text-combine text retains compressed font after adding characters to it
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Mar 2011 16:27:25 +0000 (16:27 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Mar 2011 16:27:25 +0000 (16:27 +0000)
commit316d7914bf5ca250b31e8e8d9b942ef8c7cc5d67
treec92e3d3100d4fccfef2a2bc970b24de7abdb64c2
parent773b2115bd55467f1af34a61ecd000ef3c1e28d3
text-combine text retains compressed font after adding characters to it
https://bugs.webkit.org/show_bug.cgi?id=56448

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/dynamic/text-combine.html

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty): Allow styles with text-combine to be shared, since
only the clones on the RenderCombineText will be mutated.
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange): Clone the style, to avoid mutating the parent’s
style.
(WebCore::RenderCombineText::combineText): Start off with the original font; restore it if
the text cannot be combined.
* rendering/RenderCombineText.h:
(WebCore::RenderCombineText::originalFont): Added. Returns the parent’s font.

LayoutTests:

* fast/dynamic/text-combine.html: Added.
* platform/mac/fast/dynamic/text-combine-expected.checksum: Added.
* platform/mac/fast/dynamic/text-combine-expected.png: Added.
* platform/mac/fast/dynamic/text-combine-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dynamic/text-combine.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/text-combine-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/text-combine-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/text-combine-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/rendering/RenderCombineText.cpp
Source/WebCore/rendering/RenderCombineText.h