diff options
author | Ben Murdoch <benm@google.com> | 2010-10-08 14:43:10 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-08 16:10:55 +0100 |
commit | f4220bb8c200137e401bfce313ec01c6dc1e59e0 (patch) | |
tree | d712299155934630250957e6fab05af34091fc5f /WebCore | |
parent | c386a1109bd0af0c8b792c7ebf3059bf1d8bb30d (diff) | |
download | external_webkit-f4220bb8c200137e401bfce313ec01c6dc1e59e0.zip external_webkit-f4220bb8c200137e401bfce313ec01c6dc1e59e0.tar.gz external_webkit-f4220bb8c200137e401bfce313ec01c6dc1e59e0.tar.bz2 |
Fix a WebCore/WebKit layering violation
Move the call to WebViewCore::updateViewport() from HTMLBodyElement
and HTMLMetaElement to the PlatformBridge so that WebCore code does
not depend on WebKit code to compile.
In addition to being a layering violation, the inclusion of
WebViewCore.h includes WebCoreJni.h, which in a future change
causes LOG to get #undefined when using the chromium net stack.
Change-Id: I1a9fd0b545080c9c0d9d26a3e5eb3b986c3986eb
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/html/HTMLBodyElement.cpp | 4 | ||||
-rw-r--r-- | WebCore/html/HTMLMetaElement.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/android/PlatformBridge.h | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/WebCore/html/HTMLBodyElement.cpp b/WebCore/html/HTMLBodyElement.cpp index 05c13ac..60126f7 100644 --- a/WebCore/html/HTMLBodyElement.cpp +++ b/WebCore/html/HTMLBodyElement.cpp @@ -36,8 +36,8 @@ #include "ScriptEventListener.h" #ifdef ANDROID_META_SUPPORT +#include "PlatformBridge.h" #include "Settings.h" -#include "WebViewCore.h" #endif namespace WebCore { @@ -208,7 +208,7 @@ void HTMLBodyElement::insertedIntoDocument() if (!ownerElement) { FrameView* view = document()->view(); if (view) - android::WebViewCore::getWebViewCore(view)->updateViewport(); + PlatformBridge::updateViewport(view); } } } diff --git a/WebCore/html/HTMLMetaElement.cpp b/WebCore/html/HTMLMetaElement.cpp index cdb9950..520b9ae 100644 --- a/WebCore/html/HTMLMetaElement.cpp +++ b/WebCore/html/HTMLMetaElement.cpp @@ -28,8 +28,8 @@ #include "HTMLNames.h" #ifdef ANDROID_META_SUPPORT +#include "PlatformBridge.h" #include "Settings.h" -#include "WebViewCore.h" #endif #if ENABLE(ANDROID_INSTALLABLE_WEB_APPS) @@ -95,7 +95,7 @@ void HTMLMetaElement::process() if (updateViewport && !document()->ownerElement()) { FrameView* view = document()->view(); if (view) - android::WebViewCore::getWebViewCore(view)->updateViewport(); + PlatformBridge::updateViewport(view); } #else if (equalIgnoringCase(name(), "viewport")) diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h index bdab26c..948847a 100644 --- a/WebCore/platform/android/PlatformBridge.h +++ b/WebCore/platform/android/PlatformBridge.h @@ -130,6 +130,9 @@ public: static int screenDepth(); static FloatRect screenRect(); + + // Update the viewport meta data. + static void updateViewport(FrameView*); }; } |