OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 static const ComputedStyle& initialStyle() { return mutableInitialStyle(); } | 362 static const ComputedStyle& initialStyle() { return mutableInitialStyle(); } |
363 static void invalidateInitialStyle(); | 363 static void invalidateInitialStyle(); |
364 | 364 |
365 // Computes how the style change should be propagated down the tree. | 365 // Computes how the style change should be propagated down the tree. |
366 static StyleRecalcChange stylePropagationDiff(const ComputedStyle* oldStyle, const ComputedStyle* newStyle); | 366 static StyleRecalcChange stylePropagationDiff(const ComputedStyle* oldStyle, const ComputedStyle* newStyle); |
367 | 367 |
368 ContentPosition resolvedJustifyContentPosition(const StyleContentAlignmentDa ta& normalValueBehavior) const; | 368 ContentPosition resolvedJustifyContentPosition(const StyleContentAlignmentDa ta& normalValueBehavior) const; |
369 ContentDistributionType resolvedJustifyContentDistribution(const StyleConten tAlignmentData& normalValueBehavior) const; | 369 ContentDistributionType resolvedJustifyContentDistribution(const StyleConten tAlignmentData& normalValueBehavior) const; |
370 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData & normalValueBehavior) const; | 370 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData & normalValueBehavior) const; |
371 ContentDistributionType resolvedAlignContentDistribution(const StyleContentA lignmentData& normalValueBehavior) const; | 371 ContentDistributionType resolvedAlignContentDistribution(const StyleContentA lignmentData& normalValueBehavior) const; |
372 const StyleSelfAlignmentData resolvedAlignment(const ComputedStyle& parentSt yle, ItemPosition resolvedAutoPositionForLayoutObject) const; | 372 StyleSelfAlignmentData resolvedAlignItems(ItemPosition normalValueBehaviour) const; |
373 static ItemPosition resolveAlignment(const ComputedStyle& parentStyle, const ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject); | 373 StyleSelfAlignmentData resolvedAlignSelf(ItemPosition normalValueBehaviour, const ComputedStyle* parentStyle = nullptr) const; |
Timothy Loh
2016/06/29 02:00:32
Can you add a TODO here to remove the parentStyle
jfernandez
2016/06/29 19:55:47
We can't, actually. the only way to deal with Anon
| |
374 static ItemPosition resolveJustification(const ComputedStyle& parentStyle, c onst ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject ); | 374 StyleSelfAlignmentData resolvedJustifyItems(ItemPosition normalValueBehaviou r) const; |
375 StyleSelfAlignmentData resolvedJustifySelf(ItemPosition normalValueBehaviour , const ComputedStyle* parentStyle = nullptr) const; | |
375 | 376 |
376 StyleDifference visualInvalidationDiff(const ComputedStyle&) const; | 377 StyleDifference visualInvalidationDiff(const ComputedStyle&) const; |
377 | 378 |
378 enum IsAtShadowBoundary { | 379 enum IsAtShadowBoundary { |
379 AtShadowBoundary, | 380 AtShadowBoundary, |
380 NotAtShadowBoundary, | 381 NotAtShadowBoundary, |
381 }; | 382 }; |
382 | 383 |
383 void inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary = No tAtShadowBoundary); | 384 void inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary = No tAtShadowBoundary); |
384 void copyNonInheritedFromCached(const ComputedStyle&); | 385 void copyNonInheritedFromCached(const ComputedStyle&); |
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1725 static EBoxPack initialBoxPack() { return BoxPackStart; } | 1726 static EBoxPack initialBoxPack() { return BoxPackStart; } |
1726 static float initialBoxFlex() { return 0.0f; } | 1727 static float initialBoxFlex() { return 0.0f; } |
1727 static unsigned initialBoxFlexGroup() { return 1; } | 1728 static unsigned initialBoxFlexGroup() { return 1; } |
1728 static unsigned initialBoxOrdinalGroup() { return 1; } | 1729 static unsigned initialBoxOrdinalGroup() { return 1; } |
1729 static EBoxSizing initialBoxSizing() { return BoxSizingContentBox; } | 1730 static EBoxSizing initialBoxSizing() { return BoxSizingContentBox; } |
1730 static StyleReflection* initialBoxReflect() { return 0; } | 1731 static StyleReflection* initialBoxReflect() { return 0; } |
1731 static float initialFlexGrow() { return 0; } | 1732 static float initialFlexGrow() { return 0; } |
1732 static float initialFlexShrink() { return 1; } | 1733 static float initialFlexShrink() { return 1; } |
1733 static Length initialFlexBasis() { return Length(Auto); } | 1734 static Length initialFlexBasis() { return Length(Auto); } |
1734 static int initialOrder() { return 0; } | 1735 static int initialOrder() { return 0; } |
1735 static StyleContentAlignmentData initialContentAlignment() { return StyleCon tentAlignmentData(ContentPositionNormal, ContentDistributionDefault, OverflowAli gnmentDefault); } | 1736 static StyleContentAlignmentData initialContentAlignment() { return StyleCon tentAlignmentData(RuntimeEnabledFeatures::cssGridLayoutEnabled() ? ContentPositi onNormal : ContentPositionFlexStart, ContentDistributionDefault, OverflowAlignme ntDefault); } |
1737 static StyleSelfAlignmentData initialDefaultAlignment() { return StyleSelfAl ignmentData(RuntimeEnabledFeatures::cssGridLayoutEnabled() ? ItemPositionNormal : ItemPositionStretch, OverflowAlignmentDefault); } | |
1736 static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlign mentData(ItemPositionAuto, OverflowAlignmentDefault); } | 1738 static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlign mentData(ItemPositionAuto, OverflowAlignmentDefault); } |
1737 static EFlexDirection initialFlexDirection() { return FlowRow; } | 1739 static EFlexDirection initialFlexDirection() { return FlowRow; } |
1738 static EFlexWrap initialFlexWrap() { return FlexNoWrap; } | 1740 static EFlexWrap initialFlexWrap() { return FlexNoWrap; } |
1739 static EUserModify initialUserModify() { return READ_ONLY; } | 1741 static EUserModify initialUserModify() { return READ_ONLY; } |
1740 static EUserDrag initialUserDrag() { return DRAG_AUTO; } | 1742 static EUserDrag initialUserDrag() { return DRAG_AUTO; } |
1741 static EUserSelect initialUserSelect() { return SELECT_TEXT; } | 1743 static EUserSelect initialUserSelect() { return SELECT_TEXT; } |
1742 static TextOverflow initialTextOverflow() { return TextOverflowClip; } | 1744 static TextOverflow initialTextOverflow() { return TextOverflowClip; } |
1743 static EMarginCollapse initialMarginBeforeCollapse() { return MarginCollapse Collapse; } | 1745 static EMarginCollapse initialMarginBeforeCollapse() { return MarginCollapse Collapse; } |
1744 static EMarginCollapse initialMarginAfterCollapse() { return MarginCollapseC ollapse; } | 1746 static EMarginCollapse initialMarginAfterCollapse() { return MarginCollapseC ollapse; } |
1745 static EWordBreak initialWordBreak() { return NormalWordBreak; } | 1747 static EWordBreak initialWordBreak() { return NormalWordBreak; } |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2025 } | 2027 } |
2026 | 2028 |
2027 inline bool ComputedStyle::hasPseudoElementStyle() const | 2029 inline bool ComputedStyle::hasPseudoElementStyle() const |
2028 { | 2030 { |
2029 return noninherited_flags.pseudoBits & ElementPseudoIdMask; | 2031 return noninherited_flags.pseudoBits & ElementPseudoIdMask; |
2030 } | 2032 } |
2031 | 2033 |
2032 } // namespace blink | 2034 } // namespace blink |
2033 | 2035 |
2034 #endif // ComputedStyle_h | 2036 #endif // ComputedStyle_h |
OLD | NEW |