| OLD | NEW |
| 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 Loading... |
| 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 StyleDifference diff; | 685 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), StyleDiffer
enceRepaint, selectionStyle); |
| 686 diff.setNeedsRepaintObject(); | |
| 687 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), diff, selec
tionStyle); | |
| 688 } | |
| 689 | 686 |
| 690 paintTextWithShadows(context, selectionStyle, textRun, fragment, startPositi
on, endPosition, resourceMode); | 687 paintTextWithShadows(context, selectionStyle, textRun, fragment, startPositi
on, endPosition, resourceMode); |
| 691 | 688 |
| 692 if (style != selectionStyle) { | 689 if (style != selectionStyle) |
| 693 StyleDifference diff; | 690 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), StyleDiffer
enceRepaint, style); |
| 694 diff.setNeedsRepaintObject(); | |
| 695 SVGResourcesCache::clientStyleChanged(&parent()->renderer(), diff, selec
tionStyle); | |
| 696 } | |
| 697 | 691 |
| 698 // Eventually draw text using regular style from the end position of the sel
ection to the end of the current chunk part | 692 // Eventually draw text using regular style from the end position of the sel
ection to the end of the current chunk part |
| 699 if (endPosition < static_cast<int>(fragment.length) && !paintSelectedTextOnl
y) | 693 if (endPosition < static_cast<int>(fragment.length) && !paintSelectedTextOnl
y) |
| 700 paintTextWithShadows(context, style, textRun, fragment, endPosition, fra
gment.length, resourceMode); | 694 paintTextWithShadows(context, style, textRun, fragment, endPosition, fra
gment.length, resourceMode); |
| 701 } | 695 } |
| 702 | 696 |
| 703 void SVGInlineTextBox::paintDocumentMarker(GraphicsContext*, const FloatPoint&,
DocumentMarker*, RenderStyle*, const Font&, bool) | 697 void SVGInlineTextBox::paintDocumentMarker(GraphicsContext*, const FloatPoint&,
DocumentMarker*, RenderStyle*, const Font&, bool) |
| 704 { | 698 { |
| 705 // SVG does not have support for generic document markers (e.g., spellchecki
ng, etc). | 699 // SVG does not have support for generic document markers (e.g., spellchecki
ng, etc). |
| 706 } | 700 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 renderer().updateHitTestResult(result, locationInContainer.point
() - toLayoutSize(accumulatedOffset)); | 797 renderer().updateHitTestResult(result, locationInContainer.point
() - toLayoutSize(accumulatedOffset)); |
| 804 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ
est, locationInContainer, rect)) | 798 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ
est, locationInContainer, rect)) |
| 805 return true; | 799 return true; |
| 806 } | 800 } |
| 807 } | 801 } |
| 808 } | 802 } |
| 809 return false; | 803 return false; |
| 810 } | 804 } |
| 811 | 805 |
| 812 } // namespace WebCore | 806 } // namespace WebCore |
| OLD | NEW |