| 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 | 599 |
| 600 // box-shadow (aka -webkit-box-shadow) | 600 // box-shadow (aka -webkit-box-shadow) |
| 601 static ShadowList* InitialBoxShadow() { return 0; } | 601 static ShadowList* InitialBoxShadow() { return 0; } |
| 602 ShadowList* BoxShadow() const { | 602 ShadowList* BoxShadow() const { |
| 603 return rare_non_inherited_data_->box_shadow_.Get(); | 603 return rare_non_inherited_data_->box_shadow_.Get(); |
| 604 } | 604 } |
| 605 void SetBoxShadow(PassRefPtr<ShadowList>); | 605 void SetBoxShadow(PassRefPtr<ShadowList>); |
| 606 | 606 |
| 607 // box-sizing (aka -webkit-box-sizing) | 607 // box-sizing (aka -webkit-box-sizing) |
| 608 static EBoxSizing InitialBoxSizing() { return EBoxSizing::kContentBox; } | 608 static EBoxSizing InitialBoxSizing() { return EBoxSizing::kContentBox; } |
| 609 EBoxSizing BoxSizing() const { return box_data_->BoxSizing(); } | 609 EBoxSizing BoxSizing() const { |
| 610 return static_cast<EBoxSizing>(box_data_->box_sizing_); |
| 611 } |
| 610 void SetBoxSizing(EBoxSizing s) { | 612 void SetBoxSizing(EBoxSizing s) { |
| 611 SET_VAR(box_data_, box_sizing_, static_cast<unsigned>(s)); | 613 SET_VAR(box_data_, box_sizing_, static_cast<unsigned>(s)); |
| 612 } | 614 } |
| 613 | 615 |
| 614 // clip | 616 // clip |
| 615 static LengthBox InitialClip() { return LengthBox(); } | 617 static LengthBox InitialClip() { return LengthBox(); } |
| 616 const LengthBox& Clip() const { return visual_data_->clip; } | 618 const LengthBox& Clip() const { return visual_data_->clip; } |
| 617 void SetClip(const LengthBox& box) { | 619 void SetClip(const LengthBox& box) { |
| 618 SET_VAR(visual_data_, has_auto_clip, false); | 620 SET_VAR(visual_data_, has_auto_clip, false); |
| 619 SET_VAR(visual_data_, clip, box); | 621 SET_VAR(visual_data_, clip, box); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 void SetBoxAlign(EBoxAlignment a) { | 813 void SetBoxAlign(EBoxAlignment a) { |
| 812 SET_NESTED_VAR(rare_non_inherited_data_, deprecated_flexible_box_, align, | 814 SET_NESTED_VAR(rare_non_inherited_data_, deprecated_flexible_box_, align, |
| 813 a); | 815 a); |
| 814 } | 816 } |
| 815 | 817 |
| 816 // -webkit-box-decoration-break | 818 // -webkit-box-decoration-break |
| 817 static EBoxDecorationBreak InitialBoxDecorationBreak() { | 819 static EBoxDecorationBreak InitialBoxDecorationBreak() { |
| 818 return kBoxDecorationBreakSlice; | 820 return kBoxDecorationBreakSlice; |
| 819 } | 821 } |
| 820 EBoxDecorationBreak BoxDecorationBreak() const { | 822 EBoxDecorationBreak BoxDecorationBreak() const { |
| 821 return box_data_->BoxDecorationBreak(); | 823 return static_cast<EBoxDecorationBreak>(box_data_->box_decoration_break_); |
| 822 } | 824 } |
| 823 void SetBoxDecorationBreak(EBoxDecorationBreak b) { | 825 void SetBoxDecorationBreak(EBoxDecorationBreak b) { |
| 824 SET_VAR(box_data_, box_decoration_break_, b); | 826 SET_VAR(box_data_, box_decoration_break_, static_cast<unsigned>(b)); |
| 825 } | 827 } |
| 826 | 828 |
| 827 // -webkit-box-lines | 829 // -webkit-box-lines |
| 828 static EBoxLines InitialBoxLines() { return SINGLE; } | 830 static EBoxLines InitialBoxLines() { return SINGLE; } |
| 829 EBoxLines BoxLines() const { | 831 EBoxLines BoxLines() const { |
| 830 return static_cast<EBoxLines>( | 832 return static_cast<EBoxLines>( |
| 831 rare_non_inherited_data_->deprecated_flexible_box_->lines); | 833 rare_non_inherited_data_->deprecated_flexible_box_->lines); |
| 832 } | 834 } |
| 833 void SetBoxLines(EBoxLines lines) { | 835 void SetBoxLines(EBoxLines lines) { |
| 834 SET_NESTED_VAR(rare_non_inherited_data_, deprecated_flexible_box_, lines, | 836 SET_NESTED_VAR(rare_non_inherited_data_, deprecated_flexible_box_, lines, |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 } | 1011 } |
| 1010 void SetGridTemplateRows(const Vector<GridTrackSize>& lengths) { | 1012 void SetGridTemplateRows(const Vector<GridTrackSize>& lengths) { |
| 1011 SET_NESTED_VAR(rare_non_inherited_data_, grid_, grid_template_rows_, | 1013 SET_NESTED_VAR(rare_non_inherited_data_, grid_, grid_template_rows_, |
| 1012 lengths); | 1014 lengths); |
| 1013 } | 1015 } |
| 1014 | 1016 |
| 1015 // Width/height properties. | 1017 // Width/height properties. |
| 1016 | 1018 |
| 1017 // width | 1019 // width |
| 1018 static Length InitialWidth() { return Length(); } | 1020 static Length InitialWidth() { return Length(); } |
| 1019 const Length& Width() const { return box_data_->Width(); } | 1021 const Length& Width() const { return box_data_->width_; } |
| 1020 void SetWidth(const Length& v) { SET_VAR(box_data_, width_, v); } | 1022 void SetWidth(const Length& v) { SET_VAR(box_data_, width_, v); } |
| 1021 | 1023 |
| 1022 // height | 1024 // height |
| 1023 static Length InitialHeight() { return Length(); } | 1025 static Length InitialHeight() { return Length(); } |
| 1024 const Length& Height() const { return box_data_->Height(); } | 1026 const Length& Height() const { return box_data_->height_; } |
| 1025 void SetHeight(const Length& v) { SET_VAR(box_data_, height_, v); } | 1027 void SetHeight(const Length& v) { SET_VAR(box_data_, height_, v); } |
| 1026 | 1028 |
| 1027 // max-width | 1029 // max-width |
| 1028 static Length InitialMaxWidth() { return Length(kMaxSizeNone); } | 1030 static Length InitialMaxWidth() { return Length(kMaxSizeNone); } |
| 1029 const Length& MaxWidth() const { return box_data_->MaxWidth(); } | 1031 const Length& MaxWidth() const { return box_data_->max_width_; } |
| 1030 void SetMaxWidth(const Length& v) { SET_VAR(box_data_, max_width_, v); } | 1032 void SetMaxWidth(const Length& v) { SET_VAR(box_data_, max_width_, v); } |
| 1031 | 1033 |
| 1032 // max-height | 1034 // max-height |
| 1033 static Length InitialMaxHeight() { return Length(kMaxSizeNone); } | 1035 static Length InitialMaxHeight() { return Length(kMaxSizeNone); } |
| 1034 const Length& MaxHeight() const { return box_data_->MaxHeight(); } | 1036 const Length& MaxHeight() const { return box_data_->max_height_; } |
| 1035 void SetMaxHeight(const Length& v) { SET_VAR(box_data_, max_height_, v); } | 1037 void SetMaxHeight(const Length& v) { SET_VAR(box_data_, max_height_, v); } |
| 1036 | 1038 |
| 1037 // min-width | 1039 // min-width |
| 1038 static Length InitialMinWidth() { return Length(); } | 1040 static Length InitialMinWidth() { return Length(); } |
| 1039 const Length& MinWidth() const { return box_data_->MinWidth(); } | 1041 const Length& MinWidth() const { return box_data_->min_width_; } |
| 1040 void SetMinWidth(const Length& v) { SET_VAR(box_data_, min_width_, v); } | 1042 void SetMinWidth(const Length& v) { SET_VAR(box_data_, min_width_, v); } |
| 1041 | 1043 |
| 1042 // min-height | 1044 // min-height |
| 1043 static Length InitialMinHeight() { return Length(); } | 1045 static Length InitialMinHeight() { return Length(); } |
| 1044 const Length& MinHeight() const { return box_data_->MinHeight(); } | 1046 const Length& MinHeight() const { return box_data_->min_height_; } |
| 1045 void SetMinHeight(const Length& v) { SET_VAR(box_data_, min_height_, v); } | 1047 void SetMinHeight(const Length& v) { SET_VAR(box_data_, min_height_, v); } |
| 1046 | 1048 |
| 1047 // image-orientation | 1049 // image-orientation |
| 1048 static RespectImageOrientationEnum InitialRespectImageOrientation() { | 1050 static RespectImageOrientationEnum InitialRespectImageOrientation() { |
| 1049 return kDoNotRespectImageOrientation; | 1051 return kDoNotRespectImageOrientation; |
| 1050 } | 1052 } |
| 1051 RespectImageOrientationEnum RespectImageOrientation() const { | 1053 RespectImageOrientationEnum RespectImageOrientation() const { |
| 1052 return static_cast<RespectImageOrientationEnum>( | 1054 return static_cast<RespectImageOrientationEnum>( |
| 1053 rare_inherited_data_->respect_image_orientation_); | 1055 rare_inherited_data_->respect_image_orientation_); |
| 1054 } | 1056 } |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1564 void SetTouchAction(TouchAction t) { | 1566 void SetTouchAction(TouchAction t) { |
| 1565 SET_VAR(rare_non_inherited_data_, touch_action_, t); | 1567 SET_VAR(rare_non_inherited_data_, touch_action_, t); |
| 1566 } | 1568 } |
| 1567 | 1569 |
| 1568 // vertical-align | 1570 // vertical-align |
| 1569 static EVerticalAlign InitialVerticalAlign() { | 1571 static EVerticalAlign InitialVerticalAlign() { |
| 1570 return EVerticalAlign::kBaseline; | 1572 return EVerticalAlign::kBaseline; |
| 1571 } | 1573 } |
| 1572 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } | 1574 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } |
| 1573 const Length& GetVerticalAlignLength() const { | 1575 const Length& GetVerticalAlignLength() const { |
| 1574 return box_data_->VerticalAlign(); | 1576 return box_data_->vertical_align_length_; |
| 1575 } | 1577 } |
| 1576 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } | 1578 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } |
| 1577 void SetVerticalAlignLength(const Length& length) { | 1579 void SetVerticalAlignLength(const Length& length) { |
| 1578 SetVerticalAlignInternal(EVerticalAlign::kLength); | 1580 SetVerticalAlignInternal(EVerticalAlign::kLength); |
| 1579 SET_VAR(box_data_, vertical_align_, length); | 1581 SET_VAR(box_data_, vertical_align_length_, length); |
| 1580 } | 1582 } |
| 1581 | 1583 |
| 1582 // will-change | 1584 // will-change |
| 1583 const Vector<CSSPropertyID>& WillChangeProperties() const { | 1585 const Vector<CSSPropertyID>& WillChangeProperties() const { |
| 1584 return rare_non_inherited_data_->will_change_->properties_; | 1586 return rare_non_inherited_data_->will_change_->properties_; |
| 1585 } | 1587 } |
| 1586 bool WillChangeContents() const { | 1588 bool WillChangeContents() const { |
| 1587 return rare_non_inherited_data_->will_change_->contents_; | 1589 return rare_non_inherited_data_->will_change_->contents_; |
| 1588 } | 1590 } |
| 1589 bool WillChangeScrollPosition() const { | 1591 bool WillChangeScrollPosition() const { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1600 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, contents_, b); | 1602 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, contents_, b); |
| 1601 } | 1603 } |
| 1602 void SetWillChangeScrollPosition(bool b) { | 1604 void SetWillChangeScrollPosition(bool b) { |
| 1603 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, scroll_position_, b); | 1605 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, scroll_position_, b); |
| 1604 } | 1606 } |
| 1605 void SetSubtreeWillChangeContents(bool b) { | 1607 void SetSubtreeWillChangeContents(bool b) { |
| 1606 SET_VAR(rare_inherited_data_, subtree_will_change_contents_, b); | 1608 SET_VAR(rare_inherited_data_, subtree_will_change_contents_, b); |
| 1607 } | 1609 } |
| 1608 | 1610 |
| 1609 // z-index | 1611 // z-index |
| 1610 int ZIndex() const { return box_data_->ZIndex(); } | 1612 int ZIndex() const { return box_data_->z_index_; } |
| 1611 bool HasAutoZIndex() const { return box_data_->HasAutoZIndex(); } | 1613 bool HasAutoZIndex() const { return box_data_->has_auto_z_index_; } |
| 1612 void SetZIndex(int v) { | 1614 void SetZIndex(int v) { |
| 1613 SET_VAR(box_data_, has_auto_z_index_, false); | 1615 SET_VAR(box_data_, has_auto_z_index_, false); |
| 1614 SET_VAR(box_data_, z_index_, v); | 1616 SET_VAR(box_data_, z_index_, v); |
| 1615 } | 1617 } |
| 1616 void SetHasAutoZIndex() { | 1618 void SetHasAutoZIndex() { |
| 1617 SET_VAR(box_data_, has_auto_z_index_, true); | 1619 SET_VAR(box_data_, has_auto_z_index_, true); |
| 1618 SET_VAR(box_data_, z_index_, 0); | 1620 SET_VAR(box_data_, z_index_, 0); |
| 1619 } | 1621 } |
| 1620 | 1622 |
| 1621 // zoom | 1623 // zoom |
| (...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3693 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3695 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
| 3694 } | 3696 } |
| 3695 | 3697 |
| 3696 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3698 inline bool ComputedStyle::HasPseudoElementStyle() const { |
| 3697 return PseudoBitsInternal() & kElementPseudoIdMask; | 3699 return PseudoBitsInternal() & kElementPseudoIdMask; |
| 3698 } | 3700 } |
| 3699 | 3701 |
| 3700 } // namespace blink | 3702 } // namespace blink |
| 3701 | 3703 |
| 3702 #endif // ComputedStyle_h | 3704 #endif // ComputedStyle_h |
| OLD | NEW |