mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Issue #1751 -- Remove XP_MACOSX conditionals from /dom
This commit is contained in:
parent
434b3269fb
commit
d29e4f8306
71 changed files with 100 additions and 5342 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue