summaryrefslogtreecommitdiffstats
path: root/WebCore/page
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-04-25 23:41:36 -0700
committerSteve Block <steveblock@google.com>2010-05-11 14:42:12 +0100
commiteebae91469b8f225fe78e97ce6dae26efcf6da43 (patch)
treeb1d1189684ad999f6339a3f7f941c5bbbcaeac3c /WebCore/page
parentdcc8cf2e65d1aa555cce12431a16547e66b469ee (diff)
downloadexternal_webkit-eebae91469b8f225fe78e97ce6dae26efcf6da43.zip
external_webkit-eebae91469b8f225fe78e97ce6dae26efcf6da43.tar.gz
external_webkit-eebae91469b8f225fe78e97ce6dae26efcf6da43.tar.bz2
Merge webkit.org at r58033 : Resolve merge conflicts
- CanvasRenderingContext2D.cpp - Take upstream, conflict due to cherry-pick of security fix, see 285b474734e82bc42b25e48ea4824f8050badb4f - CanvasSurface.cpp, HTMLCanvasElement.cpp - convertLogicalToDevice has been refactored. See http://trac.webkit.org/changeset/56447 - Chrome.cpp/h, ChromeClient.h - Take upstream, conflict due to cherry-pick of cancelling Geolocation permission request - Document.h - Take both, conflicts due to ANDROID_META_SUPPORT - DragImage.h - Take both, conflict due to Android addition - EmptyClients.h - Take upstream, conflicts due to Geo cancel permission request - EventHandler.cpp - Take both, conflicts due to recently upstreamed touch events and ANDROID_PLUGINS - EventHandler.cpp - Keep ours, conflict due to touch event bug fixes not yet upstreamed. See 7f034a1734d634dd1fdb3b64817d5828b5e46922 and 73adc26dba4be1d9da34a7f0907cb7b12f10c909 - FileSystemPOSIX - Take both, conflict due to ANDROID_PLUGINS - FrameLoader.cpp - Take both, conflct due to ANDROID_BLOCK_NETWORK_IMAGE - FrameView.cpp - Take both, conflict due to Android frame flattening - Geolocation.h - Merge conflicts due to Android-specific changes - Geolocation.cpp - Take upstream, conflict due to addition of Geolocation maximumAge - GeolocationPositionCache.cpp - Take upstream, conflict due to addition of ENABLE_GEOLOCATION guards - Gradient.h - Take both, conflict due to Android addition - HTMLLinkElement.cpp, DocLoader.cpp - Take both, conflict due to new link prefetching not yet upstreamed. See f91ac8eab3399adb5325701bebe0590a77e49df7 - HTMLMetaElement.cpp - Take both, conflict due to recently upstreamed meta element - JavaInstanceJSC.cpp - Take both, conflict due to Android additional logging - MediaPlayer.cpp/h - Take both, conflict due to Android-specific change - PlatformTouchPoint.h - Take upstream, conflict due to recently upstreamed unsigned stuff - RenderFrame.cpp, RenderFrameSet.h - Take both, conflict due to Android frameset flattening - RenderLayerCompositor.cpp - Take both, conflicts due to Android layers code - Settings.cpp/h - Conflict due to ANDROID_PLUGINS - TextInputController.h - Take upstream, git got confused - V8DOMWindowShell.cpp - Take upstream, conflict due to cherry-pick of method to add V8 bindings for page cache, see 8fecd9c9a62aa89fb44ed3142ba583dc7b8cbe29 - V8DOMWraper.cpp - Take upstream, conflict due to recently upstreamed WORKERS guards - WebCore.xcodeproj - Take upstream, conflict due to addition of Geolocation maximumAge - Widget.h - Take both, conflict due to Android addition - jsc/JNIUtilityPrivate.cpp - Take upstream, conflict due to switching from bzero to memset - mac/WebCoreSupport/WebChromeCient.h - Take upstream, conflicts due to Geo cancel permission request Change-Id: I1b75eac220faddf2f84c7fd4fd3436a5e07edf64
Diffstat (limited to 'WebCore/page')
-rw-r--r--WebCore/page/Chrome.cpp6
-rw-r--r--WebCore/page/Chrome.h4
-rw-r--r--WebCore/page/ChromeClient.h4
-rw-r--r--WebCore/page/EventHandler.cpp39
-rw-r--r--WebCore/page/FrameView.cpp15
-rw-r--r--WebCore/page/Geolocation.cpp90
-rw-r--r--WebCore/page/Geolocation.h14
-rw-r--r--WebCore/page/GeolocationPositionCache.cpp10
-rw-r--r--WebCore/page/Settings.cpp5
-rw-r--r--WebCore/page/Settings.h11
10 files changed, 13 insertions, 185 deletions
diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp
index b3df888..841908d 100644
--- a/WebCore/page/Chrome.cpp
+++ b/WebCore/page/Chrome.cpp
@@ -427,15 +427,9 @@ void Chrome::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geo
m_client->requestGeolocationPermissionForFrame(frame, geolocation);
}
-<<<<<<< HEAD
-void Chrome::cancelGeolocationPermissionRequestForFrame(Frame* frame)
-{
- m_client->cancelGeolocationPermissionRequestForFrame(frame);
-=======
void Chrome::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
{
m_client->cancelGeolocationPermissionRequestForFrame(frame, geolocation);
->>>>>>> webkit.org at r58033
}
void Chrome::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileChooser)
diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h
index ec58de2..658404a 100644
--- a/WebCore/page/Chrome.h
+++ b/WebCore/page/Chrome.h
@@ -136,11 +136,7 @@ namespace WebCore {
void print(Frame*);
void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
-<<<<<<< HEAD
- void cancelGeolocationPermissionRequestForFrame(Frame*);
-=======
void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*);
->>>>>>> webkit.org at r58033
void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
void chooseIconForFiles(const Vector<String>&, FileChooser*);
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index e0b70e0..78e4f32 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -192,11 +192,7 @@ namespace WebCore {
// This can be either a synchronous or asynchronous call. The ChromeClient can display UI asking the user for permission
// to use Geolocation.
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) = 0;
-<<<<<<< HEAD
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*) = 0;
-=======
virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) = 0;
->>>>>>> webkit.org at r58033
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) = 0;
// Asynchronous request to load an icon for specified filenames.
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index df8759a..d775e89 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -57,11 +57,10 @@
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformWheelEvent.h"
-<<<<<<< HEAD
-#include "PluginView.h"
-=======
#include "PluginDocument.h"
->>>>>>> webkit.org at r58033
+#if defined(ANDROID_PLUGINS)
+#include "PluginView.h"
+#endif
#include "RenderFrameSet.h"
#include "RenderTextControlSingleLine.h"
#include "RenderView.h"
@@ -2083,20 +2082,16 @@ static Node* eventTargetNodeForDocument(Document* doc)
if (!doc)
return 0;
Node* node = doc->focusedNode();
-<<<<<<< HEAD
-
#if defined(ANDROID_PLUGINS)
if (!node && doc->frame() && doc->frame()->view())
node = android::WebViewCore::getWebViewCore(doc->frame()->view())
->cursorNodeIsPlugin();
-#endif
-
-=======
+#else
if (!node && doc->isPluginDocument()) {
PluginDocument* pluginDocument = static_cast<PluginDocument*>(doc);
node = pluginDocument->pluginNode();
}
->>>>>>> webkit.org at r58033
+#endif
if (!node && doc->isHTMLDocument())
node = doc->body();
if (!node)
@@ -2718,11 +2713,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
const Vector<PlatformTouchPoint>& points = event.touchPoints();
AtomicString* eventName = 0;
-<<<<<<< HEAD
-=======
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
->>>>>>> webkit.org at r58033
for (unsigned i = 0; i < points.size(); ++i) {
const PlatformTouchPoint& point = points[i];
IntPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos());
@@ -2749,18 +2741,13 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
// Increment the platform touch id by 1 to avoid storing a key of 0 in the hashmap.
unsigned touchPointTargetKey = point.id() + 1;
-<<<<<<< HEAD
RefPtr<EventTarget> touchTarget;
-=======
- EventTarget* touchTarget = 0;
->>>>>>> webkit.org at r58033
if (point.state() == PlatformTouchPoint::TouchPressed) {
m_originatingTouchPointTargets.set(touchPointTargetKey, target);
touchTarget = target;
} else if (point.state() == PlatformTouchPoint::TouchReleased || point.state() == PlatformTouchPoint::TouchCancelled) {
// The target should be the original target for this touch, so get it from the hashmap. As it's a release or cancel
// we also remove it from the map.
-<<<<<<< HEAD
touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey);
} else
touchTarget = m_originatingTouchPointTargets.get(touchPointTargetKey);
@@ -2769,16 +2756,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
continue;
RefPtr<Touch> touch = Touch::create(doc->frame(), touchTarget.get(), point.id(),
-=======
- touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey).get();
- } else
- touchTarget = m_originatingTouchPointTargets.get(touchPointTargetKey).get();
-
- if (!touchTarget)
- continue;
-
- RefPtr<Touch> touch = Touch::create(doc->frame(), touchTarget, point.id(),
->>>>>>> webkit.org at r58033
point.screenPos().x(), point.screenPos().y(),
adjustedPageX, adjustedPageY);
@@ -2787,7 +2764,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
touches->append(touch);
// Now build up the correct list for changedTouches.
-<<<<<<< HEAD
// Note that any touches that are in the TouchStationary state (e.g. if
// the user had several points touched but did not move them all) should
// only be present in the touches list. They may also be added to the
@@ -2795,8 +2771,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
// list so we do not handle them explicitly here.
// See https://bugs.webkit.org/show_bug.cgi?id=37609 for further discussion
// about the TouchStationary state.
-=======
->>>>>>> webkit.org at r58033
if (point.state() == PlatformTouchPoint::TouchReleased)
releasedTouches->append(touch);
else if (point.state() == PlatformTouchPoint::TouchCancelled)
@@ -2859,7 +2833,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
RefPtr<TouchList> targetTouches = assembleTargetTouches(changedTouch, touches.get());
-<<<<<<< HEAD
#if PLATFORM(ANDROID)
if (event.type() == TouchLongPress) {
eventName = &eventNames().touchlongpressEvent;
@@ -2883,8 +2856,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
defaultPrevented |= doubleTapEv->defaultPrevented();
} else {
#endif
-=======
->>>>>>> webkit.org at r58033
eventName = &eventNames().touchstartEvent;
RefPtr<TouchEvent> startEv =
TouchEvent::create(touches.get(), targetTouches.get(), pressedTouches.get(),
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index f784c1b..1ebdf99 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -75,16 +75,13 @@
#include "SVGViewSpec.h"
#endif
-<<<<<<< HEAD
-#if PLATFORM(ANDROID)
-#include "WebCoreFrameBridge.h"
-#endif
-
-=======
#if ENABLE(TILED_BACKING_STORE)
#include "TiledBackingStore.h"
#endif
->>>>>>> webkit.org at r58033
+
+#if PLATFORM(ANDROID)
+#include "WebCoreFrameBridge.h"
+#endif
namespace WebCore {
@@ -1249,7 +1246,6 @@ void FrameView::scheduleRelayout()
if (!m_frame->document()->shouldScheduleLayout())
return;
-<<<<<<< HEAD
#if defined(FLATTEN_IFRAME) || defined(FLATTEN_FRAMESET)
// This is the Android frame flattening code. The common code below is not
// used as frameSetFlatteningEnabled() is false on Android.
@@ -1257,10 +1253,7 @@ void FrameView::scheduleRelayout()
m_frame->ownerRenderer()->setNeedsLayoutAndPrefWidthsRecalc();
#endif
- // When frameset flattening is enabled, the contents of the frame affects layout of the parent frames.
-=======
// When frame flattening is enabled, the contents of the frame affects layout of the parent frames.
->>>>>>> webkit.org at r58033
// Also invalidate parent frame starting from the owner element of this frame.
if (m_frame->settings()->frameFlatteningEnabled() && m_frame->ownerRenderer()) {
if (m_frame->ownerElement()->hasTagName(iframeTag) || m_frame->ownerElement()->hasTagName(frameTag))
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 55fdef5..8abf417 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -31,12 +31,8 @@
#if ENABLE(GEOLOCATION)
#include "Chrome.h"
-<<<<<<< HEAD
// ANDROID
#include "DOMWindow.h"
-// END ANDROID
-#include "Document.h"
-// ANDROID
#include "EventNames.h"
// END ANDROID
#include "Frame.h"
@@ -44,10 +40,6 @@
#if PLATFORM(ANDROID)
#include "PlatformBridge.h"
#endif
-=======
-#include "Frame.h"
-#include "Page.h"
->>>>>>> webkit.org at r58033
#include <wtf/CurrentTime.h>
#if ENABLE(CLIENT_BASED_GEOLOCATION)
@@ -224,10 +216,6 @@ Geolocation::Geolocation(Frame* frame)
, m_service(GeolocationService::create(this))
#endif
, m_allowGeolocation(Unknown)
-<<<<<<< HEAD
- , m_shouldClearCache(false)
-=======
->>>>>>> webkit.org at r58033
, m_positionCache(new GeolocationPositionCache)
{
if (!m_frame)
@@ -254,12 +242,8 @@ void Geolocation::disconnectFrame()
if (m_frame && m_frame->page() && m_allowGeolocation == InProgress)
m_frame->page()->chrome()->cancelGeolocationPermissionRequestForFrame(m_frame, this);
stopUpdating();
- if (m_frame) {
- if (m_frame->document())
- m_frame->document()->setUsingGeolocation(false);
- if (m_frame->page() && m_allowGeolocation == InProgress)
- m_frame->page()->chrome()->cancelGeolocationPermissionRequestForFrame(m_frame);
- }
+ if (m_frame && m_frame->document())
+ m_frame->document()->setUsingGeolocation(false);
m_frame = 0;
}
@@ -337,58 +321,6 @@ void Geolocation::fatalErrorOccurred(Geolocation::GeoNotifier* notifier)
}
void Geolocation::requestUsesCachedPosition(GeoNotifier* notifier)
-<<<<<<< HEAD
-{
- // This is called asynchronously, so the permissions could have been denied
- // since we last checked in startRequest.
- if (isDenied()) {
- notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
- return;
- }
-
- m_requestsAwaitingCachedPosition.add(notifier);
-
- // If permissions are allowed, make the callback
- if (isAllowed()) {
- makeCachedPositionCallbacks();
- return;
- }
-
- // Request permissions, which may be synchronous or asynchronous.
- requestPermission();
-}
-
-void Geolocation::makeCachedPositionCallbacks()
-{
- // All modifications to m_requestsAwaitingCachedPosition are done
- // asynchronously, so we don't need to worry about it being modified from
- // the callbacks.
- GeoNotifierSet::const_iterator end = m_requestsAwaitingCachedPosition.end();
- for (GeoNotifierSet::const_iterator iter = m_requestsAwaitingCachedPosition.begin(); iter != end; ++iter) {
- GeoNotifier* notifier = iter->get();
- notifier->runSuccessCallback(m_positionCache->cachedPosition());
-
- // If this is a one-shot request, stop it. Otherwise, if the watch still
- // exists, start the service to get updates.
- if (m_oneShots.contains(notifier))
- m_oneShots.remove(notifier);
- else if (m_watchers.contains(notifier)) {
- if (notifier->hasZeroTimeout() || startUpdating(notifier))
- notifier->startTimerIfNeeded();
- else
- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));
- }
- }
-
- m_requestsAwaitingCachedPosition.clear();
-
- if (!hasListeners())
- stopUpdating();
-}
-
-void Geolocation::requestTimedOut(GeoNotifier* notifier)
-=======
->>>>>>> webkit.org at r58033
{
// This is called asynchronously, so the permissions could have been denied
// since we last checked in startRequest.
@@ -437,23 +369,7 @@ void Geolocation::makeCachedPositionCallbacks()
stopUpdating();
}
-<<<<<<< HEAD
-bool Geolocation::haveSuitableCachedPosition(PositionOptions* options)
-{
- if (!m_positionCache->cachedPosition())
- return false;
- if (!options->hasMaximumAge())
- return true;
- if (!options->maximumAge())
- return false;
- DOMTimeStamp currentTimeMillis = currentTime() * 1000.0;
- return m_positionCache->cachedPosition()->timestamp() > currentTimeMillis - options->maximumAge();
-}
-
-void Geolocation::clearWatch(int watchId)
-=======
void Geolocation::requestTimedOut(GeoNotifier* notifier)
->>>>>>> webkit.org at r58033
{
// If this is a one-shot request, stop it.
m_oneShots.remove(notifier);
@@ -625,8 +541,6 @@ void Geolocation::positionChanged(PassRefPtr<Geoposition> newPosition)
{
m_positionCache->setCachedPosition(newPosition.get());
- m_positionCache->setCachedPosition(m_currentPosition.get());
-
// Stop all currently running timers.
stopTimers();
diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h
index 30db435..b4e5bef 100644
--- a/WebCore/page/Geolocation.h
+++ b/WebCore/page/Geolocation.h
@@ -27,12 +27,9 @@
#ifndef Geolocation_h
#define Geolocation_h
-<<<<<<< HEAD
// ANDROID
#include "EventListener.h"
// END ANDROID
-=======
->>>>>>> webkit.org at r58033
#include "GeolocationPositionCache.h"
#include "GeolocationService.h"
#include "Geoposition.h"
@@ -51,15 +48,10 @@ class GeolocationPosition;
class GeolocationError;
#endif
-<<<<<<< HEAD
// ANDROID
class Geolocation : public EventListener
// END ANDROID
-#if !ENABLE(CLIENT_BASED_GEOLOCATION)
-=======
-class Geolocation : public RefCounted<Geolocation>
#if !ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE(GEOLOCATION)
->>>>>>> webkit.org at r58033
, public GeolocationServiceClient
#endif
{
@@ -188,16 +180,10 @@ private:
Yes,
No
} m_allowGeolocation;
-<<<<<<< HEAD
- bool m_shouldClearCache;
-
- OwnPtr<GeolocationPositionCache> m_positionCache;
-=======
#if ENABLE(GEOLOCATION)
OwnPtr<GeolocationPositionCache> m_positionCache;
#endif
->>>>>>> webkit.org at r58033
GeoNotifierSet m_requestsAwaitingCachedPosition;
};
diff --git a/WebCore/page/GeolocationPositionCache.cpp b/WebCore/page/GeolocationPositionCache.cpp
index 76d2b0b..06159f4 100644
--- a/WebCore/page/GeolocationPositionCache.cpp
+++ b/WebCore/page/GeolocationPositionCache.cpp
@@ -26,11 +26,8 @@
#include "config.h"
#include "GeolocationPositionCache.h"
-<<<<<<< HEAD
-=======
#if ENABLE(GEOLOCATION)
->>>>>>> webkit.org at r58033
#include "Geoposition.h"
#include "SQLValue.h"
#include "SQLiteDatabase.h"
@@ -38,10 +35,6 @@
#include "SQLiteStatement.h"
#include "SQLiteTransaction.h"
-<<<<<<< HEAD
-
-=======
->>>>>>> webkit.org at r58033
namespace WebCore {
static const char* databaseName = "CachedGeoposition.db";
@@ -181,8 +174,5 @@ void GeolocationPositionCache::writeToDB(const Geoposition* position)
}
} // namespace WebCore
-<<<<<<< HEAD
-=======
#endif // ENABLE(GEOLOCATION)
->>>>>>> webkit.org at r58033
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index e1b848a..33c9c0d 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -142,13 +142,10 @@ Settings::Settings(Page* page)
, m_experimentalNotificationsEnabled(false)
, m_webGLEnabled(false)
, m_loadDeferringEnabled(true)
-<<<<<<< HEAD
+ , m_tiledBackingStoreEnabled(false)
#ifdef ANDROID_PLUGINS
, m_pluginsOnDemand(false)
#endif
-=======
- , m_tiledBackingStoreEnabled(false)
->>>>>>> webkit.org at r58033
{
// A Frame may not have been created yet, so we initialize the AtomicString
// hash before trying to use it.
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index 6893eae..04487b1 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -160,17 +160,11 @@ namespace WebCore {
void setPluginsEnabled(bool);
bool arePluginsEnabled() const { return m_arePluginsEnabled; }
-<<<<<<< HEAD
#ifdef ANDROID_PLUGINS
void setPluginsOnDemand(bool onDemand) { m_pluginsOnDemand = onDemand; }
bool arePluginsOnDemand() const { return m_pluginsOnDemand; }
#endif
- void setDatabasesEnabled(bool);
- bool databasesEnabled() const { return m_databasesEnabled; }
-
-=======
->>>>>>> webkit.org at r58033
void setLocalStorageEnabled(bool);
bool localStorageEnabled() const { return m_localStorageEnabled; }
@@ -491,13 +485,10 @@ namespace WebCore {
bool m_experimentalNotificationsEnabled : 1;
bool m_webGLEnabled : 1;
bool m_loadDeferringEnabled : 1;
-<<<<<<< HEAD
+ bool m_tiledBackingStoreEnabled : 1;
#ifdef ANDROID_PLUGINS
bool m_pluginsOnDemand : 1;
#endif
-=======
- bool m_tiledBackingStoreEnabled : 1;
->>>>>>> webkit.org at r58033
#if USE(SAFARI_THEME)
static bool gShouldPaintNativeControls;