Title: [185756] trunk
- Revision
- 185756
- Author
- [email protected]
- Date
- 2015-06-19 11:18:05 -0700 (Fri, 19 Jun 2015)
Log Message
RenderRubyText requires RenderRubyRun parent.
https://bugs.webkit.org/show_bug.cgi?id=146148
rdar://problem/21423319
Reviewed by Simon Fraser.
RenderRubyText expects its parent to be RenderRubyRun and since a
a non-block <rt> requires anonymous wrapper, we should check whether
the display type is actually block.
Source/WebCore:
Test: fast/ruby/crash-when-ruby-rt-is-non-block.html
* html/RubyTextElement.cpp:
(WebCore::RubyTextElement::createElementRenderer):
LayoutTests:
* fast/ruby/crash-when-ruby-rt-is-non-block-expected.txt: Added.
* fast/ruby/crash-when-ruby-rt-is-non-block.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (185755 => 185756)
--- trunk/LayoutTests/ChangeLog 2015-06-19 17:46:02 UTC (rev 185755)
+++ trunk/LayoutTests/ChangeLog 2015-06-19 18:18:05 UTC (rev 185756)
@@ -1,3 +1,18 @@
+2015-06-19 Zalan Bujtas <[email protected]>
+
+ RenderRubyText requires RenderRubyRun parent.
+ https://bugs.webkit.org/show_bug.cgi?id=146148
+ rdar://problem/21423319
+
+ Reviewed by Simon Fraser.
+
+ RenderRubyText expects its parent to be RenderRubyRun and since a
+ a non-block <rt> requires anonymous wrapper, we should check whether
+ the display type is actually block.
+
+ * fast/ruby/crash-when-ruby-rt-is-non-block-expected.txt: Added.
+ * fast/ruby/crash-when-ruby-rt-is-non-block.html: Added.
+
2015-06-19 Csaba Osztrogonác <[email protected]>
Remove unnecessary svn:executable flags
Added: trunk/LayoutTests/fast/ruby/crash-when-ruby-rt-is-non-block-expected.txt (0 => 185756)
--- trunk/LayoutTests/fast/ruby/crash-when-ruby-rt-is-non-block-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/ruby/crash-when-ruby-rt-is-non-block-expected.txt 2015-06-19 18:18:05 UTC (rev 185756)
@@ -0,0 +1,2 @@
+PASS if no crash or assert in debug.
+foo barfoobar
Added: trunk/LayoutTests/fast/ruby/crash-when-ruby-rt-is-non-block.html (0 => 185756)
--- trunk/LayoutTests/fast/ruby/crash-when-ruby-rt-is-non-block.html (rev 0)
+++ trunk/LayoutTests/fast/ruby/crash-when-ruby-rt-is-non-block.html 2015-06-19 18:18:05 UTC (rev 185756)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we can handle non-block ruby text.</title>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+ <ruby>PASS if no crash or assert in debug.<br>
+ <rt style="display: inline">foo</rt></ruby>
+ <ruby>bar<rt style="display: inline-block">foobar</rt></ruby>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (185755 => 185756)
--- trunk/Source/WebCore/ChangeLog 2015-06-19 17:46:02 UTC (rev 185755)
+++ trunk/Source/WebCore/ChangeLog 2015-06-19 18:18:05 UTC (rev 185756)
@@ -1,3 +1,20 @@
+2015-06-19 Zalan Bujtas <[email protected]>
+
+ RenderRubyText requires RenderRubyRun parent.
+ https://bugs.webkit.org/show_bug.cgi?id=146148
+ rdar://problem/21423319
+
+ Reviewed by Simon Fraser.
+
+ RenderRubyText expects its parent to be RenderRubyRun and since a
+ a non-block <rt> requires anonymous wrapper, we should check whether
+ the display type is actually block.
+
+ Test: fast/ruby/crash-when-ruby-rt-is-non-block.html
+
+ * html/RubyTextElement.cpp:
+ (WebCore::RubyTextElement::createElementRenderer):
+
2015-06-19 Jeremy Jones <[email protected]>
cancelPreviousPerformRequestsWithTarget for -resolveBounds in wrong class.
Modified: trunk/Source/WebCore/html/RubyTextElement.cpp (185755 => 185756)
--- trunk/Source/WebCore/html/RubyTextElement.cpp 2015-06-19 17:46:02 UTC (rev 185755)
+++ trunk/Source/WebCore/html/RubyTextElement.cpp 2015-06-19 18:18:05 UTC (rev 185756)
@@ -48,7 +48,7 @@
RenderPtr<RenderElement> RubyTextElement::createElementRenderer(Ref<RenderStyle>&& style, const RenderTreePosition& insertionPosition)
{
// RenderRubyText requires its parent to be RenderRubyRun.
- if (isRuby(insertionPosition.parent()))
+ if (isRuby(insertionPosition.parent()) && style.get().display() == BLOCK)
return createRenderer<RenderRubyText>(*this, WTF::move(style));
return HTMLElement::createElementRenderer(WTF::move(style), insertionPosition);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes