| 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 r
ights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
| 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
| 5 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 5 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 result.append(left.value()->cssText()); | 640 result.append(left.value()->cssText()); |
| 641 } | 641 } |
| 642 return result.toString(); | 642 return result.toString(); |
| 643 } | 643 } |
| 644 | 644 |
| 645 String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
thand& shorthand) const | 645 String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
thand& shorthand) const |
| 646 { | 646 { |
| 647 const unsigned size = shorthand.length(); | 647 const unsigned size = shorthand.length(); |
| 648 | 648 |
| 649 // Begin by collecting the properties into a vector. | 649 // Begin by collecting the properties into a vector. |
| 650 WillBeHeapVector<RawPtrWillBeMember<const CSSValue>> values(size); | 650 HeapVector<Member<const CSSValue>> values(size); |
| 651 // If the below loop succeeds, there should always be at minimum 1 layer. | 651 // If the below loop succeeds, there should always be at minimum 1 layer. |
| 652 size_t numLayers = 1U; | 652 size_t numLayers = 1U; |
| 653 | 653 |
| 654 for (size_t i = 0; i < size; i++) { | 654 for (size_t i = 0; i < size; i++) { |
| 655 values[i] = m_propertySet.getPropertyCSSValue(shorthand.properties()[i])
; | 655 values[i] = m_propertySet.getPropertyCSSValue(shorthand.properties()[i])
; |
| 656 // A shorthand is not available if getPropertyCSSValue didn't resolve to
anything. | 656 // A shorthand is not available if getPropertyCSSValue didn't resolve to
anything. |
| 657 if (!values[i]) | 657 if (!values[i]) |
| 658 return String(); | 658 return String(); |
| 659 if (values[i]->isBaseValueList()) { | 659 if (values[i]->isBaseValueList()) { |
| 660 const CSSValueList* valueList = toCSSValueList(values[i]); | 660 const CSSValueList* valueList = toCSSValueList(values[i]); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 isInitialValue = false; | 1012 isInitialValue = false; |
| 1013 if (!value->isInheritedValue()) | 1013 if (!value->isInheritedValue()) |
| 1014 isInheritedValue = false; | 1014 isInheritedValue = false; |
| 1015 if (isImportant != m_propertySet.propertyIsImportant(shorthand.propertie
s()[i])) | 1015 if (isImportant != m_propertySet.propertyIsImportant(shorthand.propertie
s()[i])) |
| 1016 return false; | 1016 return false; |
| 1017 } | 1017 } |
| 1018 return isInitialValue || isInheritedValue; | 1018 return isInitialValue || isInheritedValue; |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 } // namespace blink | 1021 } // namespace blink |
| OLD | NEW |