Changeset 83984 in webkit


Ignore:
Timestamp:
Apr 15, 2011 9:42:05 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-15 Vsevolod Vlasov <vsevik@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: No console message and headers in inspector when X-Frame-Options header blocks a load
https://bugs.webkit.org/show_bug.cgi?id=58136

Passed response info to inspector when X-Frame-Options header blocks resource loading.

  • http/tests/inspector/network/resources/x-frame-options-deny.cgi: Added.
  • http/tests/inspector/network/x-frame-options-deny-expected.txt: Added.
  • http/tests/inspector/network/x-frame-options-deny.html: Added.

2011-04-15 Vsevolod Vlasov <vsevik@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: No console message and headers in inspector when X-Frame-Options header blocks a load
https://bugs.webkit.org/show_bug.cgi?id=58136

Passed response info to inspector when X-Frame-Options header blocks resource loading.

Test: http/tests/inspector/network/x-frame-options-deny.html

  • inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl):
  • inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
  • loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didReceiveResponse):
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83983 r83984  
     12011-04-15  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: No console message and headers in inspector when X-Frame-Options header blocks a load
     6        https://bugs.webkit.org/show_bug.cgi?id=58136
     7
     8        Passed response info to inspector when X-Frame-Options header blocks resource loading.
     9
     10        * http/tests/inspector/network/resources/x-frame-options-deny.cgi: Added.
     11        * http/tests/inspector/network/x-frame-options-deny-expected.txt: Added.
     12        * http/tests/inspector/network/x-frame-options-deny.html: Added.
     13
    1142011-04-15  Andrey Adaikin  <aandrey@google.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r83983 r83984  
     12011-04-15  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: No console message and headers in inspector when X-Frame-Options header blocks a load
     6        https://bugs.webkit.org/show_bug.cgi?id=58136
     7
     8        Passed response info to inspector when X-Frame-Options header blocks resource loading.
     9
     10        Test: http/tests/inspector/network/x-frame-options-deny.html
     11
     12        * inspector/InspectorInstrumentation.cpp:
     13        (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl):
     14        * inspector/InspectorInstrumentation.h:
     15        (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
     16        * loader/MainResourceLoader.cpp:
     17        (WebCore::MainResourceLoader::didReceiveResponse):
     18
    1192011-04-15  Andrey Adaikin  <aandrey@google.com>
    220
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r83975 r83984  
    464464}
    465465
     466void InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r)
     467{
     468    didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
     469}
     470
    466471void InspectorInstrumentation::continueWithPolicyDownloadImpl(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r)
    467472{
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r83975 r83984  
    119119    static InspectorInstrumentationCookie willReceiveResourceResponse(Frame*, unsigned long identifier, const ResourceResponse&);
    120120    static void didReceiveResourceResponse(const InspectorInstrumentationCookie&, unsigned long identifier, DocumentLoader*, const ResourceResponse&);
     121    static void continueAfterXFrameOptionsDenied(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
    121122    static void continueWithPolicyDownload(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
    122123    static void continueWithPolicyIgnore(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
     
    238239    static void didReceiveResourceResponseImpl(const InspectorInstrumentationCookie&, unsigned long identifier, DocumentLoader*, const ResourceResponse&);
    239240    static void didReceiveResourceResponseButCanceledImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
     241    static void continueAfterXFrameOptionsDeniedImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
    240242    static void continueWithPolicyDownloadImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
    241243    static void continueWithPolicyIgnoreImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&);
     
    671673}
    672674
     675inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r)
     676{
     677#if ENABLE(INSPECTOR)
     678    if (inspectorAgentWithFrontendForFrame(frame))
     679        InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl(frame, loader, identifier, r);
     680#endif
     681}
     682
    673683inline void InspectorInstrumentation::continueWithPolicyDownload(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r)
    674684{
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r83933 r83984  
    359359        String content = it->second;
    360360        if (m_frame->loader()->shouldInterruptLoadForXFrameOptions(content, r.url())) {
     361            InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame.get(), documentLoader(), identifier(), r);
     362
    361363            cancel();
    362364            return;
Note: See TracChangeset for help on using the changeset viewer.