| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
| 4 * rights reserved. | 4 * rights reserved. |
| 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
| 6 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 6 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 case CSSPropertyFlexFlow: | 447 case CSSPropertyFlexFlow: |
| 448 return getShorthandValue(flexFlowShorthand()); | 448 return getShorthandValue(flexFlowShorthand()); |
| 449 case CSSPropertyGridColumn: | 449 case CSSPropertyGridColumn: |
| 450 return getShorthandValue(gridColumnShorthand(), " / "); | 450 return getShorthandValue(gridColumnShorthand(), " / "); |
| 451 case CSSPropertyGridRow: | 451 case CSSPropertyGridRow: |
| 452 return getShorthandValue(gridRowShorthand(), " / "); | 452 return getShorthandValue(gridRowShorthand(), " / "); |
| 453 case CSSPropertyGridArea: | 453 case CSSPropertyGridArea: |
| 454 return getShorthandValue(gridAreaShorthand(), " / "); | 454 return getShorthandValue(gridAreaShorthand(), " / "); |
| 455 case CSSPropertyGridGap: | 455 case CSSPropertyGridGap: |
| 456 return getShorthandValue(gridGapShorthand()); | 456 return getShorthandValue(gridGapShorthand()); |
| 457 case CSSPropertyPlaceContent: |
| 458 return placeContentPropertyValue(); |
| 457 case CSSPropertyFont: | 459 case CSSPropertyFont: |
| 458 return fontValue(); | 460 return fontValue(); |
| 459 case CSSPropertyFontVariant: | 461 case CSSPropertyFontVariant: |
| 460 return fontVariantValue(); | 462 return fontVariantValue(); |
| 461 case CSSPropertyMargin: | 463 case CSSPropertyMargin: |
| 462 return get4Values(marginShorthand()); | 464 return get4Values(marginShorthand()); |
| 463 case CSSPropertyMotion: | 465 case CSSPropertyMotion: |
| 464 return getShorthandValue(motionShorthand()); | 466 return getShorthandValue(motionShorthand()); |
| 465 case CSSPropertyOffset: | 467 case CSSPropertyOffset: |
| 466 return getShorthandValue(offsetShorthand()); | 468 return getShorthandValue(offsetShorthand()); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 // FIXME: CSSInitialValue::cssText should generate the right value. | 843 // FIXME: CSSInitialValue::cssText should generate the right value. |
| 842 String text = value->cssText(); | 844 String text = value->cssText(); |
| 843 if (res.isNull()) | 845 if (res.isNull()) |
| 844 res = text; | 846 res = text; |
| 845 else if (res != text) | 847 else if (res != text) |
| 846 return String(); | 848 return String(); |
| 847 } | 849 } |
| 848 return res; | 850 return res; |
| 849 } | 851 } |
| 850 | 852 |
| 853 String StylePropertySerializer::placeContentPropertyValue() const { |
| 854 String value = getCommonValue(placeContentShorthand()); |
| 855 if (value.isNull() || value.isEmpty()) |
| 856 return getShorthandValue(placeContentShorthand()); |
| 857 return value; |
| 858 } |
| 859 |
| 851 String StylePropertySerializer::borderPropertyValue() const { | 860 String StylePropertySerializer::borderPropertyValue() const { |
| 852 const StylePropertyShorthand properties[3] = { | 861 const StylePropertyShorthand properties[3] = { |
| 853 borderWidthShorthand(), borderStyleShorthand(), borderColorShorthand()}; | 862 borderWidthShorthand(), borderStyleShorthand(), borderColorShorthand()}; |
| 854 StringBuilder result; | 863 StringBuilder result; |
| 855 for (size_t i = 0; i < WTF_ARRAY_LENGTH(properties); ++i) { | 864 for (size_t i = 0; i < WTF_ARRAY_LENGTH(properties); ++i) { |
| 856 String value = getCommonValue(properties[i]); | 865 String value = getCommonValue(properties[i]); |
| 857 if (value.isNull()) | 866 if (value.isNull()) |
| 858 return String(); | 867 return String(); |
| 859 if (value == "initial") | 868 if (value == "initial") |
| 860 continue; | 869 continue; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 const CSSValue& xValue = | 936 const CSSValue& xValue = |
| 928 repeatXList ? repeatXList->item(i % repeatXList->length()) : repeatX; | 937 repeatXList ? repeatXList->item(i % repeatXList->length()) : repeatX; |
| 929 const CSSValue& yValue = | 938 const CSSValue& yValue = |
| 930 repeatYList ? repeatYList->item(i % repeatYList->length()) : repeatY; | 939 repeatYList ? repeatYList->item(i % repeatYList->length()) : repeatY; |
| 931 appendBackgroundRepeatValue(builder, xValue, yValue); | 940 appendBackgroundRepeatValue(builder, xValue, yValue); |
| 932 } | 941 } |
| 933 return builder.toString(); | 942 return builder.toString(); |
| 934 } | 943 } |
| 935 | 944 |
| 936 } // namespace blink | 945 } // namespace blink |
| OLD | NEW |