Index: Source/core/rendering/RenderBlock.cpp |
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
index bd49f4ad3547517a216814008da89d5912a61957..792d6442ccb5c40f75cc6eea8529fb1de1a6946a 100644 |
--- a/Source/core/rendering/RenderBlock.cpp |
+++ b/Source/core/rendering/RenderBlock.cpp |
@@ -3878,6 +3878,28 @@ bool RenderBlock::recalcOverflowAfterStyleChange() |
return !hasOverflowClip(); |
} |
+// Called when a positioned object moves but doesn't necessarily change size. A simplified layout is attempted |
+// that just updates the object's position. If the size does change, the object remains dirty. |
+bool RenderBlock::tryLayoutDoingPositionedMovementOnly() |
Julien - ping for review
2015/01/06 14:35:09
I can understand why only blocks use this function
rhogan
2015/01/06 21:43:45
The other reason I moved it is that hasPercentageH
Julien - ping for review
2015/01/07 09:41:39
I think we have no other option then as hasPercent
|
+{ |
+ LayoutUnit oldWidth = logicalWidth(); |
+ LogicalExtentComputedValues computedValues; |
+ logicalExtentAfterUpdatingLogicalWidth(logicalTop(), computedValues); |
+ // If we shrink to fit our width may have changed, so we still need full layout. |
+ if (oldWidth != computedValues.m_extent) |
+ return false; |
+ setLogicalWidth(computedValues.m_extent); |
+ setLogicalLeft(computedValues.m_position); |
+ setMarginStart(computedValues.m_margins.m_start); |
+ setMarginEnd(computedValues.m_margins.m_end); |
+ |
+ LayoutUnit oldHeight = logicalHeight(); |
+ updateLogicalHeight(); |
+ if (hasPercentHeightDescendants() && oldHeight != logicalHeight()) |
Julien - ping for review
2015/01/06 14:35:09
The percentage height descendant map is filled dur
|
+ return false; |
+ return true; |
Julien - ping for review
2015/01/06 14:35:09
The past 3 lines can be combined into a single lin
|
+} |
+ |
#if ENABLE(ASSERT) |
void RenderBlock::checkPositionedObjectsNeedLayout() |
{ |