Commit 0f96b2d71c5b8d4b0c03bbbcf47b6229870178c4
-
- Nikolas Zimmermann <zimmermann @k…e.org>
- Tue Feb 09 17:53:07 CET 2010
2010-02-09 MORITA Hajime <morrita@gmail.com>
Reviewed by Nikolas Zimmermann.
SVG selection text foreground colour does not respect user settings
https://bugs.webkit.org/show_bug.cgi?id=15997
Add two subphases SVGTextPaintSubphaseGlyphFillSelection and
SVGTextPaintSubphaseGlyphStrokeSelection for painting selected
text on SVG. Selected texts are painted with style from
getCachedPseudoStyle() instead of style().
Tests: svg/text/selection-styles.xhtml
* rendering/SVGCharacterLayoutInfo.h:
(WebCore::SVGTextChunkWalker::SVGTextChunkWalker):
(WebCore::SVGTextChunkWalker::setupFillSelection):
(WebCore::SVGTextChunkWalker::setupStrokeSelection):
* rendering/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBoxPaintWalker::mayHaveSelection):
(WebCore::SVGRootInlineBoxPaintWalker::chunkSetupFillSelectionCallback):
(WebCore::SVGRootInlineBoxPaintWalker::chunkSetupStrokeSelectionCallback):
(WebCore::SVGRootInlineBoxPaintWalker::activePaintServer):
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::walkTextChunks):
* rendering/SVGInlineTextBox.h:
(WebCore::):
Add callback hooks and its implementation for handle new
subphases.
* rendering/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::chunkSelectionStartEnd):
(WebCore::SVGInlineTextBox::paintCharacters):
Split box text into selected part and non-selected part, and use
separate subphases to paint them.
* svg/SVGFont.cpp:
(WebCore::SVGTextRunWalker::walk):
Relax ASSERT() condition to accept a part of text.
* svg/graphics/SVGPaintServer.cpp:
(WebCore::applyStrokeStyleToContext):
(WebCore::SVGPaintServer::setup):
* svg/graphics/SVGPaintServer.h:
* svg/graphics/SVGPaintServerGradient.cpp:
(WebCore::SVGPaintServerGradient::setup):
* svg/graphics/SVGPaintServerGradient.h:
* svg/graphics/SVGPaintServerPattern.cpp:
(WebCore::SVGPaintServerPattern::setup):
* svg/graphics/SVGPaintServerPattern.h:
* svg/graphics/SVGPaintServerSolid.cpp:
(WebCore::SVGPaintServerSolid::setup):
* svg/graphics/SVGPaintServerSolid.h:
Change setup() signature to accept RenderStyle instead of always
using RenderObject::style().
2010-02-09 MORITA Hajime <morrita@gmail.com>
Reviewed by Nikolas Zimmermann.
SVG selection text foreground colour does not respect user settings
https://bugs.webkit.org/show_bug.cgi?id=15997
Add two subphases SVGTextPaintSubphaseGlyphFillSelection and
SVGTextPaintSubphaseGlyphStrokeSelection for painting SVG text
selection. texts are painted with style from getCachedPseudoStyle() instead of style().
* platform/mac/svg/text/selection-styles-expected.checksum: Added.
* platform/mac/svg/text/selection-styles-expected.png: Added.
* platform/mac/svg/text/selection-styles-expected.txt: Added.
* platform/mac/svg/text/text-deco-01-b-expected.checksum: Updated pixel tests to account for marginal painting differences.
* platform/mac/svg/text/text-deco-01-b-expected.png: Ditto.
* platform/mac/svg/text/text-path-01-b-expected.checksum: Dito.
* platform/mac/svg/text/text-path-01-b-expected.png: Ditto.
* platform/mac/svg/text/text-text-03-b-expected.checksum: Ditto.
* platform/mac/svg/text/text-text-03-b-expected.png: Ditto.
* svg/text/selection-styles.xhtml: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
This is the initial commit in this repository, browse the initial tree state.

