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

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

Issue 2880573002: Store border-*-style on SurroundData in ComputedStyle (Closed)
Patch Set: Merge branch 'enumClass' into borderStyle 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 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 1952
1953 return (old_fill != new_fill || cached_ua_style->background_color != 1953 return (old_fill != new_fill || cached_ua_style->background_color !=
1954 state.Style()->BackgroundColor()); 1954 state.Style()->BackgroundColor());
1955 } 1955 }
1956 1956
1957 bool StyleResolver::HasAuthorBorder(const StyleResolverState& state) { 1957 bool StyleResolver::HasAuthorBorder(const StyleResolverState& state) {
1958 const CachedUAStyle* cached_ua_style = state.GetCachedUAStyle(); 1958 const CachedUAStyle* cached_ua_style = state.GetCachedUAStyle();
1959 return cached_ua_style && 1959 return cached_ua_style &&
1960 (cached_ua_style->border != state.Style()->Border() || 1960 (cached_ua_style->border != state.Style()->Border() ||
1961 !cached_ua_style->BorderColorEquals(*state.Style()) || 1961 !cached_ua_style->BorderColorEquals(*state.Style()) ||
1962 (cached_ua_style->border_left_width != 1962 !cached_ua_style->BorderWidthEquals(*state.Style()) ||
1963 state.Style()->BorderLeftWidth() || 1963 !cached_ua_style->BorderRadiiEquals(*state.Style()) ||
1964 cached_ua_style->border_right_width != 1964 !cached_ua_style->BorderStyleEquals(*state.Style()));
1965 state.Style()->BorderRightWidth() ||
1966 cached_ua_style->border_top_width !=
1967 state.Style()->BorderTopWidth() ||
1968 cached_ua_style->border_bottom_width !=
1969 state.Style()->BorderBottomWidth()) ||
1970 !(cached_ua_style->top_left_ ==
1971 state.Style()->BorderTopLeftRadius() &&
1972 cached_ua_style->top_right_ ==
1973 state.Style()->BorderTopRightRadius() &&
1974 cached_ua_style->bottom_left_ ==
1975 state.Style()->BorderBottomLeftRadius() &&
1976 cached_ua_style->bottom_right_ ==
1977 state.Style()->BorderBottomRightRadius()));
1978 } 1965 }
1979 1966
1980 void StyleResolver::ApplyCallbackSelectors(StyleResolverState& state) { 1967 void StyleResolver::ApplyCallbackSelectors(StyleResolverState& state) {
1981 RuleSet* watched_selectors_rule_set = 1968 RuleSet* watched_selectors_rule_set =
1982 GetDocument().GetStyleEngine().WatchedSelectorsRuleSet(); 1969 GetDocument().GetStyleEngine().WatchedSelectorsRuleSet();
1983 if (!watched_selectors_rule_set) 1970 if (!watched_selectors_rule_set)
1984 return; 1971 return;
1985 1972
1986 ElementRuleCollector collector(state.ElementContext(), selector_filter_, 1973 ElementRuleCollector collector(state.ElementContext(), selector_filter_,
1987 state.Style()); 1974 state.Style());
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 2022
2036 DEFINE_TRACE(StyleResolver) { 2023 DEFINE_TRACE(StyleResolver) {
2037 visitor->Trace(matched_properties_cache_); 2024 visitor->Trace(matched_properties_cache_);
2038 visitor->Trace(selector_filter_); 2025 visitor->Trace(selector_filter_);
2039 visitor->Trace(style_sharing_lists_); 2026 visitor->Trace(style_sharing_lists_);
2040 visitor->Trace(document_); 2027 visitor->Trace(document_);
2041 visitor->Trace(tracker_); 2028 visitor->Trace(tracker_);
2042 } 2029 }
2043 2030
2044 } // namespace blink 2031 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698