summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-06-02 12:07:03 +0100
committerBen Murdoch <benm@google.com>2011-06-10 10:47:21 +0100
commit2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch)
treee4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
parent87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff)
downloadexternal_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/rendering/svg/SVGRootInlineBox.cpp')
-rw-r--r--Source/WebCore/rendering/svg/SVGRootInlineBox.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp b/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
index ddbd3ea..cc6cb75 100644
--- a/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
+++ b/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
@@ -35,7 +35,7 @@
namespace WebCore {
-void SVGRootInlineBox::paint(PaintInfo& paintInfo, int, int)
+void SVGRootInlineBox::paint(PaintInfo& paintInfo, int, int, int, int)
{
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
ASSERT(!paintInfo.context->paintingDisabled());
@@ -63,7 +63,7 @@ void SVGRootInlineBox::paint(PaintInfo& paintInfo, int, int)
if (child->isSVGInlineTextBox())
SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(static_cast<SVGInlineTextBox*>(child)->textRenderer()));
- child->paint(childPaintInfo, 0, 0);
+ child->paint(childPaintInfo, 0, 0, 0, 0);
}
}
@@ -103,13 +103,13 @@ void SVGRootInlineBox::layoutCharactersInTextBoxes(InlineFlowBox* start, SVGText
SVGInlineTextBox* textBox = static_cast<SVGInlineTextBox*>(child);
characterLayout.layoutInlineTextBox(textBox);
} else {
- ASSERT(child->isInlineFlowBox());
-
// Skip generated content.
Node* node = child->renderer()->node();
if (!node)
continue;
+ ASSERT(child->isInlineFlowBox());
+
SVGInlineFlowBox* flowBox = static_cast<SVGInlineFlowBox*>(child);
bool isTextPath = node->hasTagName(SVGNames::textPathTag);
if (isTextPath) {
@@ -146,12 +146,12 @@ void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start)
textBox->setLogicalWidth(boxRect.width());
textBox->setLogicalHeight(boxRect.height());
} else {
- ASSERT(child->isInlineFlowBox());
-
// Skip generated content.
if (!child->renderer()->node())
continue;
+ ASSERT(child->isInlineFlowBox());
+
SVGInlineFlowBox* flowBox = static_cast<SVGInlineFlowBox*>(child);
layoutChildBoxes(flowBox);
@@ -214,6 +214,8 @@ InlineBox* SVGRootInlineBox::closestLeafChildForPosition(const IntPoint& point)
// FIXME: Check for vertical text!
InlineBox* closestLeaf = 0;
for (InlineBox* leaf = firstLeaf; leaf; leaf = leaf->nextLeafChild()) {
+ if (!leaf->isSVGInlineTextBox())
+ continue;
if (point.y() < leaf->m_y)
continue;
if (point.y() > leaf->m_y + leaf->virtualLogicalHeight())
@@ -274,8 +276,13 @@ static inline void reverseInlineBoxRangeAndValueListsIfNeeded(void* userData, Ve
if (first == last || first == --last)
return;
- ASSERT((*first)->isSVGInlineTextBox());
- ASSERT((*last)->isSVGInlineTextBox());
+ if (!(*last)->isSVGInlineTextBox() || !(*first)->isSVGInlineTextBox()) {
+ InlineBox* temp = *first;
+ *first = *last;
+ *last = temp;
+ ++first;
+ continue;
+ }
SVGInlineTextBox* firstTextBox = static_cast<SVGInlineTextBox*>(*first);
SVGInlineTextBox* lastTextBox = static_cast<SVGInlineTextBox*>(*last);