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" |
38 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
39 #include "core/dom/ExceptionCode.h" | 40 #include "core/dom/ExceptionCode.h" |
40 #include "core/dom/PseudoElement.h" | 41 #include "core/dom/PseudoElement.h" |
41 #include "core/dom/StyleEngine.h" | 42 #include "core/dom/StyleEngine.h" |
42 #include "core/layout/LayoutObject.h" | 43 #include "core/layout/LayoutObject.h" |
43 #include "core/style/ComputedStyle.h" | 44 #include "core/style/ComputedStyle.h" |
44 #include "wtf/text/StringBuilder.h" | 45 #include "wtf/text/StringBuilder.h" |
45 | 46 |
46 namespace blink { | 47 namespace blink { |
47 | 48 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 CSSPropertyScrollSnapPointsY, CSSPropertyScrollSnapCoordinate, | 177 CSSPropertyScrollSnapPointsY, CSSPropertyScrollSnapCoordinate, |
177 CSSPropertyScrollSnapDestination, CSSPropertyTranslate, CSSPropertyRotate, | 178 CSSPropertyScrollSnapDestination, CSSPropertyTranslate, CSSPropertyRotate, |
178 CSSPropertyScale, CSSPropertyCaretColor}; | 179 CSSPropertyScale, CSSPropertyCaretColor}; |
179 | 180 |
180 CSSValueID cssIdentifierForFontSizeKeyword(int keywordSize) { | 181 CSSValueID cssIdentifierForFontSizeKeyword(int keywordSize) { |
181 DCHECK_NE(keywordSize, 0); | 182 DCHECK_NE(keywordSize, 0); |
182 DCHECK_LE(keywordSize, 8); | 183 DCHECK_LE(keywordSize, 8); |
183 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1); | 184 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1); |
184 } | 185 } |
185 | 186 |
186 inline CSSPrimitiveValue* zoomAdjustedPixelValue(double value, | |
187 const ComputedStyle& style) { | |
188 return CSSPrimitiveValue::create(adjustFloatForAbsoluteZoom(value, style), | |
189 CSSPrimitiveValue::UnitType::Pixels); | |
190 } | |
191 | |
192 void logUnimplementedPropertyID(CSSPropertyID propertyID) { | 187 void logUnimplementedPropertyID(CSSPropertyID propertyID) { |
193 DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ()); | 188 DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ()); |
194 if (!propertyIDSet.insert(propertyID).isNewEntry) | 189 if (!propertyIDSet.insert(propertyID).isNewEntry) |
195 return; | 190 return; |
196 | 191 |
197 DLOG(ERROR) << "Blink does not yet implement getComputedStyle for '" | 192 DLOG(ERROR) << "Blink does not yet implement getComputedStyle for '" |
198 << getPropertyName(propertyID) << "'."; | 193 << getPropertyName(propertyID) << "'."; |
199 } | 194 } |
200 | 195 |
201 bool isLayoutDependent(CSSPropertyID propertyID, | 196 bool isLayoutDependent(CSSPropertyID propertyID, |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 "These styles are computed, and therefore the '" + | 558 "These styles are computed, and therefore the '" + |
564 getPropertyNameString(id) + "' property is read-only."); | 559 getPropertyNameString(id) + "' property is read-only."); |
565 } | 560 } |
566 | 561 |
567 DEFINE_TRACE(CSSComputedStyleDeclaration) { | 562 DEFINE_TRACE(CSSComputedStyleDeclaration) { |
568 visitor->trace(m_node); | 563 visitor->trace(m_node); |
569 CSSStyleDeclaration::trace(visitor); | 564 CSSStyleDeclaration::trace(visitor); |
570 } | 565 } |
571 | 566 |
572 } // namespace blink | 567 } // namespace blink |
OLD | NEW |