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

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

Issue 236203020: Separate repaint and layout requirements of StyleDifference (Step 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase, Fix break Created 6 years, 8 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
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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 if (!hasSelection || startPosition >= endPosition) { 674 if (!hasSelection || startPosition >= endPosition) {
675 paintTextWithShadows(context, style, textRun, fragment, 0, fragment.leng th, resourceMode); 675 paintTextWithShadows(context, style, textRun, fragment, 0, fragment.leng th, resourceMode);
676 return; 676 return;
677 } 677 }
678 678
679 // Eventually draw text using regular style until the start position of the selection 679 // Eventually draw text using regular style until the start position of the selection
680 if (startPosition > 0 && !paintSelectedTextOnly) 680 if (startPosition > 0 && !paintSelectedTextOnly)
681 paintTextWithShadows(context, style, textRun, fragment, 0, startPosition , resourceMode); 681 paintTextWithShadows(context, style, textRun, fragment, 0, startPosition , resourceMode);
682 682
683 // Draw text using selection style from the start to the end position of the selection 683 // Draw text using selection style from the start to the end position of the selection
684 if (style != selectionStyle) 684 if (style != selectionStyle) {
685 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), StyleDiffer enceRepaint, selectionStyle); 685 StyleDifference diff;
686 diff.setNeedsRepaintObject();
687 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), diff, selec tionStyle);
688 }
686 689
687 paintTextWithShadows(context, selectionStyle, textRun, fragment, startPositi on, endPosition, resourceMode); 690 paintTextWithShadows(context, selectionStyle, textRun, fragment, startPositi on, endPosition, resourceMode);
688 691
689 if (style != selectionStyle) 692 if (style != selectionStyle) {
690 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), StyleDiffer enceRepaint, style); 693 StyleDifference diff;
694 diff.setNeedsRepaintObject();
695 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), diff, selec tionStyle);
696 }
691 697
692 // Eventually draw text using regular style from the end position of the sel ection to the end of the current chunk part 698 // Eventually draw text using regular style from the end position of the sel ection to the end of the current chunk part
693 if (endPosition < static_cast<int>(fragment.length) && !paintSelectedTextOnl y) 699 if (endPosition < static_cast<int>(fragment.length) && !paintSelectedTextOnl y)
694 paintTextWithShadows(context, style, textRun, fragment, endPosition, fra gment.length, resourceMode); 700 paintTextWithShadows(context, style, textRun, fragment, endPosition, fra gment.length, resourceMode);
695 } 701 }
696 702
697 void SVGInlineTextBox::paintDocumentMarker(GraphicsContext*, const FloatPoint&, DocumentMarker*, RenderStyle*, const Font&, bool) 703 void SVGInlineTextBox::paintDocumentMarker(GraphicsContext*, const FloatPoint&, DocumentMarker*, RenderStyle*, const Font&, bool)
698 { 704 {
699 // SVG does not have support for generic document markers (e.g., spellchecki ng, etc). 705 // SVG does not have support for generic document markers (e.g., spellchecki ng, etc).
700 } 706 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 renderer().updateHitTestResult(result, locationInContainer.point () - toLayoutSize(accumulatedOffset)); 803 renderer().updateHitTestResult(result, locationInContainer.point () - toLayoutSize(accumulatedOffset));
798 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ est, locationInContainer, rect)) 804 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ est, locationInContainer, rect))
799 return true; 805 return true;
800 } 806 }
801 } 807 }
802 } 808 }
803 return false; 809 return false;
804 } 810 }
805 811
806 } // namespace WebCore 812 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGRoot.cpp ('k') | Source/core/rendering/svg/SVGResourcesCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698