Changeset 287521 in webkit
- Timestamp:
- Jan 2, 2022, 11:05:11 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r287520 r287521 1 2022-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 1 16 2022-01-02 Antti Koivisto <antti@apple.com> 2 17 -
trunk/Source/WebCore/html/HTMLAttachmentElement.cpp
r287494 r287521 208 208 { 209 209 if (!newFilename.isNull()) { 210 if ( RefPtrenclosingImage = enclosingImageElement())210 if (auto enclosingImage = enclosingImageElement()) 211 211 enclosingImage->setAttributeWithoutSynchronization(HTMLNames::altAttr, newFilename); 212 212 setAttributeWithoutSynchronization(HTMLNames::titleAttr, newFilename); 213 213 } else { 214 if ( RefPtrenclosingImage = enclosingImageElement())214 if (auto enclosingImage = enclosingImageElement()) 215 215 enclosingImage->removeAttribute(HTMLNames::altAttr); 216 216 removeAttribute(HTMLNames::titleAttr); … … 241 241 return; 242 242 243 RefPtrenclosingImage = enclosingImageElement();243 auto enclosingImage = enclosingImageElement(); 244 244 if (!enclosingImage) 245 245 return;
Note:
See TracChangeset
for help on using the changeset viewer.