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

Unified Diff: Source/core/layout/LayoutFlexibleBox.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 9 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
« no previous file with comments | « Source/core/layout/LayoutFlexibleBox.h ('k') | Source/core/layout/LayoutFrameSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutFlexibleBox.cpp
diff --git a/Source/core/layout/LayoutFlexibleBox.cpp b/Source/core/layout/LayoutFlexibleBox.cpp
index ce2a8f8d904718620844102083aad6d795336374..cb98c452c6514ba5fb2df67afe69239cdc1172b9 100644
--- a/Source/core/layout/LayoutFlexibleBox.cpp
+++ b/Source/core/layout/LayoutFlexibleBox.cpp
@@ -34,7 +34,7 @@
#include "core/frame/UseCounter.h"
#include "core/layout/LayoutView.h"
#include "core/layout/TextAutosizer.h"
-#include "core/layout/style/LayoutStyle.h"
+#include "core/layout/style/ComputedStyle.h"
#include "core/paint/BlockPainter.h"
#include "core/paint/DeprecatedPaintLayer.h"
#include "platform/LengthFunctions.h"
@@ -199,7 +199,7 @@ void LayoutFlexibleBox::removeChild(LayoutObject* child)
m_intrinsicSizeAlongMainAxis.remove(child);
}
-void LayoutFlexibleBox::styleDidChange(StyleDifference diff, const LayoutStyle* oldStyle)
+void LayoutFlexibleBox::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
{
LayoutBlock::styleDidChange(diff, oldStyle);
@@ -207,8 +207,8 @@ void LayoutFlexibleBox::styleDidChange(StyleDifference diff, const LayoutStyle*
// Flex items that were previously stretching need to be relayed out so we can compute new available cross axis space.
// This is only necessary for stretching since other alignment values don't change the size of the box.
for (LayoutBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
- ItemPosition previousAlignment = LayoutStyle::resolveAlignment(*oldStyle, child->styleRef(), ItemPositionStretch);
- if (previousAlignment == ItemPositionStretch && previousAlignment != LayoutStyle::resolveAlignment(styleRef(), child->styleRef(), ItemPositionStretch))
+ ItemPosition previousAlignment = ComputedStyle::resolveAlignment(*oldStyle, child->styleRef(), ItemPositionStretch);
+ if (previousAlignment == ItemPositionStretch && previousAlignment != ComputedStyle::resolveAlignment(styleRef(), child->styleRef(), ItemPositionStretch))
child->setChildNeedsLayout(MarkOnlyThis);
}
}
@@ -1000,7 +1000,7 @@ void LayoutFlexibleBox::prepareChildForPositionedLayout(LayoutBox& child, Layout
ItemPosition LayoutFlexibleBox::alignmentForChild(LayoutBox& child) const
{
- ItemPosition align = LayoutStyle::resolveAlignment(styleRef(), child.styleRef(), ItemPositionStretch);
+ ItemPosition align = ComputedStyle::resolveAlignment(styleRef(), child.styleRef(), ItemPositionStretch);
if (align == ItemPositionBaseline && hasOrthogonalFlow(child))
align = ItemPositionFlexStart;
« no previous file with comments | « Source/core/layout/LayoutFlexibleBox.h ('k') | Source/core/layout/LayoutFrameSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698