| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/style/StyleBackgroundData.h" | 37 #include "core/style/StyleBackgroundData.h" |
| 38 #include "core/style/StyleBoxData.h" | 38 #include "core/style/StyleBoxData.h" |
| 39 #include "core/style/StyleContentAlignmentData.h" | 39 #include "core/style/StyleContentAlignmentData.h" |
| 40 #include "core/style/StyleDeprecatedFlexibleBoxData.h" | 40 #include "core/style/StyleDeprecatedFlexibleBoxData.h" |
| 41 #include "core/style/StyleDifference.h" | 41 #include "core/style/StyleDifference.h" |
| 42 #include "core/style/StyleFilterData.h" | 42 #include "core/style/StyleFilterData.h" |
| 43 #include "core/style/StyleFlexibleBoxData.h" | 43 #include "core/style/StyleFlexibleBoxData.h" |
| 44 #include "core/style/StyleGridData.h" | 44 #include "core/style/StyleGridData.h" |
| 45 #include "core/style/StyleGridItemData.h" | 45 #include "core/style/StyleGridItemData.h" |
| 46 #include "core/style/StyleInheritedData.h" | 46 #include "core/style/StyleInheritedData.h" |
| 47 #include "core/style/StyleMotionRotation.h" | |
| 48 #include "core/style/StyleMultiColData.h" | 47 #include "core/style/StyleMultiColData.h" |
| 48 #include "core/style/StyleOffsetRotation.h" |
| 49 #include "core/style/StyleRareInheritedData.h" | 49 #include "core/style/StyleRareInheritedData.h" |
| 50 #include "core/style/StyleRareNonInheritedData.h" | 50 #include "core/style/StyleRareNonInheritedData.h" |
| 51 #include "core/style/StyleReflection.h" | 51 #include "core/style/StyleReflection.h" |
| 52 #include "core/style/StyleSelfAlignmentData.h" | 52 #include "core/style/StyleSelfAlignmentData.h" |
| 53 #include "core/style/StyleSurroundData.h" | 53 #include "core/style/StyleSurroundData.h" |
| 54 #include "core/style/StyleTransformData.h" | 54 #include "core/style/StyleTransformData.h" |
| 55 #include "core/style/StyleVisualData.h" | 55 #include "core/style/StyleVisualData.h" |
| 56 #include "core/style/StyleWillChangeData.h" | 56 #include "core/style/StyleWillChangeData.h" |
| 57 #include "core/style/TransformOrigin.h" | 57 #include "core/style/TransformOrigin.h" |
| 58 #include "platform/Length.h" | 58 #include "platform/Length.h" |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 // -webkit-margin-after-collapse (aka -webkit-margin-bottom-collapse) | 963 // -webkit-margin-after-collapse (aka -webkit-margin-bottom-collapse) |
| 964 static EMarginCollapse initialMarginAfterCollapse() { return MarginCollapseC
ollapse; } | 964 static EMarginCollapse initialMarginAfterCollapse() { return MarginCollapseC
ollapse; } |
| 965 EMarginCollapse marginBeforeCollapse() const { return static_cast<EMarginCol
lapse>(m_rareNonInheritedData->marginBeforeCollapse); } | 965 EMarginCollapse marginBeforeCollapse() const { return static_cast<EMarginCol
lapse>(m_rareNonInheritedData->marginBeforeCollapse); } |
| 966 void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(m_rareNonInheritedD
ata, marginAfterCollapse, c); } | 966 void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(m_rareNonInheritedD
ata, marginAfterCollapse, c); } |
| 967 | 967 |
| 968 // mix-blend-mode | 968 // mix-blend-mode |
| 969 static WebBlendMode initialBlendMode() { return WebBlendModeNormal; } | 969 static WebBlendMode initialBlendMode() { return WebBlendModeNormal; } |
| 970 WebBlendMode blendMode() const { return static_cast<WebBlendMode>(m_rareNonI
nheritedData->m_effectiveBlendMode); } | 970 WebBlendMode blendMode() const { return static_cast<WebBlendMode>(m_rareNonI
nheritedData->m_effectiveBlendMode); } |
| 971 void setBlendMode(WebBlendMode v) { m_rareNonInheritedData.access()->m_effec
tiveBlendMode = v; } | 971 void setBlendMode(WebBlendMode v) { m_rareNonInheritedData.access()->m_effec
tiveBlendMode = v; } |
| 972 | 972 |
| 973 // motion-path | 973 // offset-anchor |
| 974 static StylePath* initialMotionPath() { return nullptr; } | 974 static LengthPoint initialOffsetAnchor() { return LengthPoint(Length(Auto),
Length(Auto)); } |
| 975 StylePath* motionPath() const { return m_rareNonInheritedData->m_transform->
m_motion.m_path.get(); } | 975 const LengthPoint& offsetAnchor() const { return m_rareNonInheritedData->m_t
ransform->m_motion.m_anchor; } |
| 976 void setMotionPath(PassRefPtr<StylePath>); | 976 void setOffsetAnchor(const LengthPoint& offsetAnchor) { SET_NESTED_VAR(m_rar
eNonInheritedData, m_transform, m_motion.m_anchor, offsetAnchor); } |
| 977 | 977 |
| 978 // motion-offset | 978 // offset-distance |
| 979 static Length initialMotionOffset() { return Length(0, Fixed); } | 979 static Length initialOffsetDistance() { return Length(0, Fixed); } |
| 980 const Length& motionOffset() const { return m_rareNonInheritedData->m_transf
orm->m_motion.m_offset; } | 980 const Length& offsetDistance() const { return m_rareNonInheritedData->m_tran
sform->m_motion.m_distance; } |
| 981 void setMotionOffset(const Length& motionOffset) { SET_NESTED_VAR(m_rareNonI
nheritedData, m_transform, m_motion.m_offset, motionOffset); } | 981 void setOffsetDistance(const Length& offsetDistance) { SET_NESTED_VAR(m_rare
NonInheritedData, m_transform, m_motion.m_distance, offsetDistance); } |
| 982 | 982 |
| 983 // motion-rotation | 983 // offset-path |
| 984 static StyleMotionRotation initialMotionRotation() { return StyleMotionRotat
ion(0, MotionRotationAuto); } | 984 static StylePath* initialOffsetPath() { return nullptr; } |
| 985 const StyleMotionRotation& motionRotation() const { return m_rareNonInherite
dData->m_transform->m_motion.m_rotation; } | 985 StylePath* offsetPath() const { return m_rareNonInheritedData->m_transform->
m_motion.m_path.get(); } |
| 986 void setMotionRotation(const StyleMotionRotation& motionRotation) { SET_NEST
ED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_rotation, motionRotation)
; } | 986 void setOffsetPath(PassRefPtr<StylePath>); |
| 987 |
| 988 // offset-position |
| 989 static LengthPoint initialOffsetPosition() { return LengthPoint(Length(Auto)
, Length(Auto)); } |
| 990 const LengthPoint& offsetPosition() const { return m_rareNonInheritedData->m
_transform->m_motion.m_position; } |
| 991 void setOffsetPosition(const LengthPoint& offsetPosition) { SET_NESTED_VAR(m
_rareNonInheritedData, m_transform, m_motion.m_position, offsetPosition); } |
| 992 |
| 993 // offset-rotation |
| 994 static StyleOffsetRotation initialOffsetRotation() { return StyleOffsetRotat
ion(0, OffsetRotationAuto); } |
| 995 const StyleOffsetRotation& offsetRotation() const { return m_rareNonInherite
dData->m_transform->m_motion.m_rotation; } |
| 996 void setOffsetRotation(const StyleOffsetRotation& offsetRotation) { SET_NEST
ED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_rotation, offsetRotation)
; } |
| 987 | 997 |
| 988 // object-fit | 998 // object-fit |
| 989 static ObjectFit initialObjectFit() { return ObjectFitFill; } | 999 static ObjectFit initialObjectFit() { return ObjectFitFill; } |
| 990 ObjectFit getObjectFit() const { return static_cast<ObjectFit>(m_rareNonInhe
ritedData->m_objectFit); } | 1000 ObjectFit getObjectFit() const { return static_cast<ObjectFit>(m_rareNonInhe
ritedData->m_objectFit); } |
| 991 void setObjectFit(ObjectFit f) { SET_VAR(m_rareNonInheritedData, m_objectFit
, f); } | 1001 void setObjectFit(ObjectFit f) { SET_VAR(m_rareNonInheritedData, m_objectFit
, f); } |
| 992 | 1002 |
| 993 // object-position | 1003 // object-position |
| 994 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0,
Percent), Length(50.0, Percent)); } | 1004 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0,
Percent), Length(50.0, Percent)); } |
| 995 LengthPoint objectPosition() const { return m_rareNonInheritedData->m_object
Position; } | 1005 LengthPoint objectPosition() const { return m_rareNonInheritedData->m_object
Position; } |
| 996 void setObjectPosition(LengthPoint position) { SET_VAR(m_rareNonInheritedDat
a, m_objectPosition, position); } | 1006 void setObjectPosition(LengthPoint position) { SET_VAR(m_rareNonInheritedDat
a, m_objectPosition, position); } |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 FloatRoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, | 2134 FloatRoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, |
| 2125 const LayoutRectOutsets insets, bool includeLogicalLeftEdge, bool includ
eLogicalRightEdge) const; | 2135 const LayoutRectOutsets insets, bool includeLogicalLeftEdge, bool includ
eLogicalRightEdge) const; |
| 2126 | 2136 |
| 2127 // Float utility functions. | 2137 // Float utility functions. |
| 2128 bool isFloating() const { return m_nonInheritedData.m_floating != NoFloat; } | 2138 bool isFloating() const { return m_nonInheritedData.m_floating != NoFloat; } |
| 2129 | 2139 |
| 2130 // Mix-blend-mode utility functions. | 2140 // Mix-blend-mode utility functions. |
| 2131 bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } | 2141 bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } |
| 2132 | 2142 |
| 2133 // Motion utility functions. | 2143 // Motion utility functions. |
| 2134 bool hasMotionPath() const { return motionPath(); } | 2144 bool hasOffsetPath() const { return offsetPath(); } |
| 2135 | 2145 |
| 2136 // Direction utility functions. | 2146 // Direction utility functions. |
| 2137 bool isLeftToRightDirection() const { return direction() == LTR; } | 2147 bool isLeftToRightDirection() const { return direction() == LTR; } |
| 2138 | 2148 |
| 2139 // Perspective utility functions. | 2149 // Perspective utility functions. |
| 2140 bool hasPerspective() const { return m_rareNonInheritedData->m_perspective >
0; } | 2150 bool hasPerspective() const { return m_rareNonInheritedData->m_perspective >
0; } |
| 2141 | 2151 |
| 2142 // Page size utility functions. | 2152 // Page size utility functions. |
| 2143 void resetPageSizeType() { SET_VAR(m_rareNonInheritedData, m_pageSizeType, P
AGE_SIZE_AUTO); } | 2153 void resetPageSizeType() { SET_VAR(m_rareNonInheritedData, m_pageSizeType, P
AGE_SIZE_AUTO); } |
| 2144 | 2154 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 bool isRunningAnimationOnCompositor() const { return isRunningOpacityAnimati
onOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilter
AnimationOnCompositor() || isRunningBackdropFilterAnimationOnCompositor(); } | 2242 bool isRunningAnimationOnCompositor() const { return isRunningOpacityAnimati
onOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilter
AnimationOnCompositor() || isRunningBackdropFilterAnimationOnCompositor(); } |
| 2233 | 2243 |
| 2234 // Opacity utility functions. | 2244 // Opacity utility functions. |
| 2235 bool hasOpacity() const { return opacity() < 1.0f; } | 2245 bool hasOpacity() const { return opacity() < 1.0f; } |
| 2236 | 2246 |
| 2237 // Table layout utility functions. | 2247 // Table layout utility functions. |
| 2238 bool isFixedTableLayout() const { return tableLayout() == TableLayoutFixed &
& !logicalWidth().isAuto(); } | 2248 bool isFixedTableLayout() const { return tableLayout() == TableLayoutFixed &
& !logicalWidth().isAuto(); } |
| 2239 | 2249 |
| 2240 // Filter/transform utility functions. | 2250 // Filter/transform utility functions. |
| 2241 bool has3DTransform() const { return m_rareNonInheritedData->m_transform->ha
s3DTransform(); } | 2251 bool has3DTransform() const { return m_rareNonInheritedData->m_transform->ha
s3DTransform(); } |
| 2242 bool hasTransform() const { return hasTransformOperations() || hasMotionPath
() || hasCurrentTransformAnimation() || translate() || rotate() || scale(); } | 2252 bool hasTransform() const { return hasTransformOperations() || hasOffsetPath
() || hasCurrentTransformAnimation() || translate() || rotate() || scale(); } |
| 2243 bool hasTransformOperations() const { return !m_rareNonInheritedData->m_tran
sform->m_operations.operations().isEmpty(); } | 2253 bool hasTransformOperations() const { return !m_rareNonInheritedData->m_tran
sform->m_operations.operations().isEmpty(); } |
| 2244 ETransformStyle3D usedTransformStyle3D() const { return hasGroupingProperty(
) ? TransformStyle3DFlat : transformStyle3D(); } | 2254 ETransformStyle3D usedTransformStyle3D() const { return hasGroupingProperty(
) ? TransformStyle3DFlat : transformStyle3D(); } |
| 2245 bool transformDataEquivalent(const ComputedStyle& otherStyle) const { return
m_rareNonInheritedData->m_transform == otherStyle.m_rareNonInheritedData->m_tra
nsform; } | 2255 bool transformDataEquivalent(const ComputedStyle& otherStyle) const { return
m_rareNonInheritedData->m_transform == otherStyle.m_rareNonInheritedData->m_tra
nsform; } |
| 2246 bool preserves3D() const { return usedTransformStyle3D() != TransformStyle3D
Flat; } | 2256 bool preserves3D() const { return usedTransformStyle3D() != TransformStyle3D
Flat; } |
| 2247 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin }
; | 2257 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin }
; |
| 2248 enum ApplyMotionPath { IncludeMotionPath, ExcludeMotionPath }; | 2258 enum ApplyMotionPath { IncludeMotionPath, ExcludeMotionPath }; |
| 2249 enum ApplyIndependentTransformProperties { IncludeIndependentTransformProper
ties , ExcludeIndependentTransformProperties }; | 2259 enum ApplyIndependentTransformProperties { IncludeIndependentTransformProper
ties , ExcludeIndependentTransformProperties }; |
| 2250 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize,
ApplyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) cons
t; | 2260 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize,
ApplyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) cons
t; |
| 2251 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App
lyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) const; | 2261 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App
lyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) const; |
| 2252 | 2262 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2497 StyleColor visitedLinkTextStrokeColor() const { return m_rareInheritedData->
visitedLinkTextStrokeColor(); } | 2507 StyleColor visitedLinkTextStrokeColor() const { return m_rareInheritedData->
visitedLinkTextStrokeColor(); } |
| 2498 | 2508 |
| 2499 StyleColor decorationColorIncludingFallback(bool visitedLink) const; | 2509 StyleColor decorationColorIncludingFallback(bool visitedLink) const; |
| 2500 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; | 2510 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; |
| 2501 | 2511 |
| 2502 Color stopColor() const { return svgStyle().stopColor(); } | 2512 Color stopColor() const { return svgStyle().stopColor(); } |
| 2503 Color floodColor() const { return svgStyle().floodColor(); } | 2513 Color floodColor() const { return svgStyle().floodColor(); } |
| 2504 Color lightingColor() const { return svgStyle().lightingColor(); } | 2514 Color lightingColor() const { return svgStyle().lightingColor(); } |
| 2505 | 2515 |
| 2506 void addAppliedTextDecoration(const AppliedTextDecoration&); | 2516 void addAppliedTextDecoration(const AppliedTextDecoration&); |
| 2507 void applyMotionPathTransform(float originX, float originY, TransformationMa
trix&) const; | 2517 void applyMotionPathTransform(float originX, float originY, const FloatRect&
boundingBox, TransformationMatrix&) const; |
| 2508 | 2518 |
| 2509 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con
st; | 2519 bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) con
st; |
| 2510 bool diffNeedsFullLayout(const ComputedStyle& other) const; | 2520 bool diffNeedsFullLayout(const ComputedStyle& other) const; |
| 2511 bool diffNeedsPaintInvalidationSubtree(const ComputedStyle& other) const; | 2521 bool diffNeedsPaintInvalidationSubtree(const ComputedStyle& other) const; |
| 2512 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const; | 2522 bool diffNeedsPaintInvalidationObject(const ComputedStyle& other) const; |
| 2513 bool diffNeedsPaintInvalidationObjectForPaintImage(const StyleImage*, const
ComputedStyle& other) const; | 2523 bool diffNeedsPaintInvalidationObjectForPaintImage(const StyleImage*, const
ComputedStyle& other) const; |
| 2514 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff
erence&) const; | 2524 void updatePropertySpecificDifferences(const ComputedStyle& other, StyleDiff
erence&) const; |
| 2515 | 2525 |
| 2516 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat
h) const; | 2526 bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPat
h) const; |
| 2517 static bool shadowListHasCurrentColor(const ShadowList*); | 2527 static bool shadowListHasCurrentColor(const ShadowList*); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2612 } | 2622 } |
| 2613 | 2623 |
| 2614 inline bool ComputedStyle::hasPseudoElementStyle() const | 2624 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2615 { | 2625 { |
| 2616 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 2626 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 2617 } | 2627 } |
| 2618 | 2628 |
| 2619 } // namespace blink | 2629 } // namespace blink |
| 2620 | 2630 |
| 2621 #endif // ComputedStyle_h | 2631 #endif // ComputedStyle_h |
| OLD | NEW |