Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1505)

Unified Diff: third_party/WebKit/WebCore/rendering/RenderInline.cpp

Issue 21152: WebKit merge 40668:40722 part 1. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/WebCore/rendering/RenderInline.cpp
===================================================================
--- third_party/WebKit/WebCore/rendering/RenderInline.cpp (revision 9310)
+++ third_party/WebKit/WebCore/rendering/RenderInline.cpp (working copy)
@@ -95,13 +95,21 @@
return toRenderBlock(m_continuation)->inlineContinuation();
}
+void RenderInline::updateBoxModelInfoFromStyle()
+{
+ RenderBoxModelObject::updateBoxModelInfoFromStyle();
+
+ setInline(true); // Needed for run-ins, since run-in is considered a block display type.
+
+ // FIXME: Support transforms and reflections on inline flows someday.
+ setHasTransform(false);
+ setHasReflection(false);
+}
+
void RenderInline::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBox::styleDidChange(diff, oldStyle);
- setInline(true);
- setHasReflection(false);
-
// Ensure that all of the split inlines pick up the new style. We
// only do this if we're an inline, since we don't want to propagate
// a block's style to the other inlines.
@@ -519,7 +527,7 @@
return result;
}
-IntRect RenderInline::clippedOverflowRectForRepaint(RenderBox* repaintContainer)
+IntRect RenderInline::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer)
{
// Only run-ins are allowed in here during layout.
ASSERT(!view() || !view()->layoutStateEnabled() || isRunIn());
@@ -582,7 +590,7 @@
return r;
}
-IntRect RenderInline::rectWithOutlineForRepaint(RenderBox* repaintContainer, int outlineWidth)
+IntRect RenderInline::rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, int outlineWidth)
{
IntRect r(RenderBox::rectWithOutlineForRepaint(repaintContainer, outlineWidth));
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
@@ -667,7 +675,7 @@
return m_lineHeight;
}
-IntSize RenderInline::relativePositionedInlineOffset(const RenderObject* child) const
+IntSize RenderInline::relativePositionedInlineOffset(const RenderBox* child) const
{
ASSERT(isRelPositioned());
if (!isRelPositioned())
@@ -684,11 +692,11 @@
sx = firstLineBox()->xPos();
sy = firstLineBox()->yPos();
} else {
- sx = staticX();
- sy = staticY();
+ sx = layer()->staticX();
+ sy = layer()->staticY();
}
- if (!child->hasStaticX())
+ if (!child->style()->hasStaticX())
offset.setWidth(sx);
// This is not terribly intuitive, but we have to match other browsers. Despite being a block display type inside
// an inline, we still keep our x locked to the left of the relative positioned inline. Arguably the correct
@@ -698,7 +706,7 @@
// Avoid adding in the left border/padding of the containing block twice. Subtract it out.
offset.setWidth(sx - (child->containingBlock()->borderLeft() + child->containingBlock()->paddingLeft()));
- if (!child->hasStaticY())
+ if (!child->style()->hasStaticY())
offset.setHeight(sy);
return offset;
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderInline.h ('k') | third_party/WebKit/WebCore/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698