| 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 result.append(left.value()->cssText()); | 642 result.append(left.value()->cssText()); |
| 643 } | 643 } |
| 644 return result.toString(); | 644 return result.toString(); |
| 645 } | 645 } |
| 646 | 646 |
| 647 String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
thand& shorthand) const | 647 String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
thand& shorthand) const |
| 648 { | 648 { |
| 649 const unsigned size = shorthand.length(); | 649 const unsigned size = shorthand.length(); |
| 650 | 650 |
| 651 // Begin by collecting the properties into a vector. | 651 // Begin by collecting the properties into a vector. |
| 652 WillBeHeapVector<RawPtrWillBeMember<const CSSValue>> values(size); | 652 HeapVector<Member<const CSSValue>> values(size); |
| 653 // If the below loop succeeds, there should always be at minimum 1 layer. | 653 // If the below loop succeeds, there should always be at minimum 1 layer. |
| 654 size_t numLayers = 1U; | 654 size_t numLayers = 1U; |
| 655 | 655 |
| 656 for (size_t i = 0; i < size; i++) { | 656 for (size_t i = 0; i < size; i++) { |
| 657 values[i] = m_propertySet.getPropertyCSSValue(shorthand.properties()[i])
; | 657 values[i] = m_propertySet.getPropertyCSSValue(shorthand.properties()[i])
; |
| 658 // A shorthand is not available if getPropertyCSSValue didn't resolve to
anything. | 658 // A shorthand is not available if getPropertyCSSValue didn't resolve to
anything. |
| 659 if (!values[i]) | 659 if (!values[i]) |
| 660 return String(); | 660 return String(); |
| 661 if (values[i]->isBaseValueList()) { | 661 if (values[i]->isBaseValueList()) { |
| 662 const CSSValueList* valueList = toCSSValueList(values[i]); | 662 const CSSValueList* valueList = toCSSValueList(values[i]); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 isInitialValue = false; | 1014 isInitialValue = false; |
| 1015 if (!value->isInheritedValue()) | 1015 if (!value->isInheritedValue()) |
| 1016 isInheritedValue = false; | 1016 isInheritedValue = false; |
| 1017 if (isImportant != m_propertySet.propertyIsImportant(shorthand.propertie
s()[i])) | 1017 if (isImportant != m_propertySet.propertyIsImportant(shorthand.propertie
s()[i])) |
| 1018 return false; | 1018 return false; |
| 1019 } | 1019 } |
| 1020 return isInitialValue || isInheritedValue; | 1020 return isInitialValue || isInheritedValue; |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 } // namespace blink | 1023 } // namespace blink |
| OLD | NEW |