You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Attachment Support] The 'webkitattachmentbloburl' attribute should not persist after markup serialization
https://bugs.webkit.org/show_bug.cgi?id=180924
<rdar://problem/36099093>
Reviewed by Tim Horton.
Source/WebCore:
Work towards dragging Blob-backed attachment elements as files on iOS and Mac. It doesn't make sense for the
attachment blob URL to stick around on the element after markup serialization, so this patch removes logic that
eagerly sets the blob URL upon setting an attachment's File. Instead, we just append this attribute when
generating markup.
This patch also augments existing WKAttachmentTests to ensure that these attributes are not present.
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendCustomAttributes):
(WebCore::createFragmentFromMarkup):
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFile):
* rendering/HitTestResult.cpp:
Fixes a related issue where an attachment is backed by Blob data (and not a file path) would specify "file:///"
as its attachment file path in DragController when starting a drag. Instead, if there is no file path, fall back
to the blob URL.
This will be tested in a future patch once a WK2 dragging simulator for Mac is implemented, and support for
dragging out Blob-backed attachments as (platform) files is implemented.
(WebCore::HitTestResult::absoluteAttachmentURL const):
Tools:
Tweaks some existing tests to check that temporary attachment serialization attributes don't stick around on the
attachment elements.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[TestWKWebView hasAttribute:forQuerySelector:]):
(TestWebKitAPI::TEST):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@226097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0 commit comments