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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2869043002: Store border-*-color on SurroundData in ComputedStyle not BorderColorAndStyle (Closed)
Patch Set: Always return VisitedDependantColor(CSSPropertyID) 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 new_fill.SetRepeatY(kNoRepeatFill); 1950 new_fill.SetRepeatY(kNoRepeatFill);
1951 1951
1952 return (old_fill != new_fill || cached_ua_style->background_color != 1952 return (old_fill != new_fill || cached_ua_style->background_color !=
1953 state.Style()->BackgroundColor()); 1953 state.Style()->BackgroundColor());
1954 } 1954 }
1955 1955
1956 bool StyleResolver::HasAuthorBorder(const StyleResolverState& state) { 1956 bool StyleResolver::HasAuthorBorder(const StyleResolverState& state) {
1957 const CachedUAStyle* cached_ua_style = state.GetCachedUAStyle(); 1957 const CachedUAStyle* cached_ua_style = state.GetCachedUAStyle();
1958 return cached_ua_style && 1958 return cached_ua_style &&
1959 (cached_ua_style->border != state.Style()->Border() || 1959 (cached_ua_style->border != state.Style()->Border() ||
1960 (cached_ua_style->border_left_color !=
1961 state.Style()->VisitedDependentColor(
1962 CSSPropertyBorderLeftColor) ||
1963 cached_ua_style->border_right_color !=
1964 state.Style()->VisitedDependentColor(
1965 CSSPropertyBorderRightColor) ||
1966 cached_ua_style->border_top_color !=
1967 state.Style()->VisitedDependentColor(
1968 CSSPropertyBorderTopColor) ||
1969 cached_ua_style->border_bottom_color !=
1970 state.Style()->VisitedDependentColor(
1971 CSSPropertyBorderBottomColor)) ||
1972 (cached_ua_style->border_left_color_is_current_color !=
1973 state.Style()->BorderLeftColorIsCurrentColor() ||
1974 cached_ua_style->border_right_color_is_current_color !=
1975 state.Style()->BorderRightColorIsCurrentColor() ||
1976 cached_ua_style->border_top_color_is_current_color !=
1977 state.Style()->BorderTopColorIsCurrentColor() ||
1978 cached_ua_style->border_bottom_color_is_current_color !=
1979 state.Style()->BorderBottomColorIsCurrentColor()) ||
1960 (cached_ua_style->border_left_width != 1980 (cached_ua_style->border_left_width !=
1961 state.Style()->BorderLeftWidth() || 1981 state.Style()->BorderLeftWidth() ||
1962 cached_ua_style->border_right_width != 1982 cached_ua_style->border_right_width !=
1963 state.Style()->BorderRightWidth() || 1983 state.Style()->BorderRightWidth() ||
1964 cached_ua_style->border_top_width != 1984 cached_ua_style->border_top_width !=
1965 state.Style()->BorderTopWidth() || 1985 state.Style()->BorderTopWidth() ||
1966 cached_ua_style->border_bottom_width != 1986 cached_ua_style->border_bottom_width !=
1967 state.Style()->BorderBottomWidth()) || 1987 state.Style()->BorderBottomWidth()) ||
1968 !(cached_ua_style->top_left_ == 1988 !(cached_ua_style->top_left_ ==
1969 state.Style()->BorderTopLeftRadius() && 1989 state.Style()->BorderTopLeftRadius() &&
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2053
2034 DEFINE_TRACE(StyleResolver) { 2054 DEFINE_TRACE(StyleResolver) {
2035 visitor->Trace(matched_properties_cache_); 2055 visitor->Trace(matched_properties_cache_);
2036 visitor->Trace(selector_filter_); 2056 visitor->Trace(selector_filter_);
2037 visitor->Trace(style_sharing_lists_); 2057 visitor->Trace(style_sharing_lists_);
2038 visitor->Trace(document_); 2058 visitor->Trace(document_);
2039 visitor->Trace(tracker_); 2059 visitor->Trace(tracker_);
2040 } 2060 }
2041 2061
2042 } // namespace blink 2062 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698