OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |