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

Delta Between Two Patch Sets: lib/filterComposer.js

Issue 29901596: Issue 6493 - Ensure Firefox draws the "Block element" popup window (Closed)
Left Patch Set: Avoid hardcoding the width again Created Oct. 8, 2018, 2:48 p.m.
Right Patch Set: Only resize for Firefox users, but don't worry about the 2px Created Oct. 9, 2018, 12:15 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 | « no previous file | 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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 }).then(response => 185 }).then(response =>
186 { 186 {
187 // Sometimes sendMessage incorrectly reports a success on Firefox, so 187 // Sometimes sendMessage incorrectly reports a success on Firefox, so
188 // we must check the response too. 188 // we must check the response too.
189 if (!response) 189 if (!response)
190 throw new Error(); 190 throw new Error();
191 191
192 // Sometimes Firefox doesn't draw the window's contents initially, so we 192 // Sometimes Firefox doesn't draw the window's contents initially, so we
193 // resize the window slightly as a workaround. 193 // resize the window slightly as a workaround.
194 // https://issues.adblockplus.org/ticket/6493 194 // https://issues.adblockplus.org/ticket/6493
195 browser.windows.update(window.id, {width: window.width + 2}); 195 if (info.application == "firefox")
Sebastian Noack 2018/10/08 15:11:53 Still the window ends up 2 pixels larger as it mea
kzar 2018/10/08 15:58:28 Well, I guess so, but I really don't think that ma
Sebastian Noack 2018/10/08 16:07:22 I think this workaround should not change the effe
kzar 2018/10/08 17:23:15 Done.
196 browser.windows.update(window.id, {width: window.width + 2});
196 }).catch(e => 197 }).catch(e =>
197 { 198 {
198 // Firefox sometimes sets the status for a window to "complete" before 199 // Firefox sometimes sets the status for a window to "complete" before
199 // it is ready to receive messages[1]. As a workaround we'll try again a 200 // it is ready to receive messages[1]. As a workaround we'll try again a
200 // few times with a second delay. 201 // few times with a second delay.
201 // [1] - https://bugzilla.mozilla.org/show_bug.cgi?id=1418655 202 // [1] - https://bugzilla.mozilla.org/show_bug.cgi?id=1418655
202 setTimeout(doInit, 100); 203 setTimeout(doInit, 100);
203 }); 204 });
204 }; 205 };
205 if (window.tabs[0].status != "complete") 206 if (window.tabs[0].status != "complete")
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 port.on("composer.isPageReady", (message, sender) => 364 port.on("composer.isPageReady", (message, sender) =>
364 { 365 {
365 return readyActivePages.has(new ext.Page({id: message.pageId})); 366 return readyActivePages.has(new ext.Page({id: message.pageId}));
366 }); 367 });
367 368
368 port.on("composer.ready", (message, sender) => 369 port.on("composer.ready", (message, sender) =>
369 { 370 {
370 readyActivePages.set(sender.page, !checkWhitelisted(sender.page)); 371 readyActivePages.set(sender.page, !checkWhitelisted(sender.page));
371 updateContextMenu(sender.page); 372 updateContextMenu(sender.page);
372 }); 373 });
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld