Changeset 66408 in webkit


Ignore:
Timestamp:
Aug 30, 2010 2:16:45 PM (14 years ago)
Author:
robert@webkit.org
Message:

2010-08-30 Robert Hogan <robert@webkit.org>

Reviewed by Simon Hausmann.

allow ports with windowed plugins to support windowless plugin tests

https://bugs.webkit.org/show_bug.cgi?id=40730

Ports that implement plugins windowed by default need to have a way of
supporting plugin tests that assume the plugin is windowless. Add this
feature to the tests and support it in the webkit test plugin. Also
add mouse and keyboard event logging to the webkit-test plugin on Unix.

Unskip the following tests on Qt:

plugins/mouse-events.html
plugins/keyboard-events.html
plugins/mouse-events-fixedpos.html

  • platform/qt/Skipped:
  • plugins/keyboard-events.html:
  • plugins/mouse-events-fixedpos.html:
  • plugins/mouse-events.html:

2010-08-30 Robert Hogan <robert@webkit.org>

Reviewed by Simon Hausmann.

allow ports with windowed plugins to support windowless plugin tests

https://bugs.webkit.org/show_bug.cgi?id=40730

Ports that implement plugins windowed by default need to have a way of
supporting plugin tests that assume the plugin is windowless. Add this
feature to the tests and support it in the webkit test plugin. Also
add mouse and keyboard event logging to the webkit-test plugin on Unix.

Unskip the following tests on Qt:

plugins/mouse-events.html
plugins/keyboard-events.html
plugins/mouse-events-fixedpos.html

  • plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::setFocus): (WebCore::setXKeyEventSpecificFields):

2010-08-30 Robert Hogan <robert@webkit.org>

Reviewed by Simon Hausmann.

allow ports with windowed plugins to support windowless plugin tests

https://bugs.webkit.org/show_bug.cgi?id=40730

Ports that implement plugins windowed by default need to have a way of
supporting plugin tests that assume the plugin is windowless. Add this
feature to the tests and support it in the webkit test plugin. Also
add mouse and keyboard event logging to the webkit-test plugin on Unix.

Unskip the following tests on Qt:

plugins/mouse-events.html
plugins/keyboard-events.html
plugins/mouse-events-fixedpos.html

  • DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: (pluginSetProperty):
  • DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp: (NPP_New):
  • DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp: (webkit_test_plugin_handle_event):
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r66406 r66408  
     12010-08-30  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        allow ports with windowed plugins to support windowless plugin tests
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=40730
     8
     9        Ports that implement plugins windowed by default need to have a way of
     10        supporting plugin tests that assume the plugin is windowless. Add this
     11        feature to the tests and support it in the webkit test plugin. Also
     12        add mouse and keyboard event logging to the webkit-test plugin on Unix.
     13
     14        Unskip the following tests on Qt:
     15
     16        plugins/mouse-events.html
     17        plugins/keyboard-events.html
     18        plugins/mouse-events-fixedpos.html
     19
     20        * platform/qt/Skipped:
     21        * plugins/keyboard-events.html:
     22        * plugins/mouse-events-fixedpos.html:
     23        * plugins/mouse-events.html:
     24
    1252010-08-30  Evan Martin  <evan@chromium.org>
    226
  • trunk/LayoutTests/platform/qt/Skipped

    r66395 r66408  
    425425plugins/embed-attributes-setting.html
    426426fast/dom/object-embed-plugin-scripting.html
    427 
    428 # ---- events not getting to plugin
    429 # ---- https://bugs.webkit.org/show_bug.cgi?id=40730
    430 plugins/mouse-events.html
    431 plugins/keyboard-events.html
    432 plugins/mouse-events-fixedpos.html
    433427# ---- to be reviewed
    434428http/tests/plugins/plugin-document-has-focus.html
  • trunk/LayoutTests/plugins/keyboard-events.html

    r55620 r66408  
    55<script>
    66
     7    plg.windowedPlugin = false;
    78    plg.eventLoggingEnabled = true;
    89
  • trunk/LayoutTests/plugins/mouse-events-fixedpos.html

    r53637 r66408  
    3232    layoutTestController.dumpAsText();
    3333
     34    plg.windowedPlugin = false;
    3435    plg.eventLoggingEnabled = true;
    3536
  • trunk/LayoutTests/plugins/mouse-events.html

    r48891 r66408  
    66<script>
    77
     8    plg.windowedPlugin = false;
    89    plg.eventLoggingEnabled = true;
    910
  • trunk/WebCore/ChangeLog

    r66407 r66408  
     12010-08-30  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        allow ports with windowed plugins to support windowless plugin tests
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=40730
     8
     9        Ports that implement plugins windowed by default need to have a way of
     10        supporting plugin tests that assume the plugin is windowless. Add this
     11        feature to the tests and support it in the webkit test plugin. Also
     12        add mouse and keyboard event logging to the webkit-test plugin on Unix.
     13
     14        Unskip the following tests on Qt:
     15
     16        plugins/mouse-events.html
     17        plugins/keyboard-events.html
     18        plugins/mouse-events-fixedpos.html
     19
     20        * plugins/qt/PluginViewQt.cpp:
     21        (WebCore::PluginView::setFocus):
     22        (WebCore::setXKeyEventSpecificFields):
     23
    1242010-08-30  Kinuko Yasuda  <kinuko@chromium.org>
    225
  • trunk/WebCore/plugins/qt/PluginViewQt.cpp

    r66095 r66408  
    155155        Widget::setFocus(focused);
    156156    }
     157    if (!m_isWindowed) {
     158      XEvent npEvent;
     159      initXEvent(&npEvent);
     160      npEvent.type = (focused) ? 9 : 10; // ints as Qt unsets FocusIn and FocusOut
     161      if (!dispatchNPEvent(npEvent))
     162          LOG(Events, "PluginView::setFocus(%d): Focus event not accepted", focused);
     163    }
    157164}
    158165
     
    375382    xEvent->xkey.state = qKeyEvent->nativeModifiers();
    376383    xEvent->xkey.keycode = qKeyEvent->nativeScanCode();
     384
     385    // We may not have a nativeScanCode() if the key event is from DRT's eventsender. In that
     386    // case just populate the XEvent's keycode with the Qt platform-independent keycode. The only
     387    // place this keycode will be used is in webkit_test_plugin_handle_event().
     388    if (QWebPagePrivate::drtRun && !xEvent->xkey.keycode) {
     389        if (!qKeyEvent->text().isEmpty())
     390            xEvent->xkey.keycode = int(qKeyEvent->text().at(0).unicode() + qKeyEvent->modifiers());
     391        else if (qKeyEvent->key() && (qKeyEvent->key() != Qt::Key_unknown))
     392            xEvent->xkey.keycode = int(qKeyEvent->key() + qKeyEvent->modifiers());
     393    }
     394
    377395    xEvent->xkey.same_screen = true;
    378396
  • trunk/WebKitTools/ChangeLog

    r66405 r66408  
     12010-08-30  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        allow ports with windowed plugins to support windowless plugin tests
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=40730
     8
     9        Ports that implement plugins windowed by default need to have a way of
     10        supporting plugin tests that assume the plugin is windowless. Add this
     11        feature to the tests and support it in the webkit test plugin. Also
     12        add mouse and keyboard event logging to the webkit-test plugin on Unix.
     13
     14        Unskip the following tests on Qt:
     15
     16        plugins/mouse-events.html
     17        plugins/keyboard-events.html
     18        plugins/mouse-events-fixedpos.html
     19
     20        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
     21        (pluginSetProperty):
     22        * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
     23        (NPP_New):
     24        * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
     25        (webkit_test_plugin_handle_event):
     26
    1272010-08-30  Kevin Ollivier  <kevino@theolliviers.com>
    228
  • trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp

    r64359 r66408  
    140140    ID_PROPERTY_THROW_EXCEPTION_PROPERTY,
    141141    ID_LAST_SET_WINDOW_ARGUMENTS,
     142    ID_PROPERTY_WINDOWED_PLUGIN,
    142143    NUM_PROPERTY_IDENTIFIERS
    143144};
     
    155156    "cachedPrivateBrowsingEnabled",
    156157    "testThrowExceptionProperty",
    157     "lastSetWindowArguments"
     158    "lastSetWindowArguments",
     159    "windowedPlugin"
    158160};
    159161
     
    328330    } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_THROW_EXCEPTION_PROPERTY]) {
    329331        browser->setexception(obj, "plugin object testThrowExceptionProperty SUCCESS");
     332        return true;
     333    } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_WINDOWED_PLUGIN]) {
     334        browser->setvalue(plugin->npp, NPPVpluginWindowBool, (void *)NPVARIANT_TO_BOOLEAN(*variant));
    330335        return true;
    331336    }
  • trunk/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp

    r64362 r66408  
    268268
    269269    XEvent* evt = static_cast<XEvent*>(event);
    270     pluginLog(instance, "event %d", evt->type);
     270
     271    switch (evt->type) {
     272        case ButtonRelease:
     273            pluginLog(instance, "mouseUp at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
     274            break;
     275        case ButtonPress:
     276            pluginLog(instance, "mouseDown at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
     277            break;
     278        case KeyRelease:
     279            pluginLog(instance, "keyUp '%c'", evt->xkey.keycode);
     280            break;
     281        case KeyPress:
     282            pluginLog(instance, "keyDown '%c'", evt->xkey.keycode);
     283            break;
     284        case MotionNotify:
     285        case EnterNotify:
     286        case LeaveNotify:
     287            break;
     288        case FocusIn:
     289            pluginLog(instance, "getFocusEvent");
     290            break;
     291        case FocusOut:
     292            pluginLog(instance, "loseFocusEvent");
     293            break;
     294        default:
     295            pluginLog(instance, "event %d", evt->type);
     296    }
    271297
    272298    return 0;
Note: See TracChangeset for help on using the changeset viewer.