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

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: Set dependent patch. Created 3 years, 9 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 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3117 // Position utility functions. 3117 // Position utility functions.
3118 bool hasOutOfFlowPosition() const { 3118 bool hasOutOfFlowPosition() const {
3119 return position() == EPosition::kAbsolute || 3119 return position() == EPosition::kAbsolute ||
3120 position() == EPosition::kFixed; 3120 position() == EPosition::kFixed;
3121 } 3121 }
3122 bool hasInFlowPosition() const { 3122 bool hasInFlowPosition() const {
3123 return position() == EPosition::kRelative || 3123 return position() == EPosition::kRelative ||
3124 position() == EPosition::kSticky; 3124 position() == EPosition::kSticky;
3125 } 3125 }
3126 bool hasViewportConstrainedPosition() const { 3126 bool hasViewportConstrainedPosition() const {
3127 return position() == EPosition::kFixed || position() == EPosition::kSticky; 3127 return position() == EPosition::kFixed;
3128 }
3129 bool hasStickyConstrainedPosition() const {
3130 return position() == EPosition::kSticky &&
3131 (!top().isAuto() || !left().isAuto() || !right().isAuto() ||
3132 !bottom().isAuto());
3128 } 3133 }
3129 3134
3130 // Clip utility functions. 3135 // Clip utility functions.
3131 const Length& clipLeft() const { return m_visual->clip.left(); } 3136 const Length& clipLeft() const { return m_visual->clip.left(); }
3132 const Length& clipRight() const { return m_visual->clip.right(); } 3137 const Length& clipRight() const { return m_visual->clip.right(); }
3133 const Length& clipTop() const { return m_visual->clip.top(); } 3138 const Length& clipTop() const { return m_visual->clip.top(); }
3134 const Length& clipBottom() const { return m_visual->clip.bottom(); } 3139 const Length& clipBottom() const { return m_visual->clip.bottom(); }
3135 3140
3136 // Offset utility functions. 3141 // Offset utility functions.
3137 // Accessors for positioned object edges that take into account writing mode. 3142 // Accessors for positioned object edges that take into account writing mode.
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
3784 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId); 3789 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId);
3785 } 3790 }
3786 3791
3787 inline bool ComputedStyle::hasPseudoElementStyle() const { 3792 inline bool ComputedStyle::hasPseudoElementStyle() const {
3788 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 3793 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
3789 } 3794 }
3790 3795
3791 } // namespace blink 3796 } // namespace blink
3792 3797
3793 #endif // ComputedStyle_h 3798 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698