Changeset 91044 in webkit
- Timestamp:
- Jul 14, 2011, 7:16:09 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r91037 r91044 1 2011-07-14 Adam Barth <abarth@webkit.org> 2 3 The beforeload event allows tracking URI changes in a frame 4 https://bugs.webkit.org/show_bug.cgi?id=64482 5 6 Reviewed by Nate Chapin. 7 8 Test whether the beforeload event is fired for various kinds of redirects. 9 10 * http/tests/security/beforeload-iframe-client-redirect-expected.txt: Added. 11 * http/tests/security/beforeload-iframe-client-redirect.html: Added. 12 * http/tests/security/beforeload-iframe-server-redirect-expected.txt: Added. 13 * http/tests/security/beforeload-iframe-server-redirect.html: Added. 14 * http/tests/security/resources/post-done.html: Added. 15 * http/tests/security/resources/client-redir.html: Added. 16 1 17 2011-07-14 Vincent Scheib <scheib@chromium.org> 2 18 -
trunk/Source/WebCore/ChangeLog
r91043 r91044 1 2011-07-14 Adam Barth <abarth@webkit.org> 2 3 The beforeload event allows tracking URI changes in a frame 4 https://bugs.webkit.org/show_bug.cgi?id=64482 5 6 Reviewed by Nate Chapin. 7 8 Tests: http/tests/security/beforeload-iframe-client-redirect.html 9 http/tests/security/beforeload-iframe-server-redirect.html 10 11 Only dispatch the beforeload event for a frame if we haven't yet 12 committed our first real load. The URL that we send to our parent will 13 be the same URL the parent seens in the src attribute. 14 15 * loader/FrameLoader.cpp: 16 (WebCore::FrameLoader::loadWithDocumentLoader): 17 1 18 2011-07-14 Dan Bernstein <mitz@apple.com> 2 19 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r91006 r91044 1354 1354 1355 1355 if (Element* ownerElement = m_frame->ownerElement()) { 1356 if (!ownerElement->dispatchBeforeLoadEvent(loader->request().url().string())) { 1356 // We skip dispatching the beforeload event if we've already 1357 // committed a real document load because the event would leak 1358 // subsequent activity by the frame which the parent frame isn't 1359 // supposed to learn. For example, if the child frame navigated to 1360 // a new URL, the parent frame shouldn't learn the URL. 1361 if (!m_stateMachine.committedFirstRealDocumentLoad() 1362 && !ownerElement->dispatchBeforeLoadEvent(loader->request().url().string())) { 1357 1363 continueLoadAfterNavigationPolicy(loader->request(), formState, false); 1358 1364 return;
Note:
See TracChangeset
for help on using the changeset viewer.