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

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

Issue 2836143003: Invalidate border/outline on color change only if they use current color (Closed)
Patch Set: rebaselined Created 3 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 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 2935 matching lines...) Expand 10 before | Expand all | Expand 10 after
2946 float BorderBeforeWidth() const; 2946 float BorderBeforeWidth() const;
2947 float BorderEndWidth() const; 2947 float BorderEndWidth() const;
2948 float BorderStartWidth() const; 2948 float BorderStartWidth() const;
2949 float BorderOverWidth() const; 2949 float BorderOverWidth() const;
2950 float BorderUnderWidth() const; 2950 float BorderUnderWidth() const;
2951 2951
2952 bool HasBorderFill() const { return Border().HasBorderFill(); } 2952 bool HasBorderFill() const { return Border().HasBorderFill(); }
2953 bool HasBorder() const { return Border().HasBorder(); } 2953 bool HasBorder() const { return Border().HasBorder(); }
2954 bool HasBorderDecoration() const { return HasBorder() || HasBorderFill(); } 2954 bool HasBorderDecoration() const { return HasBorder() || HasBorderFill(); }
2955 bool HasBorderRadius() const { return Border().HasBorderRadius(); } 2955 bool HasBorderRadius() const { return Border().HasBorderRadius(); }
2956 bool HasBorderColorReferencingCurrentColor() const {
2957 return Border().HasBorderColorReferencingCurrentColor();
2958 }
2956 2959
2957 void ResetBorder() { 2960 void ResetBorder() {
2958 ResetBorderImage(); 2961 ResetBorderImage();
2959 ResetBorderTop(); 2962 ResetBorderTop();
2960 ResetBorderRight(); 2963 ResetBorderRight();
2961 ResetBorderBottom(); 2964 ResetBorderBottom();
2962 ResetBorderLeft(); 2965 ResetBorderLeft();
2963 ResetBorderTopLeftRadius(); 2966 ResetBorderTopLeftRadius();
2964 ResetBorderTopRightRadius(); 2967 ResetBorderTopRightRadius();
2965 ResetBorderBottomLeftRadius(); 2968 ResetBorderBottomLeftRadius();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
3037 void ResetPageSizeType() { 3040 void ResetPageSizeType() {
3038 SET_VAR(rare_non_inherited_data_, page_size_type_, PAGE_SIZE_AUTO); 3041 SET_VAR(rare_non_inherited_data_, page_size_type_, PAGE_SIZE_AUTO);
3039 } 3042 }
3040 3043
3041 // Outline utility functions. 3044 // Outline utility functions.
3042 bool HasOutline() const { 3045 bool HasOutline() const {
3043 return OutlineWidth() > 0 && OutlineStyle() > kBorderStyleHidden; 3046 return OutlineWidth() > 0 && OutlineStyle() > kBorderStyleHidden;
3044 } 3047 }
3045 int OutlineOutsetExtent() const; 3048 int OutlineOutsetExtent() const;
3046 float GetOutlineStrokeWidthForFocusRing() const; 3049 float GetOutlineStrokeWidthForFocusRing() const;
3050 bool HasOutlineWithCurrentColor() const {
3051 return HasOutline() && OutlineColor().IsCurrentColor();
3052 }
3047 3053
3048 // Position utility functions. 3054 // Position utility functions.
3049 bool HasOutOfFlowPosition() const { 3055 bool HasOutOfFlowPosition() const {
3050 return GetPosition() == EPosition::kAbsolute || 3056 return GetPosition() == EPosition::kAbsolute ||
3051 GetPosition() == EPosition::kFixed; 3057 GetPosition() == EPosition::kFixed;
3052 } 3058 }
3053 bool HasInFlowPosition() const { 3059 bool HasInFlowPosition() const {
3054 return GetPosition() == EPosition::kRelative || 3060 return GetPosition() == EPosition::kRelative ||
3055 GetPosition() == EPosition::kSticky; 3061 GetPosition() == EPosition::kSticky;
3056 } 3062 }
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
3741 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3747 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3742 } 3748 }
3743 3749
3744 inline bool ComputedStyle::HasPseudoElementStyle() const { 3750 inline bool ComputedStyle::HasPseudoElementStyle() const {
3745 return PseudoBitsInternal() & kElementPseudoIdMask; 3751 return PseudoBitsInternal() & kElementPseudoIdMask;
3746 } 3752 }
3747 3753
3748 } // namespace blink 3754 } // namespace blink
3749 3755
3750 #endif // ComputedStyle_h 3756 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/BorderData.h ('k') | third_party/WebKit/Source/core/style/ComputedStyleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698