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

Side by Side Diff: include.postload.js

Issue 5474511327592448: Issue 703 - Make sure that z-index of the "Block Element" dialog is the highest in the document (Closed)
Patch Set: Created June 24, 2014, 9:05 a.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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 clickHide_deactivate(); 111 clickHide_deactivate();
112 currentElement = savedElement; 112 currentElement = savedElement;
113 } 113 }
114 114
115 clickHide_filters = filters; 115 clickHide_filters = filters;
116 116
117 clickHideFiltersDialog = document.createElement("iframe"); 117 clickHideFiltersDialog = document.createElement("iframe");
118 clickHideFiltersDialog.src = ext.getURL("block.html"); 118 clickHideFiltersDialog.src = ext.getURL("block.html");
119 clickHideFiltersDialog.setAttribute("style", "position: fixed !important; visi bility: hidden; display: block !important; border: 0px !important;"); 119 clickHideFiltersDialog.setAttribute("style", "position: fixed !important; visi bility: hidden; display: block !important; border: 0px !important;");
120 clickHideFiltersDialog.style.WebkitBoxShadow = "5px 5px 20px rgba(0,0,0,0.5)"; 120 clickHideFiltersDialog.style.WebkitBoxShadow = "5px 5px 20px rgba(0,0,0,0.5)";
121 clickHideFiltersDialog.style.zIndex = 99999; 121
122 // make sure that the dialog is above everything else, by setting
123 // the z-index to the highest z-index used in the document plus 1
124 clickHideFiltersDialog.style.zIndex = Math.max.apply(null, Array.prototype.map .call(
125 document.all, function(el)
126 {
127 return parseInt(getComputedStyle(el).zIndex) || 0;
128 }
129 )) + 1;
Wladimir Palant 2014/06/24 10:31:39 Please just use the maximum possible value for zIn
Sebastian Noack 2014/06/24 13:07:52 Done.
122 130
123 // Position in upper-left all the time 131 // Position in upper-left all the time
124 clickHideFiltersDialog.style.left = "50px"; 132 clickHideFiltersDialog.style.left = "50px";
125 clickHideFiltersDialog.style.top = "50px"; 133 clickHideFiltersDialog.style.top = "50px";
126 134
127 // Make dialog partly transparent when mouse isn't over it so user has a bette r 135 // Make dialog partly transparent when mouse isn't over it so user has a bette r
128 // view of what's going to be blocked 136 // view of what's going to be blocked
129 clickHideFiltersDialog.onmouseout = function() 137 clickHideFiltersDialog.onmouseout = function()
130 { 138 {
131 if (clickHideFiltersDialog) 139 if (clickHideFiltersDialog)
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 585
578 clickHide_deactivate(); 586 clickHide_deactivate();
579 } 587 }
580 break; 588 break;
581 default: 589 default:
582 sendResponse({}); 590 sendResponse({});
583 break; 591 break;
584 } 592 }
585 }); 593 });
586 } 594 }
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