Changeset 248175 in webkit
- Timestamp:
- Aug 2, 2019 1:22:18 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r248172 r248175 1 2019-08-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: Crash when interacting with Template Content in Console 4 https://bugs.webkit.org/show_bug.cgi?id=196280 5 6 Reviewed by Joseph Pecoraro. 7 8 * inspector/dom/inspect-template-node-expected.txt: Added. 9 * inspector/dom/inspect-template-node.html: Added. 10 1 11 2019-08-02 Ryosuke Niwa <rniwa@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r248173 r248175 1 2019-08-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: Crash when interacting with Template Content in Console 4 https://bugs.webkit.org/show_bug.cgi?id=196280 5 6 Reviewed by Joseph Pecoraro. 7 8 Test: inspector/dom/inspect-template-node.html 9 10 * bindings/js/JSDOMBindingSecurity.cpp: 11 (WebCore::canAccessDocument): if target element is from a 12 <template> use its host document to check the access. Elements 13 from the host document always have access to its template elements content. 14 * inspector/agents/InspectorDOMAgent.cpp: 15 (WebCore::InspectorDOMAgent::resolveNode): templates are created in 16 special template document which doesn't have a frame, in such case get 17 the frame from the host document. 18 1 19 2019-08-02 Ryosuke Niwa <rniwa@webkit.org> 2 20 -
trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp
r237105 r248175 50 50 if (!targetDocument) 51 51 return false; 52 53 if (auto* templateHost = targetDocument->templateDocumentHost()) 54 targetDocument = templateHost; 52 55 53 56 DOMWindow& active = activeDOMWindow(*state); -
trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
r246490 r248175 2595 2595 RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup) 2596 2596 { 2597 auto* frame = node->document().frame(); 2597 Document* document = &node->document(); 2598 if (auto* templateHost = document->templateDocumentHost()) 2599 document = templateHost; 2600 auto* frame = document->frame(); 2598 2601 if (!frame) 2599 2602 return nullptr;
Note: See TracChangeset
for help on using the changeset viewer.