Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2769353002: Only create sticky position constraints for constrained sticky position. (Closed)
Patch Set: Merge with master. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 GetPosition() == EPosition::kSticky; 3031 }
3032 bool HasStickyConstrainedPosition() const {
3033 return GetPosition() == EPosition::kSticky &&
3034 (!Top().IsAuto() || !Left().IsAuto() || !Right().IsAuto() ||
3035 !Bottom().IsAuto());
3032 } 3036 }
3033 3037
3034 // Clip utility functions. 3038 // Clip utility functions.
3035 const Length& ClipLeft() const { return visual_->clip.Left(); } 3039 const Length& ClipLeft() const { return visual_->clip.Left(); }
3036 const Length& ClipRight() const { return visual_->clip.Right(); } 3040 const Length& ClipRight() const { return visual_->clip.Right(); }
3037 const Length& ClipTop() const { return visual_->clip.Top(); } 3041 const Length& ClipTop() const { return visual_->clip.Top(); }
3038 const Length& ClipBottom() const { return visual_->clip.Bottom(); } 3042 const Length& ClipBottom() const { return visual_->clip.Bottom(); }
3039 3043
3040 // Offset utility functions. 3044 // Offset utility functions.
3041 // Accessors for positioned object edges that take into account writing mode. 3045 // Accessors for positioned object edges that take into account writing mode.
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
3711 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId); 3715 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId);
3712 } 3716 }
3713 3717
3714 inline bool ComputedStyle::HasPseudoElementStyle() const { 3718 inline bool ComputedStyle::HasPseudoElementStyle() const {
3715 return pseudo_bits_ & kElementPseudoIdMask; 3719 return pseudo_bits_ & kElementPseudoIdMask;
3716 } 3720 }
3717 3721
3718 } // namespace blink 3722 } // namespace blink
3719 3723
3720 #endif // ComputedStyle_h 3724 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698