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

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

Issue 2801683005: Revert of Removing duplicate functions and symbol names in core/css (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 17 matching lines...) Expand all
28 #include "core/CSSPropertyNames.h" 28 #include "core/CSSPropertyNames.h"
29 #include "core/css/CSSIdentifierValue.h" 29 #include "core/css/CSSIdentifierValue.h"
30 #include "core/css/CSSPrimitiveValue.h" 30 #include "core/css/CSSPrimitiveValue.h"
31 #include "core/css/CSSPrimitiveValueMappings.h" 31 #include "core/css/CSSPrimitiveValueMappings.h"
32 #include "core/css/CSSPropertyIDTemplates.h" 32 #include "core/css/CSSPropertyIDTemplates.h"
33 #include "core/css/CSSPropertyMetadata.h" 33 #include "core/css/CSSPropertyMetadata.h"
34 #include "core/css/CSSSelector.h" 34 #include "core/css/CSSSelector.h"
35 #include "core/css/CSSVariableData.h" 35 #include "core/css/CSSVariableData.h"
36 #include "core/css/ComputedStyleCSSValueMapping.h" 36 #include "core/css/ComputedStyleCSSValueMapping.h"
37 #include "core/css/parser/CSSParser.h" 37 #include "core/css/parser/CSSParser.h"
38 #include "core/css/zoomAdjustedPixelValue.h"
39 #include "core/dom/Document.h" 38 #include "core/dom/Document.h"
40 #include "core/dom/ExceptionCode.h" 39 #include "core/dom/ExceptionCode.h"
41 #include "core/dom/PseudoElement.h" 40 #include "core/dom/PseudoElement.h"
42 #include "core/dom/StyleEngine.h" 41 #include "core/dom/StyleEngine.h"
43 #include "core/layout/LayoutObject.h" 42 #include "core/layout/LayoutObject.h"
44 #include "core/style/ComputedStyle.h" 43 #include "core/style/ComputedStyle.h"
45 #include "wtf/text/StringBuilder.h" 44 #include "wtf/text/StringBuilder.h"
46 45
47 namespace blink { 46 namespace blink {
48 47
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 CSSPropertyScrollSnapPointsY, CSSPropertyScrollSnapCoordinate, 176 CSSPropertyScrollSnapPointsY, CSSPropertyScrollSnapCoordinate,
178 CSSPropertyScrollSnapDestination, CSSPropertyTranslate, CSSPropertyRotate, 177 CSSPropertyScrollSnapDestination, CSSPropertyTranslate, CSSPropertyRotate,
179 CSSPropertyScale, CSSPropertyCaretColor}; 178 CSSPropertyScale, CSSPropertyCaretColor};
180 179
181 CSSValueID cssIdentifierForFontSizeKeyword(int keywordSize) { 180 CSSValueID cssIdentifierForFontSizeKeyword(int keywordSize) {
182 DCHECK_NE(keywordSize, 0); 181 DCHECK_NE(keywordSize, 0);
183 DCHECK_LE(keywordSize, 8); 182 DCHECK_LE(keywordSize, 8);
184 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1); 183 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1);
185 } 184 }
186 185
186 inline CSSPrimitiveValue* zoomAdjustedPixelValue(double value,
187 const ComputedStyle& style) {
188 return CSSPrimitiveValue::create(adjustFloatForAbsoluteZoom(value, style),
189 CSSPrimitiveValue::UnitType::Pixels);
190 }
191
187 void logUnimplementedPropertyID(CSSPropertyID propertyID) { 192 void logUnimplementedPropertyID(CSSPropertyID propertyID) {
188 DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ()); 193 DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ());
189 if (!propertyIDSet.insert(propertyID).isNewEntry) 194 if (!propertyIDSet.insert(propertyID).isNewEntry)
190 return; 195 return;
191 196
192 DLOG(ERROR) << "Blink does not yet implement getComputedStyle for '" 197 DLOG(ERROR) << "Blink does not yet implement getComputedStyle for '"
193 << getPropertyName(propertyID) << "'."; 198 << getPropertyName(propertyID) << "'.";
194 } 199 }
195 200
196 bool isLayoutDependent(CSSPropertyID propertyID, 201 bool isLayoutDependent(CSSPropertyID propertyID,
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 "These styles are computed, and therefore the '" + 563 "These styles are computed, and therefore the '" +
559 getPropertyNameString(id) + "' property is read-only."); 564 getPropertyNameString(id) + "' property is read-only.");
560 } 565 }
561 566
562 DEFINE_TRACE(CSSComputedStyleDeclaration) { 567 DEFINE_TRACE(CSSComputedStyleDeclaration) {
563 visitor->trace(m_node); 568 visitor->trace(m_node);
564 CSSStyleDeclaration::trace(visitor); 569 CSSStyleDeclaration::trace(visitor);
565 } 570 }
566 571
567 } // namespace blink 572 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698