diff options
author | Moonchild <moonchild@palemoon.org> | 2021-04-30 21:22:08 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-04-30 21:22:08 +0000 |
commit | 0dd3424f774954627d6f53df9fb47379d9b5c871 (patch) | |
tree | d8c303bac59a5bbbbc6c6f5e541a01dec1a5ae49 /dom/events | |
parent | 5e705bd5059da5b7a39e3a096b7c7f59cb466730 (diff) | |
download | uxp-0dd3424f774954627d6f53df9fb47379d9b5c871.tar.gz |
Issue #1751 -- Remove XP_MACOSX conditionals from /dom
Diffstat (limited to 'dom/events')
-rw-r--r-- | dom/events/EventStateManager.cpp | 52 | ||||
-rw-r--r-- | dom/events/TextComposition.cpp | 13 |
2 files changed, 1 insertions, 64 deletions
diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index c8f1acdb55..87c4827fab 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -95,10 +95,6 @@ #include "Units.h" #include "mozilla/layers/APZCTreeManager.h" -#ifdef XP_MACOSX -#import <ApplicationServices/ApplicationServices.h> -#endif - namespace mozilla { using namespace dom; @@ -1517,14 +1513,6 @@ EventStateManager::FireContextClick() return; } -#ifdef XP_MACOSX - // Hack to ensure that we don't show a context menu when the user - // let go of the mouse after a long cpu-hogging operation prevented - // us from handling any OS events. See bug 117589. - if (!CGEventSourceButtonState(kCGEventSourceStateCombinedSessionState, kCGMouseButtonLeft)) - return; -#endif - nsEventStatus status = nsEventStatus_eIgnore; // Dispatch to the DOM. We have to fake out the ESM and tell it that the @@ -2841,29 +2829,6 @@ EventStateManager::DecideGestureEvent(WidgetGestureNotifyEvent* aEvent, aEvent->mPanDirection = panDirection; } -#ifdef XP_MACOSX -static bool -NodeAllowsClickThrough(nsINode* aNode) -{ - while (aNode) { - if (aNode->IsXULElement()) { - mozilla::dom::Element* element = aNode->AsElement(); - static nsIContent::AttrValuesArray strings[] = - {&nsGkAtoms::always, &nsGkAtoms::never, nullptr}; - switch (element->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::clickthrough, - strings, eCaseMatters)) { - case 0: - return true; - case 1: - return false; - } - } - aNode = nsContentUtils::GetCrossDocParentNode(aNode); - } - return true; -} -#endif - void EventStateManager::PostHandleKeyboardEvent(WidgetKeyboardEvent* aKeyboardEvent, nsEventStatus& aStatus, @@ -3096,10 +3061,7 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext, // focused frame EnsureDocument(mPresContext); if (mDocument) { -#ifdef XP_MACOSX - if (!activeContent || !activeContent->IsXULElement()) -#endif - fm->ClearFocus(mDocument->GetWindow()); + fm->ClearFocus(mDocument->GetWindow()); fm->SetFocusedWindow(mDocument->GetWindow()); } } @@ -3511,18 +3473,6 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext, } break; -#ifdef XP_MACOSX - case eMouseActivate: - if (mCurrentTarget) { - nsCOMPtr<nsIContent> targetContent; - mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(targetContent)); - if (!NodeAllowsClickThrough(targetContent)) { - *aStatus = nsEventStatus_eConsumeNoDefault; - } - } - break; -#endif - default: break; } diff --git a/dom/events/TextComposition.cpp b/dom/events/TextComposition.cpp index bd7ebbc468..3b3dc6505b 100644 --- a/dom/events/TextComposition.cpp +++ b/dom/events/TextComposition.cpp @@ -21,21 +21,8 @@ #include "mozilla/Unused.h" #include "mozilla/dom/TabParent.h" -#ifdef XP_MACOSX -// Some defiens will be conflict with OSX SDK -#define TextRange _TextRange -#define TextRangeArray _TextRangeArray -#define Comment _Comment -#endif - #include "nsPluginInstanceOwner.h" -#ifdef XP_MACOSX -#undef TextRange -#undef TextRangeArray -#undef Comment -#endif - using namespace mozilla::widget; namespace mozilla { |