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 * Copyright (C) 2015 Google Inc. All rights reserved. | 8 * Copyright (C) 2015 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "core/css/CSSPrimitiveValueMappings.h" | 50 #include "core/css/CSSPrimitiveValueMappings.h" |
51 #include "core/css/CSSQuadValue.h" | 51 #include "core/css/CSSQuadValue.h" |
52 #include "core/css/CSSReflectValue.h" | 52 #include "core/css/CSSReflectValue.h" |
53 #include "core/css/CSSShadowValue.h" | 53 #include "core/css/CSSShadowValue.h" |
54 #include "core/css/CSSStringValue.h" | 54 #include "core/css/CSSStringValue.h" |
55 #include "core/css/CSSTimingFunctionValue.h" | 55 #include "core/css/CSSTimingFunctionValue.h" |
56 #include "core/css/CSSURIValue.h" | 56 #include "core/css/CSSURIValue.h" |
57 #include "core/css/CSSValueList.h" | 57 #include "core/css/CSSValueList.h" |
58 #include "core/css/CSSValuePair.h" | 58 #include "core/css/CSSValuePair.h" |
59 #include "core/css/PropertyRegistry.h" | 59 #include "core/css/PropertyRegistry.h" |
60 #include "core/css/zoomAdjustedPixelValue.h" | |
61 #include "core/layout/LayoutBlock.h" | 60 #include "core/layout/LayoutBlock.h" |
62 #include "core/layout/LayoutBox.h" | 61 #include "core/layout/LayoutBox.h" |
63 #include "core/layout/LayoutGrid.h" | 62 #include "core/layout/LayoutGrid.h" |
64 #include "core/layout/LayoutObject.h" | 63 #include "core/layout/LayoutObject.h" |
65 #include "core/style/ComputedStyle.h" | 64 #include "core/style/ComputedStyle.h" |
66 #include "core/style/ContentData.h" | 65 #include "core/style/ContentData.h" |
67 #include "core/style/CursorData.h" | 66 #include "core/style/CursorData.h" |
68 #include "core/style/QuotesData.h" | 67 #include "core/style/QuotesData.h" |
69 #include "core/style/ShadowList.h" | 68 #include "core/style/ShadowList.h" |
70 #include "core/style/StyleInheritedVariables.h" | 69 #include "core/style/StyleInheritedVariables.h" |
71 #include "core/style/StyleNonInheritedVariables.h" | 70 #include "core/style/StyleNonInheritedVariables.h" |
72 #include "platform/LengthFunctions.h" | 71 #include "platform/LengthFunctions.h" |
73 | 72 |
74 namespace blink { | 73 namespace blink { |
75 | 74 |
76 inline static bool isFlexOrGrid(const ComputedStyle* style) { | 75 inline static bool isFlexOrGrid(const ComputedStyle* style) { |
77 return style && style->isDisplayFlexibleOrGridBox(); | 76 return style && style->isDisplayFlexibleOrGridBox(); |
78 } | 77 } |
79 | 78 |
| 79 inline static CSSPrimitiveValue* zoomAdjustedPixelValue( |
| 80 double value, |
| 81 const ComputedStyle& style) { |
| 82 return CSSPrimitiveValue::create(adjustFloatForAbsoluteZoom(value, style), |
| 83 CSSPrimitiveValue::UnitType::Pixels); |
| 84 } |
| 85 |
80 inline static CSSValue* zoomAdjustedPixelValueOrAuto( | 86 inline static CSSValue* zoomAdjustedPixelValueOrAuto( |
81 const Length& length, | 87 const Length& length, |
82 const ComputedStyle& style) { | 88 const ComputedStyle& style) { |
83 if (length.isAuto()) | 89 if (length.isAuto()) |
84 return CSSIdentifierValue::create(CSSValueAuto); | 90 return CSSIdentifierValue::create(CSSValueAuto); |
85 return zoomAdjustedPixelValue(length.value(), style); | 91 return zoomAdjustedPixelValue(length.value(), style); |
86 } | 92 } |
87 | 93 |
88 static CSSValue* zoomAdjustedPixelValueForLength(const Length& length, | 94 static CSSValue* zoomAdjustedPixelValueForLength(const Length& length, |
89 const ComputedStyle& style) { | 95 const ComputedStyle& style) { |
(...skipping 3596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3686 case CSSPropertyAll: | 3692 case CSSPropertyAll: |
3687 return nullptr; | 3693 return nullptr; |
3688 default: | 3694 default: |
3689 break; | 3695 break; |
3690 } | 3696 } |
3691 NOTREACHED(); | 3697 NOTREACHED(); |
3692 return nullptr; | 3698 return nullptr; |
3693 } | 3699 } |
3694 | 3700 |
3695 } // namespace blink | 3701 } // namespace blink |
OLD | NEW |