2009-02-11 David Hyatt <hyatt@apple.com>
Eliminate the virtual position() function from RenderObject. Rename the position() overrides
in RenderText and RenderBox to positionLineBox and devirtualize them.
Patch the one call site to just check for isText() and isBox() and call the methods directly.
Remove some unnecessary overrides of position() on table sections and rows.
Reviewed by Simon Fraser
* rendering/RenderBox.cpp:
(WebCore::RenderBox::positionLineBox):
* rendering/RenderBox.h:
* rendering/RenderObject.h:
* rendering/RenderSVGRoot.cpp:
* rendering/RenderSVGRoot.h:
* rendering/RenderTableRow.h:
(WebCore::RenderTableRow::lineHeight):
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::lineHeight):
* rendering/RenderText.cpp:
(WebCore::RenderText::positionLineBox):
* rendering/RenderText.h:
* rendering/bidi.cpp:
(WebCore::RenderBlock::computeVerticalPositionsForLine):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index 6561651..f5f631b 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -738,7 +738,10 @@
// Position is used to properly position both replaced elements and
// to update the static normal flow x/y of positioned elements.
- r->m_object->position(r->m_box);
+ if (r->m_object->isText())
+ toRenderText(r->m_object)->positionLineBox(r->m_box);
+ else if (r->m_object->isBox())
+ toRenderBox(r->m_object)->positionLineBox(r->m_box);
}
// Positioned objects and zero-length text nodes destroy their boxes in
// position(), which unnecessarily dirties the line.