| 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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 void SetTouchAction(TouchAction t) { | 1510 void SetTouchAction(TouchAction t) { |
| 1511 SET_VAR(rare_non_inherited_data_, touch_action_, t); | 1511 SET_VAR(rare_non_inherited_data_, touch_action_, t); |
| 1512 } | 1512 } |
| 1513 | 1513 |
| 1514 // vertical-align | 1514 // vertical-align |
| 1515 static EVerticalAlign InitialVerticalAlign() { | 1515 static EVerticalAlign InitialVerticalAlign() { |
| 1516 return EVerticalAlign::kBaseline; | 1516 return EVerticalAlign::kBaseline; |
| 1517 } | 1517 } |
| 1518 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } | 1518 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } |
| 1519 const Length& GetVerticalAlignLength() const { | 1519 const Length& GetVerticalAlignLength() const { |
| 1520 return box_data_->vertical_align_length_; | 1520 return VerticalAlignLengthInternal(); |
| 1521 } | 1521 } |
| 1522 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } | 1522 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } |
| 1523 void SetVerticalAlignLength(const Length& length) { | 1523 void SetVerticalAlignLength(const Length& length) { |
| 1524 SetVerticalAlignInternal(EVerticalAlign::kLength); | 1524 SetVerticalAlignInternal(EVerticalAlign::kLength); |
| 1525 SET_VAR(box_data_, vertical_align_length_, length); | 1525 SetVerticalAlignLengthInternal(length); |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 // will-change | 1528 // will-change |
| 1529 const Vector<CSSPropertyID>& WillChangeProperties() const { | 1529 const Vector<CSSPropertyID>& WillChangeProperties() const { |
| 1530 return rare_non_inherited_data_->will_change_->properties_; | 1530 return rare_non_inherited_data_->will_change_->properties_; |
| 1531 } | 1531 } |
| 1532 bool WillChangeContents() const { | 1532 bool WillChangeContents() const { |
| 1533 return rare_non_inherited_data_->will_change_->contents_; | 1533 return rare_non_inherited_data_->will_change_->contents_; |
| 1534 } | 1534 } |
| 1535 bool WillChangeScrollPosition() const { | 1535 bool WillChangeScrollPosition() const { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1546 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, contents_, b); | 1546 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, contents_, b); |
| 1547 } | 1547 } |
| 1548 void SetWillChangeScrollPosition(bool b) { | 1548 void SetWillChangeScrollPosition(bool b) { |
| 1549 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, scroll_position_, b); | 1549 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, scroll_position_, b); |
| 1550 } | 1550 } |
| 1551 void SetSubtreeWillChangeContents(bool b) { | 1551 void SetSubtreeWillChangeContents(bool b) { |
| 1552 SET_VAR(rare_inherited_data_, subtree_will_change_contents_, b); | 1552 SET_VAR(rare_inherited_data_, subtree_will_change_contents_, b); |
| 1553 } | 1553 } |
| 1554 | 1554 |
| 1555 // z-index | 1555 // z-index |
| 1556 int ZIndex() const { return box_data_->z_index_; } | 1556 int ZIndex() const { return ZIndexInternal(); } |
| 1557 bool HasAutoZIndex() const { return box_data_->has_auto_z_index_; } | 1557 bool HasAutoZIndex() const { return HasAutoZIndexInternal(); } |
| 1558 void SetZIndex(int v) { | 1558 void SetZIndex(int v) { |
| 1559 SET_VAR(box_data_, has_auto_z_index_, false); | 1559 SetHasAutoZIndexInternal(false); |
| 1560 SET_VAR(box_data_, z_index_, v); | 1560 SetZIndexInternal(v); |
| 1561 } | 1561 } |
| 1562 void SetHasAutoZIndex() { | 1562 void SetHasAutoZIndex() { |
| 1563 SET_VAR(box_data_, has_auto_z_index_, true); | 1563 SetHasAutoZIndexInternal(true); |
| 1564 SET_VAR(box_data_, z_index_, 0); | 1564 SetZIndexInternal(0); |
| 1565 } | 1565 } |
| 1566 | 1566 |
| 1567 // zoom | 1567 // zoom |
| 1568 static float InitialZoom() { return 1.0f; } | 1568 static float InitialZoom() { return 1.0f; } |
| 1569 float Zoom() const { return visual_data_->zoom_; } | 1569 float Zoom() const { return visual_data_->zoom_; } |
| 1570 float EffectiveZoom() const { return rare_inherited_data_->effective_zoom_; } | 1570 float EffectiveZoom() const { return rare_inherited_data_->effective_zoom_; } |
| 1571 bool SetZoom(float); | 1571 bool SetZoom(float); |
| 1572 bool SetEffectiveZoom(float); | 1572 bool SetEffectiveZoom(float); |
| 1573 | 1573 |
| 1574 // -webkit-app-region | 1574 // -webkit-app-region |
| (...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2685 | 2685 |
| 2686 // Width/height utility functions. | 2686 // Width/height utility functions. |
| 2687 const Length& LogicalWidth() const { | 2687 const Length& LogicalWidth() const { |
| 2688 return IsHorizontalWritingMode() ? Width() : Height(); | 2688 return IsHorizontalWritingMode() ? Width() : Height(); |
| 2689 } | 2689 } |
| 2690 const Length& LogicalHeight() const { | 2690 const Length& LogicalHeight() const { |
| 2691 return IsHorizontalWritingMode() ? Height() : Width(); | 2691 return IsHorizontalWritingMode() ? Height() : Width(); |
| 2692 } | 2692 } |
| 2693 void SetLogicalWidth(const Length& v) { | 2693 void SetLogicalWidth(const Length& v) { |
| 2694 if (IsHorizontalWritingMode()) { | 2694 if (IsHorizontalWritingMode()) { |
| 2695 SET_VAR(box_data_, width_, v); | 2695 SetWidth(v); |
| 2696 } else { | 2696 } else { |
| 2697 SET_VAR(box_data_, height_, v); | 2697 SetHeight(v); |
| 2698 } | 2698 } |
| 2699 } | 2699 } |
| 2700 | 2700 |
| 2701 void SetLogicalHeight(const Length& v) { | 2701 void SetLogicalHeight(const Length& v) { |
| 2702 if (IsHorizontalWritingMode()) { | 2702 if (IsHorizontalWritingMode()) { |
| 2703 SET_VAR(box_data_, height_, v); | 2703 SetHeight(v); |
| 2704 } else { | 2704 } else { |
| 2705 SET_VAR(box_data_, width_, v); | 2705 SetWidth(v); |
| 2706 } | 2706 } |
| 2707 } | 2707 } |
| 2708 const Length& LogicalMaxWidth() const { | 2708 const Length& LogicalMaxWidth() const { |
| 2709 return IsHorizontalWritingMode() ? MaxWidth() : MaxHeight(); | 2709 return IsHorizontalWritingMode() ? MaxWidth() : MaxHeight(); |
| 2710 } | 2710 } |
| 2711 const Length& LogicalMaxHeight() const { | 2711 const Length& LogicalMaxHeight() const { |
| 2712 return IsHorizontalWritingMode() ? MaxHeight() : MaxWidth(); | 2712 return IsHorizontalWritingMode() ? MaxHeight() : MaxWidth(); |
| 2713 } | 2713 } |
| 2714 const Length& LogicalMinWidth() const { | 2714 const Length& LogicalMinWidth() const { |
| 2715 return IsHorizontalWritingMode() ? MinWidth() : MinHeight(); | 2715 return IsHorizontalWritingMode() ? MinWidth() : MinHeight(); |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3771 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3771 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
| 3772 } | 3772 } |
| 3773 | 3773 |
| 3774 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3774 inline bool ComputedStyle::HasPseudoElementStyle() const { |
| 3775 return PseudoBitsInternal() & kElementPseudoIdMask; | 3775 return PseudoBitsInternal() & kElementPseudoIdMask; |
| 3776 } | 3776 } |
| 3777 | 3777 |
| 3778 } // namespace blink | 3778 } // namespace blink |
| 3779 | 3779 |
| 3780 #endif // ComputedStyle_h | 3780 #endif // ComputedStyle_h |
| OLD | NEW |