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

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

Issue 1970563002: Compute snap offsets according to CSS Scroll Snap Spec Level 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 void setIsolation(EIsolation v) { rareNonInheritedData.access()->m_isolation = v; } 1017 void setIsolation(EIsolation v) { rareNonInheritedData.access()->m_isolation = v; }
1018 bool hasIsolation() const { return isolation() != IsolationAuto; } 1018 bool hasIsolation() const { return isolation() != IsolationAuto; }
1019 1019
1020 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { return !isLef tToRightDirection() && isHorizontalWritingMode(); } 1020 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { return !isLef tToRightDirection() && isHorizontalWritingMode(); }
1021 1021
1022 TouchAction getTouchAction() const { return static_cast<TouchAction>(rareNon InheritedData->m_touchAction); } 1022 TouchAction getTouchAction() const { return static_cast<TouchAction>(rareNon InheritedData->m_touchAction); }
1023 1023
1024 ScrollBehavior getScrollBehavior() const { return static_cast<ScrollBehavior >(rareNonInheritedData->m_scrollBehavior); } 1024 ScrollBehavior getScrollBehavior() const { return static_cast<ScrollBehavior >(rareNonInheritedData->m_scrollBehavior); }
1025 1025
1026 ScrollSnapType getScrollSnapType() const { return static_cast<ScrollSnapType >(rareNonInheritedData->m_scrollSnapType); } 1026 ScrollSnapType getScrollSnapType() const { return static_cast<ScrollSnapType >(rareNonInheritedData->m_scrollSnapType); }
1027 ScrollSnapPoints scrollSnapPointsX() const { return rareNonInheritedData->m_ scrollSnap->m_xPoints; } 1027 const ScrollSnapPoints& scrollSnapPointsX() const { return rareNonInheritedD ata->m_scrollSnap->m_xPoints; }
1028 ScrollSnapPoints scrollSnapPointsY() const { return rareNonInheritedData->m_ scrollSnap->m_yPoints; } 1028 const ScrollSnapPoints& scrollSnapPointsY() const { return rareNonInheritedD ata->m_scrollSnap->m_yPoints; }
1029 Vector<LengthPoint> scrollSnapCoordinate() const { return rareNonInheritedDa ta->m_scrollSnap->m_coordinates; } 1029 const Vector<LengthPoint>& scrollSnapCoordinate() const { return rareNonInhe ritedData->m_scrollSnap->m_coordinates; }
1030 LengthPoint scrollSnapDestination() const { return rareNonInheritedData->m_s crollSnap->m_destination; } 1030 const LengthPoint& scrollSnapDestination() const { return rareNonInheritedDa ta->m_scrollSnap->m_destination; }
1031 1031
1032 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn heritedData->m_willChange->m_properties; } 1032 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn heritedData->m_willChange->m_properties; }
1033 bool willChangeContents() const { return rareNonInheritedData->m_willChange- >m_contents; } 1033 bool willChangeContents() const { return rareNonInheritedData->m_willChange- >m_contents; }
1034 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC hange->m_scrollPosition; } 1034 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC hange->m_scrollPosition; }
1035 bool hasWillChangeCompositingHint() const; 1035 bool hasWillChangeCompositingHint() const;
1036 bool hasWillChangeTransformHint() const; 1036 bool hasWillChangeTransformHint() const;
1037 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree WillChangeContents; } 1037 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree WillChangeContents; }
1038 1038
1039 // attribute setter methods 1039 // attribute setter methods
1040 1040
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2039 } 2039 }
2040 2040
2041 inline bool ComputedStyle::hasPseudoElementStyle() const 2041 inline bool ComputedStyle::hasPseudoElementStyle() const
2042 { 2042 {
2043 return noninherited_flags.pseudoBits & ElementPseudoIdMask; 2043 return noninherited_flags.pseudoBits & ElementPseudoIdMask;
2044 } 2044 }
2045 2045
2046 } // namespace blink 2046 } // namespace blink
2047 2047
2048 #endif // ComputedStyle_h 2048 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698