Diff
Modified: trunk/Source/WebCore/ChangeLog (164440 => 164441)
--- trunk/Source/WebCore/ChangeLog 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/ChangeLog 2014-02-20 20:01:19 UTC (rev 164441)
@@ -1,5 +1,75 @@
2014-02-20 Bem Jones-Bey <[email protected]>
+ Rename border/padding/margin width/height to horizontal/vertical extent on RenderBoxModelObject
+ https://bugs.webkit.org/show_bug.cgi?id=129043
+
+ Reviewed by David Hyatt.
+
+ Using horizontal extent instead of width and vertical extent instead
+ of height makes it more obvious that these are measurements of both
+ border/margin/padding sides, not just one.
+
+ As David Hyatt put it: "I dislike using terms like 'width' since it
+ could be confused with the actual border-width CSS name, i.e., a
+ person new to this code would think the method was returning the pixel
+ width of a single border."
+
+ No new tests, no behavior change.
+
+ * html/HTMLAppletElement.cpp:
+ (WebCore::HTMLAppletElement::updateWidget):
+ * inspector/InspectorOverlay.cpp:
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::repaintLayerRectsForImage):
+ (WebCore::RenderBox::positionForPoint):
+ * rendering/RenderBoxModelObject.h:
+ (WebCore::RenderBoxModelObject::horizontalBorderExtent):
+ (WebCore::RenderBoxModelObject::verticalBorderExtent):
+ (WebCore::RenderBoxModelObject::verticalBorderAndPaddingExtent):
+ (WebCore::RenderBoxModelObject::horizontalBorderAndPaddingExtent):
+ (WebCore::RenderBoxModelObject::verticalMarginExtent):
+ (WebCore::RenderBoxModelObject::horizontalMarginExtent):
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
+ (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+ (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
+ * rendering/RenderFieldset.cpp:
+ (WebCore::RenderFieldset::computePreferredLogicalWidths):
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::crossAxisMarginExtentForChild):
+ (WebCore::RenderFlexibleBox::mainAxisBorderAndPaddingExtentForChild):
+ (WebCore::RenderFlexibleBox::computeNextFlexLine):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::localCaretRect):
+ (WebCore::RenderInline::generateCulledLineBoxRects):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::resize):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::computePreferredLogicalWidths):
+ (WebCore::RenderListBox::computeLogicalHeight):
+ * rendering/RenderMenuList.cpp:
+ (RenderMenuList::computePreferredLogicalWidths):
+ * rendering/RenderScrollbar.cpp:
+ (WebCore::RenderScrollbar::trackPieceRectWithMargins):
+ * rendering/RenderSlider.cpp:
+ (WebCore::RenderSlider::computePreferredLogicalWidths):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::computeLogicalHeight):
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::layout):
+ * rendering/line/LineLayoutState.h:
+ (WebCore::FloatWithRect::FloatWithRect):
+ * rendering/shapes/ShapeInfo.cpp:
+ (WebCore::ShapeInfo<RenderType>::setReferenceBoxLogicalSize):
+ * rendering/svg/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::updateCachedBoundaries):
+
+2014-02-20 Bem Jones-Bey <[email protected]>
+
Rename RenderBlockFlow::clearFloats and RenderBlockFlow::newLine to be more accurate
https://bugs.webkit.org/show_bug.cgi?id=128991
Modified: trunk/Source/WebCore/html/HTMLAppletElement.cpp (164440 => 164441)
--- trunk/Source/WebCore/html/HTMLAppletElement.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/html/HTMLAppletElement.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -114,9 +114,9 @@
RenderEmbeddedObject* renderer = renderEmbeddedObject();
LayoutUnit contentWidth = renderer->style().width().isFixed() ? LayoutUnit(renderer->style().width().value()) :
- renderer->width() - renderer->borderAndPaddingWidth();
+ renderer->width() - renderer->horizontalBorderAndPaddingExtent();
LayoutUnit contentHeight = renderer->style().height().isFixed() ? LayoutUnit(renderer->style().height().value()) :
- renderer->height() - renderer->borderAndPaddingHeight();
+ renderer->height() - renderer->verticalBorderAndPaddingExtent();
Vector<String> paramNames;
Vector<String> paramValues;
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (164440 => 164441)
--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -164,7 +164,7 @@
paddingBox.width() - renderInline->paddingLeft() - renderInline->paddingRight(), paddingBox.height() - renderInline->paddingTop() - renderInline->paddingBottom());
// Ignore marginTop and marginBottom for inlines.
marginBox = LayoutRect(borderBox.x() - renderInline->marginLeft(), borderBox.y(),
- borderBox.width() + renderInline->marginWidth(), borderBox.height());
+ borderBox.width() + renderInline->horizontalMarginExtent(), borderBox.height());
}
FloatQuad absContentQuad;
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -1720,7 +1720,7 @@
for (auto it = cleanLineFloats->begin(), end = cleanLineFloats->end(); it != end; ++it) {
RenderBox* floatingBox = *it;
floatingBox->layoutIfNeeded();
- LayoutSize newSize(floatingBox->width() + floatingBox->marginWidth(), floatingBox->height() + floatingBox->marginHeight());
+ LayoutSize newSize(floatingBox->width() + floatingBox->horizontalMarginExtent(), floatingBox->height() + floatingBox->verticalMarginExtent());
ASSERT_WITH_SECURITY_IMPLICATION(floatIndex < floats.size());
if (&floats[floatIndex].object != floatingBox) {
encounteredNewFloat = true;
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -1582,8 +1582,8 @@
rendererRect = LayoutRect(-layerRenderer->marginLeft(),
-layerRenderer->marginTop(),
- std::max(layerRenderer->width() + layerRenderer->marginWidth() + layerRenderer->borderLeft() + layerRenderer->borderRight(), rw),
- std::max(layerRenderer->height() + layerRenderer->marginHeight() + layerRenderer->borderTop() + layerRenderer->borderBottom(), rh));
+ std::max(layerRenderer->width() + layerRenderer->horizontalMarginExtent() + layerRenderer->borderLeft() + layerRenderer->borderRight(), rw),
+ std::max(layerRenderer->height() + layerRenderer->verticalMarginExtent() + layerRenderer->borderTop() + layerRenderer->borderBottom(), rh));
} else {
layerRenderer = this;
rendererRect = borderBoxRect();
@@ -4116,8 +4116,8 @@
return createVisiblePosition(nonPseudoElement() ? firstPositionInOrBeforeNode(nonPseudoElement()) : Position());
if (isTable() && nonPseudoElement()) {
- LayoutUnit right = contentWidth() + borderAndPaddingWidth();
- LayoutUnit bottom = contentHeight() + borderAndPaddingHeight();
+ LayoutUnit right = contentWidth() + horizontalBorderAndPaddingExtent();
+ LayoutUnit bottom = contentHeight() + verticalBorderAndPaddingExtent();
if (point.x() < 0 || point.x() > right || point.y() < 0 || point.y() > bottom) {
if (point.x() <= right / 2)
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h 2014-02-20 20:01:19 UTC (rev 164441)
@@ -117,8 +117,8 @@
virtual LayoutUnit borderBottom() const { return style().borderBottomWidth(); }
virtual LayoutUnit borderLeft() const { return style().borderLeftWidth(); }
virtual LayoutUnit borderRight() const { return style().borderRightWidth(); }
- virtual LayoutUnit borderWidth() const { return borderLeft() + borderRight(); }
- virtual LayoutUnit borderHeight() const { return borderTop() + borderBottom(); }
+ virtual LayoutUnit horizontalBorderExtent() const { return borderLeft() + borderRight(); }
+ virtual LayoutUnit verticalBorderExtent() const { return borderTop() + borderBottom(); }
virtual LayoutUnit borderBefore() const { return style().borderBeforeWidth(); }
virtual LayoutUnit borderAfter() const { return style().borderAfterWidth(); }
virtual LayoutUnit borderStart() const { return style().borderStartWidth(); }
@@ -128,8 +128,8 @@
LayoutUnit borderAndPaddingBefore() const { return borderBefore() + paddingBefore(); }
LayoutUnit borderAndPaddingAfter() const { return borderAfter() + paddingAfter(); }
- LayoutUnit borderAndPaddingHeight() const { return borderTop() + borderBottom() + paddingTop() + paddingBottom(); }
- LayoutUnit borderAndPaddingWidth() const { return borderLeft() + borderRight() + paddingLeft() + paddingRight(); }
+ LayoutUnit verticalBorderAndPaddingExtent() const { return borderTop() + borderBottom() + paddingTop() + paddingBottom(); }
+ LayoutUnit horizontalBorderAndPaddingExtent() const { return borderLeft() + borderRight() + paddingLeft() + paddingRight(); }
LayoutUnit borderAndPaddingLogicalHeight() const { return borderAndPaddingBefore() + borderAndPaddingAfter(); }
LayoutUnit borderAndPaddingLogicalWidth() const { return borderStart() + borderEnd() + paddingStart() + paddingEnd(); }
LayoutUnit borderAndPaddingLogicalLeft() const { return style().isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); }
@@ -152,8 +152,8 @@
virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = 0) const = 0;
virtual LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const = 0;
virtual LayoutUnit marginEnd(const RenderStyle* otherStyle = 0) const = 0;
- LayoutUnit marginHeight() const { return marginTop() + marginBottom(); }
- LayoutUnit marginWidth() const { return marginLeft() + marginRight(); }
+ LayoutUnit verticalMarginExtent() const { return marginTop() + marginBottom(); }
+ LayoutUnit horizontalMarginExtent() const { return marginLeft() + marginRight(); }
LayoutUnit marginLogicalHeight() const { return marginBefore() + marginAfter(); }
LayoutUnit marginLogicalWidth() const { return marginStart() + marginEnd(); }
Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -443,7 +443,7 @@
if (ascent == -1)
ascent = child->height() + child->marginBottom();
ascent += child->marginTop();
- LayoutUnit descent = (child->height() + child->marginHeight()) - ascent;
+ LayoutUnit descent = (child->height() + child->verticalMarginExtent()) - ascent;
// Update our maximum ascent.
maxAscent = std::max(maxAscent, ascent);
@@ -455,7 +455,7 @@
setHeight(std::max(yPos + maxAscent + maxDescent, height()));
}
else
- setHeight(std::max(height(), yPos + child->height() + child->marginHeight()));
+ setHeight(std::max(height(), yPos + child->height() + child->verticalMarginExtent()));
}
ASSERT(childIndex == childLayoutDeltas.size());
@@ -514,7 +514,7 @@
LayoutUnit childY = yPos;
switch (style().boxAlign()) {
case BCENTER:
- childY += child->marginTop() + std::max<LayoutUnit>(0, (contentHeight() - (child->height() + child->marginHeight())) / 2);
+ childY += child->marginTop() + std::max<LayoutUnit>(0, (contentHeight() - (child->height() + child->verticalMarginExtent())) / 2);
break;
case BBASELINE: {
LayoutUnit ascent = child->firstLineBaseline();
@@ -760,7 +760,7 @@
switch (style().boxAlign()) {
case BCENTER:
case BBASELINE: // Baseline just maps to center for vertical boxes
- childX += child->marginLeft() + std::max<LayoutUnit>(0, (contentWidth() - (child->width() + child->marginWidth())) / 2);
+ childX += child->marginLeft() + std::max<LayoutUnit>(0, (contentWidth() - (child->width() + child->horizontalMarginExtent())) / 2);
break;
case BEND:
if (!style().isLeftToRightDirection())
@@ -982,7 +982,7 @@
continue;
child->setChildNeedsLayout(MarkOnlyThis);
- child->setOverrideLogicalContentHeight(newHeight - child->borderAndPaddingHeight());
+ child->setOverrideLogicalContentHeight(newHeight - child->verticalBorderAndPaddingExtent());
child->layoutIfNeeded();
// FIXME: For now don't support RTL.
Modified: trunk/Source/WebCore/rendering/RenderFieldset.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderFieldset.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderFieldset.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -54,7 +54,7 @@
if (legendMarginRight.isFixed())
legendMinWidth += legendMarginRight.value();
- m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, legendMinWidth + borderAndPaddingWidth());
+ m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, legendMinWidth + horizontalBorderAndPaddingExtent());
}
}
Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -239,7 +239,7 @@
m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style().maxWidth().value()));
}
- int toAdd = borderAndPaddingWidth();
+ int toAdd = horizontalBorderAndPaddingExtent();
m_minPreferredLogicalWidth += toAdd;
m_maxPreferredLogicalWidth += toAdd;
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -634,7 +634,7 @@
LayoutUnit RenderFlexibleBox::crossAxisMarginExtentForChild(RenderBox& child) const
{
- return isHorizontalFlow() ? child.marginHeight() : child.marginWidth();
+ return isHorizontalFlow() ? child.verticalMarginExtent() : child.horizontalMarginExtent();
}
LayoutUnit RenderFlexibleBox::crossAxisScrollbarExtent() const
@@ -657,7 +657,7 @@
LayoutUnit RenderFlexibleBox::mainAxisBorderAndPaddingExtentForChild(RenderBox& child) const
{
- return isHorizontalFlow() ? child.borderAndPaddingWidth() : child.borderAndPaddingHeight();
+ return isHorizontalFlow() ? child.horizontalBorderAndPaddingExtent() : child.verticalBorderAndPaddingExtent();
}
LayoutUnit RenderFlexibleBox::mainAxisScrollbarExtentForChild(RenderBox& child) const
@@ -901,7 +901,7 @@
LayoutUnit childMainAxisExtent = preferredMainAxisContentExtentForChild(*child, hasInfiniteLineLength);
LayoutUnit childMainAxisMarginBoxExtent = mainAxisBorderAndPaddingExtentForChild(*child) + childMainAxisExtent;
- childMainAxisMarginBoxExtent += isHorizontalFlow() ? child->marginWidth() : child->marginHeight();
+ childMainAxisMarginBoxExtent += isHorizontalFlow() ? child->horizontalMarginExtent() : child->verticalMarginExtent();
if (isMultiline() && preferredMainAxisExtent + childMainAxisMarginBoxExtent > lineBreakLength && lineHasInFlowItem)
break;
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -249,7 +249,7 @@
if (extraWidthToEndOfLine)
*extraWidthToEndOfLine = 0;
- LayoutRect caretRect = localCaretRectForEmptyElement(borderAndPaddingWidth(), 0);
+ LayoutRect caretRect = localCaretRectForEmptyElement(horizontalBorderAndPaddingExtent(), 0);
if (InlineBox* firstBox = firstLineBox())
caretRect.moveBy(roundedLayoutPoint(firstBox->topLeft()));
@@ -573,9 +573,9 @@
int logicalTop = rootBox.logicalTop() + (rootBox.lineStyle().font().fontMetrics().ascent() - containerStyle.font().fontMetrics().ascent());
int logicalHeight = containerStyle.font().fontMetrics().height();
if (isHorizontal)
- yield(FloatRect(currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), logicalTop, currBox->width() + currBox->marginWidth(), logicalHeight));
+ yield(FloatRect(currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), logicalTop, currBox->width() + currBox->horizontalMarginExtent(), logicalHeight));
else
- yield(FloatRect(logicalTop, currBox->inlineBoxWrapper()->y() - currBox->marginTop(), logicalHeight, currBox->height() + currBox->marginHeight()));
+ yield(FloatRect(logicalTop, currBox->inlineBoxWrapper()->y() - currBox->marginTop(), logicalHeight, currBox->height() + currBox->verticalMarginExtent()));
}
} else if (curr->isRenderInline()) {
// If the child doesn't need line boxes either, then we can recur.
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -2565,7 +2565,7 @@
styledElement->setInlineStyleProperty(CSSPropertyMarginLeft, renderer->marginLeft() / zoomFactor, CSSPrimitiveValue::CSS_PX);
styledElement->setInlineStyleProperty(CSSPropertyMarginRight, renderer->marginRight() / zoomFactor, CSSPrimitiveValue::CSS_PX);
}
- LayoutUnit baseWidth = renderer->width() - (isBoxSizingBorder ? LayoutUnit() : renderer->borderAndPaddingWidth());
+ LayoutUnit baseWidth = renderer->width() - (isBoxSizingBorder ? LayoutUnit() : renderer->horizontalBorderAndPaddingExtent());
baseWidth = baseWidth / zoomFactor;
styledElement->setInlineStyleProperty(CSSPropertyWidth, roundToInt(baseWidth + difference.width()), CSSPrimitiveValue::CSS_PX);
}
@@ -2576,7 +2576,7 @@
styledElement->setInlineStyleProperty(CSSPropertyMarginTop, renderer->marginTop() / zoomFactor, CSSPrimitiveValue::CSS_PX);
styledElement->setInlineStyleProperty(CSSPropertyMarginBottom, renderer->marginBottom() / zoomFactor, CSSPrimitiveValue::CSS_PX);
}
- LayoutUnit baseHeight = renderer->height() - (isBoxSizingBorder ? LayoutUnit() : renderer->borderAndPaddingHeight());
+ LayoutUnit baseHeight = renderer->height() - (isBoxSizingBorder ? LayoutUnit() : renderer->verticalBorderAndPaddingExtent());
baseHeight = baseHeight / zoomFactor;
styledElement->setInlineStyleProperty(CSSPropertyHeight, roundToInt(baseHeight + difference.height()), CSSPrimitiveValue::CSS_PX);
}
Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderListBox.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -219,7 +219,7 @@
m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style().maxWidth().value()));
}
- LayoutUnit toAdd = borderAndPaddingWidth();
+ LayoutUnit toAdd = horizontalBorderAndPaddingExtent();
m_minPreferredLogicalWidth += toAdd;
m_maxPreferredLogicalWidth += toAdd;
@@ -253,7 +253,7 @@
void RenderListBox::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
{
- LayoutUnit height = itemHeight() * size() - rowSpacing + borderAndPaddingHeight();
+ LayoutUnit height = itemHeight() * size() - rowSpacing + verticalBorderAndPaddingExtent();
RenderBox::computeLogicalHeight(height, logicalTop, computedValues);
}
Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderMenuList.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -344,7 +344,7 @@
m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style().maxWidth().value()));
}
- LayoutUnit toAdd = borderAndPaddingWidth();
+ LayoutUnit toAdd = horizontalBorderAndPaddingExtent();
m_minPreferredLogicalWidth += toAdd;
m_maxPreferredLogicalWidth += toAdd;
Modified: trunk/Source/WebCore/rendering/RenderScrollbar.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderScrollbar.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderScrollbar.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -325,10 +325,10 @@
IntRect rect = oldRect;
if (orientation() == HorizontalScrollbar) {
rect.setX(rect.x() + partRenderer->marginLeft());
- rect.setWidth(rect.width() - partRenderer->marginWidth());
+ rect.setWidth(rect.width() - partRenderer->horizontalMarginExtent());
} else {
rect.setY(rect.y() + partRenderer->marginTop());
- rect.setHeight(rect.height() - partRenderer->marginHeight());
+ rect.setHeight(rect.height() - partRenderer->verticalMarginExtent());
}
return rect;
}
Modified: trunk/Source/WebCore/rendering/RenderSlider.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderSlider.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderSlider.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -96,7 +96,7 @@
m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style().maxWidth().value()));
}
- LayoutUnit toAdd = borderAndPaddingWidth();
+ LayoutUnit toAdd = horizontalBorderAndPaddingExtent();
m_minPreferredLogicalWidth += toAdd;
m_maxPreferredLogicalWidth += toAdd;
Modified: trunk/Source/WebCore/rendering/RenderTextControl.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderTextControl.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderTextControl.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -153,8 +153,8 @@
TextControlInnerTextElement* innerText = innerTextElement();
ASSERT(innerText);
if (RenderBox* innerTextBox = innerText->renderBox()) {
- LayoutUnit nonContentHeight = innerTextBox->borderAndPaddingHeight() + innerTextBox->marginHeight();
- logicalHeight = computeControlLogicalHeight(innerTextBox->lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight) + borderAndPaddingHeight();
+ LayoutUnit nonContentHeight = innerTextBox->verticalBorderAndPaddingExtent() + innerTextBox->verticalMarginExtent();
+ logicalHeight = computeControlLogicalHeight(innerTextBox->lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight) + verticalBorderAndPaddingExtent();
// We are able to have a horizontal scrollbar if the overflow style is scroll, or if its auto and there's no word wrap.
if ((isHorizontalWritingMode() && (style().overflowX() == OSCROLL || (style().overflowX() == OAUTO && innerText->renderer()->style().overflowWrap() == NormalOverflowWrap)))
Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -197,8 +197,8 @@
LayoutSize innerTextSize;
if (innerTextRenderer)
innerTextSize = innerTextRenderer->size();
- placeholderBox->style().setWidth(Length(innerTextSize.width() - placeholderBox->borderAndPaddingWidth(), Fixed));
- placeholderBox->style().setHeight(Length(innerTextSize.height() - placeholderBox->borderAndPaddingHeight(), Fixed));
+ placeholderBox->style().setWidth(Length(innerTextSize.width() - placeholderBox->horizontalBorderAndPaddingExtent(), Fixed));
+ placeholderBox->style().setHeight(Length(innerTextSize.height() - placeholderBox->verticalBorderAndPaddingExtent(), Fixed));
bool neededLayout = placeholderBox->needsLayout();
bool placeholderBoxHadLayout = placeholderBox->everHadLayout();
placeholderBox->layoutIfNeeded();
Modified: trunk/Source/WebCore/rendering/line/LineLayoutState.h (164440 => 164441)
--- trunk/Source/WebCore/rendering/line/LineLayoutState.h 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/line/LineLayoutState.h 2014-02-20 20:01:19 UTC (rev 164441)
@@ -42,7 +42,7 @@
struct FloatWithRect {
FloatWithRect(RenderBox& f)
: object(f)
- , rect(LayoutRect(f.x() - f.marginLeft(), f.y() - f.marginTop(), f.width() + f.marginWidth(), f.height() + f.marginHeight()))
+ , rect(LayoutRect(f.x() - f.marginLeft(), f.y() - f.marginTop(), f.width() + f.horizontalMarginExtent(), f.height() + f.verticalMarginExtent()))
, everHadLayout(f.everHadLayout())
{
}
Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -49,23 +49,23 @@
switch (referenceBox()) {
case MarginBox:
if (isHorizontalWritingMode)
- newReferenceBoxLogicalSize.expand(m_renderer.marginWidth(), m_renderer.marginHeight());
+ newReferenceBoxLogicalSize.expand(m_renderer.horizontalMarginExtent(), m_renderer.verticalMarginExtent());
else
- newReferenceBoxLogicalSize.expand(m_renderer.marginHeight(), m_renderer.marginWidth());
+ newReferenceBoxLogicalSize.expand(m_renderer.verticalMarginExtent(), m_renderer.horizontalMarginExtent());
break;
case BorderBox:
break;
case PaddingBox:
if (isHorizontalWritingMode)
- newReferenceBoxLogicalSize.shrink(m_renderer.borderWidth(), m_renderer.borderHeight());
+ newReferenceBoxLogicalSize.shrink(m_renderer.horizontalBorderExtent(), m_renderer.verticalBorderExtent());
else
- newReferenceBoxLogicalSize.shrink(m_renderer.borderHeight(), m_renderer.borderWidth());
+ newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderExtent(), m_renderer.horizontalBorderExtent());
break;
case ContentBox:
if (isHorizontalWritingMode)
- newReferenceBoxLogicalSize.shrink(m_renderer.borderAndPaddingWidth(), m_renderer.borderAndPaddingHeight());
+ newReferenceBoxLogicalSize.shrink(m_renderer.horizontalBorderAndPaddingExtent(), m_renderer.verticalBorderAndPaddingExtent());
else
- newReferenceBoxLogicalSize.shrink(m_renderer.borderAndPaddingHeight(), m_renderer.borderAndPaddingWidth());
+ newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderAndPaddingExtent(), m_renderer.horizontalBorderAndPaddingExtent());
break;
case Fill:
case Stroke:
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (164440 => 164441)
--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2014-02-20 19:40:28 UTC (rev 164440)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2014-02-20 20:01:19 UTC (rev 164441)
@@ -389,7 +389,7 @@
{
SVGRenderSupport::computeContainerBoundingBoxes(*this, m_objectBoundingBox, m_objectBoundingBoxValid, m_strokeBoundingBox, m_repaintBoundingBoxExcludingShadow);
SVGRenderSupport::intersectRepaintRectWithResources(*this, m_repaintBoundingBoxExcludingShadow);
- m_repaintBoundingBoxExcludingShadow.inflate(borderAndPaddingWidth());
+ m_repaintBoundingBoxExcludingShadow.inflate(horizontalBorderAndPaddingExtent());
m_repaintBoundingBox = m_repaintBoundingBoxExcludingShadow;
SVGRenderSupport::intersectRepaintRectWithShadows(*this, m_repaintBoundingBox);