Changeset 135595 in webkit
- Timestamp:
- Nov 23, 2012 4:55:45 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r135590 r135595 1 2012-11-23 Wojciech Bielawski <w.bielawski@samsung.com> 2 3 [WK2][WKTR] WebKitTestRunner needs eventSender.contextClick() 4 https://bugs.webkit.org/show_bug.cgi?id=86881 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Added expected results for two tests for EFL platform. Test expectations changed 9 for EFL WK1/WK2 and GTK platforms 10 11 * platform/efl/TestExpectations: 12 * platform/efl-wk1/TestExpectations: 13 * platform/efl-wk2/TestExpectations: 14 * platform/gkt-wk2/TestExpectations: 15 * platform/gtk/editing/selection/5354455-2-expected.txt: 16 * platform/efl/editing/selection/5354455-2-expected.txt: Added. 17 * platform/efl/fast/events/context-no-deselect-expected.txt: Added. 18 1 19 2012-11-23 Sudarsana Nagineni <sudarsana.nagineni@intel.com> 2 20 -
trunk/LayoutTests/platform/efl-wk1/TestExpectations
r135348 r135595 279 279 webkit.org/b/102517 css3/device-adapt/opera/syntax-002.xhtml [ Failure ] 280 280 webkit.org/b/102517 css3/device-adapt/opera/syntax-003.xhtml [ Failure ] 281 282 # ESC key does not cancel context menu in EFL port 283 Bug(EFL) editing/selection/5354455-1.html [ Failure ] -
trunk/LayoutTests/platform/efl-wk2/TestExpectations
r135590 r135595 280 280 webkit.org/b/98739 plugins/npruntime/embed-property-equality.html [ Failure ] 281 281 282 # WebKitTestRunner needs an implementation for eventSender.contextClick 283 webkit.org/b/86881 editing/pasteboard/copy-standalone-image-crash.html [ Failure ] 284 webkit.org/b/86881 editing/selection/5354455-1.html [ Failure ] 285 webkit.org/b/86881 editing/selection/5354455-2.html [ Failure ] 286 webkit.org/b/86881 editing/selection/button-right-click.html [ Failure ] 287 webkit.org/b/86881 editing/selection/context-menu-on-text.html [ Failure ] 288 webkit.org/b/86881 editing/selection/context-menu-text-selection.html [ Failure ] 289 webkit.org/b/86881 editing/selection/empty-cell-right-click.html [ Failure ] 290 webkit.org/b/86881 editing/shadow/rightclick-on-meter-in-shadow-crash.html [ Failure ] 291 webkit.org/b/86881 editing/spelling/context-menu-suggestions.html [ Failure ] 292 webkit.org/b/86881 fast/events/context-no-deselect.html [ Failure ] 282 # EFL's EventSender contextClick should return objects that implements click() method 283 webkit.org/b/98410 editing/pasteboard/copy-standalone-image-crash.html [ Failure ] 284 webkit.org/b/98410 media/context-menu-actions.html [ Failure ] 293 285 webkit.org/b/86881 fast/events/context-nodrag.html [ Failure ] 294 webkit.org/b/86881 fast/events/context-onmousedown-event.html [ Failure ]295 webkit.org/b/86881 fast/events/contextmenu-scrolled-page-with-frame.html [ Failure ]296 webkit.org/b/86881 fast/events/right-click-focus.html [ Failure ]297 webkit.org/b/86881 fast/events/selectstart-prevent-selection-on-right-click.html [ Failure ]298 webkit.org/b/86881 media/context-menu-actions.html [ Failure ]299 webkit.org/b/86881 media/controls-right-click-on-timebar.html [ Failure ]300 286 301 287 webkit.org/b/102201 fast/dom/Window/window-resize.html [ Failure ] -
trunk/LayoutTests/platform/efl/TestExpectations
r135590 r135595 1564 1564 Bug(EFL) media/context-menu-actions.html [ Failure ] 1565 1565 1566 # ESC key does not cancel context menu in EFL port1567 Bug(EFL) editing/selection/5354455-1.html [ Failure ]1568 1569 1566 # Tests that create an extra graphics layer 1570 1567 webkit.org/b/102697 compositing/overflow/overflow-auto-with-touch-no-overflow.html [ Failure ] … … 1692 1689 1693 1690 webkit.org/b/103109 fast/dom/shadow/host-wrapper-reclaimed.html [ Failure ] 1691 1692 # Start of media player causes timeout. 1693 Bug(EFL) media/controls-right-click-on-timebar.html [ Failure ] 1694 1695 # No spellcheck suggestions in context menu 1696 Bug(EFL) editing/spelling/context-menu-suggestions.html [ Failure ] -
trunk/LayoutTests/platform/gtk-wk2/TestExpectations
r135273 r135595 132 132 # WebKit2 needs textInputController.selectedRange 133 133 Bug(GTK) editing/selection/mixed-editability-10.html [ Failure ] 134 135 # Implement eventSender.contextClick136 Bug(GTK) editing/pasteboard/copy-standalone-image-crash.html [ Failure ]137 Bug(GTK) editing/selection/empty-cell-right-click.html [ Failure ]138 Bug(GTK) editing/selection/button-right-click.html [ Failure ]139 Bug(GTK) editing/selection/context-menu-on-text.html [ Failure ]140 Bug(GTK) editing/selection/empty-cell-right-click.html [ Failure ]141 Bug(GTK) fast/events/selectstart-prevent-selection-on-right-click.html [ Failure ]142 Bug(GTK) fast/events/context-no-deselect.html [ Failure ]143 Bug(GTK) fast/events/contextmenu-scrolled-page-with-frame.html [ Failure ]144 Bug(GTK) fast/events/context-onmousedown-event.html [ Failure ]145 Bug(GTK) media/controls-right-click-on-timebar.html [ Failure ]146 Bug(GTK) svg/custom/use-events-crash.svg [ Failure ]147 134 148 135 # Implement PageClientImpl::registerEditCommand and handling commands functions … … 593 580 #//////////////////////////////////////////////////////////////////////////////////////// 594 581 582 583 # Selection doesn't work properly. 584 Bug(GTK) editing/selection/context-menu-text-selection.html [ Failure Pass ] 585 Bug(GTK) editing/selection/empty-cell-right-click.html [ Failure ] 586 Bug(GTK) editing/spelling/context-menu-suggestions.html [ Failure ] 587 588 # EventSender's contextClick should return objects that implements click() method 589 webkit.org/b/98410 editing/pasteboard/copy-standalone-image-crash.html [ Failure ] 590 webkit.org/b/98410 media/context-menu-actions.html [ Failure ] 591 592 # An oncontextmenu attribute is not called. 593 Bug(GTK) editing/spelling/spellcheck-input-search-crash.html [ Failure ] 594 Bug(GTK) fast/events/contextmenu-scrolled-page-with-frame.html [ Failure ] 595 596 # An onmousedown attribute is not called. 597 Bug(GTK) fast/events/context-onmousedown-event.html [ Failure ] 598 599 # An onselectstart attribute is not called. 600 Bug(GTK) fast/events/selectstart-prevent-selection-on-right-click.html [ Failure ] 601 602 # Start of media player causes timeout 603 Bug(GTK) media/controls-right-click-on-timebar.html [ Failure ] -
trunk/Source/WebKit2/ChangeLog
r135575 r135595 1 2012-11-23 Wojciech Bielawski <w.bielawski@samsung.com> 2 3 [WK2][WKTR] WebKitTestRunner needs eventSender.contextClick() 4 https://bugs.webkit.org/show_bug.cgi?id=86881 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 InjectedBundle API extended to retrieve contextMenu entries names. 9 WebContextMenu exteded with function to retrieve menu items. 10 This API is required by layout tests. 11 Common code in WebContextMenu.cpp moved to separate method menuItemsWithUserData(). 12 Behaviour of dependend methods is unchanged. 13 14 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 15 (WKBundlePageGetContextMenuEntriesNames): 16 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 17 * WebProcess/WebPage/WebContextMenu.cpp: 18 (WebKit::WebContextMenu::items): 19 (WebKit): 20 * WebProcess/WebPage/WebContextMenu.h: 21 (WebContextMenu): 22 1 23 2012-11-22 Pierre Rossi <pierre.rossi@gmail.com> 2 24 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
r129924 r135595 31 31 #include "InjectedBundleNodeHandle.h" 32 32 #include "WKAPICast.h" 33 #include "WKArray.h" 33 34 #include "WKBundleAPICast.h" 35 #include "WKRetainPtr.h" 36 #include "WKString.h" 37 #include "WebContextMenu.h" 38 #include "WebContextMenuItem.h" 34 39 #include "WebFrame.h" 35 40 #include "WebFullScreenManager.h" … … 38 43 #include "WebRenderLayer.h" 39 44 #include "WebRenderObject.h" 45 #include "WebString.h" 40 46 #include "WebURL.h" 41 47 #include "WebURLRequest.h" … … 146 152 } 147 153 154 WKArrayRef WKBundlePageCopyContextMenuItemTitles(WKBundlePageRef pageRef) 155 { 156 #if ENABLE(CONTEXT_MENUS) 157 WebContextMenu* contextMenu = toImpl(pageRef)->contextMenu(); 158 const Vector<WebContextMenuItemData> &items = contextMenu->items(); 159 size_t arrayLength = items.size(); 160 OwnArrayPtr<WKTypeRef> itemNames = adoptArrayPtr(new WKTypeRef[arrayLength]); 161 for (size_t i = 0; i < arrayLength; ++i) 162 itemNames[i] = WKStringCreateWithUTF8CString(items[i].title().utf8().data()); 163 164 return WKArrayCreateAdoptingValues(itemNames.get(), arrayLength); 165 #else 166 return 0; 167 #endif 168 } 169 148 170 void* WKAccessibilityRootObject(WKBundlePageRef pageRef) 149 171 { -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
r129556 r135595 78 78 WK_EXPORT void* WKAccessibilityFocusedObject(WKBundlePageRef); 79 79 80 WK_EXPORT WKArrayRef WKBundlePageCopyContextMenuItemTitles(WKBundlePageRef); 81 80 82 #ifdef __cplusplus 81 83 } -
trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp
r135405 r135595 67 67 return; 68 68 69 Vector<WebContextMenuItemData> menuItems; 70 RefPtr<APIObject> userData; 71 menuItemsWithUserData(menuItems, userData); 72 WebHitTestResult::Data webHitTestResultData(controller->hitTestResult()); 73 74 // Mark the WebPage has having a shown context menu then notify the UIProcess. 75 m_page->contextMenuShowing(); 76 m_page->send(Messages::WebPageProxy::ShowContextMenu(view->contentsToWindow(controller->hitTestResult().roundedPointInInnerNodeFrame()), webHitTestResultData, menuItems, InjectedBundleUserMessageEncoder(userData.get()))); 77 } 78 79 void WebContextMenu::itemSelected(const WebContextMenuItemData& item) 80 { 81 ContextMenuItem coreItem(ActionType, static_cast<ContextMenuAction>(item.action()), item.title()); 82 m_page->corePage()->contextMenuController()->contextMenuItemSelected(&coreItem); 83 } 84 85 void WebContextMenu::menuItemsWithUserData(Vector<WebContextMenuItemData> &menuItems, RefPtr<APIObject>& userData) const 86 { 87 ContextMenuController* controller = m_page->corePage()->contextMenuController(); 88 if (!controller) 89 return; 90 91 ContextMenu* menu = controller->contextMenu(); 92 if (!menu) 93 return; 94 69 95 // Give the bundle client a chance to process the menu. 70 96 #if USE(CROSS_PLATFORM_CONTEXT_MENUS) … … 75 101 Vector<WebContextMenuItemData> proposedMenu = kitItems(coreItems, menu); 76 102 Vector<WebContextMenuItemData> newMenu; 77 RefPtr<APIObject> userData;78 103 RefPtr<InjectedBundleHitTestResult> hitTestResult = InjectedBundleHitTestResult::create(controller->hitTestResult()); 79 104 if (m_page->injectedBundleContextMenuClient().getCustomMenuFromDefaultItems(m_page, hitTestResult.get(), proposedMenu, newMenu, userData)) 80 105 proposedMenu = newMenu; 81 82 WebHitTestResult::Data webHitTestResultData(controller->hitTestResult()); 83 84 // Mark the WebPage has having a shown context menu then notify the UIProcess. 85 m_page->contextMenuShowing(); 86 m_page->send(Messages::WebPageProxy::ShowContextMenu(view->contentsToWindow(controller->hitTestResult().roundedPointInInnerNodeFrame()), webHitTestResultData, proposedMenu, InjectedBundleUserMessageEncoder(userData.get()))); 106 menuItems = proposedMenu; 87 107 } 88 108 89 void WebContextMenu::itemSelected(const WebContextMenuItemData& item) 109 Vector<WebContextMenuItemData> WebContextMenu::items() const 90 110 { 91 ContextMenuItem coreItem(ActionType, static_cast<ContextMenuAction>(item.action()), item.title()); 92 m_page->corePage()->contextMenuController()->contextMenuItemSelected(&coreItem); 111 Vector<WebContextMenuItemData> menuItems; 112 RefPtr<APIObject> userData; 113 menuItemsWithUserData(menuItems, userData); 114 return menuItems; 93 115 } 94 116 -
trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.h
r114367 r135595 44 44 void show(); 45 45 void itemSelected(const WebContextMenuItemData&); 46 Vector<WebContextMenuItemData> items() const; 46 47 47 48 private: 48 49 WebContextMenu(WebPage*); 49 50 void menuItemsWithUserData(Vector<WebContextMenuItemData>&, RefPtr<APIObject>&) const; 51 50 52 WebPage* m_page; 51 53 }; -
trunk/Tools/ChangeLog
r135585 r135595 1 2012-11-23 Wojciech Bielawski <w.bielawski@samsung.com> 2 3 [WK2][WKTR] WebKitTestRunner needs eventSender.contextClick() 4 https://bugs.webkit.org/show_bug.cgi?id=86881 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 eventSender object extended with contextClick() method in WebKitTestRunner. 9 contextClick() method returns an array of menu items objects with field 'title' containing title of single 10 context menu entry. According to some tests menu items objects shall also support 'click()' method, but it's not 11 delivered in this patch. 12 13 * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: 14 * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: 15 (WTR::EventSendingController::contextClick): 16 (WTR): 17 * WebKitTestRunner/InjectedBundle/EventSendingController.h: 18 (EventSendingController): 19 1 20 2012-11-23 Simon Hausmann <simon.hausmann@digia.com> 2 21 -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl
r131145 r135595 30 30 void mouseScrollBy(in long x, in long y); 31 31 void continuousMouseScrollBy(in long x, in long y, in [Optional] boolean paged); 32 object contextClick(); 32 33 void scheduleAsynchronousClick(); 33 34 -
trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
r129220 r135595 320 320 } 321 321 322 JSValueRef EventSendingController::contextClick() 323 { 324 WKBundlePageRef page = InjectedBundle::shared().page()->page(); 325 WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(page); 326 JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame); 327 #if ENABLE(CONTEXT_MENUS) 328 // Do mouse context click. 329 mouseDown(2, 0); 330 mouseUp(2, 0); 331 332 WKRetainPtr<WKArrayRef> entriesNames = adoptWK(WKBundlePageCopyContextMenuItemTitles(page)); 333 JSRetainPtr<JSStringRef> jsPropertyName(Adopt, JSStringCreateWithUTF8CString("title")); 334 size_t entriesSize = WKArrayGetSize(entriesNames.get()); 335 OwnArrayPtr<JSValueRef> jsValuesArray = adoptArrayPtr(new JSValueRef[entriesSize]); 336 for (size_t i = 0; i < entriesSize; ++i) { 337 ASSERT(WKGetTypeID(WKArrayGetItemAtIndex(entriesNames.get(), i)) == WKStringGetTypeID()); 338 339 WKStringRef wkEntryName = static_cast<WKStringRef>(WKArrayGetItemAtIndex(entriesNames.get(), i)); 340 JSObjectRef jsItemObject = JSObjectMake(context, /* JSClassRef */0, /* privData */0); 341 JSRetainPtr<JSStringRef> jsNameCopy(Adopt, WKStringCopyJSString(wkEntryName)); 342 JSValueRef jsEntryName = JSValueMakeString(context, jsNameCopy.get()); 343 JSObjectSetProperty(context, jsItemObject, jsPropertyName.get(), jsEntryName, kJSPropertyAttributeReadOnly, 0); 344 jsValuesArray[i] = jsItemObject; 345 } 346 347 return JSObjectMakeArray(context, entriesSize, jsValuesArray.get(), 0); 348 #else 349 return JSValueMakeUndefined(context); 350 #endif 351 } 352 322 353 #ifdef USE_WEBPROCESS_EVENT_SIMULATION 323 354 void EventSendingController::updateClickCount(WKEventMouseButton button) -
trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h
r129220 r135595 53 53 void mouseScrollBy(int x, int y); 54 54 void continuousMouseScrollBy(int x, int y, bool paged); 55 JSValueRef contextClick(); 55 56 void leapForward(int milliseconds); 56 57 void scheduleAsynchronousClick();
Note: See TracChangeset
for help on using the changeset viewer.