diff options
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/dom/EventNames.h | 5 | ||||
-rw-r--r-- | WebCore/history/CachedFrame.cpp | 2 | ||||
-rw-r--r-- | WebCore/html/HTMLFormControlElement.cpp | 2 | ||||
-rw-r--r-- | WebCore/loader/FrameLoader.cpp | 4 | ||||
-rw-r--r-- | WebCore/page/DOMWindow.cpp | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/WebCore/dom/EventNames.h b/WebCore/dom/EventNames.h index 578b7d5..930ef3a 100644 --- a/WebCore/dom/EventNames.h +++ b/WebCore/dom/EventNames.h @@ -149,10 +149,11 @@ namespace WebCore { class EventNames { int dummy; // Needed to make initialization macro work. - - public: + // Private to prevent accidental call to EventNames() instead of eventNames() EventNames(); + friend class ThreadGlobalData; + public: #define DOM_EVENT_NAMES_DECLARE(name) AtomicString name##Event; DOM_EVENT_NAMES_FOR_EACH(DOM_EVENT_NAMES_DECLARE) #undef DOM_EVENT_NAMES_DECLARE diff --git a/WebCore/history/CachedFrame.cpp b/WebCore/history/CachedFrame.cpp index fe6c31f..a868134 100644 --- a/WebCore/history/CachedFrame.cpp +++ b/WebCore/history/CachedFrame.cpp @@ -103,7 +103,7 @@ void CachedFrameBase::restore() // matches pageshowEvent as in Document::implicitClose() m_document->dispatchWindowLoadEvent(); #endif - m_document->dispatchWindowEvent(PageTransitionEvent::create(EventNames().pageshowEvent, true), m_document); + m_document->dispatchWindowEvent(PageTransitionEvent::create(eventNames().pageshowEvent, true), m_document); } CachedFrame::CachedFrame(Frame* frame) diff --git a/WebCore/html/HTMLFormControlElement.cpp b/WebCore/html/HTMLFormControlElement.cpp index ea46980..96ecc7d 100644 --- a/WebCore/html/HTMLFormControlElement.cpp +++ b/WebCore/html/HTMLFormControlElement.cpp @@ -291,7 +291,7 @@ bool HTMLFormControlElement::willValidate() const bool HTMLFormControlElement::checkValidity() { if (willValidate() && !isValidFormControlElement()) { - dispatchEvent(Event::create(EventNames().invalidEvent, false, true)); + dispatchEvent(Event::create(eventNames().invalidEvent, false, true)); return false; } diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp index 93ada45..98b8e61 100644 --- a/WebCore/loader/FrameLoader.cpp +++ b/WebCore/loader/FrameLoader.cpp @@ -529,7 +529,7 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy, DatabasePolic m_unloadEventBeingDispatched = true; if (m_frame->domWindow()) { if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide) - m_frame->domWindow()->dispatchEvent(PageTransitionEvent::create(EventNames().pagehideEvent, m_frame->document()->inPageCache()), m_frame->document()); + m_frame->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame->document()->inPageCache()), m_frame->document()); #ifndef ANDROID_PAGE_CACHE_UNLOAD if (!m_frame->document()->inPageCache()) #endif @@ -3703,7 +3703,7 @@ void FrameLoader::pageHidden() { m_unloadEventBeingDispatched = true; if (m_frame->domWindow()) - m_frame->domWindow()->dispatchEvent(PageTransitionEvent::create(EventNames().pagehideEvent, true), m_frame->document()); + m_frame->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, true), m_frame->document()); m_unloadEventBeingDispatched = false; // Send pagehide event for subframes as well diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp index 8bc8ec4..64aae8d 100644 --- a/WebCore/page/DOMWindow.cpp +++ b/WebCore/page/DOMWindow.cpp @@ -262,7 +262,7 @@ void DOMWindow::dispatchAllPendingUnloadEvents() if (!set.contains(window)) continue; - window->dispatchEvent(PageTransitionEvent::create(EventNames().pagehideEvent, false), window->document()); + window->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, false), window->document()); window->dispatchEvent(Event::create(eventNames().unloadEvent, false, false), window->document()); } |