Changeset 116430 in webkit


Ignore:
Timestamp:
May 8, 2012 9:27:04 AM (12 years ago)
Author:
kling@webkit.org
Message:

Element: isURLAttribute() should take a const Attribute&.
<http://webkit.org/b/85890>

Reviewed by Anders Carlsson.

Change isURLAttribute(Attribute*) to isURLAttribute(const Attribute&) to enforce
the fact that the Attribute can't be null, and shouldn't be mutated, at compile-time.
Also sprinkle OVERRIDE while we're at it.

  • dom/Element.cpp:

(WebCore::Element::getURLAttribute):
(WebCore::Element::getNonEmptyURLAttribute):

  • dom/Element.h:

(WebCore::Element::isURLAttribute):

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
(WebCore::MarkupAccumulator::appendAttribute):

  • editing/markup.cpp:

(WebCore::completeURLs):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::isURLAttribute):

  • html/HTMLAnchorElement.h:
  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::isURLAttribute):

  • html/HTMLBaseElement.h:
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::isURLAttribute):

  • html/HTMLBodyElement.h:
  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::isURLAttribute):

  • html/HTMLButtonElement.h:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::isURLAttribute):

  • html/HTMLElement.h:
  • html/HTMLEmbedElement.cpp:

(WebCore::HTMLEmbedElement::isURLAttribute):

  • html/HTMLEmbedElement.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::isURLAttribute):

  • html/HTMLFormElement.h:
  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::isURLAttribute):

  • html/HTMLFrameElementBase.h:

(HTMLFrameElementBase):

  • html/HTMLHtmlElement.cpp:

(WebCore::HTMLHtmlElement::isURLAttribute):

  • html/HTMLHtmlElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::isURLAttribute):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::isURLAttribute):

  • html/HTMLInputElement.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::isURLAttribute):

  • html/HTMLLinkElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::isURLAttribute):

  • html/HTMLMediaElement.h:
  • html/HTMLModElement.cpp:

(WebCore::HTMLModElement::isURLAttribute):

  • html/HTMLModElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::isURLAttribute):

  • html/HTMLObjectElement.h:
  • html/HTMLParamElement.cpp:

(WebCore::HTMLParamElement::isURLAttribute):

  • html/HTMLParamElement.h:
  • html/HTMLQuoteElement.cpp:

(WebCore::HTMLQuoteElement::isURLAttribute):

  • html/HTMLQuoteElement.h:
  • html/HTMLScriptElement.cpp:

(WebCore::HTMLScriptElement::isURLAttribute):

  • html/HTMLScriptElement.h:
  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::isURLAttribute):

  • html/HTMLSourceElement.h:
  • html/HTMLTableCellElement.cpp:

(WebCore::HTMLTableCellElement::isURLAttribute):

  • html/HTMLTableCellElement.h:
  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::isURLAttribute):

  • html/HTMLTableElement.h:
  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::isURLAttribute):

  • html/HTMLTrackElement.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::isURLAttribute):

  • html/HTMLVideoElement.h:
  • svg/SVGScriptElement.cpp:

(WebCore::SVGScriptElement::isURLAttribute):

  • svg/SVGScriptElement.h:
Location:
trunk/Source/WebCore
Files:
53 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116427 r116430  
     12012-05-08  Andreas Kling  <kling@webkit.org>
     2
     3        Element: isURLAttribute() should take a const Attribute&.
     4        <http://webkit.org/b/85890>
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Change isURLAttribute(Attribute*) to isURLAttribute(const Attribute&) to enforce
     9        the fact that the Attribute can't be null, and shouldn't be mutated, at compile-time.
     10        Also sprinkle OVERRIDE while we're at it.
     11
     12        * dom/Element.cpp:
     13        (WebCore::Element::getURLAttribute):
     14        (WebCore::Element::getNonEmptyURLAttribute):
     15        * dom/Element.h:
     16        (WebCore::Element::isURLAttribute):
     17        * editing/MarkupAccumulator.cpp:
     18        (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
     19        (WebCore::MarkupAccumulator::appendAttribute):
     20        * editing/markup.cpp:
     21        (WebCore::completeURLs):
     22        * html/HTMLAnchorElement.cpp:
     23        (WebCore::HTMLAnchorElement::isURLAttribute):
     24        * html/HTMLAnchorElement.h:
     25        * html/HTMLBaseElement.cpp:
     26        (WebCore::HTMLBaseElement::isURLAttribute):
     27        * html/HTMLBaseElement.h:
     28        * html/HTMLBodyElement.cpp:
     29        (WebCore::HTMLBodyElement::isURLAttribute):
     30        * html/HTMLBodyElement.h:
     31        * html/HTMLButtonElement.cpp:
     32        (WebCore::HTMLButtonElement::isURLAttribute):
     33        * html/HTMLButtonElement.h:
     34        * html/HTMLElement.cpp:
     35        (WebCore::HTMLElement::isURLAttribute):
     36        * html/HTMLElement.h:
     37        * html/HTMLEmbedElement.cpp:
     38        (WebCore::HTMLEmbedElement::isURLAttribute):
     39        * html/HTMLEmbedElement.h:
     40        * html/HTMLFormElement.cpp:
     41        (WebCore::HTMLFormElement::isURLAttribute):
     42        * html/HTMLFormElement.h:
     43        * html/HTMLFrameElementBase.cpp:
     44        (WebCore::HTMLFrameElementBase::isURLAttribute):
     45        * html/HTMLFrameElementBase.h:
     46        (HTMLFrameElementBase):
     47        * html/HTMLHtmlElement.cpp:
     48        (WebCore::HTMLHtmlElement::isURLAttribute):
     49        * html/HTMLHtmlElement.h:
     50        * html/HTMLImageElement.cpp:
     51        (WebCore::HTMLImageElement::isURLAttribute):
     52        * html/HTMLImageElement.h:
     53        * html/HTMLInputElement.cpp:
     54        (WebCore::HTMLInputElement::isURLAttribute):
     55        * html/HTMLInputElement.h:
     56        * html/HTMLLinkElement.cpp:
     57        (WebCore::HTMLLinkElement::isURLAttribute):
     58        * html/HTMLLinkElement.h:
     59        * html/HTMLMediaElement.cpp:
     60        (WebCore::HTMLMediaElement::isURLAttribute):
     61        * html/HTMLMediaElement.h:
     62        * html/HTMLModElement.cpp:
     63        (WebCore::HTMLModElement::isURLAttribute):
     64        * html/HTMLModElement.h:
     65        * html/HTMLObjectElement.cpp:
     66        (WebCore::HTMLObjectElement::isURLAttribute):
     67        * html/HTMLObjectElement.h:
     68        * html/HTMLParamElement.cpp:
     69        (WebCore::HTMLParamElement::isURLAttribute):
     70        * html/HTMLParamElement.h:
     71        * html/HTMLQuoteElement.cpp:
     72        (WebCore::HTMLQuoteElement::isURLAttribute):
     73        * html/HTMLQuoteElement.h:
     74        * html/HTMLScriptElement.cpp:
     75        (WebCore::HTMLScriptElement::isURLAttribute):
     76        * html/HTMLScriptElement.h:
     77        * html/HTMLSourceElement.cpp:
     78        (WebCore::HTMLSourceElement::isURLAttribute):
     79        * html/HTMLSourceElement.h:
     80        * html/HTMLTableCellElement.cpp:
     81        (WebCore::HTMLTableCellElement::isURLAttribute):
     82        * html/HTMLTableCellElement.h:
     83        * html/HTMLTableElement.cpp:
     84        (WebCore::HTMLTableElement::isURLAttribute):
     85        * html/HTMLTableElement.h:
     86        * html/HTMLTrackElement.cpp:
     87        (WebCore::HTMLTrackElement::isURLAttribute):
     88        * html/HTMLTrackElement.h:
     89        * html/HTMLVideoElement.cpp:
     90        (WebCore::HTMLVideoElement::isURLAttribute):
     91        * html/HTMLVideoElement.h:
     92        * svg/SVGScriptElement.cpp:
     93        (WebCore::SVGScriptElement::isURLAttribute):
     94        * svg/SVGScriptElement.h:
     95
    1962012-05-08  Stephen Chenney  <schenney@chromium.org>
    297
  • trunk/Source/WebCore/dom/Element.cpp

    r116423 r116430  
    867867}
    868868
    869 bool Element::isURLAttribute(Attribute*) const
    870 {
    871     return false;
    872 }
    873 
    874869const QualifiedName& Element::imageSourceAttributeName() const
    875870{
     
    18421837    if (m_attributeData) {
    18431838        if (Attribute* attribute = getAttributeItem(name))
    1844             ASSERT(isURLAttribute(attribute));
     1839            ASSERT(isURLAttribute(*attribute));
    18451840    }
    18461841#endif
     
    18531848    if (m_attributeData) {
    18541849        if (Attribute* attribute = getAttributeItem(name))
    1855             ASSERT(isURLAttribute(attribute));
     1850            ASSERT(isURLAttribute(*attribute));
    18561851    }
    18571852#endif
  • trunk/Source/WebCore/dom/Element.h

    r116423 r116430  
    282282    virtual void accessKeyAction(bool /*sendToAnyEvent*/) { }
    283283
    284     virtual bool isURLAttribute(Attribute*) const;
     284    virtual bool isURLAttribute(const Attribute&) const { return false; }
    285285
    286286    KURL getURLAttribute(const QualifiedName&) const;
  • trunk/Source/WebCore/editing/MarkupAccumulator.cpp

    r114059 r116430  
    171171void MarkupAccumulator::appendQuotedURLAttributeValue(StringBuilder& result, const Element* element, const Attribute& attribute)
    172172{
    173     ASSERT(element->isURLAttribute(const_cast<Attribute*>(&attribute)));
     173    ASSERT(element->isURLAttribute(attribute));
    174174    const String resolvedURLString = resolveURLIfNeeded(element, attribute.value());
    175175    UChar quoteChar = '"';
     
    420420    result.append('=');
    421421
    422     if (element->isURLAttribute(const_cast<Attribute*>(&attribute)))
     422    if (element->isURLAttribute(attribute))
    423423        appendQuotedURLAttributeValue(result, element, attribute);
    424424    else {
  • trunk/Source/WebCore/editing/markup.cpp

    r115669 r116430  
    111111            for (unsigned i = 0; i < length; i++) {
    112112                Attribute* attribute = e->attributeItem(i);
    113                 if (e->isURLAttribute(attribute))
     113                if (e->isURLAttribute(*attribute))
    114114                    changes.append(AttributeChange(e, attribute->name(), KURL(parsedBaseURL, attribute->value()).string()));
    115115            }
  • trunk/Source/WebCore/html/HTMLAnchorElement.cpp

    r114870 r116430  
    246246}
    247247
    248 bool HTMLAnchorElement::isURLAttribute(Attribute *attr) const
    249 {
    250     return attr->name() == hrefAttr || HTMLElement::isURLAttribute(attr);
     248bool HTMLAnchorElement::isURLAttribute(const Attribute& attribute) const
     249{
     250    return attribute.name() == hrefAttr || HTMLElement::isURLAttribute(attribute);
    251251}
    252252
  • trunk/Source/WebCore/html/HTMLAnchorElement.h

    r106769 r116430  
    113113    virtual void setActive(bool active = true, bool pause = false);
    114114    virtual void accessKeyAction(bool sendMouseEvents);
    115     virtual bool isURLAttribute(Attribute*) const;
     115    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    116116    virtual bool canStartSelection() const;
    117117    virtual String target() const;
  • trunk/Source/WebCore/html/HTMLBaseElement.cpp

    r114351 r116430  
    6666}
    6767
    68 bool HTMLBaseElement::isURLAttribute(Attribute* attribute) const
     68bool HTMLBaseElement::isURLAttribute(const Attribute& attribute) const
    6969{
    70     return attribute->name() == hrefAttr || HTMLElement::isURLAttribute(attribute);
     70    return attribute.name() == hrefAttr || HTMLElement::isURLAttribute(attribute);
    7171}
    7272
  • trunk/Source/WebCore/html/HTMLBaseElement.h

    r114351 r116430  
    3636
    3737    virtual String target() const;
    38     virtual bool isURLAttribute(Attribute*) const;
     38    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    3939    virtual void parseAttribute(Attribute*) OVERRIDE;
    4040    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
  • trunk/Source/WebCore/html/HTMLBodyElement.cpp

    r115819 r116430  
    184184}
    185185
    186 bool HTMLBodyElement::isURLAttribute(Attribute *attr) const
    187 {
    188     return attr->name() == backgroundAttr || HTMLElement::isURLAttribute(attr);
     186bool HTMLBodyElement::isURLAttribute(const Attribute& attribute) const
     187{
     188    return attribute.name() == backgroundAttr || HTMLElement::isURLAttribute(attribute);
    189189}
    190190
  • trunk/Source/WebCore/html/HTMLBodyElement.h

    r114351 r116430  
    7878    virtual void didNotifyDescendantInseretions(Node*) OVERRIDE;
    7979   
    80     virtual bool isURLAttribute(Attribute*) const;
     80    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    8181   
    8282    virtual bool supportsFocus() const;
  • trunk/Source/WebCore/html/HTMLButtonElement.cpp

    r109149 r116430  
    178178}
    179179
    180 bool HTMLButtonElement::isURLAttribute(Attribute* attr) const
     180bool HTMLButtonElement::isURLAttribute(const Attribute& attribute) const
    181181{
    182     return attr->name() == formactionAttr || HTMLFormControlElement::isURLAttribute(attr);
     182    return attribute.name() == formactionAttr || HTMLFormControlElement::isURLAttribute(attribute);
    183183}
    184184
  • trunk/Source/WebCore/html/HTMLButtonElement.h

    r110927 r116430  
    5757
    5858    virtual void accessKeyAction(bool sendMouseEvents);
    59     virtual bool isURLAttribute(Attribute*) const;
     59    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    6060
    6161    virtual bool canStartSelection() const { return false; }
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r113647 r116430  
    957957}
    958958
    959 bool HTMLElement::isURLAttribute(Attribute* attribute) const
     959bool HTMLElement::isURLAttribute(const Attribute& attribute) const
    960960{
    961961#if ENABLE(MICRODATA)
    962     return attribute->name() == itemidAttr;
     962    return attribute.name() == itemidAttr;
    963963#else
    964964    UNUSED_PARAM(attribute);
  • trunk/Source/WebCore/html/HTMLElement.h

    r113187 r116430  
    122122    void calculateAndAdjustDirectionality();
    123123
    124     virtual bool isURLAttribute(Attribute*) const;
     124    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    125125
    126126private:
  • trunk/Source/WebCore/html/HTMLEmbedElement.cpp

    r109149 r116430  
    209209}
    210210
    211 bool HTMLEmbedElement::isURLAttribute(Attribute* attr) const
    212 {
    213     return attr->name() == srcAttr || HTMLPlugInImageElement::isURLAttribute(attr);
     211bool HTMLEmbedElement::isURLAttribute(const Attribute& attribute) const
     212{
     213    return attribute.name() == srcAttr || HTMLPlugInImageElement::isURLAttribute(attribute);
    214214}
    215215
  • trunk/Source/WebCore/html/HTMLEmbedElement.h

    r109149 r116430  
    4141    virtual bool rendererIsNeeded(const NodeRenderingContext&);
    4242
    43     virtual bool isURLAttribute(Attribute*) const;
     43    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    4444    virtual const QualifiedName& imageSourceAttributeName() const;
    4545
  • trunk/Source/WebCore/html/HTMLFormElement.cpp

    r115926 r116430  
    516516}
    517517
    518 bool HTMLFormElement::isURLAttribute(Attribute* attr) const
    519 {
    520     return attr->name() == actionAttr || HTMLElement::isURLAttribute(attr);
     518bool HTMLFormElement::isURLAttribute(const Attribute& attribute) const
     519{
     520    return attribute.name() == actionAttr || HTMLElement::isURLAttribute(attribute);
    521521}
    522522
  • trunk/Source/WebCore/html/HTMLFormElement.h

    r115926 r116430  
    125125
    126126    virtual void parseAttribute(Attribute*) OVERRIDE;
    127 
    128     virtual bool isURLAttribute(Attribute*) const;
     127    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    129128
    130129    virtual void documentDidResumeFromPageCache();
  • trunk/Source/WebCore/html/HTMLFrameElementBase.cpp

    r114351 r116430  
    226226}
    227227
    228 bool HTMLFrameElementBase::isURLAttribute(Attribute *attr) const
    229 {
    230     return attr->name() == srcAttr || HTMLFrameOwnerElement::isURLAttribute(attr);
     228bool HTMLFrameElementBase::isURLAttribute(const Attribute& attribute) const
     229{
     230    return attribute.name() == srcAttr || HTMLFrameOwnerElement::isURLAttribute(attribute);
    231231}
    232232
  • trunk/Source/WebCore/html/HTMLFrameElementBase.h

    r114351 r116430  
    6363    virtual void setFocus(bool);
    6464   
    65     virtual bool isURLAttribute(Attribute*) const;
     65    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    6666    virtual bool isFrameElementBase() const { return true; }
    6767
  • trunk/Source/WebCore/html/HTMLHtmlElement.cpp

    r99742 r116430  
    5252}
    5353
    54 bool HTMLHtmlElement::isURLAttribute(Attribute* attribute) const
     54bool HTMLHtmlElement::isURLAttribute(const Attribute& attribute) const
    5555{
    56     return attribute->name() == manifestAttr || HTMLElement::isURLAttribute(attribute);
     56    return attribute.name() == manifestAttr || HTMLElement::isURLAttribute(attribute);
    5757}
    5858
  • trunk/Source/WebCore/html/HTMLHtmlElement.h

    r95919 r116430  
    3939    HTMLHtmlElement(const QualifiedName&, Document*);
    4040
    41     virtual bool isURLAttribute(Attribute*) const;
     41    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    4242};
    4343
  • trunk/Source/WebCore/html/HTMLImageElement.cpp

    r114351 r116430  
    260260}
    261261
    262 bool HTMLImageElement::isURLAttribute(Attribute* attr) const
    263 {
    264     return attr->name() == srcAttr
    265         || attr->name() == lowsrcAttr
    266         || attr->name() == longdescAttr
    267         || (attr->name() == usemapAttr && attr->value().string()[0] != '#')
    268         || HTMLElement::isURLAttribute(attr);
     262bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const
     263{
     264    return attribute.name() == srcAttr
     265        || attribute.name() == lowsrcAttr
     266        || attribute.name() == longdescAttr
     267        || (attribute.name() == usemapAttr && attribute.value().string()[0] != '#')
     268        || HTMLElement::isURLAttribute(attribute);
    269269}
    270270
  • trunk/Source/WebCore/html/HTMLImageElement.h

    r114351 r116430  
    9494    virtual bool canStartSelection() const { return false; }
    9595
    96     virtual bool isURLAttribute(Attribute*) const;
     96    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    9797
    9898    virtual bool draggable() const;
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r116389 r116430  
    12361236}
    12371237
    1238 bool HTMLInputElement::isURLAttribute(Attribute *attr) const
    1239 {
    1240     return attr->name() == srcAttr || attr->name() == formactionAttr || HTMLTextFormControlElement::isURLAttribute(attr);
     1238bool HTMLInputElement::isURLAttribute(const Attribute& attribute) const
     1239{
     1240    return attribute.name() == srcAttr || attribute.name() == formactionAttr || HTMLTextFormControlElement::isURLAttribute(attribute);
    12411241}
    12421242
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r116389 r116430  
    299299    virtual void postDispatchEventHandler(Event*, void* dataFromPreDispatch);
    300300
    301     virtual bool isURLAttribute(Attribute*) const;
     301    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    302302
    303303    virtual bool hasUnacceptableValue() const;
  • trunk/Source/WebCore/html/HTMLLinkElement.cpp

    r115951 r116430  
    391391}
    392392
    393 bool HTMLLinkElement::isURLAttribute(Attribute *attr) const
    394 {
    395     return attr->name() == hrefAttr || HTMLElement::isURLAttribute(attr);
     393bool HTMLLinkElement::isURLAttribute(const Attribute& attribute) const
     394{
     395    return attribute.name() == hrefAttr || HTMLElement::isURLAttribute(attribute);
    396396}
    397397
  • trunk/Source/WebCore/html/HTMLLinkElement.h

    r114351 r116430  
    9292    void setDisabledState(bool);
    9393
    94     virtual bool isURLAttribute(Attribute*) const;
     94    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    9595
    9696private:
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r116277 r116430  
    40224022}
    40234023
    4024 bool HTMLMediaElement::isURLAttribute(Attribute* attribute) const
    4025 {
    4026     return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
     4024bool HTMLMediaElement::isURLAttribute(const Attribute& attribute) const
     4025{
     4026    return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute);
    40274027}
    40284028
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r114390 r116430  
    326326    virtual void parseAttribute(Attribute*) OVERRIDE;
    327327    virtual void finishParsingChildren();
    328     virtual bool isURLAttribute(Attribute*) const;
     328    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    329329    virtual void attach();
    330330
  • trunk/Source/WebCore/html/HTMLModElement.cpp

    r99742 r116430  
    4040}
    4141
    42 bool HTMLModElement::isURLAttribute(Attribute* attribute) const
     42bool HTMLModElement::isURLAttribute(const Attribute& attribute) const
    4343{
    44     return attribute->name() == citeAttr || HTMLElement::isURLAttribute(attribute);
     44    return attribute.name() == citeAttr || HTMLElement::isURLAttribute(attribute);
    4545}
    4646
  • trunk/Source/WebCore/html/HTMLModElement.h

    r66327 r116430  
    3636    HTMLModElement(const QualifiedName&, Document*);
    3737
    38     virtual bool isURLAttribute(Attribute*) const;
     38    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    3939};
    4040
  • trunk/Source/WebCore/html/HTMLObjectElement.cpp

    r115669 r116430  
    352352}
    353353
    354 bool HTMLObjectElement::isURLAttribute(Attribute *attr) const
    355 {
    356     return attr->name() == dataAttr || (attr->name() == usemapAttr && attr->value().string()[0] != '#') || HTMLPlugInImageElement::isURLAttribute(attr);
     354bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const
     355{
     356    return attribute.name() == dataAttr || (attribute.name() == usemapAttr && attribute.value().string()[0] != '#') || HTMLPlugInImageElement::isURLAttribute(attribute);
    357357}
    358358
  • trunk/Source/WebCore/html/HTMLObjectElement.h

    r114351 r116430  
    7979    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
    8080
    81     virtual bool isURLAttribute(Attribute*) const;
     81    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    8282    virtual const QualifiedName& imageSourceAttributeName() const;
    8383
  • trunk/Source/WebCore/html/HTMLParamElement.cpp

    r108890 r116430  
    6060}
    6161
    62 bool HTMLParamElement::isURLAttribute(Attribute* attr) const
     62bool HTMLParamElement::isURLAttribute(const Attribute& attribute) const
    6363{
    64     if (attr->name() == valueAttr && isURLParameter(name()))
     64    if (attribute.name() == valueAttr && isURLParameter(name()))
    6565        return true;
    66     return HTMLElement::isURLAttribute(attr);
     66    return HTMLElement::isURLAttribute(attribute);
    6767}
    6868
  • trunk/Source/WebCore/html/HTMLParamElement.h

    r108890 r116430  
    4040    HTMLParamElement(const QualifiedName&, Document*);
    4141
    42     virtual bool isURLAttribute(Attribute*) const;
     42    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    4343
    4444    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
  • trunk/Source/WebCore/html/HTMLQuoteElement.cpp

    r114351 r116430  
    5050}
    5151
    52 bool HTMLQuoteElement::isURLAttribute(Attribute* attribute) const
     52bool HTMLQuoteElement::isURLAttribute(const Attribute& attribute) const
    5353{
    54     return attribute->name() == citeAttr || HTMLElement::isURLAttribute(attribute);
     54    return attribute.name() == citeAttr || HTMLElement::isURLAttribute(attribute);
    5555}
    5656
  • trunk/Source/WebCore/html/HTMLQuoteElement.h

    r114351 r116430  
    3838   
    3939    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
    40     virtual bool isURLAttribute(Attribute*) const;
     40    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    4141};
    4242
  • trunk/Source/WebCore/html/HTMLScriptElement.cpp

    r114351 r116430  
    4848}
    4949
    50 bool HTMLScriptElement::isURLAttribute(Attribute* attr) const
     50bool HTMLScriptElement::isURLAttribute(const Attribute& attribute) const
    5151{
    52     return attr->name() == srcAttr || HTMLElement::isURLAttribute(attr);
     52    return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute);
    5353}
    5454
  • trunk/Source/WebCore/html/HTMLScriptElement.h

    r114351 r116430  
    4949    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
    5050
    51     virtual bool isURLAttribute(Attribute*) const;
     51    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    5252
    5353    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
  • trunk/Source/WebCore/html/HTMLSourceElement.cpp

    r114351 r116430  
    118118}
    119119
    120 bool HTMLSourceElement::isURLAttribute(Attribute* attribute) const
     120bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const
    121121{
    122     return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
     122    return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute);
    123123}
    124124
  • trunk/Source/WebCore/html/HTMLSourceElement.h

    r114351 r116430  
    5252    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
    5353    virtual void willRemove();
    54     virtual bool isURLAttribute(Attribute*) const;
     54    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    5555
    5656    void errorEventTimerFired(Timer<HTMLSourceElement>*);
  • trunk/Source/WebCore/html/HTMLTableCellElement.cpp

    r109149 r116430  
    122122}
    123123
    124 bool HTMLTableCellElement::isURLAttribute(Attribute *attr) const
     124bool HTMLTableCellElement::isURLAttribute(const Attribute& attribute) const
    125125{
    126     return attr->name() == backgroundAttr || HTMLTablePartElement::isURLAttribute(attr);
     126    return attribute.name() == backgroundAttr || HTMLTablePartElement::isURLAttribute(attribute);
    127127}
    128128
  • trunk/Source/WebCore/html/HTMLTableCellElement.h

    r109149 r116430  
    6060    virtual StylePropertySet* additionalAttributeStyle() OVERRIDE;
    6161
    62     virtual bool isURLAttribute(Attribute*) const;
     62    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    6363
    6464    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
  • trunk/Source/WebCore/html/HTMLTableElement.cpp

    r115160 r116430  
    556556}
    557557
    558 bool HTMLTableElement::isURLAttribute(Attribute *attr) const
    559 {
    560     return attr->name() == backgroundAttr || HTMLElement::isURLAttribute(attr);
     558bool HTMLTableElement::isURLAttribute(const Attribute& attribute) const
     559{
     560    return attribute.name() == backgroundAttr || HTMLElement::isURLAttribute(attribute);
    561561}
    562562
  • trunk/Source/WebCore/html/HTMLTableElement.h

    r115160 r116430  
    7575    virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
    7676    virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;
    77     virtual bool isURLAttribute(Attribute*) const;
     77    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    7878
    7979    // Used to obtain either a solid or outset border decl and to deal with the frame and rules attributes.
  • trunk/Source/WebCore/html/HTMLTrackElement.cpp

    r114351 r116430  
    185185}
    186186
    187 bool HTMLTrackElement::isURLAttribute(Attribute* attribute) const
    188 {
    189     return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
     187bool HTMLTrackElement::isURLAttribute(const Attribute& attribute) const
     188{
     189    return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute);
    190190}
    191191
  • trunk/Source/WebCore/html/HTMLTrackElement.h

    r114351 r116430  
    8080    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
    8181    virtual void willRemove() OVERRIDE;
    82     virtual bool isURLAttribute(Attribute*) const;
     82    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    8383
    8484#if ENABLE(MICRODATA)
  • trunk/Source/WebCore/html/HTMLVideoElement.cpp

    r109149 r116430  
    183183}
    184184   
    185 bool HTMLVideoElement::isURLAttribute(Attribute* attribute) const
    186 {
    187     return HTMLMediaElement::isURLAttribute(attribute)
    188         || attribute->name() == posterAttr;
     185bool HTMLVideoElement::isURLAttribute(const Attribute& attribute) const
     186{
     187    return attribute.name() == posterAttr || HTMLMediaElement::isURLAttribute(attribute);
    189188}
    190189
  • trunk/Source/WebCore/html/HTMLVideoElement.h

    r109149 r116430  
    8282    virtual bool hasVideo() const { return player() && player()->hasVideo(); }
    8383    virtual bool supportsFullscreen() const;
    84     virtual bool isURLAttribute(Attribute*) const;
     84    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    8585    virtual const QualifiedName& imageSourceAttributeName() const;
    8686
  • trunk/Source/WebCore/svg/SVGScriptElement.cpp

    r114351 r116430  
    133133}
    134134
    135 bool SVGScriptElement::isURLAttribute(Attribute* attr) const
    136 {
    137     return attr->name() == sourceAttributeValue();
     135bool SVGScriptElement::isURLAttribute(const Attribute& attribute) const
     136{
     137    return attribute.name() == sourceAttributeValue();
    138138}
    139139
  • trunk/Source/WebCore/svg/SVGScriptElement.h

    r114351 r116430  
    5151
    5252    virtual void svgAttributeChanged(const QualifiedName&);
    53     virtual bool isURLAttribute(Attribute*) const;
     53    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
    5454    virtual void finishParsingChildren();
    5555
Note: See TracChangeset for help on using the changeset viewer.