Some style changes cause tatechuyoko to be drawn off center
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Nov 2015 19:40:39 +0000 (19:40 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Nov 2015 19:40:39 +0000 (19:40 +0000)
commit727530fbfb47669ee0e5bc10e44fedbf7a555f6f
treee43ed9409bf2b98c1e677e45ffc5b68d7a9d269f
parent07000aa7f5adba3c9e1507a61a9542bec3fca5ce
Some style changes cause tatechuyoko to be drawn off center
https://bugs.webkit.org/show_bug.cgi?id=150986
<rdar://problem/20748013>

Reviewed by Darin Adler.

Source/WebCore:

Layouts should be idempotent. In particular, during layout, an element should not
rely on a previous call to styleDidChange() with a sufficiently high StyleDifference.
RenderCombineText was assuming that, if a layout occurs, a previous call to
styleDidChange() would have reset the renderedText. However, an ancestor element might
cause the RenderCombineText to re-combine when it is already combined. Therefore, the
recombination should fully uncombine before recombining.

Test: fast/text/text-combine-style-change-extra-layout.html

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText): Fully uncombine before recombining.

LayoutTests:

* fast/text/text-combine-style-change-extra-layout-expected.html: Added.
* fast/text/text-combine-style-change-extra-layout.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/text-combine-style-change-extra-layout-expected.html [new file with mode: 0644]
LayoutTests/fast/text/text-combine-style-change-extra-layout.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderCombineText.cpp