summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2009-12-09 15:59:21 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-09 15:59:21 -0800
commitedc7ae3e39462862f5a598cae20fdec379270ee7 (patch)
treee6cb5aa9a6d2b1178da4dc361193614b4c749e6a /WebCore
parenta6e254b135c20e98b21d162db696f6eb2c276297 (diff)
parent17c1a14b2505f0733de3526a49ce1e12a2eb8b37 (diff)
downloadexternal_webkit-edc7ae3e39462862f5a598cae20fdec379270ee7.zip
external_webkit-edc7ae3e39462862f5a598cae20fdec379270ee7.tar.gz
external_webkit-edc7ae3e39462862f5a598cae20fdec379270ee7.tar.bz2
am 17c1a14b: Merge change I85893753 into eclair-mr2
Merge commit '17c1a14b2505f0733de3526a49ce1e12a2eb8b37' into eclair-mr2-plus-aosp * commit '17c1a14b2505f0733de3526a49ce1e12a2eb8b37': Pull down change 51321 from webkit.org.
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/dom/EventNames.h5
-rw-r--r--WebCore/history/CachedFrame.cpp2
-rw-r--r--WebCore/html/HTMLFormControlElement.cpp2
-rw-r--r--WebCore/loader/FrameLoader.cpp4
-rw-r--r--WebCore/page/DOMWindow.cpp2
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());
}