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

Side by Side Diff: composer.postload.js

Issue 29365526: Issue 4603 - Prevent element hiding filters hiding composer overlays (Closed)
Patch Set: Created Nov. 28, 2016, 1:39 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if (style.position == "fixed") 139 if (style.position == "fixed")
140 { 140 {
141 position = "fixed"; 141 position = "fixed";
142 offsetX = offsetY = 0; 142 offsetX = offsetY = 0;
143 } 143 }
144 } 144 }
145 145
146 let overlay = document.createElement("div"); 146 let overlay = document.createElement("div");
147 overlay.prisoner = element; 147 overlay.prisoner = element;
148 overlay.className = "__adblockplus__overlay"; 148 overlay.className = "__adblockplus__overlay";
149 overlay.setAttribute("style", "opacity:0.4; display:inline-box; " + 149 overlay.setAttribute("style",
150 "overflow:hidden; box-sizing:border-box;"); 150 "opacity:0.4; display:inline-block !important; " +
151 "overflow:hidden; box-sizing:border-box;");
151 let rect = element.getBoundingClientRect(); 152 let rect = element.getBoundingClientRect();
152 overlay.style.width = rect.width + "px"; 153 overlay.style.width = rect.width + "px";
153 overlay.style.height = rect.height + "px"; 154 overlay.style.height = rect.height + "px";
154 overlay.style.left = (rect.left + offsetX) + "px"; 155 overlay.style.left = (rect.left + offsetX) + "px";
155 overlay.style.top = (rect.top + offsetY) + "px"; 156 overlay.style.top = (rect.top + offsetY) + "px";
156 overlay.style.position = position; 157 overlay.style.position = position;
157 overlay.style.zIndex = 0x7FFFFFFE; 158 overlay.style.zIndex = 0x7FFFFFFE;
158 159
159 document.documentElement.appendChild(overlay); 160 document.documentElement.appendChild(overlay);
160 return overlay; 161 return overlay;
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } 581 }
581 }); 582 });
582 } 583 }
583 break; 584 break;
584 } 585 }
585 }); 586 });
586 587
587 if (window == window.top) 588 if (window == window.top)
588 ext.backgroundPage.sendMessage({type: "composer.ready"}); 589 ext.backgroundPage.sendMessage({type: "composer.ready"});
589 } 590 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld