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

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

Issue 2936113003: Make EIsolation an enum class. (Closed)
Patch Set: Fix code Created 3 years, 6 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 } 1014 }
1015 RespectImageOrientationEnum RespectImageOrientation() const { 1015 RespectImageOrientationEnum RespectImageOrientation() const {
1016 return static_cast<RespectImageOrientationEnum>( 1016 return static_cast<RespectImageOrientationEnum>(
1017 RespectImageOrientationInternal()); 1017 RespectImageOrientationInternal());
1018 } 1018 }
1019 void SetRespectImageOrientation(RespectImageOrientationEnum v) { 1019 void SetRespectImageOrientation(RespectImageOrientationEnum v) {
1020 SetRespectImageOrientationInternal(v); 1020 SetRespectImageOrientationInternal(v);
1021 } 1021 }
1022 1022
1023 // isolation 1023 // isolation
1024 static EIsolation InitialIsolation() { return kIsolationAuto; } 1024 static EIsolation InitialIsolation() { return EIsolation::kAuto; }
1025 EIsolation Isolation() const { 1025 EIsolation Isolation() const {
1026 return static_cast<EIsolation>(rare_non_inherited_data_->isolation_); 1026 return static_cast<EIsolation>(rare_non_inherited_data_->isolation_);
1027 } 1027 }
1028 void SetIsolation(EIsolation v) { 1028 void SetIsolation(EIsolation v) {
1029 rare_non_inherited_data_.Access()->isolation_ = v; 1029 rare_non_inherited_data_.Access()->isolation_ = static_cast<unsigned>(v);
1030 } 1030 }
1031 1031
1032 // -webkit-margin-before-collapse (aka -webkit-margin-top-collapse) 1032 // -webkit-margin-before-collapse (aka -webkit-margin-top-collapse)
1033 static EMarginCollapse InitialMarginBeforeCollapse() { 1033 static EMarginCollapse InitialMarginBeforeCollapse() {
1034 return kMarginCollapseCollapse; 1034 return kMarginCollapseCollapse;
1035 } 1035 }
1036 EMarginCollapse MarginAfterCollapse() const { 1036 EMarginCollapse MarginAfterCollapse() const {
1037 return static_cast<EMarginCollapse>( 1037 return static_cast<EMarginCollapse>(
1038 rare_non_inherited_data_->margin_after_collapse_); 1038 rare_non_inherited_data_->margin_after_collapse_);
1039 } 1039 }
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2940 } 2940 }
2941 bool IsDisplayBlockContainer() const { 2941 bool IsDisplayBlockContainer() const {
2942 return IsDisplayBlockContainer(Display()); 2942 return IsDisplayBlockContainer(Display());
2943 } 2943 }
2944 bool IsDisplayFlexibleOrGridBox() const { 2944 bool IsDisplayFlexibleOrGridBox() const {
2945 return IsDisplayFlexibleBox(Display()) || IsDisplayGridBox(Display()); 2945 return IsDisplayFlexibleBox(Display()) || IsDisplayGridBox(Display());
2946 } 2946 }
2947 bool IsDisplayFlexibleBox() const { return IsDisplayFlexibleBox(Display()); } 2947 bool IsDisplayFlexibleBox() const { return IsDisplayFlexibleBox(Display()); }
2948 2948
2949 // Isolation utility functions. 2949 // Isolation utility functions.
2950 bool HasIsolation() const { return Isolation() != kIsolationAuto; } 2950 bool HasIsolation() const { return Isolation() != EIsolation::kAuto; }
2951 2951
2952 // Content utility functions. 2952 // Content utility functions.
2953 bool HasContent() const { return GetContentData(); } 2953 bool HasContent() const { return GetContentData(); }
2954 2954
2955 // Cursor utility functions. 2955 // Cursor utility functions.
2956 CursorList* Cursors() const { return CursorDataInternal().Get(); } 2956 CursorList* Cursors() const { return CursorDataInternal().Get(); }
2957 void AddCursor(StyleImage*, 2957 void AddCursor(StyleImage*,
2958 bool hot_spot_specified, 2958 bool hot_spot_specified,
2959 const IntPoint& hot_spot = IntPoint()); 2959 const IntPoint& hot_spot = IntPoint());
2960 void SetCursorList(CursorList*); 2960 void SetCursorList(CursorList*);
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
3574 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3574 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3575 } 3575 }
3576 3576
3577 inline bool ComputedStyle::HasPseudoElementStyle() const { 3577 inline bool ComputedStyle::HasPseudoElementStyle() const {
3578 return PseudoBitsInternal() & kElementPseudoIdMask; 3578 return PseudoBitsInternal() & kElementPseudoIdMask;
3579 } 3579 }
3580 3580
3581 } // namespace blink 3581 } // namespace blink
3582 3582
3583 #endif // ComputedStyle_h 3583 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.json5 ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698