Index: Source/core/layout/LayoutReplaced.cpp |
diff --git a/Source/core/layout/LayoutReplaced.cpp b/Source/core/layout/LayoutReplaced.cpp |
index 35193bc747ab3cc0ce075ace73b63fcad046dd23..59cc89a27c8e4051de4c176a45c66e9c808224d2 100644 |
--- a/Source/core/layout/LayoutReplaced.cpp |
+++ b/Source/core/layout/LayoutReplaced.cpp |
@@ -38,14 +38,14 @@ const int LayoutReplaced::defaultWidth = 300; |
const int LayoutReplaced::defaultHeight = 150; |
LayoutReplaced::LayoutReplaced(Element* element) |
- : RenderBox(element) |
+ : LayoutBox(element) |
, m_intrinsicSize(defaultWidth, defaultHeight) |
{ |
setReplaced(true); |
} |
LayoutReplaced::LayoutReplaced(Element* element, const LayoutSize& intrinsicSize) |
- : RenderBox(element) |
+ : LayoutBox(element) |
, m_intrinsicSize(intrinsicSize) |
{ |
setReplaced(true); |
@@ -60,12 +60,12 @@ void LayoutReplaced::willBeDestroyed() |
if (!documentBeingDestroyed() && parent()) |
parent()->dirtyLinesFromChangedChild(this); |
- RenderBox::willBeDestroyed(); |
+ LayoutBox::willBeDestroyed(); |
} |
void LayoutReplaced::styleDidChange(StyleDifference diff, const LayoutStyle* oldStyle) |
{ |
- RenderBox::styleDidChange(diff, oldStyle); |
+ LayoutBox::styleDidChange(diff, oldStyle); |
bool hadStyle = (oldStyle != 0); |
float oldZoom = hadStyle ? oldStyle->effectiveZoom() : LayoutStyle::initialZoom(); |
@@ -172,7 +172,7 @@ static inline bool rendererHasAspectRatio(const LayoutObject* renderer) |
return renderer->isImage() || renderer->isCanvas() || renderer->isVideo(); |
} |
-void LayoutReplaced::computeAspectRatioInformationForRenderBox(RenderBox* contentRenderer, FloatSize& constrainedSize, double& intrinsicRatio) const |
+void LayoutReplaced::computeAspectRatioInformationForLayoutBox(LayoutBox* contentRenderer, FloatSize& constrainedSize, double& intrinsicRatio) const |
{ |
FloatSize intrinsicSize; |
if (contentRenderer) { |
@@ -210,8 +210,8 @@ void LayoutReplaced::computeAspectRatioInformationForRenderBox(RenderBox* conten |
if (intrinsicRatio && !intrinsicSize.isEmpty() && style()->logicalWidth().isAuto() && style()->logicalHeight().isAuto()) { |
// We can't multiply or divide by 'intrinsicRatio' here, it breaks tests, like fast/images/zoomed-img-size.html, which |
// can only be fixed once subpixel precision is available for things like intrinsicWidth/Height - which include zoom! |
- constrainedSize.setWidth(RenderBox::computeReplacedLogicalHeight() * intrinsicSize.width() / intrinsicSize.height()); |
- constrainedSize.setHeight(RenderBox::computeReplacedLogicalWidth() * intrinsicSize.height() / intrinsicSize.width()); |
+ constrainedSize.setWidth(LayoutBox::computeReplacedLogicalHeight() * intrinsicSize.width() / intrinsicSize.height()); |
+ constrainedSize.setHeight(LayoutBox::computeReplacedLogicalWidth() * intrinsicSize.height() / intrinsicSize.width()); |
} |
} |
@@ -271,12 +271,12 @@ LayoutUnit LayoutReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh |
if (style()->logicalWidth().isSpecified() || style()->logicalWidth().isIntrinsic()) |
return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogicalWidthUsing(style()->logicalWidth()), shouldComputePreferred); |
- RenderBox* contentRenderer = embeddedContentBox(); |
+ LayoutBox* contentRenderer = embeddedContentBox(); |
// 10.3.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width |
double intrinsicRatio = 0; |
FloatSize constrainedSize; |
- computeAspectRatioInformationForRenderBox(contentRenderer, constrainedSize, intrinsicRatio); |
+ computeAspectRatioInformationForLayoutBox(contentRenderer, constrainedSize, intrinsicRatio); |
if (style()->logicalWidth().isAuto()) { |
bool computedHeightIsAuto = hasAutoHeightOrContainingBlockWithAutoHeight(); |
@@ -334,12 +334,12 @@ LayoutUnit LayoutReplaced::computeReplacedLogicalHeight() const |
if (hasReplacedLogicalHeight()) |
return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplacedLogicalHeightUsing(style()->logicalHeight())); |
- RenderBox* contentRenderer = embeddedContentBox(); |
+ LayoutBox* contentRenderer = embeddedContentBox(); |
// 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height |
double intrinsicRatio = 0; |
FloatSize constrainedSize; |
- computeAspectRatioInformationForRenderBox(contentRenderer, constrainedSize, intrinsicRatio); |
+ computeAspectRatioInformationForLayoutBox(contentRenderer, constrainedSize, intrinsicRatio); |
bool widthIsAuto = style()->logicalWidth().isAuto(); |
bool hasIntrinsicHeight = constrainedSize.height() > 0; |
@@ -423,7 +423,7 @@ PositionWithAffinity LayoutReplaced::positionForPoint(const LayoutPoint& point) |
return createPositionWithAffinity(1, DOWNSTREAM); |
} |
- return RenderBox::positionForPoint(point); |
+ return LayoutBox::positionForPoint(point); |
} |
LayoutRect LayoutReplaced::selectionRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer) const |
@@ -461,7 +461,7 @@ LayoutRect LayoutReplaced::localSelectionRect(bool checkWhetherSelected) const |
void LayoutReplaced::setSelectionState(SelectionState state) |
{ |
// The selection state for our containing block hierarchy is updated by the base class call. |
- RenderBox::setSelectionState(state); |
+ LayoutBox::setSelectionState(state); |
if (!inlineBoxWrapper()) |
return; |