Changeset 109149 in webkit
- Timestamp:
- Feb 28, 2012 2:21:02 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 67 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109147 r109149 1 2012-02-28 Andreas Kling <awesomekling@apple.com> 2 3 StyledElement::isPresentationAttribute() only needs the attribute name. 4 <http://webkit.org/b/79828> 5 6 Reviewed by Anders Carlsson. 7 8 Pass the QualifiedName to isPresentationAttribute instead of the whole 9 Attribute. We only need the name to know what kind of attribute it is. 10 11 This makes the code a little less ugly and makes it possible to use 12 the function without having an Attribute object. 13 14 * dom/StyledElement.cpp: 15 (WebCore::StyledElement::attributeChanged): 16 * dom/StyledElement.h: 17 (WebCore::StyledElement::isPresentationAttribute): 18 * html/HTMLBRElement.cpp: 19 (WebCore::HTMLBRElement::isPresentationAttribute): 20 * html/HTMLBRElement.h: 21 * html/HTMLBodyElement.cpp: 22 (WebCore::HTMLBodyElement::isPresentationAttribute): 23 * html/HTMLBodyElement.h: 24 * html/HTMLButtonElement.cpp: 25 (WebCore::HTMLButtonElement::isPresentationAttribute): 26 * html/HTMLButtonElement.h: 27 * html/HTMLDivElement.cpp: 28 (WebCore::HTMLDivElement::isPresentationAttribute): 29 * html/HTMLDivElement.h: 30 * html/HTMLElement.cpp: 31 (WebCore::HTMLElement::isPresentationAttribute): 32 * html/HTMLElement.h: 33 * html/HTMLEmbedElement.cpp: 34 (WebCore::HTMLEmbedElement::isPresentationAttribute): 35 * html/HTMLEmbedElement.h: 36 * html/HTMLFontElement.cpp: 37 (WebCore::HTMLFontElement::isPresentationAttribute): 38 * html/HTMLFontElement.h: 39 * html/HTMLFrameSetElement.cpp: 40 (WebCore::HTMLFrameSetElement::isPresentationAttribute): 41 * html/HTMLFrameSetElement.h: 42 * html/HTMLHRElement.cpp: 43 (WebCore::HTMLHRElement::isPresentationAttribute): 44 * html/HTMLHRElement.h: 45 * html/HTMLIFrameElement.cpp: 46 (WebCore::HTMLIFrameElement::isPresentationAttribute): 47 * html/HTMLIFrameElement.h: 48 * html/HTMLImageElement.cpp: 49 (WebCore::HTMLImageElement::isPresentationAttribute): 50 * html/HTMLImageElement.h: 51 * html/HTMLInputElement.cpp: 52 (WebCore::HTMLInputElement::isPresentationAttribute): 53 * html/HTMLInputElement.h: 54 * html/HTMLLIElement.cpp: 55 (WebCore::HTMLLIElement::isPresentationAttribute): 56 * html/HTMLLIElement.h: 57 * html/HTMLMarqueeElement.cpp: 58 (WebCore::HTMLMarqueeElement::isPresentationAttribute): 59 * html/HTMLMarqueeElement.h: 60 * html/HTMLOListElement.cpp: 61 (WebCore::HTMLOListElement::isPresentationAttribute): 62 * html/HTMLOListElement.h: 63 * html/HTMLObjectElement.cpp: 64 (WebCore::HTMLObjectElement::isPresentationAttribute): 65 * html/HTMLObjectElement.h: 66 * html/HTMLParagraphElement.cpp: 67 (WebCore::HTMLParagraphElement::isPresentationAttribute): 68 * html/HTMLParagraphElement.h: 69 * html/HTMLPlugInElement.cpp: 70 (WebCore::HTMLPlugInElement::isPresentationAttribute): 71 * html/HTMLPlugInElement.h: 72 * html/HTMLPreElement.cpp: 73 (WebCore::HTMLPreElement::isPresentationAttribute): 74 * html/HTMLPreElement.h: 75 * html/HTMLSelectElement.cpp: 76 (WebCore::HTMLSelectElement::isPresentationAttribute): 77 * html/HTMLSelectElement.h: 78 * html/HTMLTableCaptionElement.cpp: 79 (WebCore::HTMLTableCaptionElement::isPresentationAttribute): 80 * html/HTMLTableCaptionElement.h: 81 * html/HTMLTableCellElement.cpp: 82 (WebCore::HTMLTableCellElement::isPresentationAttribute): 83 * html/HTMLTableCellElement.h: 84 * html/HTMLTableColElement.cpp: 85 (WebCore::HTMLTableColElement::isPresentationAttribute): 86 * html/HTMLTableColElement.h: 87 * html/HTMLTableElement.cpp: 88 (WebCore::HTMLTableElement::isPresentationAttribute): 89 * html/HTMLTableElement.h: 90 * html/HTMLTablePartElement.cpp: 91 (WebCore::HTMLTablePartElement::isPresentationAttribute): 92 * html/HTMLTablePartElement.h: 93 * html/HTMLTextAreaElement.cpp: 94 (WebCore::HTMLTextAreaElement::isPresentationAttribute): 95 * html/HTMLTextAreaElement.h: 96 * html/HTMLUListElement.cpp: 97 (WebCore::HTMLUListElement::isPresentationAttribute): 98 * html/HTMLUListElement.h: 99 * html/HTMLVideoElement.cpp: 100 (WebCore::HTMLVideoElement::isPresentationAttribute): 101 * html/HTMLVideoElement.h: 102 * mathml/MathMLElement.cpp: 103 (WebCore::MathMLElement::isPresentationAttribute): 104 * mathml/MathMLElement.h: 105 * svg/SVGImageElement.cpp: 106 (WebCore::SVGImageElement::isPresentationAttribute): 107 * svg/SVGImageElement.h: 108 * svg/SVGStyledElement.cpp: 109 (WebCore::SVGStyledElement::isPresentationAttribute): 110 * svg/SVGStyledElement.h: 111 * svg/SVGTextContentElement.cpp: 112 (WebCore::SVGTextContentElement::isPresentationAttribute): 113 * svg/SVGTextContentElement.h: 114 1 115 2012-02-28 Enrica Casucci <enrica@apple.com> 2 116 -
trunk/Source/WebCore/dom/StyledElement.cpp
r108927 r109149 67 67 parseAttribute(attr); 68 68 69 if (isPresentationAttribute(attr )) {69 if (isPresentationAttribute(attr->name())) { 70 70 setAttributeStyleDirty(); 71 71 setNeedsStyleRecalc(InlineStyleChange); -
trunk/Source/WebCore/dom/StyledElement.h
r108667 r109149 65 65 virtual void copyNonAttributeProperties(const Element*); 66 66 67 virtual bool isPresentationAttribute( Attribute*) const { return false; }67 virtual bool isPresentationAttribute(const QualifiedName&) const { return false; } 68 68 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) { } 69 69 -
trunk/Source/WebCore/html/HTMLBRElement.cpp
r108885 r109149 50 50 } 51 51 52 bool HTMLBRElement::isPresentationAttribute( Attribute* attr) const52 bool HTMLBRElement::isPresentationAttribute(const QualifiedName& name) const 53 53 { 54 if ( attr->name()== clearAttr)54 if (name == clearAttr) 55 55 return true; 56 return HTMLElement::isPresentationAttribute( attr);56 return HTMLElement::isPresentationAttribute(name); 57 57 } 58 58 -
trunk/Source/WebCore/html/HTMLBRElement.h
r107554 r109149 39 39 HTMLBRElement(const QualifiedName&, Document*); 40 40 41 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;41 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 42 42 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 43 43 -
trunk/Source/WebCore/html/HTMLBodyElement.cpp
r108345 r109149 62 62 } 63 63 64 bool HTMLBodyElement::isPresentationAttribute( Attribute* attr) const65 { 66 if ( attr->name() == backgroundAttr || attr->name() == marginwidthAttr || attr->name() == leftmarginAttr || attr->name() == marginheightAttr || attr->name() == topmarginAttr || attr->name() == bgcolorAttr || attr->name() == textAttr || attr->name()== bgpropertiesAttr)64 bool HTMLBodyElement::isPresentationAttribute(const QualifiedName& name) const 65 { 66 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginAttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr || name == textAttr || name == bgpropertiesAttr) 67 67 return true; 68 return HTMLElement::isPresentationAttribute( attr);68 return HTMLElement::isPresentationAttribute(name); 69 69 } 70 70 -
trunk/Source/WebCore/html/HTMLBodyElement.h
r107554 r109149 72 72 73 73 virtual void parseAttribute(Attribute*) OVERRIDE; 74 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;74 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 75 75 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 76 76 -
trunk/Source/WebCore/html/HTMLButtonElement.cpp
r107554 r109149 80 80 } 81 81 82 bool HTMLButtonElement::isPresentationAttribute( Attribute* attr) const82 bool HTMLButtonElement::isPresentationAttribute(const QualifiedName& name) const 83 83 { 84 if ( attr->name()== alignAttr) {84 if (name == alignAttr) { 85 85 // Don't map 'align' attribute. This matches what Firefox and IE do, but not Opera. 86 86 // See http://bugs.webkit.org/show_bug.cgi?id=12071 … … 88 88 } 89 89 90 return HTMLFormControlElement::isPresentationAttribute( attr);90 return HTMLFormControlElement::isPresentationAttribute(name); 91 91 } 92 92 -
trunk/Source/WebCore/html/HTMLButtonElement.h
r107554 r109149 45 45 46 46 virtual void parseAttribute(Attribute*) OVERRIDE; 47 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;47 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 48 48 virtual void defaultEventHandler(Event*); 49 49 virtual bool appendFormData(FormDataList&, bool); -
trunk/Source/WebCore/html/HTMLDivElement.cpp
r108345 r109149 49 49 } 50 50 51 bool HTMLDivElement::isPresentationAttribute( Attribute* attr) const51 bool HTMLDivElement::isPresentationAttribute(const QualifiedName& name) const 52 52 { 53 if ( attr->name()== alignAttr)53 if (name == alignAttr) 54 54 return true; 55 return HTMLElement::isPresentationAttribute( attr);55 return HTMLElement::isPresentationAttribute(name); 56 56 } 57 57 -
trunk/Source/WebCore/html/HTMLDivElement.h
r107554 r109149 37 37 38 38 private: 39 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;39 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 40 40 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 41 41 }; -
trunk/Source/WebCore/html/HTMLElement.cpp
r108885 r109149 160 160 } 161 161 162 bool HTMLElement::isPresentationAttribute( Attribute* attr) const163 { 164 if ( attr->name() == alignAttr || attr->name() == contenteditableAttr || attr->name() == hiddenAttr || attr->name() == langAttr || attr->name().matches(XMLNames::langAttr) || attr->name() == draggableAttr || attr->name()== dirAttr)162 bool HTMLElement::isPresentationAttribute(const QualifiedName& name) const 163 { 164 if (name == alignAttr || name == contenteditableAttr || name == hiddenAttr || name == langAttr || name.matches(XMLNames::langAttr) || name == draggableAttr || name == dirAttr) 165 165 return true; 166 return StyledElement::isPresentationAttribute( attr);166 return StyledElement::isPresentationAttribute(name); 167 167 } 168 168 -
trunk/Source/WebCore/html/HTMLElement.h
r108345 r109149 108 108 109 109 virtual void parseAttribute(Attribute*) OVERRIDE; 110 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;110 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 111 111 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 112 112 -
trunk/Source/WebCore/html/HTMLEmbedElement.cpp
r108904 r109149 75 75 } 76 76 77 bool HTMLEmbedElement::isPresentationAttribute( Attribute* attr) const78 { 79 if ( attr->name()== hiddenAttr)77 bool HTMLEmbedElement::isPresentationAttribute(const QualifiedName& name) const 78 { 79 if (name == hiddenAttr) 80 80 return true; 81 return HTMLPlugInImageElement::isPresentationAttribute( attr);81 return HTMLPlugInImageElement::isPresentationAttribute(name); 82 82 } 83 83 -
trunk/Source/WebCore/html/HTMLEmbedElement.h
r108904 r109149 36 36 37 37 virtual void parseAttribute(Attribute*) OVERRIDE; 38 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;38 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 39 39 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 40 40 -
trunk/Source/WebCore/html/HTMLFontElement.cpp
r108451 r109149 161 161 } 162 162 163 bool HTMLFontElement::isPresentationAttribute( Attribute* attr) const163 bool HTMLFontElement::isPresentationAttribute(const QualifiedName& name) const 164 164 { 165 if ( attr->name() == sizeAttr || attr->name() == colorAttr || attr->name()== faceAttr)165 if (name == sizeAttr || name == colorAttr || name == faceAttr) 166 166 return true; 167 return HTMLElement::isPresentationAttribute( attr);167 return HTMLElement::isPresentationAttribute(name); 168 168 } 169 169 -
trunk/Source/WebCore/html/HTMLFontElement.h
r107554 r109149 38 38 HTMLFontElement(const QualifiedName&, Document*); 39 39 40 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;40 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 41 41 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 42 42 }; -
trunk/Source/WebCore/html/HTMLFrameSetElement.cpp
r107554 r109149 65 65 } 66 66 67 bool HTMLFrameSetElement::isPresentationAttribute( Attribute* attr) const68 { 69 if ( attr->name()== bordercolorAttr)67 bool HTMLFrameSetElement::isPresentationAttribute(const QualifiedName& name) const 68 { 69 if (name == bordercolorAttr) 70 70 return true; 71 return HTMLElement::isPresentationAttribute( attr);71 return HTMLElement::isPresentationAttribute(name); 72 72 } 73 73 -
trunk/Source/WebCore/html/HTMLFrameSetElement.h
r107554 r109149 69 69 70 70 virtual void parseAttribute(Attribute*) OVERRIDE; 71 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;71 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 72 72 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 73 73 -
trunk/Source/WebCore/html/HTMLHRElement.cpp
r108765 r109149 50 50 } 51 51 52 bool HTMLHRElement::isPresentationAttribute( Attribute* attr) const52 bool HTMLHRElement::isPresentationAttribute(const QualifiedName& name) const 53 53 { 54 if ( attr->name() == alignAttr || attr->name() == widthAttr || attr->name() == colorAttr || attr->name() == noshadeAttr || attr->name()== sizeAttr)54 if (name == alignAttr || name == widthAttr || name == colorAttr || name == noshadeAttr || name == sizeAttr) 55 55 return true; 56 return HTMLElement::isPresentationAttribute( attr);56 return HTMLElement::isPresentationAttribute(name); 57 57 } 58 58 -
trunk/Source/WebCore/html/HTMLHRElement.h
r107554 r109149 38 38 HTMLHRElement(const QualifiedName&, Document*); 39 39 40 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;40 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 41 41 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 42 42 }; -
trunk/Source/WebCore/html/HTMLIFrameElement.cpp
r108765 r109149 49 49 } 50 50 51 bool HTMLIFrameElement::isPresentationAttribute( Attribute* attr) const51 bool HTMLIFrameElement::isPresentationAttribute(const QualifiedName& name) const 52 52 { 53 if ( attr->name() == widthAttr || attr->name() == heightAttr || attr->name() == alignAttr || attr->name()== frameborderAttr)53 if (name == widthAttr || name == heightAttr || name == alignAttr || name == frameborderAttr) 54 54 return true; 55 return HTMLFrameElementBase::isPresentationAttribute( attr);55 return HTMLFrameElementBase::isPresentationAttribute(name); 56 56 } 57 57 -
trunk/Source/WebCore/html/HTMLIFrameElement.h
r107554 r109149 37 37 38 38 virtual void parseAttribute(Attribute*) OVERRIDE; 39 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;39 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 40 40 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 41 41 -
trunk/Source/WebCore/html/HTMLImageElement.cpp
r108345 r109149 79 79 } 80 80 81 bool HTMLImageElement::isPresentationAttribute( Attribute* attr) const82 { 83 if ( attr->name() == widthAttr || attr->name() == heightAttr || attr->name() == borderAttr || attr->name() == vspaceAttr || attr->name() == hspaceAttr || attr->name() == alignAttr || attr->name()== valignAttr)81 bool HTMLImageElement::isPresentationAttribute(const QualifiedName& name) const 82 { 83 if (name == widthAttr || name == heightAttr || name == borderAttr || name == vspaceAttr || name == hspaceAttr || name == alignAttr || name == valignAttr) 84 84 return true; 85 return HTMLElement::isPresentationAttribute( attr);85 return HTMLElement::isPresentationAttribute(name); 86 86 } 87 87 -
trunk/Source/WebCore/html/HTMLImageElement.h
r107554 r109149 85 85 private: 86 86 virtual void parseAttribute(Attribute*) OVERRIDE; 87 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;87 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 88 88 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 89 89 -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r108228 r109149 661 661 } 662 662 663 bool HTMLInputElement::isPresentationAttribute( Attribute* attr) const664 { 665 if ( attr->name() == vspaceAttr || attr->name() == hspaceAttr || attr->name() == alignAttr || attr->name() == widthAttr || attr->name() == heightAttr || (attr->name()== borderAttr && isImageButton()))663 bool HTMLInputElement::isPresentationAttribute(const QualifiedName& name) const 664 { 665 if (name == vspaceAttr || name == hspaceAttr || name == alignAttr || name == widthAttr || name == heightAttr || (name == borderAttr && isImageButton())) 666 666 return true; 667 return HTMLTextFormControlElement::isPresentationAttribute( attr);667 return HTMLTextFormControlElement::isPresentationAttribute(name); 668 668 } 669 669 -
trunk/Source/WebCore/html/HTMLInputElement.h
r107555 r109149 277 277 278 278 virtual void parseAttribute(Attribute*) OVERRIDE; 279 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;279 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 280 280 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 281 281 virtual void finishParsingChildren(); -
trunk/Source/WebCore/html/HTMLLIElement.cpp
r108345 r109149 50 50 } 51 51 52 bool HTMLLIElement::isPresentationAttribute( Attribute* attr) const52 bool HTMLLIElement::isPresentationAttribute(const QualifiedName& name) const 53 53 { 54 if ( attr->name()== typeAttr)54 if (name == typeAttr) 55 55 return true; 56 return HTMLElement::isPresentationAttribute( attr);56 return HTMLElement::isPresentationAttribute(name); 57 57 } 58 58 -
trunk/Source/WebCore/html/HTMLLIElement.h
r107554 r109149 37 37 38 38 virtual void parseAttribute(Attribute*) OVERRIDE; 39 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;39 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 40 40 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 41 41 -
trunk/Source/WebCore/html/HTMLMarqueeElement.cpp
r108345 r109149 59 59 } 60 60 61 bool HTMLMarqueeElement::isPresentationAttribute( Attribute* attr) const61 bool HTMLMarqueeElement::isPresentationAttribute(const QualifiedName& name) const 62 62 { 63 if ( attr->name() == widthAttr || attr->name() == heightAttr || attr->name() == bgcolorAttr || attr->name() == vspaceAttr || attr->name() == hspaceAttr || attr->name() == scrollamountAttr || attr->name() == scrolldelayAttr || attr->name() == loopAttr || attr->name() == behaviorAttr || attr->name()== directionAttr)63 if (name == widthAttr || name == heightAttr || name == bgcolorAttr || name == vspaceAttr || name == hspaceAttr || name == scrollamountAttr || name == scrolldelayAttr || name == loopAttr || name == behaviorAttr || name == directionAttr) 64 64 return true; 65 return HTMLElement::isPresentationAttribute( attr);65 return HTMLElement::isPresentationAttribute(name); 66 66 } 67 67 -
trunk/Source/WebCore/html/HTMLMarqueeElement.h
r107579 r109149 54 54 HTMLMarqueeElement(const QualifiedName&, Document*); 55 55 56 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;56 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 57 57 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 58 58 -
trunk/Source/WebCore/html/HTMLOListElement.cpp
r108345 r109149 55 55 } 56 56 57 bool HTMLOListElement::isPresentationAttribute( Attribute* attr) const57 bool HTMLOListElement::isPresentationAttribute(const QualifiedName& name) const 58 58 { 59 if ( attr->name()== typeAttr)59 if (name == typeAttr) 60 60 return true; 61 return HTMLElement::isPresentationAttribute( attr);61 return HTMLElement::isPresentationAttribute(name); 62 62 } 63 63 -
trunk/Source/WebCore/html/HTMLOListElement.h
r107554 r109149 55 55 56 56 virtual void parseAttribute(Attribute*) OVERRIDE; 57 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;57 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 58 58 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 59 59 -
trunk/Source/WebCore/html/HTMLObjectElement.cpp
r107554 r109149 78 78 } 79 79 80 bool HTMLObjectElement::isPresentationAttribute( Attribute* attr) const81 { 82 if ( attr->name()== borderAttr)80 bool HTMLObjectElement::isPresentationAttribute(const QualifiedName& name) const 81 { 82 if (name == borderAttr) 83 83 return true; 84 return HTMLPlugInImageElement::isPresentationAttribute( attr);84 return HTMLPlugInImageElement::isPresentationAttribute(name); 85 85 } 86 86 -
trunk/Source/WebCore/html/HTMLObjectElement.h
r107554 r109149 68 68 69 69 virtual void parseAttribute(Attribute*) OVERRIDE; 70 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;70 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 71 71 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 72 72 -
trunk/Source/WebCore/html/HTMLParagraphElement.cpp
r108345 r109149 45 45 } 46 46 47 bool HTMLParagraphElement::isPresentationAttribute( Attribute* attr) const47 bool HTMLParagraphElement::isPresentationAttribute(const QualifiedName& name) const 48 48 { 49 if ( attr->name()== alignAttr)49 if (name == alignAttr) 50 50 return true; 51 return HTMLElement::isPresentationAttribute( attr);51 return HTMLElement::isPresentationAttribute(name); 52 52 } 53 53 -
trunk/Source/WebCore/html/HTMLParagraphElement.h
r107554 r109149 35 35 HTMLParagraphElement(const QualifiedName&, Document*); 36 36 37 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;37 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 38 38 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 39 39 }; -
trunk/Source/WebCore/html/HTMLPlugInElement.cpp
r107554 r109149 141 141 } 142 142 143 bool HTMLPlugInElement::isPresentationAttribute( Attribute* attr) const144 { 145 if ( attr->name() == widthAttr || attr->name() == heightAttr || attr->name() == vspaceAttr || attr->name() == hspaceAttr || attr->name()== alignAttr)143 bool HTMLPlugInElement::isPresentationAttribute(const QualifiedName& name) const 144 { 145 if (name == widthAttr || name == heightAttr || name == vspaceAttr || name == hspaceAttr || name == alignAttr) 146 146 return true; 147 return HTMLFrameOwnerElement::isPresentationAttribute( attr);147 return HTMLFrameOwnerElement::isPresentationAttribute(name); 148 148 } 149 149 -
trunk/Source/WebCore/html/HTMLPlugInElement.h
r107554 r109149 59 59 virtual void detach(); 60 60 virtual void removedFromDocument(); 61 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;61 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 62 62 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 63 63 -
trunk/Source/WebCore/html/HTMLPreElement.cpp
r107554 r109149 43 43 } 44 44 45 bool HTMLPreElement::isPresentationAttribute( Attribute* attr) const45 bool HTMLPreElement::isPresentationAttribute(const QualifiedName& name) const 46 46 { 47 if ( attr->name()== wrapAttr)47 if (name == wrapAttr) 48 48 return true; 49 return HTMLElement::isPresentationAttribute( attr);49 return HTMLElement::isPresentationAttribute(name); 50 50 } 51 51 -
trunk/Source/WebCore/html/HTMLPreElement.h
r107554 r109149 35 35 HTMLPreElement(const QualifiedName&, Document*); 36 36 37 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;37 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 38 38 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 39 39 }; -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r108758 r109149 258 258 } 259 259 260 bool HTMLSelectElement::isPresentationAttribute( Attribute* attr) const261 { 262 if ( attr->name()== alignAttr) {260 bool HTMLSelectElement::isPresentationAttribute(const QualifiedName& name) const 261 { 262 if (name == alignAttr) { 263 263 // Don't map 'align' attribute. This matches what Firefox, Opera and IE do. 264 264 // See http://bugs.webkit.org/show_bug.cgi?id=12072 … … 266 266 } 267 267 268 return HTMLFormControlElementWithState::isPresentationAttribute( attr);268 return HTMLFormControlElementWithState::isPresentationAttribute(name); 269 269 } 270 270 -
trunk/Source/WebCore/html/HTMLSelectElement.h
r108758 r109149 123 123 124 124 virtual void parseAttribute(Attribute*) OVERRIDE; 125 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;125 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 126 126 127 127 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE; -
trunk/Source/WebCore/html/HTMLTableCaptionElement.cpp
r108345 r109149 45 45 } 46 46 47 bool HTMLTableCaptionElement::isPresentationAttribute( Attribute* attr) const47 bool HTMLTableCaptionElement::isPresentationAttribute(const QualifiedName& name) const 48 48 { 49 if ( attr->name()== alignAttr)49 if (name == alignAttr) 50 50 return true; 51 return HTMLElement::isPresentationAttribute( attr);51 return HTMLElement::isPresentationAttribute(name); 52 52 } 53 53 -
trunk/Source/WebCore/html/HTMLTableCaptionElement.h
r107580 r109149 38 38 HTMLTableCaptionElement(const QualifiedName&, Document*); 39 39 40 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;40 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 41 41 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 42 42 }; -
trunk/Source/WebCore/html/HTMLTableCellElement.cpp
r108345 r109149 76 76 } 77 77 78 bool HTMLTableCellElement::isPresentationAttribute( Attribute* attr) const78 bool HTMLTableCellElement::isPresentationAttribute(const QualifiedName& name) const 79 79 { 80 if ( attr->name() == nowrapAttr || attr->name() == widthAttr || attr->name()== heightAttr)80 if (name == nowrapAttr || name == widthAttr || name == heightAttr) 81 81 return true; 82 return HTMLTablePartElement::isPresentationAttribute( attr);82 return HTMLTablePartElement::isPresentationAttribute(name); 83 83 } 84 84 -
trunk/Source/WebCore/html/HTMLTableCellElement.h
r107554 r109149 55 55 56 56 virtual void parseAttribute(Attribute*) OVERRIDE; 57 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;57 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 58 58 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 59 59 -
trunk/Source/WebCore/html/HTMLTableColElement.cpp
r107554 r109149 48 48 } 49 49 50 bool HTMLTableColElement::isPresentationAttribute( Attribute* attr) const50 bool HTMLTableColElement::isPresentationAttribute(const QualifiedName& name) const 51 51 { 52 if ( attr->name()== widthAttr)52 if (name == widthAttr) 53 53 return true; 54 return HTMLTablePartElement::isPresentationAttribute( attr);54 return HTMLTablePartElement::isPresentationAttribute(name); 55 55 } 56 56 -
trunk/Source/WebCore/html/HTMLTableColElement.h
r107554 r109149 44 44 45 45 virtual void parseAttribute(Attribute*) OVERRIDE; 46 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;46 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 47 47 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 48 48 virtual StylePropertySet* additionalAttributeStyle() OVERRIDE; -
trunk/Source/WebCore/html/HTMLTableElement.cpp
r108901 r109149 353 353 } 354 354 355 bool HTMLTableElement::isPresentationAttribute( Attribute* attr) const356 { 357 if ( attr->name() == widthAttr || attr->name() == heightAttr || attr->name() == bgcolorAttr || attr->name() == backgroundAttr || attr->name() == valignAttr || attr->name() == vspaceAttr || attr->name() == hspaceAttr || attr->name() == alignAttr || attr->name() == cellspacingAttr || attr->name() == borderAttr || attr->name() == bordercolorAttr || attr->name() == frameAttr || attr->name()== rulesAttr)355 bool HTMLTableElement::isPresentationAttribute(const QualifiedName& name) const 356 { 357 if (name == widthAttr || name == heightAttr || name == bgcolorAttr || name == backgroundAttr || name == valignAttr || name == vspaceAttr || name == hspaceAttr || name == alignAttr || name == cellspacingAttr || name == borderAttr || name == bordercolorAttr || name == frameAttr || name == rulesAttr) 358 358 return true; 359 return HTMLElement::isPresentationAttribute( attr);359 return HTMLElement::isPresentationAttribute(name); 360 360 } 361 361 -
trunk/Source/WebCore/html/HTMLTableElement.h
r108901 r109149 72 72 73 73 virtual void parseAttribute(Attribute*) OVERRIDE; 74 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;74 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 75 75 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 76 76 virtual bool isURLAttribute(Attribute*) const; -
trunk/Source/WebCore/html/HTMLTablePartElement.cpp
r108765 r109149 39 39 using namespace HTMLNames; 40 40 41 bool HTMLTablePartElement::isPresentationAttribute( Attribute* attr) const41 bool HTMLTablePartElement::isPresentationAttribute(const QualifiedName& name) const 42 42 { 43 if ( attr->name() == bgcolorAttr || attr->name() == backgroundAttr || attr->name() == bordercolorAttr || attr->name() == valignAttr || attr->name() == alignAttr || attr->name()== heightAttr)43 if (name == bgcolorAttr || name == backgroundAttr || name == bordercolorAttr || name == valignAttr || name == alignAttr || name == heightAttr) 44 44 return true; 45 return HTMLElement::isPresentationAttribute( attr);45 return HTMLElement::isPresentationAttribute(name); 46 46 } 47 47 -
trunk/Source/WebCore/html/HTMLTablePartElement.h
r107554 r109149 40 40 } 41 41 42 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;42 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 43 43 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 44 44 -
trunk/Source/WebCore/html/HTMLTextAreaElement.cpp
r108959 r109149 120 120 } 121 121 122 bool HTMLTextAreaElement::isPresentationAttribute( Attribute* attr) const123 { 124 if ( attr->name()== alignAttr) {122 bool HTMLTextAreaElement::isPresentationAttribute(const QualifiedName& name) const 123 { 124 if (name == alignAttr) { 125 125 // Don't map 'align' attribute. This matches what Firefox, Opera and IE do. 126 126 // See http://bugs.webkit.org/show_bug.cgi?id=7075 … … 128 128 } 129 129 130 if ( attr->name()== wrapAttr)130 if (name == wrapAttr) 131 131 return true; 132 return HTMLTextFormControlElement::isPresentationAttribute( attr);132 return HTMLTextFormControlElement::isPresentationAttribute(name); 133 133 } 134 134 -
trunk/Source/WebCore/html/HTMLTextAreaElement.h
r107554 r109149 95 95 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 96 96 virtual void parseAttribute(Attribute*) OVERRIDE; 97 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;97 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 98 98 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 99 99 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); -
trunk/Source/WebCore/html/HTMLUListElement.cpp
r108345 r109149 48 48 } 49 49 50 bool HTMLUListElement::isPresentationAttribute( Attribute* attr) const50 bool HTMLUListElement::isPresentationAttribute(const QualifiedName& name) const 51 51 { 52 if ( attr->name()== typeAttr)52 if (name == typeAttr) 53 53 return true; 54 return HTMLElement::isPresentationAttribute( attr);54 return HTMLElement::isPresentationAttribute(name); 55 55 } 56 56 -
trunk/Source/WebCore/html/HTMLUListElement.h
r107554 r109149 36 36 HTMLUListElement(const QualifiedName&, Document*); 37 37 38 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;38 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 39 39 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 40 40 }; -
trunk/Source/WebCore/html/HTMLVideoElement.cpp
r107554 r109149 106 106 } 107 107 108 bool HTMLVideoElement::isPresentationAttribute( Attribute* attr) const109 { 110 if ( attr->name() == widthAttr || attr->name()== heightAttr)108 bool HTMLVideoElement::isPresentationAttribute(const QualifiedName& name) const 109 { 110 if (name == widthAttr || name == heightAttr) 111 111 return true; 112 return HTMLMediaElement::isPresentationAttribute( attr);112 return HTMLMediaElement::isPresentationAttribute(name); 113 113 } 114 114 -
trunk/Source/WebCore/html/HTMLVideoElement.h
r107554 r109149 77 77 virtual void detach(); 78 78 virtual void parseAttribute(Attribute*) OVERRIDE; 79 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;79 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 80 80 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 81 81 virtual bool isVideo() const { return true; } -
trunk/Source/WebCore/mathml/MathMLElement.cpp
r108345 r109149 49 49 } 50 50 51 bool MathMLElement::isPresentationAttribute( Attribute* attr) const51 bool MathMLElement::isPresentationAttribute(const QualifiedName& name) const 52 52 { 53 if ( attr->name() == mathbackgroundAttr || attr->name() == mathsizeAttr || attr->name() == mathcolorAttr || attr->name() == fontsizeAttr || attr->name() == backgroundAttr || attr->name() == colorAttr || attr->name() == fontstyleAttr || attr->name() == fontweightAttr || attr->name()== fontfamilyAttr)53 if (name == mathbackgroundAttr || name == mathsizeAttr || name == mathcolorAttr || name == fontsizeAttr || name == backgroundAttr || name == colorAttr || name == fontstyleAttr || name == fontweightAttr || name == fontfamilyAttr) 54 54 return true; 55 return StyledElement::isPresentationAttribute( attr);55 return StyledElement::isPresentationAttribute(name); 56 56 } 57 57 -
trunk/Source/WebCore/mathml/MathMLElement.h
r107554 r109149 43 43 private: 44 44 virtual bool isMathMLElement() const { return true; } 45 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;45 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 46 46 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 47 47 }; -
trunk/Source/WebCore/svg/SVGImageElement.cpp
r108345 r109149 92 92 } 93 93 94 bool SVGImageElement::isPresentationAttribute( Attribute* attr) const95 { 96 if ( attr->name() == SVGNames::widthAttr || attr->name()== SVGNames::heightAttr)94 bool SVGImageElement::isPresentationAttribute(const QualifiedName& name) const 95 { 96 if (name == SVGNames::widthAttr || name == SVGNames::heightAttr) 97 97 return true; 98 return SVGStyledTransformableElement::isPresentationAttribute( attr);98 return SVGStyledTransformableElement::isPresentationAttribute(name); 99 99 } 100 100 -
trunk/Source/WebCore/svg/SVGImageElement.h
r107554 r109149 51 51 bool isSupportedAttribute(const QualifiedName&); 52 52 virtual void parseAttribute(Attribute*) OVERRIDE; 53 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;53 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 54 54 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 55 55 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGStyledElement.cpp
r109097 r109149 280 280 } 281 281 282 bool SVGStyledElement::isPresentationAttribute( Attribute* attr) const283 { 284 if (SVGStyledElement::cssPropertyIdForSVGAttributeName( attr->name()) > 0)282 bool SVGStyledElement::isPresentationAttribute(const QualifiedName& name) const 283 { 284 if (SVGStyledElement::cssPropertyIdForSVGAttributeName(name) > 0) 285 285 return true; 286 return SVGElement::isPresentationAttribute( attr);286 return SVGElement::isPresentationAttribute(name); 287 287 } 288 288 -
trunk/Source/WebCore/svg/SVGStyledElement.h
r107554 r109149 67 67 68 68 virtual void parseAttribute(Attribute*) OVERRIDE; 69 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;69 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 70 70 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 71 71 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGTextContentElement.cpp
r108345 r109149 229 229 } 230 230 231 bool SVGTextContentElement::isPresentationAttribute( Attribute* attr) const232 { 233 if ( attr->name().matches(XMLNames::spaceAttr))231 bool SVGTextContentElement::isPresentationAttribute(const QualifiedName& name) const 232 { 233 if (name.matches(XMLNames::spaceAttr)) 234 234 return true; 235 return SVGStyledElement::isPresentationAttribute( attr);235 return SVGStyledElement::isPresentationAttribute(name); 236 236 } 237 237 -
trunk/Source/WebCore/svg/SVGTextContentElement.h
r107554 r109149 105 105 bool isSupportedAttribute(const QualifiedName&); 106 106 virtual void parseAttribute(Attribute*) OVERRIDE; 107 virtual bool isPresentationAttribute( Attribute*) const OVERRIDE;107 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 108 108 virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE; 109 109 virtual void svgAttributeChanged(const QualifiedName&);
Note: See TracChangeset
for help on using the changeset viewer.