Skip to content
  • cwzwarich@webkit.org's avatar
    2008-12-18 Cameron Zwarich <zwarich@apple.com> · 05a4f6a0
    cwzwarich@webkit.org authored
            Reviewed by Geoff Garen.
    
            Bug 21855: REGRESSION (r37323): Gmail complains about popup blocking when opening a link
            <https://bugs.webkit.org/show_bug.cgi?id=21855>
            <rdar://problem/6278244>
    
            If JavaScript is not currently executing, the handleEvent member function
            of JSAbstractEventListener should set the dynamic global object to the
            global object of the context in which the event occurred.
            
            If this is not set, then JavaScriptCore will simply take the global object
            of the context where the event handler function was created, which may be
            a different frame. This will cause the popup blocker to incorrectly block
            windows opened from onclick events inside of an iframe whose handler was
            created in the outer frame, as it will check the outer frame and see that
            it is not processing any events.
    
            JavaScriptCore:
    
            * interpreter/Interpreter.cpp:
            * runtime/JSGlobalObject.h:
            (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
            (JSC::DynamicGlobalObjectScope::~DynamicGlobalObjectScope):
    
            WebCore:
    
            * bindings/js/JSEventListener.cpp:
            (WebCore::JSAbstractEventListener::handleEvent):
    
            WebKitTools:
    
            * DumpRenderTree/mac/EventSendingController.h:
            * DumpRenderTree/mac/EventSendingController.mm:
            (+[EventSendingController isSelectorExcludedFromWebScript:]): Expose
            scheduleAsynchronousClick to JavaScript.
            (-[EventSendingController scheduleAsynchronousClick]): Add.
    
            LayoutTests:
    
            * fast/events/popup-blocking-click-in-iframe-expected.txt: Added.
            * fast/events/popup-blocking-click-in-iframe.html: Added.
            * fast/events/resources/popup-blocking-click-in-iframe-otherFrame.html: Added.
            * platform/gtk/Skipped:
            * platform/qt/Skipped:
            * platform/win/Skipped:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    05a4f6a0