Move InlineTextBox's text painting to it's own class
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 22:29:30 +0000 (22:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 22:29:30 +0000 (22:29 +0000)
commit0bc1937a3e0acbe4835cd63263ff7e287f90731e
tree830982c61a372665885f212ea240f313d693561c
parenta11d485534e6425f64ade8d5750c3745f6a7a48d
Move InlineTextBox's text painting to it's own class
https://bugs.webkit.org/show_bug.cgi?id=123355

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-10-29
Reviewed by Dean Jackson.

Implementing text-decoration-skip: ink requires drawing text
twice (once regularly, and once with a thick outline into a mask).
This patch pulls out the relevant text drawing code from
InlineTextBox into a new class, called TextPainter, which can be re-used
to draw text multiple times.

Because there should be no observable difference, no tests need to be updated.

* CMakeLists.txt: Adding new TextPainter class
* GNUmakefile.list.am: Adding new TextPainter class
* WebCore.vcxproj/WebCore.vcxproj: Adding new TextPainter class
* WebCore.vcxproj/WebCore.vcxproj.filters: Adding new TextPainter
class
* WebCore.xcodeproj/project.pbxproj: Adding new TextPainter class
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Moving text drawing code from
this function
* rendering/RenderingAllInOne.cpp: Adding new TextPainter class
* rendering/TextPainter.cpp: Added.
(WebCore::TextPainter::TextPainter):
(WebCore::drawTextOrEmphasisMarks):
(WebCore::paintTextWithShadows):
(WebCore::rotation):
(WebCore::TextPainter::paintText): New location for text drawing
code
(WebCore::TextPainter::paintTextInContext):
* rendering/TextPainter.h: Added.
(WebCore::SavedDrawingStateForMask::SavedDrawingStateForMask):
(WebCore::TextPainter::boxRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/RenderingAllInOne.cpp
Source/WebCore/rendering/TextPainter.cpp [new file with mode: 0644]
Source/WebCore/rendering/TextPainter.h [new file with mode: 0644]