Title: [234922] trunk/Source/WebCore
Revision
234922
Author
za...@apple.com
Date
2018-08-16 07:28:34 -0700 (Thu, 16 Aug 2018)

Log Message

[LFC] Bail out of subtree verification when trees are out of sync.
https://bugs.webkit.org/show_bug.cgi?id=188633

Reviewed by Antti Koivisto.

There's no point of trying to match geometry when subtrees are out of sync.
They get out of sync when the render tree has unsupported boxes (see LayoutTreeBuilder).

* layout/Verification.cpp:
(WebCore::Layout::verifyAndOutputSubtree):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234921 => 234922)


--- trunk/Source/WebCore/ChangeLog	2018-08-16 14:23:35 UTC (rev 234921)
+++ trunk/Source/WebCore/ChangeLog	2018-08-16 14:28:34 UTC (rev 234922)
@@ -1,3 +1,16 @@
+2018-08-16  Zalan Bujtas  <za...@apple.com>
+
+        [LFC] Bail out of subtree verification when trees are out of sync.
+        https://bugs.webkit.org/show_bug.cgi?id=188633
+
+        Reviewed by Antti Koivisto.
+
+        There's no point of trying to match geometry when subtrees are out of sync.
+        They get out of sync when the render tree has unsupported boxes (see LayoutTreeBuilder).
+
+        * layout/Verification.cpp:
+        (WebCore::Layout::verifyAndOutputSubtree):
+
 2018-08-16  Antti Koivisto  <an...@apple.com>
 
         Use OptionSet for ActivityState::Flags

Modified: trunk/Source/WebCore/layout/Verification.cpp (234921 => 234922)


--- trunk/Source/WebCore/layout/Verification.cpp	2018-08-16 14:23:35 UTC (rev 234921)
+++ trunk/Source/WebCore/layout/Verification.cpp	2018-08-16 14:28:34 UTC (rev 234922)
@@ -170,6 +170,12 @@
             continue;
         }
 
+        if (!childBox) {
+            stream  << "Trees are out of sync!";
+            stream.nextLine();
+            return true;
+        }
+
         if (is<RenderBlockFlow>(*childRenderer) && childBox->establishesInlineFormattingContext()) {
             ASSERT(childRenderer->childrenInline());
             auto& blockFlow = downcast<RenderBlockFlow>(*childRenderer);
@@ -183,6 +189,7 @@
         childBox = childBox->nextSibling();
         childRenderer = childRenderer->nextSibling();
     }
+
     return mismtachingGeometry;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to