| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright |
| 5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. |
| 6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above |
| 7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer |
| 8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the |
| 9 * distribution. | 9 * distribution. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| 11 * contributors may be used to endorse or promote products derived from | 11 * contributors may be used to endorse or promote products derived from |
| 12 * this software without specific prior written permission. | 12 * this software without specific prior written permission. |
| 13 * | 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 15 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 15 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 16 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 16 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 17 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 17 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 18 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 18 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 19 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 19 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 20 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 20 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "core/css/resolver/StyleBuilderConverter.h" | 27 #include "core/css/resolver/StyleBuilderConverter.h" |
| 28 | 28 |
| 29 #include <algorithm> |
| 29 #include "core/css/BasicShapeFunctions.h" | 30 #include "core/css/BasicShapeFunctions.h" |
| 30 #include "core/css/CSSBasicShapeValues.h" | 31 #include "core/css/CSSBasicShapeValues.h" |
| 31 #include "core/css/CSSColorValue.h" | 32 #include "core/css/CSSColorValue.h" |
| 32 #include "core/css/CSSContentDistributionValue.h" | 33 #include "core/css/CSSContentDistributionValue.h" |
| 33 #include "core/css/CSSCustomIdentValue.h" | 34 #include "core/css/CSSCustomIdentValue.h" |
| 34 #include "core/css/CSSFontFamilyValue.h" | 35 #include "core/css/CSSFontFamilyValue.h" |
| 35 #include "core/css/CSSFontFeatureValue.h" | 36 #include "core/css/CSSFontFeatureValue.h" |
| 36 #include "core/css/CSSFontVariationValue.h" | 37 #include "core/css/CSSFontVariationValue.h" |
| 37 #include "core/css/CSSFunctionValue.h" | 38 #include "core/css/CSSFunctionValue.h" |
| 38 #include "core/css/CSSGridAutoRepeatValue.h" | 39 #include "core/css/CSSGridAutoRepeatValue.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 50 #include "core/css/resolver/TransformBuilder.h" | 51 #include "core/css/resolver/TransformBuilder.h" |
| 51 #include "core/frame/LocalFrame.h" | 52 #include "core/frame/LocalFrame.h" |
| 52 #include "core/frame/UseCounter.h" | 53 #include "core/frame/UseCounter.h" |
| 53 #include "core/style/ClipPathOperation.h" | 54 #include "core/style/ClipPathOperation.h" |
| 54 #include "core/style/TextSizeAdjust.h" | 55 #include "core/style/TextSizeAdjust.h" |
| 55 #include "core/svg/SVGURIReference.h" | 56 #include "core/svg/SVGURIReference.h" |
| 56 #include "platform/fonts/FontCache.h" | 57 #include "platform/fonts/FontCache.h" |
| 57 #include "platform/transforms/RotateTransformOperation.h" | 58 #include "platform/transforms/RotateTransformOperation.h" |
| 58 #include "platform/transforms/ScaleTransformOperation.h" | 59 #include "platform/transforms/ScaleTransformOperation.h" |
| 59 #include "platform/transforms/TranslateTransformOperation.h" | 60 #include "platform/transforms/TranslateTransformOperation.h" |
| 60 #include <algorithm> | |
| 61 | 61 |
| 62 namespace blink { | 62 namespace blink { |
| 63 | 63 |
| 64 namespace { | 64 namespace { |
| 65 | 65 |
| 66 static GridLength convertGridTrackBreadth(const StyleResolverState& state, | 66 static GridLength convertGridTrackBreadth(const StyleResolverState& state, |
| 67 const CSSValue& value) { | 67 const CSSValue& value) { |
| 68 // Fractional unit. | 68 // Fractional unit. |
| 69 if (value.isPrimitiveValue() && toCSSPrimitiveValue(value).isFlex()) | 69 if (value.isPrimitiveValue() && toCSSPrimitiveValue(value).isFlex()) |
| 70 return GridLength(toCSSPrimitiveValue(value).getDoubleValue()); | 70 return GridLength(toCSSPrimitiveValue(value).getDoubleValue()); |
| (...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 } | 1395 } |
| 1396 | 1396 |
| 1397 const CSSValue& StyleBuilderConverter::convertRegisteredPropertyValue( | 1397 const CSSValue& StyleBuilderConverter::convertRegisteredPropertyValue( |
| 1398 const StyleResolverState& state, | 1398 const StyleResolverState& state, |
| 1399 const CSSValue& value) { | 1399 const CSSValue& value) { |
| 1400 return computeRegisteredPropertyValue(state.cssToLengthConversionData(), | 1400 return computeRegisteredPropertyValue(state.cssToLengthConversionData(), |
| 1401 value); | 1401 value); |
| 1402 } | 1402 } |
| 1403 | 1403 |
| 1404 } // namespace blink | 1404 } // namespace blink |
| OLD | NEW |