| 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 | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "core/CSSPropertyNames.h" | 30 #include "core/CSSPropertyNames.h" |
| 31 #include "core/ComputedStyleBase.h" | 31 #include "core/ComputedStyleBase.h" |
| 32 #include "core/CoreExport.h" | 32 #include "core/CoreExport.h" |
| 33 #include "core/css/StyleAutoColor.h" | 33 #include "core/css/StyleAutoColor.h" |
| 34 #include "core/css/StyleColor.h" | 34 #include "core/css/StyleColor.h" |
| 35 #include "core/layout/LayoutTheme.h" | 35 #include "core/layout/LayoutTheme.h" |
| 36 #include "core/style/AppliedTextDecoration.h" | 36 #include "core/style/AppliedTextDecoration.h" |
| 37 #include "core/style/AppliedTextDecorationList.h" | 37 #include "core/style/AppliedTextDecorationList.h" |
| 38 #include "core/style/BorderValue.h" | 38 #include "core/style/BorderValue.h" |
| 39 #include "core/style/ComputedStyleConstants.h" | 39 #include "core/style/ComputedStyleConstants.h" |
| 40 #include "core/style/ContentData.h" |
| 40 #include "core/style/CounterDirectives.h" | 41 #include "core/style/CounterDirectives.h" |
| 41 #include "core/style/CursorData.h" | 42 #include "core/style/CursorData.h" |
| 42 #include "core/style/CursorList.h" | 43 #include "core/style/CursorList.h" |
| 43 #include "core/style/DataRef.h" | 44 #include "core/style/DataRef.h" |
| 44 #include "core/style/LineClampValue.h" | 45 #include "core/style/LineClampValue.h" |
| 45 #include "core/style/NinePieceImage.h" | 46 #include "core/style/NinePieceImage.h" |
| 46 #include "core/style/QuotesData.h" | 47 #include "core/style/QuotesData.h" |
| 47 #include "core/style/SVGComputedStyle.h" | 48 #include "core/style/SVGComputedStyle.h" |
| 48 #include "core/style/ShadowData.h" | 49 #include "core/style/ShadowData.h" |
| 49 #include "core/style/ShadowList.h" | 50 #include "core/style/ShadowList.h" |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 SetBorderBottomColorIsCurrentColor(color.IsCurrentColor()); | 550 SetBorderBottomColorIsCurrentColor(color.IsCurrentColor()); |
| 550 } | 551 } |
| 551 } | 552 } |
| 552 | 553 |
| 553 // box-shadow (aka -webkit-box-shadow) | 554 // box-shadow (aka -webkit-box-shadow) |
| 554 static ShadowList* InitialBoxShadow() { return 0; } | 555 static ShadowList* InitialBoxShadow() { return 0; } |
| 555 ShadowList* BoxShadow() const { | 556 ShadowList* BoxShadow() const { |
| 556 return rare_non_inherited_data_->box_shadow_.Get(); | 557 return rare_non_inherited_data_->box_shadow_.Get(); |
| 557 } | 558 } |
| 558 void SetBoxShadow(RefPtr<ShadowList>); | 559 void SetBoxShadow(RefPtr<ShadowList>); |
| 560 bool BoxShadowDataEquivalent(const ComputedStyle& other) const { |
| 561 return DataEquivalent(BoxShadow(), other.BoxShadow()); |
| 562 } |
| 559 | 563 |
| 560 // clip | 564 // clip |
| 561 static LengthBox InitialClip() { return LengthBox(); } | 565 static LengthBox InitialClip() { return LengthBox(); } |
| 562 const LengthBox& Clip() const { return ClipInternal(); } | 566 const LengthBox& Clip() const { return ClipInternal(); } |
| 563 void SetClip(const LengthBox& box) { | 567 void SetClip(const LengthBox& box) { |
| 564 SetHasAutoClipInternal(false); | 568 SetHasAutoClipInternal(false); |
| 565 SetClipInternal(box); | 569 SetClipInternal(box); |
| 566 } | 570 } |
| 567 bool HasAutoClip() const { return HasAutoClipInternal(); } | 571 bool HasAutoClip() const { return HasAutoClipInternal(); } |
| 568 void SetHasAutoClip() { | 572 void SetHasAutoClip() { |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 // shape-outside (aka -webkit-shape-outside) | 1374 // shape-outside (aka -webkit-shape-outside) |
| 1371 static ShapeValue* InitialShapeOutside() { return 0; } | 1375 static ShapeValue* InitialShapeOutside() { return 0; } |
| 1372 ShapeValue* ShapeOutside() const { | 1376 ShapeValue* ShapeOutside() const { |
| 1373 return rare_non_inherited_data_->shape_outside_.Get(); | 1377 return rare_non_inherited_data_->shape_outside_.Get(); |
| 1374 } | 1378 } |
| 1375 void SetShapeOutside(ShapeValue* value) { | 1379 void SetShapeOutside(ShapeValue* value) { |
| 1376 if (rare_non_inherited_data_->shape_outside_ == value) | 1380 if (rare_non_inherited_data_->shape_outside_ == value) |
| 1377 return; | 1381 return; |
| 1378 rare_non_inherited_data_.Access()->shape_outside_ = value; | 1382 rare_non_inherited_data_.Access()->shape_outside_ = value; |
| 1379 } | 1383 } |
| 1384 bool ShapeOutsideDataEquivalent(const ComputedStyle& other) const { |
| 1385 return DataEquivalent(ShapeOutside(), other.ShapeOutside()); |
| 1386 } |
| 1380 | 1387 |
| 1381 // size | 1388 // size |
| 1382 const FloatSize& PageSize() const { | 1389 const FloatSize& PageSize() const { |
| 1383 return rare_non_inherited_data_->page_size_; | 1390 return rare_non_inherited_data_->page_size_; |
| 1384 } | 1391 } |
| 1385 PageSizeType GetPageSizeType() const { | 1392 PageSizeType GetPageSizeType() const { |
| 1386 return static_cast<PageSizeType>(rare_non_inherited_data_->page_size_type_); | 1393 return static_cast<PageSizeType>(rare_non_inherited_data_->page_size_type_); |
| 1387 } | 1394 } |
| 1388 void SetPageSize(const FloatSize& s) { | 1395 void SetPageSize(const FloatSize& s) { |
| 1389 SET_VAR(rare_non_inherited_data_, page_size_, s); | 1396 SET_VAR(rare_non_inherited_data_, page_size_, s); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 | 1549 |
| 1543 // -webkit-clip-path | 1550 // -webkit-clip-path |
| 1544 static ClipPathOperation* InitialClipPath() { return 0; } | 1551 static ClipPathOperation* InitialClipPath() { return 0; } |
| 1545 ClipPathOperation* ClipPath() const { | 1552 ClipPathOperation* ClipPath() const { |
| 1546 return rare_non_inherited_data_->clip_path_.Get(); | 1553 return rare_non_inherited_data_->clip_path_.Get(); |
| 1547 } | 1554 } |
| 1548 void SetClipPath(RefPtr<ClipPathOperation> operation) { | 1555 void SetClipPath(RefPtr<ClipPathOperation> operation) { |
| 1549 if (rare_non_inherited_data_->clip_path_ != operation) | 1556 if (rare_non_inherited_data_->clip_path_ != operation) |
| 1550 rare_non_inherited_data_.Access()->clip_path_ = std::move(operation); | 1557 rare_non_inherited_data_.Access()->clip_path_ = std::move(operation); |
| 1551 } | 1558 } |
| 1559 bool ClipPathDataEquivalent(const ComputedStyle& other) const { |
| 1560 return DataEquivalent(ClipPath(), other.ClipPath()); |
| 1561 } |
| 1552 | 1562 |
| 1553 // Mask properties. | 1563 // Mask properties. |
| 1554 // -webkit-mask-box-image-outset | 1564 // -webkit-mask-box-image-outset |
| 1555 const BorderImageLengthBox& MaskBoxImageOutset() const { | 1565 const BorderImageLengthBox& MaskBoxImageOutset() const { |
| 1556 return rare_non_inherited_data_->mask_box_image_.Outset(); | 1566 return rare_non_inherited_data_->mask_box_image_.Outset(); |
| 1557 } | 1567 } |
| 1558 void SetMaskBoxImageOutset(const BorderImageLengthBox& outset) { | 1568 void SetMaskBoxImageOutset(const BorderImageLengthBox& outset) { |
| 1559 rare_non_inherited_data_.Access()->mask_box_image_.SetOutset(outset); | 1569 rare_non_inherited_data_.Access()->mask_box_image_.SetOutset(outset); |
| 1560 } | 1570 } |
| 1561 | 1571 |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2270 bool IsColumnFlexDirection() const { | 2280 bool IsColumnFlexDirection() const { |
| 2271 return FlexDirection() == kFlowColumn || | 2281 return FlexDirection() == kFlowColumn || |
| 2272 FlexDirection() == kFlowColumnReverse; | 2282 FlexDirection() == kFlowColumnReverse; |
| 2273 } | 2283 } |
| 2274 bool IsReverseFlexDirection() const { | 2284 bool IsReverseFlexDirection() const { |
| 2275 return FlexDirection() == kFlowRowReverse || | 2285 return FlexDirection() == kFlowRowReverse || |
| 2276 FlexDirection() == kFlowColumnReverse; | 2286 FlexDirection() == kFlowColumnReverse; |
| 2277 } | 2287 } |
| 2278 bool HasBoxReflect() const { return BoxReflect(); } | 2288 bool HasBoxReflect() const { return BoxReflect(); } |
| 2279 bool ReflectionDataEquivalent(const ComputedStyle& other) const { | 2289 bool ReflectionDataEquivalent(const ComputedStyle& other) const { |
| 2280 return rare_non_inherited_data_->ReflectionDataEquivalent( | 2290 return DataEquivalent(BoxReflect(), other.BoxReflect()); |
| 2281 *other.rare_non_inherited_data_); | |
| 2282 } | 2291 } |
| 2283 | 2292 |
| 2284 // Mask utility functions. | 2293 // Mask utility functions. |
| 2285 bool HasMask() const { | 2294 bool HasMask() const { |
| 2286 return rare_non_inherited_data_->mask_.HasImage() || | 2295 return rare_non_inherited_data_->mask_.HasImage() || |
| 2287 rare_non_inherited_data_->mask_box_image_.HasImage(); | 2296 rare_non_inherited_data_->mask_box_image_.HasImage(); |
| 2288 } | 2297 } |
| 2289 StyleImage* MaskImage() const { | 2298 StyleImage* MaskImage() const { |
| 2290 return rare_non_inherited_data_->mask_.GetImage(); | 2299 return rare_non_inherited_data_->mask_.GetImage(); |
| 2291 } | 2300 } |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3051 } | 3060 } |
| 3052 bool HasStaticInlinePosition(bool horizontal) const { | 3061 bool HasStaticInlinePosition(bool horizontal) const { |
| 3053 return horizontal ? HasAutoLeftAndRight() : HasAutoTopAndBottom(); | 3062 return horizontal ? HasAutoLeftAndRight() : HasAutoTopAndBottom(); |
| 3054 } | 3063 } |
| 3055 bool HasStaticBlockPosition(bool horizontal) const { | 3064 bool HasStaticBlockPosition(bool horizontal) const { |
| 3056 return horizontal ? HasAutoTopAndBottom() : HasAutoLeftAndRight(); | 3065 return horizontal ? HasAutoTopAndBottom() : HasAutoLeftAndRight(); |
| 3057 } | 3066 } |
| 3058 | 3067 |
| 3059 // Content utility functions. | 3068 // Content utility functions. |
| 3060 bool ContentDataEquivalent(const ComputedStyle& other) const { | 3069 bool ContentDataEquivalent(const ComputedStyle& other) const { |
| 3061 return rare_non_inherited_data_->ContentDataEquivalent( | 3070 return DataEquivalent(GetContentData(), other.GetContentData()); |
| 3062 *other.rare_non_inherited_data_); | |
| 3063 } | 3071 } |
| 3064 | 3072 |
| 3065 // Contain utility functions. | 3073 // Contain utility functions. |
| 3066 bool ContainsPaint() const { | 3074 bool ContainsPaint() const { |
| 3067 return rare_non_inherited_data_->contain_ & kContainsPaint; | 3075 return rare_non_inherited_data_->contain_ & kContainsPaint; |
| 3068 } | 3076 } |
| 3069 bool ContainsStyle() const { | 3077 bool ContainsStyle() const { |
| 3070 return rare_non_inherited_data_->contain_ & kContainsStyle; | 3078 return rare_non_inherited_data_->contain_ & kContainsStyle; |
| 3071 } | 3079 } |
| 3072 bool ContainsLayout() const { | 3080 bool ContainsLayout() const { |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3744 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3752 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
| 3745 } | 3753 } |
| 3746 | 3754 |
| 3747 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3755 inline bool ComputedStyle::HasPseudoElementStyle() const { |
| 3748 return PseudoBitsInternal() & kElementPseudoIdMask; | 3756 return PseudoBitsInternal() & kElementPseudoIdMask; |
| 3749 } | 3757 } |
| 3750 | 3758 |
| 3751 } // namespace blink | 3759 } // namespace blink |
| 3752 | 3760 |
| 3753 #endif // ComputedStyle_h | 3761 #endif // ComputedStyle_h |
| OLD | NEW |