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

Unified Diff: include.preload.js

Issue 29352610: Issue 4265 - Adblock Plus 0.9.5.0 hangs apps.facebook.com (backport Issue 4104) (Closed)
Patch Set: Created Sept. 10, 2016, 12:40 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -150,16 +150,21 @@
{
function collapseElement()
{
+ var propertyName = "display";
+ var propertyValue = "none";
if (element.localName == "frame")
- element.style.setProperty("visibility", "hidden", "important");
- else
- element.style.setProperty("display", "none", "important");
+ {
+ propertyName = "visibility";
+ propertyValue = "hidden";
+ }
+ if (element.style.getPropertyValue(propertyName) != propertyValue ||
+ element.style.getPropertyPriority(propertyName) != "important")
+ element.style.setProperty(propertyName, propertyValue, "important");
}
- if (collapse && !element._collapsed)
+ if (collapse)
{
collapseElement();
- element._collapsed = true;
if (MutationObserver)
new MutationObserver(collapseElement).observe(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld