Title: [181928] trunk/Source/WebCore
Revision
181928
Author
[email protected]
Date
2015-03-24 20:52:10 -0700 (Tue, 24 Mar 2015)

Log Message

Unreviewed, rolling out r181898 and r181909.
https://bugs.webkit.org/show_bug.cgi?id=143034

Broke fast/regions/auto-size/autoheight-two-pass-layout-
complex-002.html (Requested by ap on #webkit).

Reverted changesets:

"Improve the offsetWidth/Height layout optimization"
https://bugs.webkit.org/show_bug.cgi?id=143008
http://trac.webkit.org/changeset/181898

"Disable layout dimensions optimization for RenderRegions"
https://bugs.webkit.org/show_bug.cgi?id=143017
http://trac.webkit.org/changeset/181909

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (181927 => 181928)


--- trunk/Source/WebCore/ChangeLog	2015-03-25 02:37:00 UTC (rev 181927)
+++ trunk/Source/WebCore/ChangeLog	2015-03-25 03:52:10 UTC (rev 181928)
@@ -1,3 +1,21 @@
+2015-03-24  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r181898 and r181909.
+        https://bugs.webkit.org/show_bug.cgi?id=143034
+
+        Broke fast/regions/auto-size/autoheight-two-pass-layout-
+        complex-002.html (Requested by ap on #webkit).
+
+        Reverted changesets:
+
+        "Improve the offsetWidth/Height layout optimization"
+        https://bugs.webkit.org/show_bug.cgi?id=143008
+        http://trac.webkit.org/changeset/181898
+
+        "Disable layout dimensions optimization for RenderRegions"
+        https://bugs.webkit.org/show_bug.cgi?id=143017
+        http://trac.webkit.org/changeset/181909
+
 2015-03-24  Zhuo Li  <[email protected]>
 
         Scripts running in isolated world should not subject to a page's CSP about 'eval'.

Modified: trunk/Source/WebCore/dom/Document.cpp (181927 => 181928)


--- trunk/Source/WebCore/dom/Document.cpp	2015-03-25 02:37:00 UTC (rev 181927)
+++ trunk/Source/WebCore/dom/Document.cpp	2015-03-25 03:52:10 UTC (rev 181928)
@@ -1896,7 +1896,7 @@
     return ensureStyleResolver().styleForElement(element, element->parentNode() ? element->parentNode()->computedStyle() : nullptr);
 }
 
-bool Document::updateLayoutIfDimensionsOutOfDate(Element& element, DimensionsCheck dimensionsCheck)
+bool Document::updateLayoutIfDimensionsOutOfDate(Element* element, DimensionsCheck dimensionsCheck)
 {
     ASSERT(isMainThread());
     
@@ -1920,14 +1920,14 @@
     // layout.
     bool requireFullLayout = false;
     if (HTMLFrameOwnerElement* owner = ownerElement()) {
-        if (owner->document().updateLayoutIfDimensionsOutOfDate(*owner))
+        if (owner->document().updateLayoutIfDimensionsOutOfDate(owner))
             requireFullLayout = true;
     }
     
     updateStyleIfNeeded();
-
-    RenderObject* renderer = element.renderer();
-    if (!renderer || renderer->needsLayout() || renderer->isRenderRegion()) // Needing layout or having auto height regions result in giving up.
+    
+    RenderObject* renderer = element->renderer();
+    if (!renderer || renderer->needsLayout())
         requireFullLayout = true;
 
     bool isVertical = renderer && !renderer->isHorizontalWritingMode();
@@ -1940,7 +1940,7 @@
         RenderBox* currentBox = nullptr;
         
         // Check our containing block chain. If anything in the chain needs a layout, then require a full layout.
-        for (RenderObject* currRenderer = element.renderer(); currRenderer && !currRenderer->isRenderView(); currRenderer = currRenderer->container()) {
+        for (RenderObject* currRenderer = element->renderer(); currRenderer && !currRenderer->isRenderView(); currRenderer = currRenderer->container()) {
             
             // Require the entire container chain to be boxes.
             if (!is<RenderBox>(currRenderer)) {
@@ -1969,8 +1969,9 @@
                 }
             }
             
-            if (!currentBox->isRenderBlockFlow() || currentBox->flowThreadContainingBlock() || currentBox->isWritingModeRoot()) {
-                // FIXME: For now require only block flows all the way back to the root. This limits the optimization
+            if (!currentBox->isRenderBlockFlow() || currentBox->isInline() || currentBox->isOutOfFlowPositioned() || currentBox->flowThreadContainingBlock() || currentBox->isWritingModeRoot()) {
+                // FIXME: For now require only block-level non-positioned
+                // block flows all the way back to the root. This limits the optimization
                 // for now, and we'll expand it in future patches to apply to more and more scenarios.
                 // Disallow regions/columns from having the optimization.
                 // Give up if the writing mode changes at all in the containing block chain.

Modified: trunk/Source/WebCore/dom/Document.h (181927 => 181928)


--- trunk/Source/WebCore/dom/Document.h	2015-03-25 02:37:00 UTC (rev 181927)
+++ trunk/Source/WebCore/dom/Document.h	2015-03-25 03:52:10 UTC (rev 181928)
@@ -260,7 +260,7 @@
     LimitedQuirksMode = 1 << 2
 };
 
-enum DimensionsCheck { WidthDimensionsCheck = 1 << 0, HeightDimensionsCheck = 1 << 1, AllDimensionsCheck = 1 << 2 };
+enum DimensionsCheck { WidthDimensionsCheck = 0x1, HeightDimensionsCheck = 0x2, AllDimensionsCheck = 0x3 };
 
 class Document : public ContainerNode, public TreeScope, public ScriptExecutionContext, public FontSelectorClient {
 public:
@@ -569,7 +569,7 @@
     bool renderTreeBeingDestroyed() const { return m_renderTreeBeingDestroyed; }
     bool hasLivingRenderTree() const { return renderView() && !renderTreeBeingDestroyed(); }
     
-    bool updateLayoutIfDimensionsOutOfDate(Element&, DimensionsCheck = AllDimensionsCheck);
+    bool updateLayoutIfDimensionsOutOfDate(Element*, DimensionsCheck = AllDimensionsCheck);
     
     AXObjectCache* existingAXObjectCache() const;
     WEBCORE_EXPORT AXObjectCache* axObjectCache() const;

Modified: trunk/Source/WebCore/dom/Element.cpp (181927 => 181928)


--- trunk/Source/WebCore/dom/Element.cpp	2015-03-25 02:37:00 UTC (rev 181927)
+++ trunk/Source/WebCore/dom/Element.cpp	2015-03-25 03:52:10 UTC (rev 181928)
@@ -729,7 +729,7 @@
 
 double Element::offsetWidth()
 {
-    document().updateLayoutIfDimensionsOutOfDate(*this, WidthDimensionsCheck);
+    document().updateLayoutIfDimensionsOutOfDate(this, WidthDimensionsCheck);
     if (RenderBoxModelObject* renderer = renderBoxModelObject()) {
         LayoutUnit offsetWidth = subpixelMetricsEnabled(renderer->document()) ? renderer->offsetWidth() : LayoutUnit(renderer->pixelSnappedOffsetWidth());
         return convertToNonSubpixelValueIfNeeded(adjustLayoutUnitForAbsoluteZoom(offsetWidth, *renderer).toDouble(), renderer->document());
@@ -739,7 +739,7 @@
 
 double Element::offsetHeight()
 {
-    document().updateLayoutIfDimensionsOutOfDate(*this, HeightDimensionsCheck);
+    document().updateLayoutIfDimensionsOutOfDate(this, HeightDimensionsCheck);
     if (RenderBoxModelObject* renderer = renderBoxModelObject()) {
         LayoutUnit offsetHeight = subpixelMetricsEnabled(renderer->document()) ? renderer->offsetHeight() : LayoutUnit(renderer->pixelSnappedOffsetHeight());
         return convertToNonSubpixelValueIfNeeded(adjustLayoutUnitForAbsoluteZoom(offsetHeight, *renderer).toDouble(), renderer->document());
@@ -791,7 +791,7 @@
 
 double Element::clientWidth()
 {
-    document().updateLayoutIfDimensionsOutOfDate(*this, WidthDimensionsCheck);
+    document().updateLayoutIgnorePendingStylesheets();
 
     if (!document().hasLivingRenderTree())
         return 0;
@@ -812,7 +812,8 @@
 
 double Element::clientHeight()
 {
-    document().updateLayoutIfDimensionsOutOfDate(*this, HeightDimensionsCheck);
+    document().updateLayoutIgnorePendingStylesheets();
+
     if (!document().hasLivingRenderTree())
         return 0;
     RenderView& renderView = *document().renderView();
@@ -872,7 +873,7 @@
 
 int Element::scrollWidth()
 {
-    document().updateLayoutIfDimensionsOutOfDate(*this, WidthDimensionsCheck);
+    document().updateLayoutIgnorePendingStylesheets();
     if (RenderBox* rend = renderBox())
         return adjustForAbsoluteZoom(rend->scrollWidth(), *rend);
     return 0;
@@ -880,7 +881,7 @@
 
 int Element::scrollHeight()
 {
-    document().updateLayoutIfDimensionsOutOfDate(*this, HeightDimensionsCheck);
+    document().updateLayoutIgnorePendingStylesheets();
     if (RenderBox* rend = renderBox())
         return adjustForAbsoluteZoom(rend->scrollHeight(), *rend);
     return 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to