| 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 result.append(left.value()->cssText()); | 624 result.append(left.value()->cssText()); |
| 625 } | 625 } |
| 626 return result.toString(); | 626 return result.toString(); |
| 627 } | 627 } |
| 628 | 628 |
| 629 String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
thand& shorthand) const | 629 String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
thand& shorthand) const |
| 630 { | 630 { |
| 631 const unsigned size = shorthand.length(); | 631 const unsigned size = shorthand.length(); |
| 632 | 632 |
| 633 // Begin by collecting the properties into a vector. | 633 // Begin by collecting the properties into a vector. |
| 634 WillBeHeapVector<RawPtrWillBeMember<const CSSValue>> values(size); | 634 HeapVector<Member<const CSSValue>> values(size); |
| 635 // If the below loop succeeds, there should always be at minimum 1 layer. | 635 // If the below loop succeeds, there should always be at minimum 1 layer. |
| 636 size_t numLayers = 1U; | 636 size_t numLayers = 1U; |
| 637 | 637 |
| 638 for (size_t i = 0; i < size; i++) { | 638 for (size_t i = 0; i < size; i++) { |
| 639 values[i] = m_propertySet.getPropertyCSSValue(shorthand.properties()[i])
; | 639 values[i] = m_propertySet.getPropertyCSSValue(shorthand.properties()[i])
; |
| 640 // A shorthand is not available if getPropertyCSSValue didn't resolve to
anything. | 640 // A shorthand is not available if getPropertyCSSValue didn't resolve to
anything. |
| 641 if (!values[i]) | 641 if (!values[i]) |
| 642 return String(); | 642 return String(); |
| 643 if (values[i]->isBaseValueList()) { | 643 if (values[i]->isBaseValueList()) { |
| 644 const CSSValueList* valueList = toCSSValueList(values[i]); | 644 const CSSValueList* valueList = toCSSValueList(values[i]); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 isInitialValue = false; | 996 isInitialValue = false; |
| 997 if (!value->isInheritedValue()) | 997 if (!value->isInheritedValue()) |
| 998 isInheritedValue = false; | 998 isInheritedValue = false; |
| 999 if (isImportant != m_propertySet.propertyIsImportant(shorthand.propertie
s()[i])) | 999 if (isImportant != m_propertySet.propertyIsImportant(shorthand.propertie
s()[i])) |
| 1000 return false; | 1000 return false; |
| 1001 } | 1001 } |
| 1002 return isInitialValue || isInheritedValue; | 1002 return isInitialValue || isInheritedValue; |
| 1003 } | 1003 } |
| 1004 | 1004 |
| 1005 } // namespace blink | 1005 } // namespace blink |
| OLD | NEW |