haikuwebkit/LayoutTests/fast/ruby/ruby-inline-style-not-updat...

22 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Source/WebCore: Tests: fast/ruby/ruby-block-style-not-updated-with-before-after-content.html fast/ruby/ruby-block-style-not-updated.html fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html fast/ruby/ruby-inline-style-not-updated.html fast/table/table-row-style-not-updated-with-after-content.html fast/table/table-row-style-not-updated-with-before-content.html fast/table/table-row-style-not-updated.html fast/table/table-style-not-updated.html * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: (WebCore::RenderObject::isBeforeAfterContent): * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::styleDidChange): (WebCore::RenderRubyAsBlock::styleDidChange): * rendering/RenderRuby.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleDidChange): (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::styleDidChange): (WebCore::RenderTableSection::addChild): * rendering/RenderTableSection.h: LayoutTests: None of the different color boxes should overlap. If they overlap, test fails. * fast/ruby/ruby-block-style-not-updated-expected.png: Added. * fast/ruby/ruby-block-style-not-updated-expected.txt: Added. * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.png: Added. * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: Added. * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: Added. * fast/ruby/ruby-block-style-not-updated.html: Added. * fast/ruby/ruby-inline-style-not-updated-expected.png: Added. * fast/ruby/ruby-inline-style-not-updated-expected.txt: Added. * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.png: Added. * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: Added. * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: Added. * fast/ruby/ruby-inline-style-not-updated.html: Added. * fast/table/table-row-style-not-updated-expected.png: Added. * fast/table/table-row-style-not-updated-expected.txt: Added. * fast/table/table-row-style-not-updated-with-after-content-expected.png: Added. * fast/table/table-row-style-not-updated-with-after-content-expected.txt: Added. * fast/table/table-row-style-not-updated-with-after-content.html: Added. * fast/table/table-row-style-not-updated-with-before-content-expected.png: Added. * fast/table/table-row-style-not-updated-with-before-content-expected.txt: Added. * fast/table/table-row-style-not-updated-with-before-content.html: Added. * fast/table/table-row-style-not-updated.html: Added. * fast/table/table-style-not-updated-expected.png: Added. * fast/table/table-style-not-updated-expected.txt: Added. * fast/table/table-style-not-updated.html: Added. * platform/mac/fast/css-generated-content/table-before-after-child-add-expected.txt: * platform/mac/fast/css-generated-content/table-cell-before-after-child-add-expected.txt: * platform/mac/fast/css-generated-content/table-row-before-after-child-add-expected.txt: * platform/mac/fast/css-generated-content/table-table-before-after-child-add-expected.txt: * platform/mac/fast/table/table-after-child-in-table-expected.txt: * platform/mac/fast/table/table-before-child-in-table-expected.txt: * platform/mac/fast/table/table-cell-after-child-in-table-expected.txt: * platform/mac/fast/table/table-cell-before-child-in-table-expected.txt: * platform/mac/fast/table/table-row-after-child-in-table-expected.txt: * platform/mac/fast/table/table-row-before-child-in-table-expected.txt: Canonical link: https://commits.webkit.org/83449@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-09-06 01:45:39 +00:00
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock (anonymous) at (0,0) size 784x384
Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Japanese line breaking rules need to be respected before and after Ruby. https://bugs.webkit.org/show_bug.cgi?id=91588 <rdar://problem/17306535> Reviewed by Dean Jackson. Source/WebCore: Added fast/ruby/ruby-punctuation-avoid-breaking.html. This patch has to add support for following line breaking rules at both sides of a Ruby boundary. For breaking before a Ruby, unfortunately we just hard-code the rules (and apply this hard-coding only to Ruby and not to other inline replaced elements). For breaking after a Ruby we do better. The Ruby run caches its prior characters and line layout is able to obtain them and use them when deciding whether or not to break. This means for the "after" side of a Ruby, we're able to behave the same as if no Ruby was used. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded): * rendering/RenderRubyBase.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::RenderRubyRun): (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator): (WebCore::RenderRubyRun::canBreakBefore): * rendering/RenderRubyRun.h: * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::canBreakBefore): * rendering/RenderRubyText.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleReplaced): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): LayoutTests: * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: * fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added. * fast/ruby/ruby-punctuation-avoid-breaking.html: Added. Canonical link: https://commits.webkit.org/159047@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-29 22:03:40 +00:00
RenderRuby (inline) {RUBY} at (0,0) size 640x384 [color=#0000FF]
RenderInline (generated) at (0,0) size 640x128 [color=#FFA500]
RenderText at (0,0) size 640x128
text run at (0,0) width 640: "1234 "
Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Source/WebCore: Tests: fast/ruby/ruby-block-style-not-updated-with-before-after-content.html fast/ruby/ruby-block-style-not-updated.html fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html fast/ruby/ruby-inline-style-not-updated.html fast/table/table-row-style-not-updated-with-after-content.html fast/table/table-row-style-not-updated-with-before-content.html fast/table/table-row-style-not-updated.html fast/table/table-style-not-updated.html * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: (WebCore::RenderObject::isBeforeAfterContent): * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::styleDidChange): (WebCore::RenderRubyAsBlock::styleDidChange): * rendering/RenderRuby.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleDidChange): (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::styleDidChange): (WebCore::RenderTableSection::addChild): * rendering/RenderTableSection.h: LayoutTests: None of the different color boxes should overlap. If they overlap, test fails. * fast/ruby/ruby-block-style-not-updated-expected.png: Added. * fast/ruby/ruby-block-style-not-updated-expected.txt: Added. * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.png: Added. * fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt: Added. * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html: Added. * fast/ruby/ruby-block-style-not-updated.html: Added. * fast/ruby/ruby-inline-style-not-updated-expected.png: Added. * fast/ruby/ruby-inline-style-not-updated-expected.txt: Added. * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.png: Added. * fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt: Added. * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html: Added. * fast/ruby/ruby-inline-style-not-updated.html: Added. * fast/table/table-row-style-not-updated-expected.png: Added. * fast/table/table-row-style-not-updated-expected.txt: Added. * fast/table/table-row-style-not-updated-with-after-content-expected.png: Added. * fast/table/table-row-style-not-updated-with-after-content-expected.txt: Added. * fast/table/table-row-style-not-updated-with-after-content.html: Added. * fast/table/table-row-style-not-updated-with-before-content-expected.png: Added. * fast/table/table-row-style-not-updated-with-before-content-expected.txt: Added. * fast/table/table-row-style-not-updated-with-before-content.html: Added. * fast/table/table-row-style-not-updated.html: Added. * fast/table/table-style-not-updated-expected.png: Added. * fast/table/table-style-not-updated-expected.txt: Added. * fast/table/table-style-not-updated.html: Added. * platform/mac/fast/css-generated-content/table-before-after-child-add-expected.txt: * platform/mac/fast/css-generated-content/table-cell-before-after-child-add-expected.txt: * platform/mac/fast/css-generated-content/table-row-before-after-child-add-expected.txt: * platform/mac/fast/css-generated-content/table-table-before-after-child-add-expected.txt: * platform/mac/fast/table/table-after-child-in-table-expected.txt: * platform/mac/fast/table/table-before-child-in-table-expected.txt: * platform/mac/fast/table/table-cell-after-child-in-table-expected.txt: * platform/mac/fast/table/table-cell-before-child-in-table-expected.txt: * platform/mac/fast/table/table-row-after-child-in-table-expected.txt: * platform/mac/fast/table/table-row-before-child-in-table-expected.txt: Canonical link: https://commits.webkit.org/83449@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-09-06 01:45:39 +00:00
RenderRubyRun (anonymous) at (0,128) size 512x128
RenderRubyBase (anonymous) at (0,0) size 512x128
RenderText {#text} at (0,0) size 512x128
text run at (0,0) width 512: "ABCD"
RenderInline (generated) at (0,0) size 512x128 [color=#FFFF00]
RenderText at (0,256) size 512x128
text run at (0,256) width 512: "4578"
RenderText {#text} at (0,0) size 0x0
RenderBlock {DIV} at (0,384) size 784x128 [color=#008000]
RenderText {#text} at (0,0) size 512x128
text run at (0,0) width 512: "EFGH"