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

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp

Issue 2796183002: Introduce the nested namespace ::blink::cssvalue, start with CSSColorValue. (Closed)
Patch Set: Use the least possible namespace scoping when aliasing. Created 3 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) 2007, 2008, 2009 Apple Computer, Inc. 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc.
3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 18 matching lines...) Expand all
29 #include "core/css/CSSColorValue.h" 29 #include "core/css/CSSColorValue.h"
30 #include "core/css/CSSComputedStyleDeclaration.h" 30 #include "core/css/CSSComputedStyleDeclaration.h"
31 #include "core/css/CSSIdentifierValue.h" 31 #include "core/css/CSSIdentifierValue.h"
32 #include "core/css/StylePropertySet.h" 32 #include "core/css/StylePropertySet.h"
33 #include "core/css/parser/CSSParser.h" 33 #include "core/css/parser/CSSParser.h"
34 #include "core/editing/EditingStyle.h" 34 #include "core/editing/EditingStyle.h"
35 #include "core/editing/EditingUtilities.h" 35 #include "core/editing/EditingUtilities.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 using namespace cssvalue;
40
39 bool EditingStyleUtilities::hasAncestorVerticalAlignStyle(Node& node, 41 bool EditingStyleUtilities::hasAncestorVerticalAlignStyle(Node& node,
40 CSSValueID value) { 42 CSSValueID value) {
41 for (Node& runner : NodeTraversal::inclusiveAncestorsOf(node)) { 43 for (Node& runner : NodeTraversal::inclusiveAncestorsOf(node)) {
42 CSSComputedStyleDeclaration* ancestorStyle = 44 CSSComputedStyleDeclaration* ancestorStyle =
43 CSSComputedStyleDeclaration::create(&runner); 45 CSSComputedStyleDeclaration::create(&runner);
44 if (getIdentifierValue(ancestorStyle, CSSPropertyVerticalAlign) == value) 46 if (getIdentifierValue(ancestorStyle, CSSPropertyVerticalAlign) == value)
45 return true; 47 return true;
46 } 48 }
47 return false; 49 return false;
48 } 50 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 191 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
190 CSSComputedStyleDeclaration* ancestorStyle = 192 CSSComputedStyleDeclaration* ancestorStyle =
191 CSSComputedStyleDeclaration::create(ancestor); 193 CSSComputedStyleDeclaration::create(ancestor);
192 if (!hasTransparentBackgroundColor(ancestorStyle)) 194 if (!hasTransparentBackgroundColor(ancestorStyle))
193 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor); 195 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor);
194 } 196 }
195 return nullptr; 197 return nullptr;
196 } 198 }
197 199
198 } // namespace blink 200 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingStyle.cpp ('k') | third_party/WebKit/Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698