Changeset 106756 in webkit
- Timestamp:
- Feb 5, 2012 12:29:38 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r106695 r106756 521 521 dom/CompositionEvent.cpp 522 522 dom/ContainerNode.cpp 523 dom/CSSMappedAttributeDeclaration.cpp524 523 dom/CustomEvent.cpp 525 524 dom/DatasetDOMStringMap.cpp -
trunk/Source/WebCore/ChangeLog
r106755 r106756 1 2012-02-05 Andreas Kling <awesomekling@apple.com> 2 3 Kill CSSMappedAttributeDeclaration. 4 <http://webkit.org/b/77820> 5 6 Reviewed by Antti Koivisto. 7 8 Replace all use of CSSMappedAttributeDeclaration by StylePropertySet. 9 Moved the setNeedsStyleRecalc() calls from CSSMappedAttributeDeclaration 10 to the add/remove-CSS-property helpers in StyledElement. 11 12 This removes one step of indirection for attribute styles and reduces 13 the size of elements that have presentational attributes by one pointer. 14 15 * CMakeLists.txt: 16 * GNUmakefile.list.am: 17 * Target.pri: 18 * WebCore.gypi: 19 * WebCore.order: 20 * WebCore.vcproj/WebCore.vcproj: 21 * WebCore.xcodeproj/project.pbxproj: 22 * dom/CSSMappedAttributeDeclaration.cpp: Removed. 23 * dom/CSSMappedAttributeDeclaration.h: Removed. 24 * dom/DOMAllInOne.cpp: 25 26 Remove CSSMappedAttributeDeclaration.{cpp,h} 27 28 * css/CSSParser.h: 29 * css/CSSParser.cpp: 30 (WebCore::parseSimpleLengthValue): 31 32 Remove CSSParser::parseMappedAttributeValue(), we now use parseValue() 33 directly instead. We lose the benefit of caching new CSSValues in the 34 document's CSSValuePool but this optimization can be added back later. 35 36 * css/CSSStyleSelector.cpp: 37 (WebCore::CSSStyleSelector::matchAllRules): 38 * dom/ElementAttributeData.h: 39 (ElementAttributeData): 40 * dom/NamedNodeMap.cpp: 41 (WebCore::NamedNodeMap::ensureAttributeStyle): 42 * dom/NamedNodeMap.h: 43 (WebCore::NamedNodeMap::attributeStyle): 44 (NamedNodeMap): 45 * dom/StyledElement.cpp: 46 (WebCore::StyledElement::removeCSSProperties): 47 (WebCore::StyledElement::addCSSProperty): 48 (WebCore::StyledElement::addCSSImageProperty): 49 (WebCore::StyledElement::addCSSLength): 50 (WebCore::StyledElement::addCSSColor): 51 * dom/StyledElement.h: 52 (WebCore): 53 (WebCore::StyledElement::attributeStyle): 54 (WebCore::StyledElement::ensureAttributeStyle): 55 * inspector/InspectorCSSAgent.cpp: 56 (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles): 57 1 58 2012-02-05 Ilya Tikhonovsky <loislo@chromium.org> 2 59 -
trunk/Source/WebCore/GNUmakefile.list.am
r106695 r106756 1475 1475 Source/WebCore/dom/ContainerNode.h \ 1476 1476 Source/WebCore/dom/CrossThreadTask.h \ 1477 Source/WebCore/dom/CSSMappedAttributeDeclaration.cpp \1478 Source/WebCore/dom/CSSMappedAttributeDeclaration.h \1479 1477 Source/WebCore/dom/CustomEvent.cpp \ 1480 1478 Source/WebCore/dom/CustomEvent.h \ -
trunk/Source/WebCore/Target.pri
r106695 r106756 485 485 dom/CompositionEvent.cpp \ 486 486 dom/ContainerNode.cpp \ 487 dom/CSSMappedAttributeDeclaration.cpp \488 487 dom/CustomEvent.cpp \ 489 488 dom/DecodedDataDocumentParser.cpp \ … … 1597 1596 dom/Comment.h \ 1598 1597 dom/ContainerNode.h \ 1599 dom/CSSMappedAttributeDeclaration.h \1600 1598 dom/CustomEvent.h \ 1601 1599 dom/default/PlatformMessagePortChannel.h \ -
trunk/Source/WebCore/WebCore.gypi
r106699 r106756 576 576 'dom/Attr.h', 577 577 'dom/Attribute.h', 578 'dom/CSSMappedAttributeDeclaration.h',579 578 'dom/CharacterData.h', 580 579 'dom/CheckedRadioButtons.h', … … 4929 4928 'dom/CDATASection.cpp', 4930 4929 'dom/CDATASection.h', 4931 'dom/CSSMappedAttributeDeclaration.cpp',4932 4930 'dom/CharacterData.cpp', 4933 4931 'dom/CheckedRadioButtons.cpp', -
trunk/Source/WebCore/WebCore.order
r105502 r106756 4916 4916 __ZN7WebCore26CSSMutableStyleDeclaration11setPropertyEiibb 4917 4917 __ZN7WebCore26CSSMutableStyleDeclaration19setPropertyInternalERKNS_11CSSPropertyEPS1_ 4918 __ZN7WebCore13StyledElement22setMappedAttributeDeclENS_20MappedAttributeEntryERKNS_13QualifiedNameERKN3WTF12AtomicStringEPNS_29CSSMappedAttributeDeclarationE4919 4918 __ZN3WTF6VectorIPN7WebCore26CSSMutableStyleDeclarationELm0EE14expandCapacityEm 4920 4919 __ZN7WebCore11RenderStyle26setHorizontalBorderSpacingEs … … 5367 5366 __ZN3WTF6VectorINS_6RefPtrIN7WebCore19AccessibilityObjectEEELm0EED1Ev 5368 5367 __ZN7WebCore16HTMLTableElementD0Ev 5369 __ZN7WebCore29CSSMappedAttributeDeclarationD0Ev5370 5368 __ZN7WebCore13StyledElement25removeMappedAttributeDeclENS_20MappedAttributeEntryERKNS_13QualifiedNameERKN3WTF12AtomicStringE 5371 5369 __ZN7WebCore26CSSMutableStyleDeclarationD2Ev … … 7919 7917 __ZN7WebCore23HTMLTableCaptionElementD0Ev 7920 7918 __ZN7WebCore13StyledElement11addCSSColorEPNS_9AttributeEiRKN3WTF6StringE 7921 __ZN3WTF9HashTableIN7WebCore18MappedAttributeKeyESt4pairIS2_PNS1_29CSSMappedAttributeDeclarationEENS_18PairFirstExtractorIS6_EENS1_19MappedAttributeHashENS_14PairHashTraitsINS1_24MappedAttributeKeyTraitsENS_10HashTraitsIS5_EEEESB_E16lookupForWritingIS2_NS_22IdentityHashTranslatorIS2_S6_S9_EEEES3_IPS6_bERKT_7922 __ZN3WTF9HashTableIN7WebCore18MappedAttributeKeyESt4pairIS2_PNS1_29CSSMappedAttributeDeclarationEENS_18PairFirstExtractorIS6_EENS1_19MappedAttributeHashENS_14PairHashTraitsINS1_24MappedAttributeKeyTraitsENS_10HashTraitsIS5_EEEESB_E3addIS2_S5_NS_17HashMapTranslatorIS6_SE_S9_EEEES3_INS_17HashTableIteratorIS2_S6_S8_S9_SE_SB_EEbERKT_RKT0_7923 __ZN3WTF9HashTableIN7WebCore18MappedAttributeKeyESt4pairIS2_PNS1_29CSSMappedAttributeDeclarationEENS_18PairFirstExtractorIS6_EENS1_19MappedAttributeHashENS_14PairHashTraitsINS1_24MappedAttributeKeyTraitsENS_10HashTraitsIS5_EEEESB_E6lookupIS2_NS_22IdentityHashTranslatorIS2_S6_S9_EEEEPS6_RKT_7924 __ZN3WTF9HashTableIN7WebCore18MappedAttributeKeyESt4pairIS2_PNS1_29CSSMappedAttributeDeclarationEENS_18PairFirstExtractorIS6_EENS1_19MappedAttributeHashENS_14PairHashTraitsINS1_24MappedAttributeKeyTraitsENS_10HashTraitsIS5_EEEESB_E6rehashEi7925 7919 __ZN7WebCore16HTMLStyleElement20parseMappedAttributeEPNS_9AttributeE 7926 7920 __ZN7WebCore15FontFamilyValueC1ERKN3WTF6StringE -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r106695 r106756 46643 46643 </File> 46644 46644 <File 46645 RelativePath="..\dom\CSSMappedAttributeDeclaration.cpp"46646 >46647 <FileConfiguration46648 Name="Debug|Win32"46649 ExcludedFromBuild="true"46650 >46651 <Tool46652 Name="VCCLCompilerTool"46653 />46654 </FileConfiguration>46655 <FileConfiguration46656 Name="Release|Win32"46657 ExcludedFromBuild="true"46658 >46659 <Tool46660 Name="VCCLCompilerTool"46661 />46662 </FileConfiguration>46663 <FileConfiguration46664 Name="Debug_Cairo_CFLite|Win32"46665 ExcludedFromBuild="true"46666 >46667 <Tool46668 Name="VCCLCompilerTool"46669 />46670 </FileConfiguration>46671 <FileConfiguration46672 Name="Release_Cairo_CFLite|Win32"46673 ExcludedFromBuild="true"46674 >46675 <Tool46676 Name="VCCLCompilerTool"46677 />46678 </FileConfiguration>46679 <FileConfiguration46680 Name="Debug_All|Win32"46681 ExcludedFromBuild="true"46682 >46683 <Tool46684 Name="VCCLCompilerTool"46685 />46686 </FileConfiguration>46687 <FileConfiguration46688 Name="Production|Win32"46689 ExcludedFromBuild="true"46690 >46691 <Tool46692 Name="VCCLCompilerTool"46693 />46694 </FileConfiguration>46695 </File>46696 <File46697 RelativePath="..\dom\CSSMappedAttributeDeclaration.h"46698 >46699 </File>46700 <File46701 46645 RelativePath="..\dom\CustomEvent.cpp" 46702 46646 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r106723 r106756 3973 3973 A8C4A80709D563270003AC8D /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F509D563270003AC8D /* Element.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3974 3974 A8C4A80809D563270003AC8D /* Element.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7F609D563270003AC8D /* Element.cpp */; }; 3975 A8C4A80909D563270003AC8D /* CSSMappedAttributeDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F709D563270003AC8D /* CSSMappedAttributeDeclaration.h */; settings = {ATTRIBUTES = (Private, ); }; };3976 A8C4A80A09D563270003AC8D /* CSSMappedAttributeDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7F809D563270003AC8D /* CSSMappedAttributeDeclaration.cpp */; };3977 3975 A8C4A80B09D563270003AC8D /* Attribute.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7F909D563270003AC8D /* Attribute.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3978 3976 A8C4A80C09D563270003AC8D /* Attribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7FA09D563270003AC8D /* Attribute.cpp */; }; … … 10694 10692 A8C4A7F509D563270003AC8D /* Element.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = "<group>"; }; 10695 10693 A8C4A7F609D563270003AC8D /* Element.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Element.cpp; sourceTree = "<group>"; }; 10696 A8C4A7F709D563270003AC8D /* CSSMappedAttributeDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSMappedAttributeDeclaration.h; sourceTree = "<group>"; };10697 A8C4A7F809D563270003AC8D /* CSSMappedAttributeDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSMappedAttributeDeclaration.cpp; sourceTree = "<group>"; };10698 10694 A8C4A7F909D563270003AC8D /* Attribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Attribute.h; sourceTree = "<group>"; }; 10699 10695 A8C4A7FA09D563270003AC8D /* Attribute.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Attribute.cpp; sourceTree = "<group>"; }; … … 20407 20403 E1A1470711102B1500EEC0F3 /* ContainerNodeAlgorithms.h */, 20408 20404 2E3FAA0811A36BF100576624 /* CrossThreadTask.h */, 20409 A8C4A7F809D563270003AC8D /* CSSMappedAttributeDeclaration.cpp */,20410 A8C4A7F709D563270003AC8D /* CSSMappedAttributeDeclaration.h */,20411 20405 62CD32561157E57C0063B0A7 /* CustomEvent.cpp */, 20412 20406 62CD32571157E57C0063B0A7 /* CustomEvent.h */, … … 21291 21285 A80E6D080A1989CA007FB8C5 /* CSSInitialValue.h in Headers */, 21292 21286 BC772E131331620C001EC9CE /* CSSLineBoxContainValue.h in Headers */, 21293 A8C4A80909D563270003AC8D /* CSSMappedAttributeDeclaration.h in Headers */,21294 21287 A80E6D030A1989CA007FB8C5 /* CSSMediaRule.h in Headers */, 21295 21288 A80E6DFC0A199067007FB8C5 /* StylePropertySet.h in Headers */, … … 24696 24689 A80E6D020A1989CA007FB8C5 /* CSSInitialValue.cpp in Sources */, 24697 24690 BC772E16133162C2001EC9CE /* CSSLineBoxContainValue.cpp in Sources */, 24698 A8C4A80A09D563270003AC8D /* CSSMappedAttributeDeclaration.cpp in Sources */,24699 24691 A80E6CFC0A1989CA007FB8C5 /* CSSMediaRule.cpp in Sources */, 24700 24692 A80E6DFB0A199067007FB8C5 /* StylePropertySet.cpp in Sources */, -
trunk/Source/WebCore/css/CSSParser.cpp
r106695 r106756 410 410 } 411 411 412 static bool parseSimpleLengthValue(StylePropertySet* declaration, int propertyId, const String& string, bool important, bool strict , CSSStyleSheet* contextStyleSheet = 0)412 static bool parseSimpleLengthValue(StylePropertySet* declaration, int propertyId, const String& string, bool important, bool strict) 413 413 { 414 414 bool acceptsNegativeNumbers; … … 474 474 return false; 475 475 476 CSSStyleSheet* styleSheet = contextStyleSheet ? contextStyleSheet :declaration->contextStyleSheet();476 CSSStyleSheet* styleSheet = declaration->contextStyleSheet(); 477 477 if (!styleSheet) 478 478 return false; … … 483 483 declaration->addParsedProperty(property); 484 484 return true; 485 }486 487 bool CSSParser::parseMappedAttributeValue(CSSMappedAttributeDeclaration* mappedAttribute, StyledElement* element, int propertyId, const String& value)488 {489 ASSERT(mappedAttribute);490 ASSERT(element);491 ASSERT(element->document());492 CSSStyleSheet* elementSheet = element->document()->elementSheet();493 if (parseSimpleLengthValue(mappedAttribute->declaration(), propertyId, value, false, false, elementSheet))494 return true;495 if (parseColorValue(mappedAttribute->declaration(), propertyId, value, false, false, elementSheet))496 return true;497 CSSParser parser(false);498 return parser.parseValue(mappedAttribute->declaration(), propertyId, value, false, elementSheet);499 485 } 500 486 -
trunk/Source/WebCore/css/CSSParser.h
r106681 r106756 44 44 45 45 class CSSBorderImageSliceValue; 46 class CSSMappedAttributeDeclaration;47 46 class CSSPrimitiveValue; 48 47 class CSSValuePool; … … 77 76 bool parseDeclaration(StylePropertySet*, const String&, RefPtr<CSSStyleSourceData>* = 0, CSSStyleSheet* contextStyleSheet = 0); 78 77 bool parseMediaQuery(MediaList*, const String&); 79 80 static bool parseMappedAttributeValue(CSSMappedAttributeDeclaration*, StyledElement*, int propertyId, const String&);81 78 82 79 Document* findDocument() const; -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r106741 r106756 997 997 // Now check author rules, beginning first with presentational attributes mapped from HTML. 998 998 if (m_styledElement) { 999 if (CSSMappedAttributeDeclaration* attributeStyle = m_styledElement->attributeStyle()) { 1000 ASSERT(attributeStyle->declaration()); 1001 if (!attributeStyle->declaration()->isEmpty()) { 999 if (StylePropertySet* attributeStyle = m_styledElement->attributeStyle()) { 1000 if (!attributeStyle->isEmpty()) { 1002 1001 result.ranges.lastAuthorRule = m_matchedRules.size(); 1003 1002 if (result.ranges.firstAuthorRule == -1) 1004 1003 result.ranges.firstAuthorRule = result.ranges.lastAuthorRule; 1005 addMatchedDeclaration(attributeStyle ->declaration());1004 addMatchedDeclaration(attributeStyle); 1006 1005 result.isCacheable = false; 1007 1006 } -
trunk/Source/WebCore/dom/DOMAllInOne.cpp
r106323 r106756 32 32 #include "BeforeUnloadEvent.cpp" 33 33 #include "CDATASection.cpp" 34 #include "CSSMappedAttributeDeclaration.cpp"35 34 #include "CharacterData.cpp" 36 35 #include "CheckedRadioButtons.cpp" -
trunk/Source/WebCore/dom/ElementAttributeData.h
r106740 r106756 27 27 #define ElementAttributeData_h 28 28 29 #include "CSSMappedAttributeDeclaration.h"30 29 #include "SpaceSplitString.h" 31 30 #include "StylePropertySet.h" … … 52 51 53 52 RefPtr<StylePropertySet> m_inlineStyleDecl; 54 RefPtr< CSSMappedAttributeDeclaration> m_attributeStyle;53 RefPtr<StylePropertySet> m_attributeStyle; 55 54 SpaceSplitString m_classNames; 56 55 AtomicString m_idForStyleResolution; -
trunk/Source/WebCore/dom/NamedNodeMap.cpp
r106746 r106756 337 337 } 338 338 339 CSSMappedAttributeDeclaration* NamedNodeMap::ensureAttributeStyle()339 StylePropertySet* NamedNodeMap::ensureAttributeStyle() 340 340 { 341 341 if (!attributeData()->m_attributeStyle) { 342 attributeData()->m_attributeStyle = CSSMappedAttributeDeclaration::create();343 attributeData()->m_attributeStyle-> declaration()->setStrictParsing(false);342 attributeData()->m_attributeStyle = StylePropertySet::create(); 343 attributeData()->m_attributeStyle->setStrictParsing(false); 344 344 } 345 345 return attributeData()->m_attributeStyle.get(); -
trunk/Source/WebCore/dom/NamedNodeMap.h
r106740 r106756 27 27 28 28 #include "Attribute.h" 29 #include "CSSMappedAttributeDeclaration.h"30 29 #include "CSSPropertyNames.h" 31 30 #include "ElementAttributeData.h" … … 106 105 void destroyInlineStyleDecl(); 107 106 108 CSSMappedAttributeDeclaration* attributeStyle() const { return attributeData()->m_attributeStyle.get(); }109 CSSMappedAttributeDeclaration* ensureAttributeStyle();107 StylePropertySet* attributeStyle() const { return attributeData()->m_attributeStyle.get(); } 108 StylePropertySet* ensureAttributeStyle(); 110 109 111 110 private: -
trunk/Source/WebCore/dom/StyledElement.cpp
r106746 r106756 26 26 27 27 #include "Attribute.h" 28 #include "CSSImageValue.h" 28 29 #include "CSSStyleSelector.h" 29 30 #include "CSSStyleSheet.h" … … 122 123 void StyledElement::removeCSSProperties(int id1, int id2, int id3, int id4, int id5, int id6, int id7, int id8) 123 124 { 124 CSSMappedAttributeDeclaration* style = attributeStyle();125 StylePropertySet* style = attributeStyle(); 125 126 if (!style) 126 127 return; 127 128 129 setNeedsStyleRecalc(FullStyleChange); 130 128 131 ASSERT(id1 != CSSPropertyInvalid); 129 style->remove MappedProperty(this,id1);132 style->removeProperty(id1); 130 133 131 134 if (id2 == CSSPropertyInvalid) 132 135 return; 133 style->remove MappedProperty(this,id2);136 style->removeProperty(id2); 134 137 if (id3 == CSSPropertyInvalid) 135 138 return; 136 style->remove MappedProperty(this,id3);139 style->removeProperty(id3); 137 140 if (id4 == CSSPropertyInvalid) 138 141 return; 139 style->remove MappedProperty(this,id4);142 style->removeProperty(id4); 140 143 if (id5 == CSSPropertyInvalid) 141 144 return; 142 style->remove MappedProperty(this,id5);145 style->removeProperty(id5); 143 146 if (id6 == CSSPropertyInvalid) 144 147 return; 145 style->remove MappedProperty(this,id6);148 style->removeProperty(id6); 146 149 if (id7 == CSSPropertyInvalid) 147 150 return; 148 style->remove MappedProperty(this,id7);151 style->removeProperty(id7); 149 152 if (id8 == CSSPropertyInvalid) 150 153 return; 151 style->remove MappedProperty(this,id8);154 style->removeProperty(id8); 152 155 } 153 156 154 157 void StyledElement::addCSSProperty(int id, const String &value) 155 158 { 156 ensureAttributeStyle()->setMappedProperty(this, id, value); 159 if (!ensureAttributeStyle()->setProperty(id, value)) 160 removeCSSProperty(id); 161 else 162 setNeedsStyleRecalc(FullStyleChange); 157 163 } 158 164 159 165 void StyledElement::addCSSProperty(int id, int value) 160 166 { 161 ensureAttributeStyle()->setMappedProperty(this, id, value); 167 ensureAttributeStyle()->setProperty(id, value); 168 setNeedsStyleRecalc(FullStyleChange); 162 169 } 163 170 164 171 void StyledElement::addCSSImageProperty(int id, const String& url) 165 172 { 166 ensureAttributeStyle()->setMappedImageProperty(this, id, url); 173 ensureAttributeStyle()->setProperty(CSSProperty(id, CSSImageValue::create(url))); 174 setNeedsStyleRecalc(FullStyleChange); 167 175 } 168 176 … … 193 201 194 202 if (l != v->length()) { 195 ensureAttributeStyle()->setMappedLengthProperty(this,id, v->substring(0, l));203 addCSSProperty(id, v->substring(0, l)); 196 204 return; 197 205 } 198 206 } 199 207 200 ensureAttributeStyle()->setMappedLengthProperty(this,id, value);208 addCSSProperty(id, value); 201 209 } 202 210 … … 273 281 Color parsedColor(colorString); 274 282 if (parsedColor.isValid()) { 275 ensureAttributeStyle()->setMappedProperty(this,id, colorString);276 return; 277 } 278 279 ensureAttributeStyle()->setMappedProperty(this,id, parseColorStringWithCrazyLegacyRules(colorString));283 addCSSProperty(id, colorString); 284 return; 285 } 286 287 addCSSProperty(id, parseColorStringWithCrazyLegacyRules(colorString)); 280 288 } 281 289 -
trunk/Source/WebCore/dom/StyledElement.h
r106746 r106756 33 33 34 34 class Attribute; 35 class CSSMappedAttributeDeclaration;36 35 37 36 class StyledElement : public Element { … … 56 55 virtual CSSStyleDeclaration* style() OVERRIDE { return ensureInlineStyleDecl()->ensureCSSStyleDeclaration(); } 57 56 58 CSSMappedAttributeDeclaration* attributeStyle() const { return attributeMap() ? attributeMap()->attributeStyle() : 0; }59 CSSMappedAttributeDeclaration* ensureAttributeStyle() { return ensureAttributeMap()->ensureAttributeStyle(); }57 StylePropertySet* attributeStyle() const { return attributeMap() ? attributeMap()->attributeStyle() : 0; } 58 StylePropertySet* ensureAttributeStyle() { return ensureAttributeMap()->ensureAttributeStyle(); } 60 59 61 60 const SpaceSplitString& classNames() const; -
trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp
r106740 r106756 723 723 return InspectorArray::create(); 724 724 725 CSSMappedAttributeDeclaration* attributeStyle = static_cast<StyledElement*>(element)->attributeStyle();726 if (!attributeStyle || !attributeStyle->declaration())725 StylePropertySet* attributeStyle = static_cast<StyledElement*>(element)->attributeStyle(); 726 if (!attributeStyle) 727 727 return InspectorArray::create(); 728 728 729 729 RefPtr<InspectorObject> attrStyleObject = InspectorObject::create(); 730 RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSId(), attributeStyle-> declaration()->ensureCSSStyleDeclaration(), 0);730 RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSId(), attributeStyle->ensureCSSStyleDeclaration(), 0); 731 731 attrStyleObject->setString("name", ""); 732 732 attrStyleObject->setObject("style", inspectorStyle->buildObjectForStyle());
Note: See TracChangeset
for help on using the changeset viewer.