Changeset 45570 in webkit
- Timestamp:
- Jul 6, 2009 3:42:38 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r45569 r45570 1 2009-07-06 Roland Steiner <rolandsteiner@google.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 generalize the special height treatment for SVG (to be re-used for ruby): 6 renamed InlineBox::m_isSVG to m_hasVirtualHeight 7 renamed InlineBox::isSVG() to hasVirtualHeight() 8 renamed InlineBox::setIsSVG() to setHasVirtualHeight() 9 10 * rendering/InlineBox.cpp: 11 (WebCore::InlineBox::height): 12 * rendering/InlineBox.h: 13 (WebCore::InlineBox::InlineBox): 14 (WebCore::InlineBox::isText): 15 (WebCore::InlineBox::setIsText): 16 (WebCore::InlineBox::isSVGRootInlineBox): 17 (WebCore::InlineBox::hasVirtualHeight): 18 (WebCore::InlineBox::setHasVirtualHeight): 19 (WebCore::InlineBox::virtualHeight): 20 * rendering/RenderSVGInline.cpp: 21 (WebCore::RenderSVGInline::createFlowBox): 22 * rendering/RenderSVGInlineText.cpp: 23 (WebCore::RenderSVGInlineText::createTextBox): 24 * rendering/RenderSVGText.cpp: 25 (WebCore::RenderSVGText::createRootBox): 26 * rendering/SVGInlineFlowBox.h: 27 (WebCore::SVGInlineFlowBox::virtualHeight): 28 * rendering/SVGInlineTextBox.h: 29 (WebCore::SVGInlineTextBox::virtualHeight): 30 * rendering/SVGRootInlineBox.h: 31 (WebCore::SVGRootInlineBox::virtualHeight): 32 1 33 2009-07-06 Alice Liu <alice.liu@apple.com> 2 34 -
trunk/WebCore/rendering/InlineBox.cpp
r43664 r45570 89 89 { 90 90 #if ENABLE(SVG) 91 if ( isSVG())92 return svgBoxHeight();93 #endif 94 91 if (hasVirtualHeight()) 92 return virtualHeight(); 93 #endif 94 95 95 if (renderer()->isText()) 96 96 return m_isText ? renderer()->style(m_firstLine)->font().height() : 0; -
trunk/WebCore/rendering/InlineBox.h
r43664 r45570 50 50 , m_extracted(false) 51 51 #if ENABLE(SVG) 52 , m_ isSVG(false)52 , m_hasVirtualHeight(false) 53 53 #endif 54 54 , m_endsWithBreak(false) … … 83 83 , m_extracted(extracted) 84 84 #if ENABLE(SVG) 85 , m_ isSVG(false)85 , m_hasVirtualHeight(false) 86 86 #endif 87 87 , m_endsWithBreak(false) … … 130 130 void showTreeForThis() const; 131 131 #endif 132 133 bool isText() const { return m_isText; } 134 void setIsText(bool b) { m_isText = b; } 135 132 136 virtual bool isInlineBox() { return false; } 133 137 virtual bool isInlineFlowBox() const { return false; } … … 136 140 #if ENABLE(SVG) 137 141 virtual bool isSVGRootInlineBox() { return false; } 138 bool isSVG() const { return m_isSVG; } 139 void setIsSVG(bool b) { m_isSVG = b; }140 #endif 141 bool isText() const { return m_isText; }142 void setIsText(bool b) { m_isText = b; } 143 142 143 bool hasVirtualHeight() const { return m_hasVirtualHeight; } 144 void setHasVirtualHeight() { m_hasVirtualHeight = true; } 145 virtual int virtualHeight() const { ASSERT_NOT_REACHED(); return 0; } 146 #endif 147 144 148 bool isConstructed() { return m_constructed; } 145 149 virtual void setConstructed() … … 243 247 return 0; 244 248 } 245 246 protected:247 #if ENABLE(SVG)248 virtual int svgBoxHeight() const { return 0; }249 #endif250 249 251 250 private: … … 273 272 bool m_dirty : 1; 274 273 bool m_extracted : 1; 275 276 #if ENABLE(SVG) 277 bool m_isSVG : 1; 278 #endif 274 bool m_hasVirtualHeight : 1; 279 275 280 276 // for RootInlineBox -
trunk/WebCore/rendering/RenderSVGInline.cpp
r45517 r45570 43 43 { 44 44 InlineFlowBox* box = new (renderArena()) SVGInlineFlowBox(this); 45 box->set IsSVG(true);45 box->setHasVirtualHeight(); 46 46 return box; 47 47 } -
trunk/WebCore/rendering/RenderSVGInlineText.cpp
r43177 r45570 135 135 { 136 136 InlineTextBox* box = new (renderArena()) SVGInlineTextBox(this); 137 box->set IsSVG(true);137 box->setHasVirtualHeight(); 138 138 return box; 139 139 } -
trunk/WebCore/rendering/RenderSVGText.cpp
r45517 r45570 93 93 { 94 94 RootInlineBox* box = new (renderArena()) SVGRootInlineBox(this); 95 box->set IsSVG(true);95 box->setHasVirtualHeight(); 96 96 return box; 97 97 } -
trunk/WebCore/rendering/SVGInlineFlowBox.h
r42846 r45570 38 38 } 39 39 40 virtual int svgBoxHeight() const { return m_height; }40 virtual int virtualHeight() const { return m_height; } 41 41 void setHeight(int h) { m_height = h; } 42 42 -
trunk/WebCore/rendering/SVGInlineTextBox.h
r43526 r45570 39 39 SVGInlineTextBox(RenderObject* obj); 40 40 41 virtual int svgBoxHeight() const { return m_height; }41 virtual int virtualHeight() const { return m_height; } 42 42 void setHeight(int h) { m_height = h; } 43 43 -
trunk/WebCore/rendering/SVGRootInlineBox.h
r42846 r45570 54 54 virtual bool isSVGRootInlineBox() { return true; } 55 55 56 virtual int svgBoxHeight() const { return m_height; }56 virtual int virtualHeight() const { return m_height; } 57 57 void setHeight(int h) { m_height = h; } 58 58
Note: See TracChangeset
for help on using the changeset viewer.