Changeset 273300 in webkit
- Timestamp:
- Feb 23, 2021, 12:20:01 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/Page.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r273299 r273300 1 2021-02-23 Ryosuke Niwa <rniwa@webkit.org> 2 3 Handle Page::didFinishLoadingImageForElement asynchronously 4 https://bugs.webkit.org/show_bug.cgi?id=221390 5 6 Reviewed by Antti Koivisto. 7 8 Use EventLoop instead of RunLoop::main() to be thread safe in iOS WebKit1. 9 10 * page/Page.cpp: 11 (WebCore::Page::didFinishLoadingImageForElement): 12 1 13 2021-02-22 Don Olmstead <don.olmstead@sony.com> 2 14 -
trunk/Source/WebCore/page/Page.cpp
r273231 r273300 55 55 #include "Event.h" 56 56 #include "EventHandler.h" 57 #include "EventLoop.h" 57 58 #include "EventNames.h" 58 59 #include "ExtensionStyleSheets.h" … … 3337 3338 void Page::didFinishLoadingImageForElement(HTMLImageElement& element) 3338 3339 { 3339 RunLoop::main().dispatch([this, weakThis = makeWeakPtr(*this), element = makeRef(element)]() { 3340 if (!weakThis) 3340 element.document().eventLoop().queueTask(TaskSource::Networking, [element = makeRef(element)]() { 3341 auto frame = makeRefPtr(element->document().frame()); 3342 if (!frame) 3341 3343 return; 3342 3344 3343 if (auto frame = makeRefPtr(element->document().frame()))3344 frame->editor().revealSelectionIfNeededAfterLoadingImageForElement(element);3345 chrome().client().didFinishLoadingImageForElement(element);3345 frame->editor().revealSelectionIfNeededAfterLoadingImageForElement(element); 3346 if (auto* page = frame->page(); element->document().frame() == frame) 3347 page->chrome().client().didFinishLoadingImageForElement(element); 3346 3348 }); 3347 3349 }
Note:
See TracChangeset
for help on using the changeset viewer.