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 3009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3020 // Position utility functions. | 3020 // Position utility functions. |
3021 bool HasOutOfFlowPosition() const { | 3021 bool HasOutOfFlowPosition() const { |
3022 return GetPosition() == EPosition::kAbsolute || | 3022 return GetPosition() == EPosition::kAbsolute || |
3023 GetPosition() == EPosition::kFixed; | 3023 GetPosition() == EPosition::kFixed; |
3024 } | 3024 } |
3025 bool HasInFlowPosition() const { | 3025 bool HasInFlowPosition() const { |
3026 return GetPosition() == EPosition::kRelative || | 3026 return GetPosition() == EPosition::kRelative || |
3027 GetPosition() == EPosition::kSticky; | 3027 GetPosition() == EPosition::kSticky; |
3028 } | 3028 } |
3029 bool HasViewportConstrainedPosition() const { | 3029 bool HasViewportConstrainedPosition() const { |
3030 return GetPosition() == EPosition::kFixed; | 3030 return GetPosition() == EPosition::kFixed || |
3031 } | 3031 GetPosition() == EPosition::kSticky; |
3032 bool HasStickyConstrainedPosition() const { | |
3033 return GetPosition() == EPosition::kSticky && | |
3034 (!Top().IsAuto() || !Left().IsAuto() || !Right().IsAuto() || | |
3035 !Bottom().IsAuto()); | |
3036 } | 3032 } |
3037 | 3033 |
3038 // Clip utility functions. | 3034 // Clip utility functions. |
3039 const Length& ClipLeft() const { return visual_->clip.Left(); } | 3035 const Length& ClipLeft() const { return visual_->clip.Left(); } |
3040 const Length& ClipRight() const { return visual_->clip.Right(); } | 3036 const Length& ClipRight() const { return visual_->clip.Right(); } |
3041 const Length& ClipTop() const { return visual_->clip.Top(); } | 3037 const Length& ClipTop() const { return visual_->clip.Top(); } |
3042 const Length& ClipBottom() const { return visual_->clip.Bottom(); } | 3038 const Length& ClipBottom() const { return visual_->clip.Bottom(); } |
3043 | 3039 |
3044 // Offset utility functions. | 3040 // Offset utility functions. |
3045 // Accessors for positioned object edges that take into account writing mode. | 3041 // Accessors for positioned object edges that take into account writing mode. |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3715 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId); | 3711 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId); |
3716 } | 3712 } |
3717 | 3713 |
3718 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3714 inline bool ComputedStyle::HasPseudoElementStyle() const { |
3719 return pseudo_bits_ & kElementPseudoIdMask; | 3715 return pseudo_bits_ & kElementPseudoIdMask; |
3720 } | 3716 } |
3721 | 3717 |
3722 } // namespace blink | 3718 } // namespace blink |
3723 | 3719 |
3724 #endif // ComputedStyle_h | 3720 #endif // ComputedStyle_h |
OLD | NEW |