Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: Source/core/rendering/svg/SVGInlineTextBox.cpp

Issue 585563002: [SVG] Restore the non-selection style after painting the selected run (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweak test. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/text/selection-partial-gradient-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 StyleDifference diff; 655 StyleDifference diff;
656 diff.setNeedsPaintInvalidationObject(); 656 diff.setNeedsPaintInvalidationObject();
657 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), diff, selec tionStyle); 657 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), diff, selec tionStyle);
658 } 658 }
659 659
660 paintTextWithShadows(context, selectionStyle, textRun, fragment, startPositi on, endPosition, resourceMode); 660 paintTextWithShadows(context, selectionStyle, textRun, fragment, startPositi on, endPosition, resourceMode);
661 661
662 if (style != selectionStyle) { 662 if (style != selectionStyle) {
663 StyleDifference diff; 663 StyleDifference diff;
664 diff.setNeedsPaintInvalidationObject(); 664 diff.setNeedsPaintInvalidationObject();
665 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), diff, selec tionStyle); 665 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), diff, style );
666 } 666 }
667 667
668 // Eventually draw text using regular style from the end position of the sel ection to the end of the current chunk part 668 // Eventually draw text using regular style from the end position of the sel ection to the end of the current chunk part
669 if (endPosition < static_cast<int>(fragment.length) && !paintSelectedTextOnl y) 669 if (endPosition < static_cast<int>(fragment.length) && !paintSelectedTextOnl y)
670 paintTextWithShadows(context, style, textRun, fragment, endPosition, fra gment.length, resourceMode); 670 paintTextWithShadows(context, style, textRun, fragment, endPosition, fra gment.length, resourceMode);
671 } 671 }
672 672
673 void SVGInlineTextBox::paintDocumentMarker(GraphicsContext*, const FloatPoint&, DocumentMarker*, RenderStyle*, const Font&, bool) 673 void SVGInlineTextBox::paintDocumentMarker(GraphicsContext*, const FloatPoint&, DocumentMarker*, RenderStyle*, const Font&, bool)
674 { 674 {
675 // SVG does not have support for generic document markers (e.g., spellchecki ng, etc). 675 // SVG does not have support for generic document markers (e.g., spellchecki ng, etc).
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 renderer().updateHitTestResult(result, locationInContainer.point () - toLayoutSize(accumulatedOffset)); 773 renderer().updateHitTestResult(result, locationInContainer.point () - toLayoutSize(accumulatedOffset));
774 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ est, locationInContainer, rect)) 774 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ est, locationInContainer, rect))
775 return true; 775 return true;
776 } 776 }
777 } 777 }
778 } 778 }
779 return false; 779 return false;
780 } 780 }
781 781
782 } // namespace blink 782 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/svg/text/selection-partial-gradient-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698