Index: third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp |
diff --git a/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp |
index 3db45ce9cb9d66214d00863a9f010efc45918a84..f5782baa7bd2638c6b6c22654cde0d1860b20f75 100644 |
--- a/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp |
+++ b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp |
@@ -4,6 +4,7 @@ |
#include "core/css/cssom/InlineStylePropertyMap.h" |
+#include "bindings/core/v8/Iterable.h" |
#include "core/CSSPropertyNames.h" |
#include "core/css/CSSPrimitiveValue.h" |
#include "core/css/CSSPropertyMetadata.h" |
@@ -127,5 +128,23 @@ void InlineStylePropertyMap::remove(CSSPropertyID propertyID, ExceptionState& ex |
m_ownerElement->removeInlineStyleProperty(propertyID); |
} |
+HeapVector<StylePropertyMap::StylePropertyMapEntry> InlineStylePropertyMap::getIterationEntries() |
+{ |
+ HeapVector<StylePropertyMap::StylePropertyMapEntry> result; |
+ StylePropertySet& inlineStyleSet = m_ownerElement->ensureMutableInlineStyle(); |
+ for (unsigned i = 0; i < inlineStyleSet.propertyCount(); i++) { |
+ StylePropertySet::PropertyReference propertyReference = inlineStyleSet.propertyAt(i); |
+ CSSPropertyID propertyID = propertyReference.id(); |
+ StyleValueVector styleValueVector = cssValueToStyleValueVector(propertyID, *propertyReference.value()); |
+ StyleValueOrStyleValueSequence value; |
+ if (styleValueVector.size() == 1) |
+ value.setStyleValue(styleValueVector[0]); |
+ else |
+ value.setStyleValueSequence(styleValueVector); |
+ result.append(std::make_pair(getPropertyNameString(propertyID), value)); |
+ } |
+ return result; |
+} |
+ |
} // namespace blink |