Title: [255002] branches/safari-609-branch
- Revision
- 255002
- Author
- [email protected]
- Date
- 2020-01-23 13:43:10 -0800 (Thu, 23 Jan 2020)
Log Message
Cherry-pick r254484. rdar://problem/58606285
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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-609-branch/LayoutTests/ChangeLog (255001 => 255002)
--- branches/safari-609-branch/LayoutTests/ChangeLog 2020-01-23 21:43:06 UTC (rev 255001)
+++ branches/safari-609-branch/LayoutTests/ChangeLog 2020-01-23 21:43:10 UTC (rev 255002)
@@ -1,5 +1,43 @@
2020-01-23 Russell Epstein <[email protected]>
+ Cherry-pick r254484. rdar://problem/58606285
+
+ 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.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-23 Russell Epstein <[email protected]>
+
Cherry-pick r254408. rdar://problem/58606270
[WebCore] Fix crash in module loader due to change in fragment reservation
Added: branches/safari-609-branch/LayoutTests/fast/ruby/before-child-is-block-after-expected.txt (0 => 255002)
--- branches/safari-609-branch/LayoutTests/fast/ruby/before-child-is-block-after-expected.txt (rev 0)
+++ branches/safari-609-branch/LayoutTests/fast/ruby/before-child-is-block-after-expected.txt 2020-01-23 21:43:10 UTC (rev 255002)
@@ -0,0 +1 @@
+Passed if this test did not crash or assert.
Added: branches/safari-609-branch/LayoutTests/fast/ruby/before-child-is-block-after.html (0 => 255002)
--- branches/safari-609-branch/LayoutTests/fast/ruby/before-child-is-block-after.html (rev 0)
+++ branches/safari-609-branch/LayoutTests/fast/ruby/before-child-is-block-after.html 2020-01-23 21:43:10 UTC (rev 255002)
@@ -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: branches/safari-609-branch/Source/WebCore/ChangeLog (255001 => 255002)
--- branches/safari-609-branch/Source/WebCore/ChangeLog 2020-01-23 21:43:06 UTC (rev 255001)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog 2020-01-23 21:43:10 UTC (rev 255002)
@@ -1,5 +1,48 @@
2020-01-23 Russell Epstein <[email protected]>
+ Cherry-pick r254484. rdar://problem/58606285
+
+ 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.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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):
+
+2020-01-23 Russell Epstein <[email protected]>
+
Cherry-pick r254408. rdar://problem/58606270
[WebCore] Fix crash in module loader due to change in fragment reservation
Modified: branches/safari-609-branch/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (255001 => 255002)
--- branches/safari-609-branch/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp 2020-01-23 21:43:06 UTC (rev 255001)
+++ branches/safari-609-branch/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp 2020-01-23 21:43:10 UTC (rev 255002)
@@ -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