summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderListItem.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/rendering/RenderListItem.cpp
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/rendering/RenderListItem.cpp')
-rw-r--r--WebCore/rendering/RenderListItem.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/WebCore/rendering/RenderListItem.cpp b/WebCore/rendering/RenderListItem.cpp
index b69612e..47158b6 100644
--- a/WebCore/rendering/RenderListItem.cpp
+++ b/WebCore/rendering/RenderListItem.cpp
@@ -31,6 +31,7 @@
#include "HTMLOListElement.h"
#include "RenderListMarker.h"
#include "RenderView.h"
+#include <wtf/StdLibExtras.h>
using namespace std;
@@ -143,7 +144,7 @@ static RenderObject* getParentOfFirstLineBox(RenderBlock* curr, RenderObject* ma
if (currChild == marker)
continue;
- if (currChild->isInline() && (!currChild->isInlineFlow() || curr->generatesLineBoxesForInlineChild(currChild)))
+ if (currChild->isInline() && (!currChild->isRenderInline() || curr->generatesLineBoxesForInlineChild(currChild)))
return curr;
if (currChild->isFloating() || currChild->isPositioned())
@@ -234,12 +235,12 @@ void RenderListItem::layout()
void RenderListItem::positionListMarker()
{
if (m_marker && !m_marker->isInside() && m_marker->inlineBoxWrapper()) {
- int markerOldX = m_marker->xPos();
+ int markerOldX = m_marker->x();
int yOffset = 0;
int xOffset = 0;
- for (RenderObject* o = m_marker->parent(); o != this; o = o->parent()) {
- yOffset += o->yPos();
- xOffset += o->xPos();
+ for (RenderBox* o = m_marker->parentBox(); o != this; o = o->parentBox()) {
+ yOffset += o->y();
+ xOffset += o->x();
}
bool adjustOverflow = false;
@@ -266,12 +267,12 @@ void RenderListItem::positionListMarker()
if (adjustOverflow) {
IntRect markerRect(markerXPos + xOffset, yOffset, m_marker->width(), m_marker->height());
- RenderObject* o = m_marker;
+ RenderBox* o = m_marker;
do {
- o = o->parent();
+ o = o->parentBox();
if (o->isRenderBlock())
static_cast<RenderBlock*>(o)->addVisualOverflow(markerRect);
- markerRect.move(-o->xPos(), -o->yPos());
+ markerRect.move(-o->x(), -o->y());
} while (o != this);
}
}
@@ -279,7 +280,7 @@ void RenderListItem::positionListMarker()
void RenderListItem::paint(PaintInfo& paintInfo, int tx, int ty)
{
- if (!m_height)
+ if (!height())
return;
RenderBlock::paint(paintInfo, tx, ty);
@@ -289,7 +290,7 @@ const String& RenderListItem::markerText() const
{
if (m_marker)
return m_marker->text();
- static String staticNullString;
+ DEFINE_STATIC_LOCAL(String, staticNullString, ());
return staticNullString;
}