Title: [153683] branches/safari-537-branch/Source/WebCore
Revision
153683
Author
[email protected]
Date
2013-08-02 17:51:14 -0700 (Fri, 02 Aug 2013)

Log Message

Merged r153672.  <rdar://problem/14631785>

Modified Paths

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153682 => 153683)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-03 00:24:11 UTC (rev 153682)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-03 00:51:14 UTC (rev 153683)
@@ -1,5 +1,29 @@
 2013-08-02  Lucas Forschler  <[email protected]>
 
+        Merge r153672
+
+    2013-08-02  Andreas Kling  <[email protected]>
+
+            Removing a <link> element with an empty stylesheet shouldn't trigger style recalc.
+            <http://webkit.org/b/119442>
+            <rdar://problem/14631785>
+
+            Reviewed by Antti Koivisto.
+
+            Let Document decide whether or not to do a style recalc after a <link> element is removed.
+            This avoids unnecessary work when removing a <link> that refers to an empty style sheet.
+
+            Some Facebook pages have a <link rel="stylesheet" href="" that gets
+            removed during the initial page load, causing style recalc.
+
+            * html/HTMLLinkElement.cpp:
+            (WebCore::HTMLLinkElement::removedFrom):
+
+                Use DeferRecalcStyleIfNeeded. Since the style sheet is being removed, it will either
+                cause a recalc (because it's no longer in the set of active sheets) or do nothing.
+
+2013-08-02  Lucas Forschler  <[email protected]>
+
         Merge r153632
 
     2013-07-31  Ryosuke Niwa  <[email protected]>

Modified: branches/safari-537-branch/Source/WebCore/html/HTMLLinkElement.cpp (153682 => 153683)


--- branches/safari-537-branch/Source/WebCore/html/HTMLLinkElement.cpp	2013-08-03 00:24:11 UTC (rev 153682)
+++ branches/safari-537-branch/Source/WebCore/html/HTMLLinkElement.cpp	2013-08-03 00:51:14 UTC (rev 153683)
@@ -280,7 +280,7 @@
         removePendingSheet(RemovePendingSheetNotifyLater);
 
     if (document()->renderer())
-        document()->styleResolverChanged(DeferRecalcStyle);
+        document()->styleResolverChanged(DeferRecalcStyleIfNeeded);
 }
 
 void HTMLLinkElement::finishParsingChildren()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to