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: Source/core/rendering/style/StyleRareNonInheritedData.cpp

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased once again to master, fixed layout test. Created 6 years, 8 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 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Opera Software ASA. All rights reserved.
4 * 5 *
5 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
9 * 10 *
10 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 14 * Library General Public License for more details.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 , m_grid(o.m_grid) 109 , m_grid(o.m_grid)
109 , m_gridItem(o.m_gridItem) 110 , m_gridItem(o.m_gridItem)
110 , m_content(o.m_content ? o.m_content->clone() : nullptr) 111 , m_content(o.m_content ? o.m_content->clone() : nullptr)
111 , m_counterDirectives(o.m_counterDirectives ? clone(*o.m_counterDirectives) : nullptr) 112 , m_counterDirectives(o.m_counterDirectives ? clone(*o.m_counterDirectives) : nullptr)
112 , m_boxShadow(o.m_boxShadow) 113 , m_boxShadow(o.m_boxShadow)
113 , m_boxReflect(o.m_boxReflect) 114 , m_boxReflect(o.m_boxReflect)
114 , m_animations(o.m_animations ? adoptPtrWillBeNoop(new CSSAnimationDataList( *o.m_animations)) : nullptr) 115 , m_animations(o.m_animations ? adoptPtrWillBeNoop(new CSSAnimationDataList( *o.m_animations)) : nullptr)
115 , m_transitions(o.m_transitions ? adoptPtrWillBeNoop(new CSSAnimationDataLis t(*o.m_transitions)) : nullptr) 116 , m_transitions(o.m_transitions ? adoptPtrWillBeNoop(new CSSAnimationDataLis t(*o.m_transitions)) : nullptr)
116 , m_mask(o.m_mask) 117 , m_mask(o.m_mask)
117 , m_maskBoxImage(o.m_maskBoxImage) 118 , m_maskBoxImage(o.m_maskBoxImage)
119 , m_navigation(o.m_navigation ? adoptPtr(new StyleNavigationData(*o.m_naviga tion)) : nullptr)
118 , m_pageSize(o.m_pageSize) 120 , m_pageSize(o.m_pageSize)
119 , m_shapeOutside(o.m_shapeOutside) 121 , m_shapeOutside(o.m_shapeOutside)
120 , m_shapeMargin(o.m_shapeMargin) 122 , m_shapeMargin(o.m_shapeMargin)
121 , m_shapeImageThreshold(o.m_shapeImageThreshold) 123 , m_shapeImageThreshold(o.m_shapeImageThreshold)
122 , m_clipPath(o.m_clipPath) 124 , m_clipPath(o.m_clipPath)
123 , m_textDecorationColor(o.m_textDecorationColor) 125 , m_textDecorationColor(o.m_textDecorationColor)
124 , m_visitedLinkTextDecorationColor(o.m_visitedLinkTextDecorationColor) 126 , m_visitedLinkTextDecorationColor(o.m_visitedLinkTextDecorationColor)
125 , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor) 127 , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
126 , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor) 128 , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor)
127 , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor) 129 , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 && m_willChange == o.m_willChange 188 && m_willChange == o.m_willChange
187 && m_filter == o.m_filter 189 && m_filter == o.m_filter
188 && m_grid == o.m_grid 190 && m_grid == o.m_grid
189 && m_gridItem == o.m_gridItem 191 && m_gridItem == o.m_gridItem
190 && contentDataEquivalent(o) 192 && contentDataEquivalent(o)
191 && counterDataEquivalent(o) 193 && counterDataEquivalent(o)
192 && shadowDataEquivalent(o) 194 && shadowDataEquivalent(o)
193 && reflectionDataEquivalent(o) 195 && reflectionDataEquivalent(o)
194 && animationDataEquivalent(o) 196 && animationDataEquivalent(o)
195 && transitionDataEquivalent(o) 197 && transitionDataEquivalent(o)
198 && navigationDataEquivalent(o)
196 && m_mask == o.m_mask 199 && m_mask == o.m_mask
197 && m_maskBoxImage == o.m_maskBoxImage 200 && m_maskBoxImage == o.m_maskBoxImage
198 && m_pageSize == o.m_pageSize 201 && m_pageSize == o.m_pageSize
199 && m_shapeOutside == o.m_shapeOutside 202 && m_shapeOutside == o.m_shapeOutside
200 && m_shapeMargin == o.m_shapeMargin 203 && m_shapeMargin == o.m_shapeMargin
201 && m_shapeImageThreshold == o.m_shapeImageThreshold 204 && m_shapeImageThreshold == o.m_shapeImageThreshold
202 && m_clipPath == o.m_clipPath 205 && m_clipPath == o.m_clipPath
203 && m_textDecorationColor == o.m_textDecorationColor 206 && m_textDecorationColor == o.m_textDecorationColor
204 && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColo r 207 && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColo r
205 && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor 208 && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 ContentData* b = o.m_content.get(); 250 ContentData* b = o.m_content.get();
248 251
249 while (a && b && *a == *b) { 252 while (a && b && *a == *b) {
250 a = a->next(); 253 a = a->next();
251 b = b->next(); 254 b = b->next();
252 } 255 }
253 256
254 return !a && !b; 257 return !a && !b;
255 } 258 }
256 259
260 bool StyleRareNonInheritedData::navigationDataEquivalent(const StyleRareNonInher itedData& o) const
261 {
262 StyleNavigationData* a = m_navigation.get();
263 StyleNavigationData* b = o.m_navigation.get();
264
265 return a && b && *a == *b;
266 }
267
257 bool StyleRareNonInheritedData::counterDataEquivalent(const StyleRareNonInherite dData& o) const 268 bool StyleRareNonInheritedData::counterDataEquivalent(const StyleRareNonInherite dData& o) const
258 { 269 {
259 if (m_counterDirectives.get() == o.m_counterDirectives.get()) 270 if (m_counterDirectives.get() == o.m_counterDirectives.get())
260 return true; 271 return true;
261 272
262 if (m_counterDirectives && o.m_counterDirectives && *m_counterDirectives == *o.m_counterDirectives) 273 if (m_counterDirectives && o.m_counterDirectives && *m_counterDirectives == *o.m_counterDirectives)
263 return true; 274 return true;
264 275
265 return false; 276 return false;
266 } 277 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 return false; 312 return false;
302 return true; 313 return true;
303 } 314 }
304 315
305 bool StyleRareNonInheritedData::hasFilters() const 316 bool StyleRareNonInheritedData::hasFilters() const
306 { 317 {
307 return m_filter.get() && !m_filter->m_operations.isEmpty(); 318 return m_filter.get() && !m_filter->m_operations.isEmpty();
308 } 319 }
309 320
310 } // namespace WebCore 321 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698