Changeset 287521 in webkit


Ignore:
Timestamp:
Jan 2, 2022, 11:05:11 AM (4 years ago)
Author:
Wenson Hsieh
Message:

Followup to r287494
https://bugs.webkit.org/show_bug.cgi?id=234747
rdar://85899879

Reviewed by Darin Adler.

Use auto instread of RefPtr when storing the result of enclosingImageElement() in a few places; this
method already returns a RefPtr.

  • html/HTMLAttachmentElement.cpp:

(WebCore::HTMLAttachmentElement::updateAttributes):
(WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r287520 r287521  
     12022-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Followup to r287494
     4        https://bugs.webkit.org/show_bug.cgi?id=234747
     5        rdar://85899879
     6
     7        Reviewed by Darin Adler.
     8
     9        Use `auto` instread of `RefPtr` when storing the result of `enclosingImageElement()` in a few places; this
     10        method already returns a `RefPtr`.
     11
     12        * html/HTMLAttachmentElement.cpp:
     13        (WebCore::HTMLAttachmentElement::updateAttributes):
     14        (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
     15
    1162022-01-02  Antti Koivisto  <antti@apple.com>
    217
  • trunk/Source/WebCore/html/HTMLAttachmentElement.cpp

    r287494 r287521  
    208208{
    209209    if (!newFilename.isNull()) {
    210         if (RefPtr enclosingImage = enclosingImageElement())
     210        if (auto enclosingImage = enclosingImageElement())
    211211            enclosingImage->setAttributeWithoutSynchronization(HTMLNames::altAttr, newFilename);
    212212        setAttributeWithoutSynchronization(HTMLNames::titleAttr, newFilename);
    213213    } else {
    214         if (RefPtr enclosingImage = enclosingImageElement())
     214        if (auto enclosingImage = enclosingImageElement())
    215215            enclosingImage->removeAttribute(HTMLNames::altAttr);
    216216        removeAttribute(HTMLNames::titleAttr);
     
    241241        return;
    242242
    243     RefPtr enclosingImage = enclosingImageElement();
     243    auto enclosingImage = enclosingImageElement();
    244244    if (!enclosingImage)
    245245        return;
Note: See TracChangeset for help on using the changeset viewer.