Changeset 182864 in webkit
- Timestamp:
- Apr 15, 2015 3:35:42 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r182860 r182864 1 2015-04-15 Daniel Bates <dabates@apple.com> 2 3 Clean up: Have SVGTextLayoutEngine::beginTextPathLayout() take a reference to a 4 RenderSVGTextPath instead of a pointer 5 https://bugs.webkit.org/show_bug.cgi?id=143787 6 7 Reviewed by Andreas Kling. 8 9 SVGTextLayoutEngine::beginTextPathLayout() assumes that the passed RenderObject is a 10 non-null pointer to a RenderSVGTextPath object. Instead we should have this function take a 11 reference to a RenderSVGTextPath object to help callers catch bad usage and better document 12 the expectation of a valid RenderSVGTextPath object. 13 14 * rendering/svg/SVGRootInlineBox.cpp: 15 (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): Downcast the renderer of the 16 inline box to a RenderSVGTextPath object and pass it to SVGTextLayoutEngine::beginTextPathLayout(). 17 We ensured that this cast is safe earlier in this function. 18 SVGTextLayoutEngine::beginTextPathLayout(). 19 * rendering/svg/SVGTextLayoutEngine.cpp: 20 (WebCore::SVGTextLayoutEngine::beginTextPathLayout): Change type of first parameter from 21 RenderObject* to RenderSVGTextPath. Remove ASSERT() that was checking for a non-null 22 RenderObject pointer since we are passing the renderer by reference and a well-formed 23 reference must refer to a valid object. 24 * rendering/svg/SVGTextLayoutEngine.h: Substitute RenderSVGTextPath& for RenderObject*. 25 1 26 2015-04-13 Jer Noble <jer.noble@apple.com> 2 27 -
trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
r182111 r182864 27 27 #include "GraphicsContext.h" 28 28 #include "RenderSVGText.h" 29 #include "RenderSVGTextPath.h" 29 30 #include "SVGInlineFlowBox.h" 30 31 #include "SVGInlineTextBox.h" … … 120 121 layoutCharactersInTextBoxes(&flowBox, lineLayout); 121 122 122 characterLayout.beginTextPathLayout( &child->renderer(), lineLayout);123 characterLayout.beginTextPathLayout(downcast<RenderSVGTextPath>(child->renderer()), lineLayout); 123 124 } 124 125 -
trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp
r182828 r182864 162 162 } 163 163 164 void SVGTextLayoutEngine::beginTextPathLayout(RenderObject* object, SVGTextLayoutEngine& lineLayout) 165 { 166 ASSERT(object); 167 164 void SVGTextLayoutEngine::beginTextPathLayout(RenderSVGTextPath& textPath, SVGTextLayoutEngine& lineLayout) 165 { 168 166 m_inPathLayout = true; 169 RenderSVGTextPath& textPath = downcast<RenderSVGTextPath>(*object);170 167 171 168 m_textPath = textPath.layoutPath(); -
trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.h
r163440 r182864 31 31 class RenderStyle; 32 32 class RenderSVGInlineText; 33 class RenderSVGTextPath; 33 34 class SVGElement; 34 35 class SVGInlineTextBox; … … 51 52 SVGTextChunkBuilder& chunkLayoutBuilder() { return m_chunkLayoutBuilder; } 52 53 53 void beginTextPathLayout(Render Object*, SVGTextLayoutEngine& lineLayout);54 void beginTextPathLayout(RenderSVGTextPath&, SVGTextLayoutEngine& lineLayout); 54 55 void endTextPathLayout(); 55 56
Note: See TracChangeset
for help on using the changeset viewer.