haikuwebkit/LayoutTests/fast/ruby/ruby-punctuation-avoid-brea...

17 lines
532 B
HTML
Raw Permalink Normal View History

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
<html lang="ja">
<head>
<meta http-equiv ="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div>
<p>Japanese Line breaking rule "Kinsoku" Test Case. We should not break before or after the Ruby.
<div style="position: absolute; top: 50px; left: 3%; width: 40px;">
<ruby>直帰<rt>ちょっき</rt></ruby>
</div>
<div>
<div style="position: absolute; top: 50px; left: 200px;-webkit-writing-mode: vertical-rl; height: 40px;">
<ruby>直帰<rt>ちょっき</rt></ruby>
</div>
</body>
</html>