REGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Jul 2015 20:31:25 +0000 (20:31 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Jul 2015 20:31:25 +0000 (20:31 +0000)
commit5df16ab5bed75386408233f88e67fd8dfd4363f0
treed43f22bd87148876d669eb4051ee43684aa42484
parenta422589ca37be987f7009076355737e85a6bc45b
REGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted Japanese text
https://bugs.webkit.org/show_bug.cgi?id=146492

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by WebKit serializing the used line-height size (e.g. 18px) in the copied content
instead of string "normal" and removeStyleFromRulesAndContext failing to strip it down when text with
a font that influences the line height got pasted. This is because the used value of line-height
property of the context and the pasted content doesn't match when the context doesn't use the same font.

Fixed the bug by not considering line-height as a list of editing properties we try to preserve. This is
fine because we don't provide editing operations to directly manipulate line-height.

Test: editing/pasteboard/cjk-line-height.html

* editing/EditingStyle.cpp:
(WebCore::editingProperties): Removed CSSPropertyLineHeight.

LayoutTests:

Added a regression test. Also reverted the bad rebaseline in r179168:
http://trac.webkit.org/changeset/179168/trunk/LayoutTests/editing/pasteboard/simplfiying-markup-should-not-strip-content-expected.txt

* editing/pasteboard/cjk-line-height-expected.txt: Added.
* editing/pasteboard/cjk-line-height.html: Added.
* editing/pasteboard/simplfiying-markup-should-not-strip-content-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/cjk-line-height-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/cjk-line-height.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/simplfiying-markup-should-not-strip-content-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/editing/EditingStyle.cpp