Title: [244003] releases/WebKitGTK/webkit-2.24
- Revision
- 244003
- Author
- [email protected]
- Date
- 2019-04-08 05:38:48 -0700 (Mon, 08 Apr 2019)
Log Message
Merge r242919 - Use RenderBox::previousSiblingBox/nextSiblingBox in RenderMultiColumnFlow
https://bugs.webkit.org/show_bug.cgi?id=195701
<rdar://problem/48448658>
Reviewed by Simon Fraser.
Source/WebCore:
It's safer to use existing RenderBox functions to get sibling boxes.
Test: fast/ruby/crash-when-paginated-ruby.html
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlow::previousColumnSetOrSpannerSiblingOf):
LayoutTests:
* fast/ruby/crash-when-paginated-ruby-expected.txt: Added.
* fast/ruby/crash-when-paginated-ruby.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog (244002 => 244003)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-04-08 12:38:43 UTC (rev 244002)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-04-08 12:38:48 UTC (rev 244003)
@@ -1,3 +1,14 @@
+2019-03-13 Zalan Bujtas <[email protected]>
+
+ Use RenderBox::previousSiblingBox/nextSiblingBox in RenderMultiColumnFlow
+ https://bugs.webkit.org/show_bug.cgi?id=195701
+ <rdar://problem/48448658>
+
+ Reviewed by Simon Fraser.
+
+ * fast/ruby/crash-when-paginated-ruby-expected.txt: Added.
+ * fast/ruby/crash-when-paginated-ruby.html: Added.
+
2019-03-13 Wenson Hsieh <[email protected]>
Fix an edge case where HTMLFormElement::removeFormElement is invoked twice with the same element
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/fast/ruby/crash-when-paginated-ruby-expected.txt (0 => 244003)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/fast/ruby/crash-when-paginated-ruby-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/fast/ruby/crash-when-paginated-ruby-expected.txt 2019-04-08 12:38:48 UTC (rev 244003)
@@ -0,0 +1 @@
+click me Pass if no crash.
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/fast/ruby/crash-when-paginated-ruby.html (0 => 244003)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/fast/ruby/crash-when-paginated-ruby.html (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/fast/ruby/crash-when-paginated-ruby.html 2019-04-08 12:38:48 UTC (rev 244003)
@@ -0,0 +1,16 @@
+<style>
+ruby {
+ float:left;
+ column-count: 2;
+}
+</style>
+<ruby id=ruby>content</ruby>
+Pass if no crash.
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+document.body.offsetHeight;
+ruby.innerHTML="<button>click me</button>";
+styleSheet = document.styleSheets[0];
+styleSheet.addRule('#ruby::before','content: counter(coun2)');
+</script>
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/platform/mac/TestExpectations (244002 => 244003)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/platform/mac/TestExpectations 2019-04-08 12:38:43 UTC (rev 244002)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/platform/mac/TestExpectations 2019-04-08 12:38:48 UTC (rev 244003)
@@ -149,6 +149,7 @@
# Asserts in debug.
[ Debug ] fast/images/large-size-image-crash.html [ Skip ]
+[ Debug ] fast/ruby/crash-when-paginated-ruby.html [ Skip ]
webkit.org/b/188061 [ Debug ] webgl/2.0.0/conformance2/glsl3/compound-assignment-type-combination.html [ Slow ]
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (244002 => 244003)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-04-08 12:38:43 UTC (rev 244002)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-04-08 12:38:48 UTC (rev 244003)
@@ -1,3 +1,19 @@
+2019-03-13 Zalan Bujtas <[email protected]>
+
+ Use RenderBox::previousSiblingBox/nextSiblingBox in RenderMultiColumnFlow
+ https://bugs.webkit.org/show_bug.cgi?id=195701
+ <rdar://problem/48448658>
+
+ Reviewed by Simon Fraser.
+
+ It's safer to use existing RenderBox functions to get sibling boxes.
+
+ Test: fast/ruby/crash-when-paginated-ruby.html
+
+ * rendering/RenderMultiColumnFlow.cpp:
+ (WebCore::RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf):
+ (WebCore::RenderMultiColumnFlow::previousColumnSetOrSpannerSiblingOf):
+
2019-03-13 Wenson Hsieh <[email protected]>
Fix an edge case where HTMLFormElement::removeFormElement is invoked twice with the same element
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/RenderMultiColumnFlow.cpp (244002 => 244003)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/RenderMultiColumnFlow.cpp 2019-04-08 12:38:43 UTC (rev 244002)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/RenderMultiColumnFlow.cpp 2019-04-08 12:38:48 UTC (rev 244003)
@@ -93,11 +93,7 @@
RenderBox* RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf(const RenderBox* child)
{
- if (!child)
- return nullptr;
- if (RenderObject* sibling = child->nextSibling())
- return downcast<RenderBox>(sibling);
- return nullptr;
+ return child ? child->nextSiblingBox() : nullptr;
}
RenderBox* RenderMultiColumnFlow::previousColumnSetOrSpannerSiblingOf(const RenderBox* child)
@@ -104,10 +100,9 @@
{
if (!child)
return nullptr;
- if (RenderObject* sibling = child->previousSibling()) {
- if (is<RenderFragmentedFlow>(*sibling))
- return nullptr;
- return downcast<RenderBox>(sibling);
+ if (auto* sibling = child->previousSiblingBox()) {
+ if (!is<RenderFragmentedFlow>(*sibling))
+ return sibling;
}
return nullptr;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes