-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IFC][Ruby] Anonymous bases should have white-space:nowrap
https://bugs.webkit.org/show_bug.cgi?id=266635 rdar://119864996 Reviewed by Alan Baradlay. The UA stylesheet has 'white-space: nowrap' for bases https://www.w3.org/TR/css-ruby-1/#default-ua-ruby. This should also be applied to anonymous bases. The behavior matches Firefox. * LayoutTests/TestExpectations: * LayoutTests/fast/ruby/floating-ruby-text-expected.txt: * LayoutTests/fast/ruby/positioned-ruby-text-expected.txt: * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::propagateStyleToAnonymousChildren): Don't reset ruby style when propagating style changes to anonymous children. * Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp: (WebCore::createAnonymousStyleForRuby): Set 'white-space: nowrap' to anonymous base style. (WebCore::createAnonymousRendererForRuby): Factor into functions. (WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild): (WebCore::RenderTreeBuilder::Ruby::attachForStyleBasedRuby): * Source/WebCore/rendering/updating/RenderTreeBuilderRuby.h: Canonical link: https://commits.webkit.org/272285@main
- Loading branch information
Showing
7 changed files
with
59 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x46 | ||
RenderBlock {HTML} at (0,0) size 800x46 [color=#FFFFFF] | ||
RenderBody {BODY} at (8,8) size 784x30 | ||
RenderInline {RUBY} at (0,0) size 740x25 | ||
RenderInline (generated) at (0,0) size 740x25 | ||
RenderText {#text} at (0,5) size 740x25 | ||
text run at (0,5) width 740: "Attempt to create a floating ruby text element. Float is not supported for" | ||
text run at (0,20) width 670: "ruby text, which should be apparent from the resulting render tree." | ||
RenderBlock {RT} at (0,0) size 740x5 | ||
RenderText {#text} at (350,0) size 40x5 | ||
text run at (350,0) width 40: "rubytext" | ||
layer at (0,0) size 1428x585 | ||
RenderView at (0,0) size 800x585 | ||
layer at (0,0) size 800x31 | ||
RenderBlock {HTML} at (0,0) size 800x31 [color=#FFFFFF] | ||
RenderBody {BODY} at (8,8) size 784x15 | ||
RenderInline {RUBY} at (0,0) size 1420x10 | ||
RenderInline (generated) at (0,0) size 1420x10 | ||
RenderText {#text} at (0,5) size 1420x10 | ||
text run at (0,5) width 1420: "Attempt to create a floating ruby text element. Float is not supported for ruby text, which should be apparent from the resulting render tree." | ||
RenderBlock {RT} at (0,0) size 1420x5 | ||
RenderText {#text} at (690,0) size 40x5 | ||
text run at (690,0) width 40: "rubytext" | ||
RenderText {#text} at (0,0) size 0x0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x61 | ||
RenderBlock {HTML} at (0,0) size 800x61 | ||
RenderBody {BODY} at (8,8) size 784x45 | ||
RenderInline {RUBY} at (0,0) size 760x40 | ||
RenderInline (generated) at (0,0) size 760x40 | ||
RenderText {#text} at (0,5) size 760x40 | ||
text run at (0,5) width 760: "Attempt to create a positioned ruby text element. Non-static position is not" | ||
text run at (0,20) width 750: "supported for ruby text, which should be apparent from the resulting render" | ||
text run at (0,35) width 50: "tree." | ||
RenderBlock {RT} at (0,0) size 760x5 | ||
RenderText {#text} at (360,0) size 40x5 | ||
text run at (360,0) width 40: "rubytext" | ||
layer at (0,0) size 1588x585 | ||
RenderView at (0,0) size 800x585 | ||
layer at (0,0) size 800x31 | ||
RenderBlock {HTML} at (0,0) size 800x31 | ||
RenderBody {BODY} at (8,8) size 784x15 | ||
RenderInline {RUBY} at (0,0) size 1580x10 | ||
RenderInline (generated) at (0,0) size 1580x10 | ||
RenderText {#text} at (0,5) size 1580x10 | ||
text run at (0,5) width 1580: "Attempt to create a positioned ruby text element. Non-static position is not supported for ruby text, which should be apparent from the resulting render tree." | ||
RenderBlock {RT} at (0,0) size 1580x5 | ||
RenderText {#text} at (770,0) size 40x5 | ||
text run at (770,0) width 40: "rubytext" | ||
RenderText {#text} at (0,0) size 0x0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters