Skip to content
Permalink
Browse files
2011-05-01 Ryosuke Niwa <rniwa@webkit.org>
        Reviewed by Eric Seidel.

        Get rid of versions of sendContextMenuEvent and eventMayStartDrag that takes NSEvent
        https://bugs.webkit.org/show_bug.cgi?id=59837

        Removed EventHandler::sendContextMenuEvent(NSEvent*) and EventHandler::eventMayStartDrag(NSEvent*)

        * WebCore.exp.in:
        * page/EventHandler.h:
        * page/mac/EventHandlerMac.mm:
2011-05-01  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        Get rid of versions of sendContextMenuEvent and eventMayStartDrag that takes NSEvent
        https://bugs.webkit.org/show_bug.cgi?id=59837

        Call sendContextMenuEvent and eventMayStartDrag with PlatformMouseEvent instead of NSEvent.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView menuForEvent:]):
        (-[WebHTMLView acceptsFirstMouse:]):
        (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):

Canonical link: https://commits.webkit.org/75133@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rniwa committed May 1, 2011
1 parent 872078d commit e3d8ed10063e8e5190c4c24266bf810412b4f05f
Showing 6 changed files with 36 additions and 32 deletions.
@@ -1,3 +1,16 @@
2011-05-01 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Eric Seidel.

Get rid of versions of sendContextMenuEvent and eventMayStartDrag that takes NSEvent
https://bugs.webkit.org/show_bug.cgi?id=59837

Removed EventHandler::sendContextMenuEvent(NSEvent*) and EventHandler::eventMayStartDrag(NSEvent*)

* WebCore.exp.in:
* page/EventHandler.h:
* page/mac/EventHandlerMac.mm:

2011-05-01 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Eric Seidel.
@@ -488,6 +488,7 @@ __ZN7WebCore17GlyphPageTreeNode18treeGlyphPageCountEv
__ZN7WebCore17HistoryController26saveDocumentAndScrollStateEv
__ZN7WebCore17nameForCursorTypeENS_6Cursor4TypeE
__ZN7WebCore17openTemporaryFileERKN3WTF6StringERi
__ZN7WebCore18PlatformMouseEventC1EP7NSEventP6NSView
__ZN7WebCore18PlatformStrategies26createLocalizationStrategyEv
__ZN7WebCore18SearchPopupMenuMacC1EPNS_15PopupMenuClientE
__ZN7WebCore18isStartOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
@@ -1475,7 +1476,6 @@ __ZNK7WebCore18RenderLayerBacking20compositingLayerTypeEv

#if ENABLE(CONTEXT_MENUS)
__ZN7WebCore11ContextMenu22setPlatformDescriptionEP14NSMutableArray
__ZN7WebCore12EventHandler20sendContextMenuEventEP7NSEvent
__ZN7WebCore12EventHandler20sendContextMenuEventERKNS_18PlatformMouseEventE
__ZN7WebCore15ContextMenuItem26releasePlatformDescriptionEv
__ZN7WebCore15ContextMenuItemC1ENS_17ContextMenuActionERKN3WTF6StringEbbRNS2_6VectorIS0_Lm0EEE
@@ -1504,7 +1504,6 @@ __ZN7WebCore8Settings41setUsesDashboardBackwardCompatibilityModeEb

#if ENABLE(DRAG_SUPPORT)
__ZN7WebCore12EventHandler17dragSourceEndedAtERKNS_18PlatformMouseEventENS_13DragOperationE
__ZN7WebCore12EventHandler17eventMayStartDragEP7NSEvent
__ZNK7WebCore12EventHandler17eventMayStartDragERKNS_18PlatformMouseEventE
__ZN7WebCore14DragController10dragExitedEPNS_8DragDataE
__ZN7WebCore14DragController11dragEnteredEPNS_8DragDataE
@@ -214,11 +214,6 @@ class EventHandler {
bool keyEvent(NSEvent *);
bool wheelEvent(NSEvent *);

#if ENABLE(CONTEXT_MENUS)
bool sendContextMenuEvent(NSEvent *);
#endif
bool eventMayStartDrag(NSEvent *);

void sendFakeEventsAfterWidgetTracking(NSEvent *initiatingEvent);

void setActivationEventNumber(int num) { m_activationEventNumber = num; }
@@ -660,26 +660,6 @@ static bool frameHasPlatformWidget(Frame* frame)
return PlatformMouseEvent(currentNSEvent(), windowView);
}

#if ENABLE(CONTEXT_MENUS)
bool EventHandler::sendContextMenuEvent(NSEvent *event)
{
Page* page = m_frame->page();
if (!page)
return false;
return sendContextMenuEvent(PlatformMouseEvent(event, page->chrome()->platformPageClient()));
}
#endif // ENABLE(CONTEXT_MENUS)

#if ENABLE(DRAG_SUPPORT)
bool EventHandler::eventMayStartDrag(NSEvent *event)
{
Page* page = m_frame->page();
if (!page)
return false;
return eventMayStartDrag(PlatformMouseEvent(event, page->chrome()->platformPageClient()));
}
#endif // ENABLE(DRAG_SUPPORT)

bool EventHandler::eventActivatedView(const PlatformMouseEvent& event) const
{
return m_activationEventNumber == event.eventNumber();
@@ -1,3 +1,17 @@
2011-05-01 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Eric Seidel.

Get rid of versions of sendContextMenuEvent and eventMayStartDrag that takes NSEvent
https://bugs.webkit.org/show_bug.cgi?id=59837

Call sendContextMenuEvent and eventMayStartDrag with PlatformMouseEvent instead of NSEvent.

* WebView/WebHTMLView.mm:
(-[WebHTMLView menuForEvent:]):
(-[WebHTMLView acceptsFirstMouse:]):
(-[WebHTMLView shouldDelayWindowOrderingForEvent:]):

2011-05-01 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Eric Seidel.
@@ -76,6 +76,7 @@
#import <WebCore/CSSMutableStyleDeclaration.h>
#import <WebCore/CachedImage.h>
#import <WebCore/CachedResourceClient.h>
#import <WebCore/Chrome.h>
#import <WebCore/ColorMac.h>
#import <WebCore/ContextMenu.h>
#import <WebCore/ContextMenuController.h>
@@ -3108,7 +3109,7 @@ - (NSMenu *)menuForEvent:(NSEvent *)event
_private->handlingMouseDownEvent = YES;
page->contextMenuController()->clearContextMenu();
coreFrame->eventHandler()->mouseDown(event);
BOOL handledEvent = coreFrame->eventHandler()->sendContextMenuEvent(event);
BOOL handledEvent = coreFrame->eventHandler()->sendContextMenuEvent(PlatformMouseEvent(event, page->chrome()->platformPageClient()));
_private->handlingMouseDownEvent = NO;

if (!handledEvent)
@@ -3425,9 +3426,10 @@ - (BOOL)acceptsFirstMouse:(NSEvent *)event
if (Frame* coreFrame = core([hitHTMLView _frame])) {
coreFrame->eventHandler()->setActivationEventNumber([event eventNumber]);
[hitHTMLView _setMouseDownEvent:event];
if ([hitHTMLView _isSelectionEvent:event])
result = coreFrame->eventHandler()->eventMayStartDrag(event);
else if ([hitHTMLView _isScrollBarEvent:event])
if ([hitHTMLView _isSelectionEvent:event]) {
if (Page* page = coreFrame->page())
result = coreFrame->eventHandler()->eventMayStartDrag(PlatformMouseEvent(event, page->chrome()->platformPageClient()));
} else if ([hitHTMLView _isScrollBarEvent:event])
result = true;
[hitHTMLView _setMouseDownEvent:nil];
}
@@ -3450,7 +3452,8 @@ - (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)event
if ([hitHTMLView _isSelectionEvent:event]) {
if (Frame* coreFrame = core([hitHTMLView _frame])) {
[hitHTMLView _setMouseDownEvent:event];
result = coreFrame->eventHandler()->eventMayStartDrag(event);
if (Page* page = coreFrame->page())
result = coreFrame->eventHandler()->eventMayStartDrag(PlatformMouseEvent(event, page->chrome()->platformPageClient()));
[hitHTMLView _setMouseDownEvent:nil];
}
}

0 comments on commit e3d8ed1

Please sign in to comment.