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

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

Issue 2891003002: Store border-image-* on SurroundData in ComputedStyle (Closed)
Patch Set: Store border-image-* on SurroundData in ComputedStyle 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) 2013 Google, Inc. 2 * Copyright (C) 2013 Google, Inc.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 bool BorderStyleEquals(const ComputedStyle& other) const { 78 bool BorderStyleEquals(const ComputedStyle& other) const {
79 return ( 79 return (
80 border_left_style == static_cast<unsigned>(other.BorderLeftStyle()) && 80 border_left_style == static_cast<unsigned>(other.BorderLeftStyle()) &&
81 border_right_style == static_cast<unsigned>(other.BorderRightStyle()) && 81 border_right_style == static_cast<unsigned>(other.BorderRightStyle()) &&
82 border_top_style == static_cast<unsigned>(other.BorderTopStyle()) && 82 border_top_style == static_cast<unsigned>(other.BorderTopStyle()) &&
83 border_bottom_style == 83 border_bottom_style ==
84 static_cast<unsigned>(other.BorderBottomStyle())); 84 static_cast<unsigned>(other.BorderBottomStyle()));
85 } 85 }
86 86
87 BorderData border;
88 LengthSize top_left_; 87 LengthSize top_left_;
89 LengthSize top_right_; 88 LengthSize top_right_;
90 LengthSize bottom_left_; 89 LengthSize bottom_left_;
91 LengthSize bottom_right_; 90 LengthSize bottom_right_;
92 Color border_left_color; 91 Color border_left_color;
93 Color border_right_color; 92 Color border_right_color;
94 Color border_top_color; 93 Color border_top_color;
95 Color border_bottom_color; 94 Color border_bottom_color;
96 bool border_left_color_is_current_color; 95 bool border_left_color_is_current_color;
97 bool border_right_color_is_current_color; 96 bool border_right_color_is_current_color;
98 bool border_top_color_is_current_color; 97 bool border_top_color_is_current_color;
99 bool border_bottom_color_is_current_color; 98 bool border_bottom_color_is_current_color;
100 unsigned border_left_style : 4; // EBorderStyle 99 unsigned border_left_style : 4; // EBorderStyle
101 unsigned border_right_style : 4; // EBorderStyle 100 unsigned border_right_style : 4; // EBorderStyle
102 unsigned border_top_style : 4; // EBorderStyle 101 unsigned border_top_style : 4; // EBorderStyle
103 unsigned border_bottom_style : 4; // EBorderStyle 102 unsigned border_bottom_style : 4; // EBorderStyle
104 float border_left_width; 103 float border_left_width;
105 float border_right_width; 104 float border_right_width;
106 float border_top_width; 105 float border_top_width;
107 float border_bottom_width; 106 float border_bottom_width;
107 NinePieceImage border_image;
108 FillLayer background_layers; 108 FillLayer background_layers;
109 StyleColor background_color; 109 StyleColor background_color;
110 110
111 private: 111 private:
112 explicit CachedUAStyle(const ComputedStyle* style) 112 explicit CachedUAStyle(const ComputedStyle* style)
113 : border(style->Border()), 113 : top_left_(style->BorderTopLeftRadius()),
114 top_left_(style->BorderTopLeftRadius()),
115 top_right_(style->BorderTopRightRadius()), 114 top_right_(style->BorderTopRightRadius()),
116 bottom_left_(style->BorderBottomLeftRadius()), 115 bottom_left_(style->BorderBottomLeftRadius()),
117 bottom_right_(style->BorderBottomRightRadius()), 116 bottom_right_(style->BorderBottomRightRadius()),
118 border_left_color(style->BorderLeftColorInternal()), 117 border_left_color(style->BorderLeftColorInternal()),
119 border_right_color(style->BorderRightColorInternal()), 118 border_right_color(style->BorderRightColorInternal()),
120 border_top_color(style->BorderTopColorInternal()), 119 border_top_color(style->BorderTopColorInternal()),
121 border_bottom_color(style->BorderBottomColorInternal()), 120 border_bottom_color(style->BorderBottomColorInternal()),
122 border_left_color_is_current_color( 121 border_left_color_is_current_color(
123 style->BorderLeftColorIsCurrentColor()), 122 style->BorderLeftColorIsCurrentColor()),
124 border_right_color_is_current_color( 123 border_right_color_is_current_color(
125 style->BorderRightColorIsCurrentColor()), 124 style->BorderRightColorIsCurrentColor()),
126 border_top_color_is_current_color( 125 border_top_color_is_current_color(
127 style->BorderTopColorIsCurrentColor()), 126 style->BorderTopColorIsCurrentColor()),
128 border_bottom_color_is_current_color( 127 border_bottom_color_is_current_color(
129 style->BorderBottomColorIsCurrentColor()), 128 style->BorderBottomColorIsCurrentColor()),
130 border_left_style(static_cast<unsigned>(style->BorderLeftStyle())), 129 border_left_style(static_cast<unsigned>(style->BorderLeftStyle())),
131 border_right_style(static_cast<unsigned>(style->BorderRightStyle())), 130 border_right_style(static_cast<unsigned>(style->BorderRightStyle())),
132 border_top_style(static_cast<unsigned>(style->BorderTopStyle())), 131 border_top_style(static_cast<unsigned>(style->BorderTopStyle())),
133 border_bottom_style(static_cast<unsigned>(style->BorderBottomStyle())), 132 border_bottom_style(static_cast<unsigned>(style->BorderBottomStyle())),
134 border_left_width(style->BorderLeftWidth()), 133 border_left_width(style->BorderLeftWidth()),
135 border_right_width(style->BorderRightWidth()), 134 border_right_width(style->BorderRightWidth()),
136 border_top_width(style->BorderTopWidth()), 135 border_top_width(style->BorderTopWidth()),
137 border_bottom_width(style->BorderBottomWidth()), 136 border_bottom_width(style->BorderBottomWidth()),
137 border_image(style->BorderImage()),
138 background_layers(style->BackgroundLayers()), 138 background_layers(style->BackgroundLayers()),
139 background_color(style->BackgroundColor()) {} 139 background_color(style->BackgroundColor()) {}
140 }; 140 };
141 141
142 } // namespace blink 142 } // namespace blink
143 143
144 #endif // CachedUAStyle_h 144 #endif // CachedUAStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698