Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: chrome/content/ui/sidebar.js

Issue 29334565: Issue 1950 - Fixed: Filter tooltip not shown for long filters (Closed)
Left Patch Set: Created Jan. 26, 2016, 4:11 p.m.
Right Patch Set: Created Jan. 29, 2016, 6:26 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « chrome/content/ui/filters-filteractions.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 // Fills a box with text splitting it up into multiple lines if necessary 245 // Fills a box with text splitting it up into multiple lines if necessary
246 function setMultilineContent(box, text, noRemove) 246 function setMultilineContent(box, text, noRemove)
247 { 247 {
248 if (!noRemove) 248 if (!noRemove)
249 while (box.firstChild) 249 while (box.firstChild)
250 box.removeChild(box.firstChild); 250 box.removeChild(box.firstChild);
251 251
252 let lines = text.match(/.{1,80}/g); 252 let lines = text.match(/.{1,80}/g);
253 if (lines.length > 6) 253 if (lines.length > 7)
Erik 2016/01/29 04:29:31 Same here, I think this should be `if (lines.leng
Thomas Greiner 2016/01/29 18:28:56 Done.
254 { 254 {
255 // Text is too long to display in full so we cut out the middle part 255 // Text is too long to display in full so we cut out the middle part
256 lines = lines.slice(0,3).concat("\u2026", lines.slice(-3)); 256 lines = lines.slice(0,3).concat("\u2026", lines.slice(-3));
257 } 257 }
258 258
259 for (let line of lines) 259 for (let line of lines)
260 { 260 {
261 let description = document.createElement("description"); 261 let description = document.createElement("description");
262 description.setAttribute("value", line); 262 description.setAttribute("value", line);
263 box.appendChild(description); 263 box.appendChild(description);
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 return {tooltip: this.itemsDummyTooltip}; 1316 return {tooltip: this.itemsDummyTooltip};
1317 }, 1317 },
1318 1318
1319 invalidateItem: function(item) 1319 invalidateItem: function(item)
1320 { 1320 {
1321 let row = this.data.indexOf(item); 1321 let row = this.data.indexOf(item);
1322 if (row >= 0) 1322 if (row >= 0)
1323 this.boxObject.invalidateRow(row); 1323 this.boxObject.invalidateRow(row);
1324 } 1324 }
1325 } 1325 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld