- Revision
- 183100
- Author
- [email protected]
- Date
- 2015-04-22 03:31:24 -0700 (Wed, 22 Apr 2015)
Log Message
Rename hasOverride{Height,Width}() to hasOverrideLogicalContent{Height,Width}()
https://bugs.webkit.org/show_bug.cgi?id=143984
Reviewed by Darin Adler.
This patch is renaming these LayoutBox methods, because of their names
don't match with the getters and setters, which is confusing. Specially
now that we also have hasOverrideContainingBlockLogical{Height,Width}().
No new tests (this is just a refactoring).
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateRubyForJustifiedText):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::hasOverrideLogicalContentHeight):
(WebCore::RenderBox::hasOverrideLogicalContentWidth):
(WebCore::RenderBox::overrideLogicalContentWidth):
(WebCore::RenderBox::overrideLogicalContentHeight):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::contentWidthForChild):
(WebCore::contentHeightForChild):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (183099 => 183100)
--- trunk/Source/WebCore/ChangeLog 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/ChangeLog 2015-04-22 10:31:24 UTC (rev 183100)
@@ -1,3 +1,41 @@
+2015-04-22 Manuel Rego Casasnovas <[email protected]>
+
+ Rename hasOverride{Height,Width}() to hasOverrideLogicalContent{Height,Width}()
+ https://bugs.webkit.org/show_bug.cgi?id=143984
+
+ Reviewed by Darin Adler.
+
+ This patch is renaming these LayoutBox methods, because of their names
+ don't match with the getters and setters, which is confusing. Specially
+ now that we also have hasOverrideContainingBlockLogical{Height,Width}().
+
+ No new tests (this is just a refactoring).
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::hasOverrideLogicalContentHeight):
+ (WebCore::RenderBox::hasOverrideLogicalContentWidth):
+ (WebCore::RenderBox::overrideLogicalContentWidth):
+ (WebCore::RenderBox::overrideLogicalContentHeight):
+ (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
+ (WebCore::RenderBox::computeLogicalWidthInRegion):
+ (WebCore::RenderBox::computeLogicalHeight):
+ (WebCore::RenderBox::computePercentageLogicalHeight):
+ (WebCore::RenderBox::availableLogicalHeightUsing):
+ * rendering/RenderBox.h:
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::contentWidthForChild):
+ (WebCore::contentHeightForChild):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
+ * rendering/RenderRubyBase.cpp:
+ (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::calcRowLogicalHeight):
+
2015-04-21 Jer Noble <[email protected]>
[Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (183099 => 183100)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2015-04-22 10:31:24 UTC (rev 183100)
@@ -2938,7 +2938,7 @@
void RenderBlockFlow::fitBorderToLinesIfNeeded()
{
- if (style().borderFit() == BorderFitBorder || hasOverrideWidth())
+ if (style().borderFit() == BorderFitBorder || hasOverrideLogicalContentWidth())
return;
// Walk any normal flow lines to snugly fit.
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (183099 => 183100)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2015-04-22 10:31:24 UTC (rev 183100)
@@ -569,7 +569,7 @@
totalOpportunitiesInRun += opportunitiesInRun;
}
- ASSERT(!rubyRun.hasOverrideWidth());
+ ASSERT(!rubyRun.hasOverrideLogicalContentWidth());
float newBaseWidth = rubyRun.logicalWidth() + totalExpansion + marginStartForChild(rubyRun) + marginEndForChild(rubyRun);
float newRubyRunWidth = rubyRun.logicalWidth() + totalExpansion;
rubyBase.setInitialOffset((newRubyRunWidth - newBaseWidth) / 2);
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (183099 => 183100)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2015-04-22 10:31:24 UTC (rev 183100)
@@ -1026,12 +1026,12 @@
return m_maxPreferredLogicalWidth;
}
-bool RenderBox::hasOverrideHeight() const
+bool RenderBox::hasOverrideLogicalContentHeight() const
{
return gOverrideHeightMap && gOverrideHeightMap->contains(this);
}
-bool RenderBox::hasOverrideWidth() const
+bool RenderBox::hasOverrideLogicalContentWidth() const
{
return gOverrideWidthMap && gOverrideWidthMap->contains(this);
}
@@ -1070,13 +1070,13 @@
LayoutUnit RenderBox::overrideLogicalContentWidth() const
{
- ASSERT(hasOverrideWidth());
+ ASSERT(hasOverrideLogicalContentWidth());
return gOverrideWidthMap->get(this);
}
LayoutUnit RenderBox::overrideLogicalContentHeight() const
{
- ASSERT(hasOverrideHeight());
+ ASSERT(hasOverrideLogicalContentHeight());
return gOverrideHeightMap->get(this);
}
@@ -1907,7 +1907,7 @@
#endif
RenderBlock* cb = containingBlock();
- if (cb->hasOverrideHeight())
+ if (cb->hasOverrideLogicalContentHeight())
return cb->overrideLogicalContentHeight();
const RenderStyle& containingBlockStyle = cb->style();
@@ -2312,7 +2312,7 @@
// width. Use the width from the style context.
// FIXME: Account for block-flow in flexible boxes.
// https://bugs.webkit.org/show_bug.cgi?id=46418
- if (hasOverrideWidth() && (isRubyRun() || style().borderFit() == BorderFitLines || parent()->isFlexibleBoxIncludingDeprecated())) {
+ if (hasOverrideLogicalContentWidth() && (isRubyRun() || style().borderFit() == BorderFitLines || parent()->isFlexibleBoxIncludingDeprecated())) {
computedValues.m_extent = overrideLogicalContentWidth() + borderAndPaddingLogicalWidth();
return;
}
@@ -2712,7 +2712,7 @@
// grab our cached flexible height.
// FIXME: Account for block-flow in flexible boxes.
// https://bugs.webkit.org/show_bug.cgi?id=46418
- if (hasOverrideHeight() && parent()->isFlexibleBoxIncludingDeprecated())
+ if (hasOverrideLogicalContentHeight() && parent()->isFlexibleBoxIncludingDeprecated())
h = Length(overrideLogicalContentHeight(), Fixed);
else if (treatAsReplaced)
h = Length(computeReplacedLogicalHeight(), Fixed);
@@ -2848,7 +2848,7 @@
// Table cells violate what the CSS spec says to do with heights. Basically we
// don't care if the cell specified a height or not. We just always make ourselves
// be a percentage of the cell's current content height.
- if (!cb->hasOverrideHeight()) {
+ if (!cb->hasOverrideLogicalContentHeight()) {
// Normally we would let the cell size intrinsically, but scrolling overflow has to be
// treated differently, since WinIE lets scrolled overflow regions shrink as needed.
// While we can't get all cases right, we can at least detect when the cell has a specified
@@ -3037,7 +3037,7 @@
// artificially. We're going to rely on this cell getting expanded to some new
// height, and then when we lay out again we'll use the calculation below.
if (isTableCell() && (h.isAuto() || h.isPercent())) {
- if (hasOverrideHeight())
+ if (hasOverrideLogicalContentHeight())
return overrideLogicalContentHeight();
return logicalHeight() - borderAndPaddingLogicalHeight();
}
Modified: trunk/Source/WebCore/rendering/RenderBox.h (183099 => 183100)
--- trunk/Source/WebCore/rendering/RenderBox.h 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2015-04-22 10:31:24 UTC (rev 183100)
@@ -319,8 +319,8 @@
// include the scrollbar height/width.
LayoutUnit overrideLogicalContentWidth() const;
LayoutUnit overrideLogicalContentHeight() const;
- bool hasOverrideHeight() const;
- bool hasOverrideWidth() const;
+ bool hasOverrideLogicalContentHeight() const;
+ bool hasOverrideLogicalContentWidth() const;
void setOverrideLogicalContentHeight(LayoutUnit);
void setOverrideLogicalContentWidth(LayoutUnit);
void clearOverrideSize();
Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (183099 => 183100)
--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2015-04-22 10:31:24 UTC (rev 183100)
@@ -151,14 +151,14 @@
static LayoutUnit contentWidthForChild(RenderBox* child)
{
- if (child->hasOverrideWidth())
+ if (child->hasOverrideLogicalContentWidth())
return child->overrideLogicalContentWidth();
return child->logicalWidth() - child->borderAndPaddingLogicalWidth();
}
static LayoutUnit contentHeightForChild(RenderBox* child)
{
- if (child->hasOverrideHeight())
+ if (child->hasOverrideLogicalContentHeight())
return child->overrideLogicalContentHeight();
return child->logicalHeight() - child->borderAndPaddingLogicalHeight();
}
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (183099 => 183100)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2015-04-22 10:31:24 UTC (rev 183100)
@@ -652,7 +652,7 @@
LayoutUnit RenderFlexibleBox::preferredMainAxisContentExtentForChild(RenderBox& child, bool hasInfiniteLineLength)
{
- bool hasOverrideSize = child.hasOverrideWidth() || child.hasOverrideHeight();
+ bool hasOverrideSize = child.hasOverrideLogicalContentWidth() || child.hasOverrideLogicalContentHeight();
if (hasOverrideSize)
child.clearOverrideSize();
Modified: trunk/Source/WebCore/rendering/RenderRubyBase.cpp (183099 => 183100)
--- trunk/Source/WebCore/rendering/RenderRubyBase.cpp 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/rendering/RenderRubyBase.cpp 2015-04-22 10:31:24 UTC (rev 183100)
@@ -143,13 +143,13 @@
void RenderRubyBase::adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const
{
- if (rubyRun()->hasOverrideWidth() && firstRootBox() && !firstRootBox()->nextRootBox()) {
+ if (rubyRun()->hasOverrideLogicalContentWidth() && firstRootBox() && !firstRootBox()->nextRootBox()) {
logicalLeft += m_initialOffset;
logicalWidth -= 2 * m_initialOffset;
return;
}
- LayoutUnit maxPreferredLogicalWidth = rubyRun() && rubyRun()->hasOverrideWidth() ? rubyRun()->overrideLogicalContentWidth() : this->maxPreferredLogicalWidth();
+ LayoutUnit maxPreferredLogicalWidth = rubyRun() && rubyRun()->hasOverrideLogicalContentWidth() ? rubyRun()->overrideLogicalContentWidth() : this->maxPreferredLogicalWidth();
if (maxPreferredLogicalWidth >= logicalWidth)
return;
Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (183099 => 183100)
--- trunk/Source/WebCore/rendering/RenderTableSection.cpp 2015-04-22 06:46:04 UTC (rev 183099)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp 2015-04-22 10:31:24 UTC (rev 183100)
@@ -316,7 +316,7 @@
// For row spanning cells, |r| is the last row in the span.
unsigned cellStartRow = cell->rowIndex();
- if (cell->hasOverrideHeight()) {
+ if (cell->hasOverrideLogicalContentHeight()) {
if (!statePusher.didPush()) {
// Technically, we should also push state for the row, but since
// rows don't push a coordinate transform, that's not necessary.