Skip to content
Permalink
Browse files
StyledElement::isPresentationAttribute() only needs the attribute name.
<http://webkit.org/b/79828>

Reviewed by Anders Carlsson.

Pass the QualifiedName to isPresentationAttribute instead of the whole
Attribute. We only need the name to know what kind of attribute it is.

This makes the code a little less ugly and makes it possible to use
the function without having an Attribute object.

* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
* dom/StyledElement.h:
(WebCore::StyledElement::isPresentationAttribute):
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::isPresentationAttribute):
* html/HTMLBRElement.h:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::isPresentationAttribute):
* html/HTMLBodyElement.h:
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::isPresentationAttribute):
* html/HTMLButtonElement.h:
* html/HTMLDivElement.cpp:
(WebCore::HTMLDivElement::isPresentationAttribute):
* html/HTMLDivElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::isPresentationAttribute):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::isPresentationAttribute):
* html/HTMLEmbedElement.h:
* html/HTMLFontElement.cpp:
(WebCore::HTMLFontElement::isPresentationAttribute):
* html/HTMLFontElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::isPresentationAttribute):
* html/HTMLFrameSetElement.h:
* html/HTMLHRElement.cpp:
(WebCore::HTMLHRElement::isPresentationAttribute):
* html/HTMLHRElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::isPresentationAttribute):
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::isPresentationAttribute):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isPresentationAttribute):
* html/HTMLInputElement.h:
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::isPresentationAttribute):
* html/HTMLLIElement.h:
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::isPresentationAttribute):
* html/HTMLMarqueeElement.h:
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::isPresentationAttribute):
* html/HTMLOListElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::isPresentationAttribute):
* html/HTMLObjectElement.h:
* html/HTMLParagraphElement.cpp:
(WebCore::HTMLParagraphElement::isPresentationAttribute):
* html/HTMLParagraphElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::isPresentationAttribute):
* html/HTMLPlugInElement.h:
* html/HTMLPreElement.cpp:
(WebCore::HTMLPreElement::isPresentationAttribute):
* html/HTMLPreElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::isPresentationAttribute):
* html/HTMLSelectElement.h:
* html/HTMLTableCaptionElement.cpp:
(WebCore::HTMLTableCaptionElement::isPresentationAttribute):
* html/HTMLTableCaptionElement.h:
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::isPresentationAttribute):
* html/HTMLTableCellElement.h:
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::isPresentationAttribute):
* html/HTMLTableColElement.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::isPresentationAttribute):
* html/HTMLTableElement.h:
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::isPresentationAttribute):
* html/HTMLTablePartElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::isPresentationAttribute):
* html/HTMLTextAreaElement.h:
* html/HTMLUListElement.cpp:
(WebCore::HTMLUListElement::isPresentationAttribute):
* html/HTMLUListElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::isPresentationAttribute):
* html/HTMLVideoElement.h:
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::isPresentationAttribute):
* mathml/MathMLElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isPresentationAttribute):
* svg/SVGImageElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::isPresentationAttribute):
* svg/SVGStyledElement.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::isPresentationAttribute):
* svg/SVGTextContentElement.h:


Canonical link: https://commits.webkit.org/96908@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Andreas Kling committed Feb 28, 2012
1 parent b4dc52a commit 62e63d0716de34f7e4f2f7f1c3b8b4b78654dc5c
Showing with 245 additions and 131 deletions.
  1. +114 −0 Source/WebCore/ChangeLog
  2. +1 −1 Source/WebCore/dom/StyledElement.cpp
  3. +1 −1 Source/WebCore/dom/StyledElement.h
  4. +3 −3 Source/WebCore/html/HTMLBRElement.cpp
  5. +1 −1 Source/WebCore/html/HTMLBRElement.h
  6. +3 −3 Source/WebCore/html/HTMLBodyElement.cpp
  7. +1 −1 Source/WebCore/html/HTMLBodyElement.h
  8. +3 −3 Source/WebCore/html/HTMLButtonElement.cpp
  9. +1 −1 Source/WebCore/html/HTMLButtonElement.h
  10. +3 −3 Source/WebCore/html/HTMLDivElement.cpp
  11. +1 −1 Source/WebCore/html/HTMLDivElement.h
  12. +3 −3 Source/WebCore/html/HTMLElement.cpp
  13. +1 −1 Source/WebCore/html/HTMLElement.h
  14. +3 −3 Source/WebCore/html/HTMLEmbedElement.cpp
  15. +1 −1 Source/WebCore/html/HTMLEmbedElement.h
  16. +3 −3 Source/WebCore/html/HTMLFontElement.cpp
  17. +1 −1 Source/WebCore/html/HTMLFontElement.h
  18. +3 −3 Source/WebCore/html/HTMLFrameSetElement.cpp
  19. +1 −1 Source/WebCore/html/HTMLFrameSetElement.h
  20. +3 −3 Source/WebCore/html/HTMLHRElement.cpp
  21. +1 −1 Source/WebCore/html/HTMLHRElement.h
  22. +3 −3 Source/WebCore/html/HTMLIFrameElement.cpp
  23. +1 −1 Source/WebCore/html/HTMLIFrameElement.h
  24. +3 −3 Source/WebCore/html/HTMLImageElement.cpp
  25. +1 −1 Source/WebCore/html/HTMLImageElement.h
  26. +3 −3 Source/WebCore/html/HTMLInputElement.cpp
  27. +1 −1 Source/WebCore/html/HTMLInputElement.h
  28. +3 −3 Source/WebCore/html/HTMLLIElement.cpp
  29. +1 −1 Source/WebCore/html/HTMLLIElement.h
  30. +3 −3 Source/WebCore/html/HTMLMarqueeElement.cpp
  31. +1 −1 Source/WebCore/html/HTMLMarqueeElement.h
  32. +3 −3 Source/WebCore/html/HTMLOListElement.cpp
  33. +1 −1 Source/WebCore/html/HTMLOListElement.h
  34. +3 −3 Source/WebCore/html/HTMLObjectElement.cpp
  35. +1 −1 Source/WebCore/html/HTMLObjectElement.h
  36. +3 −3 Source/WebCore/html/HTMLParagraphElement.cpp
  37. +1 −1 Source/WebCore/html/HTMLParagraphElement.h
  38. +3 −3 Source/WebCore/html/HTMLPlugInElement.cpp
  39. +1 −1 Source/WebCore/html/HTMLPlugInElement.h
  40. +3 −3 Source/WebCore/html/HTMLPreElement.cpp
  41. +1 −1 Source/WebCore/html/HTMLPreElement.h
  42. +3 −3 Source/WebCore/html/HTMLSelectElement.cpp
  43. +1 −1 Source/WebCore/html/HTMLSelectElement.h
  44. +3 −3 Source/WebCore/html/HTMLTableCaptionElement.cpp
  45. +1 −1 Source/WebCore/html/HTMLTableCaptionElement.h
  46. +3 −3 Source/WebCore/html/HTMLTableCellElement.cpp
  47. +1 −1 Source/WebCore/html/HTMLTableCellElement.h
  48. +3 −3 Source/WebCore/html/HTMLTableColElement.cpp
  49. +1 −1 Source/WebCore/html/HTMLTableColElement.h
  50. +3 −3 Source/WebCore/html/HTMLTableElement.cpp
  51. +1 −1 Source/WebCore/html/HTMLTableElement.h
  52. +3 −3 Source/WebCore/html/HTMLTablePartElement.cpp
  53. +1 −1 Source/WebCore/html/HTMLTablePartElement.h
  54. +4 −4 Source/WebCore/html/HTMLTextAreaElement.cpp
  55. +1 −1 Source/WebCore/html/HTMLTextAreaElement.h
  56. +3 −3 Source/WebCore/html/HTMLUListElement.cpp
  57. +1 −1 Source/WebCore/html/HTMLUListElement.h
  58. +3 −3 Source/WebCore/html/HTMLVideoElement.cpp
  59. +1 −1 Source/WebCore/html/HTMLVideoElement.h
  60. +3 −3 Source/WebCore/mathml/MathMLElement.cpp
  61. +1 −1 Source/WebCore/mathml/MathMLElement.h
  62. +3 −3 Source/WebCore/svg/SVGImageElement.cpp
  63. +1 −1 Source/WebCore/svg/SVGImageElement.h
  64. +3 −3 Source/WebCore/svg/SVGStyledElement.cpp
  65. +1 −1 Source/WebCore/svg/SVGStyledElement.h
  66. +3 −3 Source/WebCore/svg/SVGTextContentElement.cpp
  67. +1 −1 Source/WebCore/svg/SVGTextContentElement.h
@@ -1,3 +1,117 @@
2012-02-28 Andreas Kling <awesomekling@apple.com>

StyledElement::isPresentationAttribute() only needs the attribute name.
<http://webkit.org/b/79828>

Reviewed by Anders Carlsson.

Pass the QualifiedName to isPresentationAttribute instead of the whole
Attribute. We only need the name to know what kind of attribute it is.

This makes the code a little less ugly and makes it possible to use
the function without having an Attribute object.

* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
* dom/StyledElement.h:
(WebCore::StyledElement::isPresentationAttribute):
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::isPresentationAttribute):
* html/HTMLBRElement.h:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::isPresentationAttribute):
* html/HTMLBodyElement.h:
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::isPresentationAttribute):
* html/HTMLButtonElement.h:
* html/HTMLDivElement.cpp:
(WebCore::HTMLDivElement::isPresentationAttribute):
* html/HTMLDivElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::isPresentationAttribute):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::isPresentationAttribute):
* html/HTMLEmbedElement.h:
* html/HTMLFontElement.cpp:
(WebCore::HTMLFontElement::isPresentationAttribute):
* html/HTMLFontElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::isPresentationAttribute):
* html/HTMLFrameSetElement.h:
* html/HTMLHRElement.cpp:
(WebCore::HTMLHRElement::isPresentationAttribute):
* html/HTMLHRElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::isPresentationAttribute):
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::isPresentationAttribute):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isPresentationAttribute):
* html/HTMLInputElement.h:
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::isPresentationAttribute):
* html/HTMLLIElement.h:
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::isPresentationAttribute):
* html/HTMLMarqueeElement.h:
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::isPresentationAttribute):
* html/HTMLOListElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::isPresentationAttribute):
* html/HTMLObjectElement.h:
* html/HTMLParagraphElement.cpp:
(WebCore::HTMLParagraphElement::isPresentationAttribute):
* html/HTMLParagraphElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::isPresentationAttribute):
* html/HTMLPlugInElement.h:
* html/HTMLPreElement.cpp:
(WebCore::HTMLPreElement::isPresentationAttribute):
* html/HTMLPreElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::isPresentationAttribute):
* html/HTMLSelectElement.h:
* html/HTMLTableCaptionElement.cpp:
(WebCore::HTMLTableCaptionElement::isPresentationAttribute):
* html/HTMLTableCaptionElement.h:
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::isPresentationAttribute):
* html/HTMLTableCellElement.h:
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::isPresentationAttribute):
* html/HTMLTableColElement.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::isPresentationAttribute):
* html/HTMLTableElement.h:
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::isPresentationAttribute):
* html/HTMLTablePartElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::isPresentationAttribute):
* html/HTMLTextAreaElement.h:
* html/HTMLUListElement.cpp:
(WebCore::HTMLUListElement::isPresentationAttribute):
* html/HTMLUListElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::isPresentationAttribute):
* html/HTMLVideoElement.h:
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::isPresentationAttribute):
* mathml/MathMLElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isPresentationAttribute):
* svg/SVGImageElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::isPresentationAttribute):
* svg/SVGStyledElement.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::isPresentationAttribute):
* svg/SVGTextContentElement.h:

2012-02-28 Enrica Casucci <enrica@apple.com>

More Pasteboard code cleanup.
@@ -66,7 +66,7 @@ void StyledElement::attributeChanged(Attribute* attr)
if (!(attr->name() == styleAttr && isSynchronizingStyleAttribute()))
parseAttribute(attr);

if (isPresentationAttribute(attr)) {
if (isPresentationAttribute(attr->name())) {
setAttributeStyleDirty();
setNeedsStyleRecalc(InlineStyleChange);
}
@@ -64,7 +64,7 @@ class StyledElement : public Element {
virtual void parseAttribute(Attribute*);
virtual void copyNonAttributeProperties(const Element*);

virtual bool isPresentationAttribute(Attribute*) const { return false; }
virtual bool isPresentationAttribute(const QualifiedName&) const { return false; }
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) { }

void addPropertyToAttributeStyle(StylePropertySet*, int propertyID, int identifier);
@@ -49,11 +49,11 @@ PassRefPtr<HTMLBRElement> HTMLBRElement::create(const QualifiedName& tagName, Do
return adoptRef(new HTMLBRElement(tagName, document));
}

bool HTMLBRElement::isPresentationAttribute(Attribute* attr) const
bool HTMLBRElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == clearAttr)
if (name == clearAttr)
return true;
return HTMLElement::isPresentationAttribute(attr);
return HTMLElement::isPresentationAttribute(name);
}

void HTMLBRElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -38,7 +38,7 @@ class HTMLBRElement : public HTMLElement {
private:
HTMLBRElement(const QualifiedName&, Document*);

virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;

virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
@@ -61,11 +61,11 @@ HTMLBodyElement::~HTMLBodyElement()
{
}

bool HTMLBodyElement::isPresentationAttribute(Attribute* attr) const
bool HTMLBodyElement::isPresentationAttribute(const QualifiedName& name) const
{
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)
if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginAttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr || name == textAttr || name == bgpropertiesAttr)
return true;
return HTMLElement::isPresentationAttribute(attr);
return HTMLElement::isPresentationAttribute(name);
}

void HTMLBodyElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -71,7 +71,7 @@ class HTMLBodyElement : public HTMLElement {
HTMLBodyElement(const QualifiedName&, Document*);

virtual void parseAttribute(Attribute*) OVERRIDE;
virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;

virtual void insertedIntoDocument();
@@ -79,15 +79,15 @@ const AtomicString& HTMLButtonElement::formControlType() const
return emptyAtom;
}

bool HTMLButtonElement::isPresentationAttribute(Attribute* attr) const
bool HTMLButtonElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == alignAttr) {
if (name == alignAttr) {
// Don't map 'align' attribute. This matches what Firefox and IE do, but not Opera.
// See http://bugs.webkit.org/show_bug.cgi?id=12071
return false;
}

return HTMLFormControlElement::isPresentationAttribute(attr);
return HTMLFormControlElement::isPresentationAttribute(name);
}

void HTMLButtonElement::parseAttribute(Attribute* attr)
@@ -44,7 +44,7 @@ class HTMLButtonElement : public HTMLFormControlElement {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);

virtual void parseAttribute(Attribute*) OVERRIDE;
virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void defaultEventHandler(Event*);
virtual bool appendFormData(FormDataList&, bool);

@@ -48,11 +48,11 @@ PassRefPtr<HTMLDivElement> HTMLDivElement::create(const QualifiedName& tagName,
return adoptRef(new HTMLDivElement(tagName, document));
}

bool HTMLDivElement::isPresentationAttribute(Attribute* attr) const
bool HTMLDivElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == alignAttr)
if (name == alignAttr)
return true;
return HTMLElement::isPresentationAttribute(attr);
return HTMLElement::isPresentationAttribute(name);
}

void HTMLDivElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -36,7 +36,7 @@ class HTMLDivElement : public HTMLElement {
HTMLDivElement(const QualifiedName&, Document*);

private:
virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;
};

@@ -159,11 +159,11 @@ void HTMLElement::mapLanguageAttributeToLocale(Attribute* attribute, StyleProper
}
}

bool HTMLElement::isPresentationAttribute(Attribute* attr) const
bool HTMLElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == alignAttr || attr->name() == contenteditableAttr || attr->name() == hiddenAttr || attr->name() == langAttr || attr->name().matches(XMLNames::langAttr) || attr->name() == draggableAttr || attr->name() == dirAttr)
if (name == alignAttr || name == contenteditableAttr || name == hiddenAttr || name == langAttr || name.matches(XMLNames::langAttr) || name == draggableAttr || name == dirAttr)
return true;
return StyledElement::isPresentationAttribute(attr);
return StyledElement::isPresentationAttribute(name);
}

void HTMLElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -107,7 +107,7 @@ class HTMLElement : public StyledElement {
void applyBorderAttributeToStyle(Attribute*, StylePropertySet*);

virtual void parseAttribute(Attribute*) OVERRIDE;
virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;

virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
@@ -74,11 +74,11 @@ RenderWidget* HTMLEmbedElement::renderWidgetForJSBindings()
return findWidgetRenderer(this);
}

bool HTMLEmbedElement::isPresentationAttribute(Attribute* attr) const
bool HTMLEmbedElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == hiddenAttr)
if (name == hiddenAttr)
return true;
return HTMLPlugInImageElement::isPresentationAttribute(attr);
return HTMLPlugInImageElement::isPresentationAttribute(name);
}

void HTMLEmbedElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -35,7 +35,7 @@ class HTMLEmbedElement : public HTMLPlugInImageElement {
HTMLEmbedElement(const QualifiedName&, Document*, bool createdByParser);

virtual void parseAttribute(Attribute*) OVERRIDE;
virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;

virtual bool rendererIsNeeded(const NodeRenderingContext&);
@@ -160,11 +160,11 @@ bool HTMLFontElement::cssValueFromFontSizeNumber(const String& s, int& size)
return true;
}

bool HTMLFontElement::isPresentationAttribute(Attribute* attr) const
bool HTMLFontElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == sizeAttr || attr->name() == colorAttr || attr->name() == faceAttr)
if (name == sizeAttr || name == colorAttr || name == faceAttr)
return true;
return HTMLElement::isPresentationAttribute(attr);
return HTMLElement::isPresentationAttribute(name);
}

void HTMLFontElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -37,7 +37,7 @@ class HTMLFontElement : public HTMLElement {
private:
HTMLFontElement(const QualifiedName&, Document*);

virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;
};

@@ -64,11 +64,11 @@ PassRefPtr<HTMLFrameSetElement> HTMLFrameSetElement::create(const QualifiedName&
return adoptRef(new HTMLFrameSetElement(tagName, document));
}

bool HTMLFrameSetElement::isPresentationAttribute(Attribute* attr) const
bool HTMLFrameSetElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == bordercolorAttr)
if (name == bordercolorAttr)
return true;
return HTMLElement::isPresentationAttribute(attr);
return HTMLElement::isPresentationAttribute(name);
}

void HTMLFrameSetElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -68,7 +68,7 @@ class HTMLFrameSetElement : public HTMLElement {
HTMLFrameSetElement(const QualifiedName&, Document*);

virtual void parseAttribute(Attribute*) OVERRIDE;
virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;

virtual void attach();
@@ -49,11 +49,11 @@ PassRefPtr<HTMLHRElement> HTMLHRElement::create(const QualifiedName& tagName, Do
return adoptRef(new HTMLHRElement(tagName, document));
}

bool HTMLHRElement::isPresentationAttribute(Attribute* attr) const
bool HTMLHRElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == alignAttr || attr->name() == widthAttr || attr->name() == colorAttr || attr->name() == noshadeAttr || attr->name() == sizeAttr)
if (name == alignAttr || name == widthAttr || name == colorAttr || name == noshadeAttr || name == sizeAttr)
return true;
return HTMLElement::isPresentationAttribute(attr);
return HTMLElement::isPresentationAttribute(name);
}

void HTMLHRElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -37,7 +37,7 @@ class HTMLHRElement : public HTMLElement {
private:
HTMLHRElement(const QualifiedName&, Document*);

virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;
};

@@ -48,11 +48,11 @@ PassRefPtr<HTMLIFrameElement> HTMLIFrameElement::create(const QualifiedName& tag
return adoptRef(new HTMLIFrameElement(tagName, document));
}

bool HTMLIFrameElement::isPresentationAttribute(Attribute* attr) const
bool HTMLIFrameElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == widthAttr || attr->name() == heightAttr || attr->name() == alignAttr || attr->name() == frameborderAttr)
if (name == widthAttr || name == heightAttr || name == alignAttr || name == frameborderAttr)
return true;
return HTMLFrameElementBase::isPresentationAttribute(attr);
return HTMLFrameElementBase::isPresentationAttribute(name);
}

void HTMLIFrameElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -36,7 +36,7 @@ class HTMLIFrameElement : public HTMLFrameElementBase {
HTMLIFrameElement(const QualifiedName&, Document*);

virtual void parseAttribute(Attribute*) OVERRIDE;
virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;

virtual void insertedIntoDocument();
@@ -78,11 +78,11 @@ PassRefPtr<HTMLImageElement> HTMLImageElement::createForJSConstructor(Document*
return image.release();
}

bool HTMLImageElement::isPresentationAttribute(Attribute* attr) const
bool HTMLImageElement::isPresentationAttribute(const QualifiedName& name) const
{
if (attr->name() == widthAttr || attr->name() == heightAttr || attr->name() == borderAttr || attr->name() == vspaceAttr || attr->name() == hspaceAttr || attr->name() == alignAttr || attr->name() == valignAttr)
if (name == widthAttr || name == heightAttr || name == borderAttr || name == vspaceAttr || name == hspaceAttr || name == alignAttr || name == valignAttr)
return true;
return HTMLElement::isPresentationAttribute(attr);
return HTMLElement::isPresentationAttribute(name);
}

void HTMLImageElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)

0 comments on commit 62e63d0

Please sign in to comment.