Emphasis mark is printed after inline-block with justify
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 23:52:00 +0000 (23:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 23:52:00 +0000 (23:52 +0000)
commit85f29366ec9f1698829b7d8ea565f631bd68f437
treef07febdaba52517e84141e1ee8b1ca17c490f923
parent66ba4a5ac110637b640900dc98b2d726977ea765
Emphasis mark is printed after inline-block with justify
https://bugs.webkit.org/show_bug.cgi?id=104631

Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2012-12-14
Reviewed by Dean Jackson.

Source/WebCore:

Do not print an emphasis mark after an inline-block when justified.

If an inline-block is expanded, it has a space appended to it.
This space should not have any emphasis marks drawn.

Test: fast/inline/justify-emphasis-inline-box.html

* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::zeroWidthSpaceGlyph): Add getter method to get zero width space glyph.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal): We use zero width space for the extra space not to draw emphasis marks.

LayoutTests:

Test that emphasis marks are not drawn incorrectly in justified text with inline boxes.

* fast/inline/justify-emphasis-inline-box.html: Added.
* platform/chromium-mac/fast/inline/justify-emphasis-inline-box-expected.png: Added.
* platform/chromium-mac/fast/inline/justify-emphasis-inline-box-expected.txt: Added.
* platform/mac/fast/inline/justify-emphasis-inline-box-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/inline/justify-emphasis-inline-box.html [new file with mode: 0644]
LayoutTests/platform/chromium-mac/fast/inline/justify-emphasis-inline-box-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-mac/fast/inline/justify-emphasis-inline-box-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/mac/fast/inline/justify-emphasis-inline-box-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/SimpleFontData.h
Source/WebCore/platform/graphics/WidthIterator.cpp