Title: [251799] trunk
Revision
251799
Author
[email protected]
Date
2019-10-30 13:49:15 -0700 (Wed, 30 Oct 2019)

Log Message

ASSERTION FAILED: !object || !isRuby(object->parent()) || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == D
https://bugs.webkit.org/show_bug.cgi?id=196003
<rdar://problem/49219890>

Reviewed by Antti Koivisto.

Source/WebCore:

This test case triggered two slightly different issues.
1. It's valid to have column flows/sets as the child of the ruby renderer (isRubyChildForNormalRemoval already accepts these type of renderers).
2. When the parent finding logic comes back with the insertion point as parent candidate, we can only call the simple internal insert when the multicol context is not present (since the multicol context (sadly) mutates the insertion point).

* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::attach):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::isAnonymousRubyInlineBlock):
(WebCore::lastRubyRun):

LayoutTests:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (251798 => 251799)


--- trunk/LayoutTests/ChangeLog	2019-10-30 20:44:34 UTC (rev 251798)
+++ trunk/LayoutTests/ChangeLog	2019-10-30 20:49:15 UTC (rev 251799)
@@ -1,3 +1,13 @@
+2019-10-30  Zalan Bujtas  <[email protected]>
+
+        ASSERTION FAILED: !object || !isRuby(object->parent()) || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == D
+        https://bugs.webkit.org/show_bug.cgi?id=196003
+        <rdar://problem/49219890>
+
+        Reviewed by Antti Koivisto.
+
+        * TestExpectations:
+
 2019-10-30  Peng Liu  <[email protected]>
 
         [Picture-in-Picture Web API] Implement PictureInPictureWindow

Modified: trunk/LayoutTests/TestExpectations (251798 => 251799)


--- trunk/LayoutTests/TestExpectations	2019-10-30 20:44:34 UTC (rev 251798)
+++ trunk/LayoutTests/TestExpectations	2019-10-30 20:49:15 UTC (rev 251799)
@@ -900,7 +900,6 @@
 fast/harness/sample-fail-mismatch-reftest.html [ WontFix ImageOnlyFailure ]
 
 webkit.org/b/127697 fast/writing-mode/ruby-text-logical-left.html [ Skip ]
-webkit.org/b/196003 [ Debug ] fast/ruby/crash-when-paginated-ruby.html [ Skip ]
 
 webkit.org/b/129057 media/controls-styling-strict.html [ Pass Failure ]
 

Modified: trunk/Source/WebCore/ChangeLog (251798 => 251799)


--- trunk/Source/WebCore/ChangeLog	2019-10-30 20:44:34 UTC (rev 251798)
+++ trunk/Source/WebCore/ChangeLog	2019-10-30 20:49:15 UTC (rev 251799)
@@ -1,3 +1,21 @@
+2019-10-30  Zalan Bujtas  <[email protected]>
+
+        ASSERTION FAILED: !object || !isRuby(object->parent()) || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == D
+        https://bugs.webkit.org/show_bug.cgi?id=196003
+        <rdar://problem/49219890>
+
+        Reviewed by Antti Koivisto.
+
+        This test case triggered two slightly different issues.
+        1. It's valid to have column flows/sets as the child of the ruby renderer (isRubyChildForNormalRemoval already accepts these type of renderers).
+        2. When the parent finding logic comes back with the insertion point as parent candidate, we can only call the simple internal insert when the multicol context is not present (since the multicol context (sadly) mutates the insertion point).
+
+        * rendering/updating/RenderTreeBuilder.cpp:
+        (WebCore::RenderTreeBuilder::attach):
+        * rendering/updating/RenderTreeBuilderRuby.cpp:
+        (WebCore::isAnonymousRubyInlineBlock):
+        (WebCore::lastRubyRun):
+
 2019-10-30  Andres Gonzalez  <[email protected]>
 
         Create base class common to AccessibilityObject and AXIsolatedTreeNode.

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (251798 => 251799)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2019-10-30 20:44:34 UTC (rev 251798)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2019-10-30 20:49:15 UTC (rev 251799)
@@ -185,6 +185,11 @@
 {
     auto insertRecursiveIfNeeded = [&](RenderElement& parentCandidate) {
         if (&parent == &parentCandidate) {
+            // Parents inside multicols can't call internal attach directly.
+            if (is<RenderBlockFlow>(parent) && downcast<RenderBlockFlow>(parent).multiColumnFlow()) {
+                blockFlowBuilder().attach(downcast<RenderBlockFlow>(parent), WTFMove(child), beforeChild);
+                return;
+            }
             attachToRenderElement(parent, WTFMove(child), beforeChild);
             return;
         }

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp (251798 => 251799)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp	2019-10-30 20:44:34 UTC (rev 251798)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp	2019-10-30 20:49:15 UTC (rev 251799)
@@ -48,7 +48,9 @@
         || !isRuby(object->parent())
         || is<RenderRubyRun>(*object)
         || (object->isInline() && (object->isBeforeContent() || object->isAfterContent()))
-        || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == DisplayType::InlineBlock));
+        || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == DisplayType::InlineBlock)
+        || object->isRenderMultiColumnFlow()
+        || object->isRenderMultiColumnSet());
 
     return object
         && isRuby(object->parent())
@@ -109,7 +111,7 @@
     if (child && !is<RenderRubyRun>(*child))
         child = child->previousSibling();
     if (!is<RenderRubyRun>(child)) {
-        ASSERT(!child || child->isBeforeContent() || child == rubyBeforeBlock(ruby));
+        ASSERT(!child || child->isBeforeContent() || child == rubyBeforeBlock(ruby) || child->isRenderMultiColumnFlow() || child->isRenderMultiColumnSet());
         return nullptr;
     }
     return downcast<RenderRubyRun>(child);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to