Title: [254484] trunk
- Revision
- 254484
- Author
- [email protected]
- Date
- 2020-01-13 19:28:33 -0800 (Mon, 13 Jan 2020)
Log Message
RenderTreeBuilder::Block::attachIgnoringContinuation should handle inline-block anonymous containers.
https://bugs.webkit.org/show_bug.cgi?id=202913
<rdar://problem/56233694>
Reviewed by Simon Fraser.
Source/WebCore:
When the before child happens to be a block level box wrapped in an anonymous inline-block (e.g. ruby),
let's attach this new child before the anonymous inline-block wrapper instead.
Test: fast/ruby/before-child-is-block-after.html
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):
LayoutTests:
* fast/ruby/before-child-is-block-after-expected.txt: Added.
* fast/ruby/before-child-is-block-after.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (254483 => 254484)
--- trunk/LayoutTests/ChangeLog 2020-01-14 03:18:09 UTC (rev 254483)
+++ trunk/LayoutTests/ChangeLog 2020-01-14 03:28:33 UTC (rev 254484)
@@ -1,3 +1,14 @@
+2020-01-13 Zalan Bujtas <[email protected]>
+
+ RenderTreeBuilder::Block::attachIgnoringContinuation should handle inline-block anonymous containers.
+ https://bugs.webkit.org/show_bug.cgi?id=202913
+ <rdar://problem/56233694>
+
+ Reviewed by Simon Fraser.
+
+ * fast/ruby/before-child-is-block-after-expected.txt: Added.
+ * fast/ruby/before-child-is-block-after.html: Added.
+
2020-01-13 John Wilander <[email protected]>
Remove calls to testRunner.installStatisticsDidModifyDataRecordsCallback() in http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins*
Added: trunk/LayoutTests/fast/ruby/before-child-is-block-after-expected.txt (0 => 254484)
--- trunk/LayoutTests/fast/ruby/before-child-is-block-after-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/ruby/before-child-is-block-after-expected.txt 2020-01-14 03:28:33 UTC (rev 254484)
@@ -0,0 +1 @@
+Passed if this test did not crash or assert.
Added: trunk/LayoutTests/fast/ruby/before-child-is-block-after.html (0 => 254484)
--- trunk/LayoutTests/fast/ruby/before-child-is-block-after.html (rev 0)
+++ trunk/LayoutTests/fast/ruby/before-child-is-block-after.html 2020-01-14 03:28:33 UTC (rev 254484)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<style>
+ ruby::after {
+ display: block;
+ content: "";
+ }
+ ruby {
+ display: block;
+ }
+</style>
+
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+_onload_ = function() {
+ var ruby = document.createElement('ruby');
+ document.body.appendChild(ruby);
+ document.body.offsetTop;
+ ruby.appendChild(document.createTextNode('Passed if this test did not crash or assert.'));
+}
+</script>
Modified: trunk/Source/WebCore/ChangeLog (254483 => 254484)
--- trunk/Source/WebCore/ChangeLog 2020-01-14 03:18:09 UTC (rev 254483)
+++ trunk/Source/WebCore/ChangeLog 2020-01-14 03:28:33 UTC (rev 254484)
@@ -1,3 +1,19 @@
+2020-01-13 Zalan Bujtas <[email protected]>
+
+ RenderTreeBuilder::Block::attachIgnoringContinuation should handle inline-block anonymous containers.
+ https://bugs.webkit.org/show_bug.cgi?id=202913
+ <rdar://problem/56233694>
+
+ Reviewed by Simon Fraser.
+
+ When the before child happens to be a block level box wrapped in an anonymous inline-block (e.g. ruby),
+ let's attach this new child before the anonymous inline-block wrapper instead.
+
+ Test: fast/ruby/before-child-is-block-after.html
+
+ * rendering/updating/RenderTreeBuilderBlock.cpp:
+ (WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):
+
2019-12-14 Darin Adler <[email protected]>
Remove the "needsFullOrderingComparisons" feature from PODRedBlackTree
Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (254483 => 254484)
--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp 2020-01-14 03:18:09 UTC (rev 254483)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp 2020-01-14 03:28:33 UTC (rev 254484)
@@ -166,6 +166,13 @@
ASSERT(beforeChildContainer);
if (beforeChildContainer->isAnonymous()) {
+ if (beforeChildContainer->isInline() && child->isInline()) {
+ // The before child happens to be a block level box wrapped in an anonymous inline-block in an inline context (e.g. ruby).
+ // Let's attach this new child before the anonymous inline-block wrapper.
+ ASSERT(beforeChildContainer->isInlineBlockOrInlineTable());
+ m_builder.attach(parent, WTFMove(child), beforeChildContainer);
+ return;
+ }
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!beforeChildContainer->isInline());
// If the requested beforeChild is not one of our children, then this is because
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes