| 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.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
| 7 * Copyright (C) 2015 Google Inc. All rights reserved. | 7 * Copyright (C) 2015 Google 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 CSSValueList* afterSlash = CSSValueList::createSpaceSeparated(); | 543 CSSValueList* afterSlash = CSSValueList::createSpaceSeparated(); |
| 544 afterSlash->append(*valueForFillSize(currLayer->size(), style)); | 544 afterSlash->append(*valueForFillSize(currLayer->size(), style)); |
| 545 afterSlash->append(*CSSPrimitiveValue::create(currLayer->origin())); | 545 afterSlash->append(*CSSPrimitiveValue::create(currLayer->origin())); |
| 546 afterSlash->append(*CSSPrimitiveValue::create(currLayer->clip())); | 546 afterSlash->append(*CSSPrimitiveValue::create(currLayer->clip())); |
| 547 list->append(*afterSlash); | 547 list->append(*afterSlash); |
| 548 ret->append(*list); | 548 ret->append(*list); |
| 549 } | 549 } |
| 550 return ret; | 550 return ret; |
| 551 } | 551 } |
| 552 | 552 |
| 553 static CSSValueList* valueForContentPositionAndDistributionWithOverflowAlignment
(const StyleContentAlignmentData& data, CSSValueID normalBehaviorValueID) | 553 static CSSValueList* valueForContentPositionAndDistributionWithOverflowAlignment
(const StyleContentAlignmentData& data) |
| 554 { | 554 { |
| 555 CSSValueList* result = CSSValueList::createSpaceSeparated(); | 555 CSSValueList* result = CSSValueList::createSpaceSeparated(); |
| 556 if (data.distribution() != ContentDistributionDefault) | 556 if (data.distribution() != ContentDistributionDefault) |
| 557 result->append(*CSSPrimitiveValue::create(data.distribution())); | 557 result->append(*CSSPrimitiveValue::create(data.distribution())); |
| 558 if (data.distribution() == ContentDistributionDefault || data.position() !=
ContentPositionNormal) { | 558 if (data.distribution() == ContentDistributionDefault || data.position() !=
ContentPositionNormal) |
| 559 if (!RuntimeEnabledFeatures::cssGridLayoutEnabled() && data.position() =
= ContentPositionNormal) | 559 result->append(*CSSPrimitiveValue::create(data.position())); |
| 560 result->append(*CSSPrimitiveValue::createIdentifier(normalBehaviorVa
lueID)); | |
| 561 else | |
| 562 result->append(*CSSPrimitiveValue::create(data.position())); | |
| 563 } | |
| 564 if ((data.position() >= ContentPositionCenter || data.distribution() != Cont
entDistributionDefault) && data.overflow() != OverflowAlignmentDefault) | 560 if ((data.position() >= ContentPositionCenter || data.distribution() != Cont
entDistributionDefault) && data.overflow() != OverflowAlignmentDefault) |
| 565 result->append(*CSSPrimitiveValue::create(data.overflow())); | 561 result->append(*CSSPrimitiveValue::create(data.overflow())); |
| 566 ASSERT(result->length() > 0); | 562 ASSERT(result->length() > 0); |
| 567 ASSERT(result->length() <= 3); | 563 ASSERT(result->length() <= 3); |
| 568 return result; | 564 return result; |
| 569 } | 565 } |
| 570 | 566 |
| 571 static CSSPrimitiveValue* valueForLineHeight(const ComputedStyle& style) | 567 static CSSPrimitiveValue* valueForLineHeight(const ComputedStyle& style) |
| 572 { | 568 { |
| 573 Length length = style.lineHeight(); | 569 Length length = style.lineHeight(); |
| (...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1888 } | 1884 } |
| 1889 return value; | 1885 return value; |
| 1890 } | 1886 } |
| 1891 case CSSPropertyDirection: | 1887 case CSSPropertyDirection: |
| 1892 return CSSPrimitiveValue::create(style.direction()); | 1888 return CSSPrimitiveValue::create(style.direction()); |
| 1893 case CSSPropertyDisplay: | 1889 case CSSPropertyDisplay: |
| 1894 return CSSPrimitiveValue::create(style.display()); | 1890 return CSSPrimitiveValue::create(style.display()); |
| 1895 case CSSPropertyEmptyCells: | 1891 case CSSPropertyEmptyCells: |
| 1896 return CSSPrimitiveValue::create(style.emptyCells()); | 1892 return CSSPrimitiveValue::create(style.emptyCells()); |
| 1897 case CSSPropertyAlignContent: | 1893 case CSSPropertyAlignContent: |
| 1898 return valueForContentPositionAndDistributionWithOverflowAlignment(style
.alignContent(), CSSValueStretch); | 1894 return valueForContentPositionAndDistributionWithOverflowAlignment(style
.alignContent()); |
| 1899 case CSSPropertyAlignItems: | 1895 case CSSPropertyAlignItems: |
| 1900 return valueForItemPositionWithOverflowAlignment(style.alignItems()); | 1896 return valueForItemPositionWithOverflowAlignment(style.alignItems()); |
| 1901 case CSSPropertyAlignSelf: | 1897 case CSSPropertyAlignSelf: |
| 1902 return valueForItemPositionWithOverflowAlignment(style.alignSelf()); | 1898 return valueForItemPositionWithOverflowAlignment(style.alignSelf()); |
| 1903 case CSSPropertyFlex: | 1899 case CSSPropertyFlex: |
| 1904 return valuesForShorthandProperty(flexShorthand(), style, layoutObject,
styledNode, allowVisitedStyle); | 1900 return valuesForShorthandProperty(flexShorthand(), style, layoutObject,
styledNode, allowVisitedStyle); |
| 1905 case CSSPropertyFlexBasis: | 1901 case CSSPropertyFlexBasis: |
| 1906 return zoomAdjustedPixelValueForLength(style.flexBasis(), style); | 1902 return zoomAdjustedPixelValueForLength(style.flexBasis(), style); |
| 1907 case CSSPropertyFlexDirection: | 1903 case CSSPropertyFlexDirection: |
| 1908 return CSSPrimitiveValue::create(style.flexDirection()); | 1904 return CSSPrimitiveValue::create(style.flexDirection()); |
| 1909 case CSSPropertyFlexFlow: | 1905 case CSSPropertyFlexFlow: |
| 1910 return valuesForShorthandProperty(flexFlowShorthand(), style, layoutObje
ct, styledNode, allowVisitedStyle); | 1906 return valuesForShorthandProperty(flexFlowShorthand(), style, layoutObje
ct, styledNode, allowVisitedStyle); |
| 1911 case CSSPropertyFlexGrow: | 1907 case CSSPropertyFlexGrow: |
| 1912 return CSSPrimitiveValue::create(style.flexGrow(), CSSPrimitiveValue::Un
itType::Number); | 1908 return CSSPrimitiveValue::create(style.flexGrow(), CSSPrimitiveValue::Un
itType::Number); |
| 1913 case CSSPropertyFlexShrink: | 1909 case CSSPropertyFlexShrink: |
| 1914 return CSSPrimitiveValue::create(style.flexShrink(), CSSPrimitiveValue::
UnitType::Number); | 1910 return CSSPrimitiveValue::create(style.flexShrink(), CSSPrimitiveValue::
UnitType::Number); |
| 1915 case CSSPropertyFlexWrap: | 1911 case CSSPropertyFlexWrap: |
| 1916 return CSSPrimitiveValue::create(style.flexWrap()); | 1912 return CSSPrimitiveValue::create(style.flexWrap()); |
| 1917 case CSSPropertyJustifyContent: | 1913 case CSSPropertyJustifyContent: |
| 1918 return valueForContentPositionAndDistributionWithOverflowAlignment(style
.justifyContent(), CSSValueFlexStart); | 1914 return valueForContentPositionAndDistributionWithOverflowAlignment(style
.justifyContent()); |
| 1919 case CSSPropertyOrder: | 1915 case CSSPropertyOrder: |
| 1920 return CSSPrimitiveValue::create(style.order(), CSSPrimitiveValue::UnitT
ype::Number); | 1916 return CSSPrimitiveValue::create(style.order(), CSSPrimitiveValue::UnitT
ype::Number); |
| 1921 case CSSPropertyFloat: | 1917 case CSSPropertyFloat: |
| 1922 if (style.display() != NONE && style.hasOutOfFlowPosition()) | 1918 if (style.display() != NONE && style.hasOutOfFlowPosition()) |
| 1923 return CSSPrimitiveValue::createIdentifier(CSSValueNone); | 1919 return CSSPrimitiveValue::createIdentifier(CSSValueNone); |
| 1924 return CSSPrimitiveValue::create(style.floating()); | 1920 return CSSPrimitiveValue::create(style.floating()); |
| 1925 case CSSPropertyFont: | 1921 case CSSPropertyFont: |
| 1926 return valueForFont(style); | 1922 return valueForFont(style); |
| 1927 case CSSPropertyFontFamily: | 1923 case CSSPropertyFontFamily: |
| 1928 return valueForFontFamily(style); | 1924 return valueForFontFamily(style); |
| (...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3016 case CSSPropertyAll: | 3012 case CSSPropertyAll: |
| 3017 return nullptr; | 3013 return nullptr; |
| 3018 default: | 3014 default: |
| 3019 break; | 3015 break; |
| 3020 } | 3016 } |
| 3021 ASSERT_NOT_REACHED(); | 3017 ASSERT_NOT_REACHED(); |
| 3022 return nullptr; | 3018 return nullptr; |
| 3023 } | 3019 } |
| 3024 | 3020 |
| 3025 } // namespace blink | 3021 } // namespace blink |
| OLD | NEW |