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

Unified Diff: Source/core/style/ComputedStyle.cpp

Issue 1070143002: [Alignment] Single class for holding the alignment data. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased and got back previous setter names. Created 5 years, 8 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/style/ComputedStyle.h ('k') | Source/core/style/StyleContentAlignmentData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/style/ComputedStyle.cpp
diff --git a/Source/core/style/ComputedStyle.cpp b/Source/core/style/ComputedStyle.cpp
index 55e5e184c452ef04b7ac13ab6e637b610973677d..05b99967f742c30d7a80bd97b50d4a6aa7b92a39 100644
--- a/Source/core/style/ComputedStyle.cpp
+++ b/Source/core/style/ComputedStyle.cpp
@@ -179,10 +179,7 @@ StyleRecalcChange ComputedStyle::stylePropagationDiff(const ComputedStyle* oldSt
|| !oldStyle->contentDataEquivalent(newStyle)
|| oldStyle->hasTextCombine() != newStyle->hasTextCombine()
|| oldStyle->justifyItems() != newStyle->justifyItems()
- || oldStyle->justifyItemsOverflowAlignment() != newStyle->justifyItemsOverflowAlignment()
- || oldStyle->justifyItemsPositionType() != newStyle->justifyItemsPositionType()
- || oldStyle->alignItems() != newStyle->alignItems()
- || oldStyle->alignItemsOverflowAlignment() != newStyle->alignItemsOverflowAlignment())
+ || oldStyle->alignItems() != newStyle->alignItems())
return Reattach;
if (oldStyle->inheritedNotEqual(*newStyle))
@@ -200,16 +197,16 @@ StyleRecalcChange ComputedStyle::stylePropagationDiff(const ComputedStyle* oldSt
ItemPosition ComputedStyle::resolveAlignment(const ComputedStyle& parentStyle, const ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject)
{
// The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto".
- if (childStyle.alignSelf() == ItemPositionAuto)
- return (parentStyle.alignItems() == ItemPositionAuto) ? resolvedAutoPositionForLayoutObject : parentStyle.alignItems();
- return childStyle.alignSelf();
+ if (childStyle.alignSelfPosition() == ItemPositionAuto)
+ return (parentStyle.alignItemsPosition() == ItemPositionAuto) ? resolvedAutoPositionForLayoutObject : parentStyle.alignItemsPosition();
+ return childStyle.alignSelfPosition();
}
ItemPosition ComputedStyle::resolveJustification(const ComputedStyle& parentStyle, const ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject)
{
- if (childStyle.justifySelf() == ItemPositionAuto)
- return (parentStyle.justifyItems() == ItemPositionAuto) ? resolvedAutoPositionForLayoutObject : parentStyle.justifyItems();
- return childStyle.justifySelf();
+ if (childStyle.justifySelfPosition() == ItemPositionAuto)
+ return (parentStyle.justifyItemsPosition() == ItemPositionAuto) ? resolvedAutoPositionForLayoutObject : parentStyle.justifyItemsPosition();
+ return childStyle.justifySelfPosition();
}
void ComputedStyle::inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary isAtShadowBoundary)
@@ -649,12 +646,11 @@ bool ComputedStyle::diffNeedsFullLayout(const ComputedStyle& other) const
if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) {
if (rareNonInheritedData->m_alignContent != other.rareNonInheritedData->m_alignContent
- || rareNonInheritedData->m_alignContentDistribution != other.rareNonInheritedData->m_alignContentDistribution
|| rareNonInheritedData->m_alignItems != other.rareNonInheritedData->m_alignItems
|| rareNonInheritedData->m_alignSelf != other.rareNonInheritedData->m_alignSelf
- || rareNonInheritedData->m_alignSelfOverflowAlignment != other.rareNonInheritedData->m_alignSelfOverflowAlignment
|| rareNonInheritedData->m_justifyContent != other.rareNonInheritedData->m_justifyContent
- || rareNonInheritedData->m_justifyContentDistribution != other.rareNonInheritedData->m_justifyContentDistribution)
+ || rareNonInheritedData->m_justifyItems != other.rareNonInheritedData->m_justifyItems
+ || rareNonInheritedData->m_justifySelf != other.rareNonInheritedData->m_justifySelf)
return true;
}
« no previous file with comments | « Source/core/style/ComputedStyle.h ('k') | Source/core/style/StyleContentAlignmentData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698