[webkit-reviews] review granted: [Bug 234803] Undownloaded iCloud Photos are inserted as broken images when attachment element is enabled : [Attachment 448200] Fix iOS build

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 2 19:21:48 PST 2022


Darin Adler <darin at apple.com> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 234803: Undownloaded iCloud Photos are inserted as broken images when
attachment element is enabled
https://bugs.webkit.org/show_bug.cgi?id=234803

Attachment 448200: Fix iOS build

https://bugs.webkit.org/attachment.cgi?id=448200&action=review




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 448200
  --> https://bugs.webkit.org/attachment.cgi?id=448200
Fix iOS build

View in context: https://bugs.webkit.org/attachment.cgi?id=448200&action=review

> Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:729
> +    bool fileExists = FileSystem::fileExists(path);

Instead of making a separate file system call, can we save the result from
fileTypeFollowingSymlinks? Always nice to reduce the number of separate file
system accesses.

> Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:736
> +	  
attachment->setAttributeWithoutSynchronization(HTMLNames::progressAttr, "0"_s);

I think there’s a way to get the string “0” without allocating a new string.
Part of how JavaScript optimizes numeric strings. Not sure it’s easily
available, but maybe AtomString::number(0) would work.


More information about the webkit-reviews mailing list