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

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

Issue 15183002: Clear SVGInlineTextBox fragments when the text changes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised per reviewer comments. Created 7 years, 7 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 , m_paintingResource(0) 61 , m_paintingResource(0)
62 { 62 {
63 } 63 }
64 64
65 void SVGInlineTextBox::dirtyLineBoxes() 65 void SVGInlineTextBox::dirtyLineBoxes()
66 { 66 {
67 InlineTextBox::dirtyLineBoxes(); 67 InlineTextBox::dirtyLineBoxes();
68 68
69 // Clear the now stale text fragments 69 // Clear the now stale text fragments
70 clearTextFragments(); 70 clearTextFragments();
71
72 // And clear any following text fragments as the text on which they
eseidel 2013/05/15 18:35:01 This doesn't feel right. In CSS the block handles
Stephen Chennney 2013/05/15 19:16:46 SVG creates InlineTextBoxes for reasons that diffe
73 // depend may now no longer exist.
74 InlineTextBox* nextBox = nextTextBox();
75 if (nextBox)
76 nextBox->dirtyLineBoxes();
71 } 77 }
72 78
73 int SVGInlineTextBox::offsetForPosition(float, bool) const 79 int SVGInlineTextBox::offsetForPosition(float, bool) const
74 { 80 {
75 // SVG doesn't use the standard offset <-> position selection system, as it' s not suitable for SVGs complex needs. 81 // SVG doesn't use the standard offset <-> position selection system, as it' s not suitable for SVGs complex needs.
76 // vertical text selection, inline boxes spanning multiple lines (contrary t o HTML, etc.) 82 // vertical text selection, inline boxes spanning multiple lines (contrary t o HTML, etc.)
77 ASSERT_NOT_REACHED(); 83 ASSERT_NOT_REACHED();
78 return 0; 84 return 0;
79 } 85 }
80 86
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 return true; 726 return true;
721 } 727 }
722 } 728 }
723 } 729 }
724 return false; 730 return false;
725 } 731 }
726 732
727 } // namespace WebCore 733 } // namespace WebCore
728 734
729 #endif 735 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698