From 5f47da230420d946ecde634850a8d64515f95f0c Mon Sep 17 00:00:00 2001 From: Cameron Kaiser Date: Sat, 18 Aug 2018 16:33:55 -0700 Subject: [PATCH] #517: a couple tune-ups --- dom/base/Element.cpp | 6 +++--- dom/events/EventStateManager.cpp | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 8beb04e72..134952cec 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -1168,10 +1168,10 @@ Element::GetDestinationInsertionPoints() void Element::GetAttribute(const nsAString& aName, DOMString& aReturn) { - // Complete the illusion of issue 517 by preventing Rocket Loader from - // seeing the data-cf-nonce attribute. This doesn't seem to be used + // Complete the illusion of TenFourFox issue 517 by preventing Rocket Loader + // from seeing the data-cf-nonce attribute. This doesn't seem to be used // anywhere else in the Cloudflare stack. - if (MOZ_UNLIKELY(aName.LowerCaseEqualsASCII("data-cf-nonce"))) { + if (!IsXULElement() && MOZ_UNLIKELY(aName.LowerCaseEqualsASCII("data-cf-nonce"))) { #if DEBUG fprintf(stderr, "TenFourFox: blocked access to proscribed property data-cf-nonce.\n"); #endif diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index 846601b06..5101ed223 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -522,11 +522,14 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext, return NS_ERROR_NULL_POINTER; } +#if(0) +// This is obnoxious, and seems to no longer be relevant. NS_WARN_IF_FALSE(!aTargetFrame || !aTargetFrame->GetContent() || aTargetFrame->GetContent() == aTargetContent || aTargetFrame->GetContent()->GetFlattenedTreeParent() == aTargetContent, "aTargetFrame should be related with aTargetContent"); +#endif mCurrentTarget = aTargetFrame; mCurrentTargetContent = nullptr;