summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/android/GeolocationServiceAndroid.cpp9
-rw-r--r--WebCore/platform/android/GeolocationServiceAndroid.h3
-rw-r--r--WebCore/platform/graphics/android/GraphicsContextAndroid.cpp21
3 files changed, 19 insertions, 14 deletions
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp
index 9dcef6f..9e1c919 100644
--- a/WebCore/platform/android/GeolocationServiceAndroid.cpp
+++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp
@@ -29,7 +29,6 @@
#include <JNIHelp.h> // For jniRegisterNativeMethods
#include <jni_utility.h> // For getJNIEnv
-#include "Frame.h"
#include "Geoposition.h"
#include "PositionError.h"
#include "PositionOptions.h"
@@ -300,9 +299,8 @@ bool GeolocationServiceAndroid::startUpdating(PositionOptions* options)
// On Android, high power == GPS. Set whether to use GPS before we start the
// implementation.
- // FIXME: Checking for the presence of options will probably not be required
- // once WebKit bug 27254 is fixed.
- if (options && options->enableHighAccuracy())
+ ASSERT(options);
+ if (options->enableHighAccuracy())
m_javaBridge->setEnableGps(true);
if (!haveJavaBridge)
@@ -346,7 +344,8 @@ void GeolocationServiceAndroid::newErrorAvailable(PassRefPtr<PositionError> erro
errorOccurred();
}
-void GeolocationServiceAndroid::timerFired(Timer<GeolocationServiceAndroid>* timer) {
+void GeolocationServiceAndroid::timerFired(Timer<GeolocationServiceAndroid>* timer)
+{
ASSERT(&m_timer == timer);
ASSERT(m_lastPosition || m_lastError);
if (m_lastPosition)
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.h b/WebCore/platform/android/GeolocationServiceAndroid.h
index 90a8864..f233f9a 100644
--- a/WebCore/platform/android/GeolocationServiceAndroid.h
+++ b/WebCore/platform/android/GeolocationServiceAndroid.h
@@ -43,7 +43,6 @@ namespace WebCore {
public:
static GeolocationService* create(GeolocationServiceClient*);
- GeolocationServiceAndroid(GeolocationServiceClient*);
virtual ~GeolocationServiceAndroid() {};
virtual bool startUpdating(PositionOptions*);
@@ -58,6 +57,8 @@ namespace WebCore {
void timerFired(Timer<GeolocationServiceAndroid>* timer);
private:
+ GeolocationServiceAndroid(GeolocationServiceClient*);
+
static bool isPositionMovement(Geoposition* position1, Geoposition* position2);
static bool isPositionMoreAccurate(Geoposition* position1, Geoposition* position2);
static bool isPositionMoreTimely(Geoposition* position1, Geoposition* position2);
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
index 46ac9da..a78c155 100644
--- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
@@ -1049,16 +1049,21 @@ void GraphicsContext::concatCTM(const TransformationMatrix& xform)
GC2Canvas(this)->concat((SkMatrix) xform);
}
+/* This is intended to round the rect to device pixels (through the CTM)
+ and then invert the result back into source space, with the hope that when
+ it is drawn (through the matrix), it will land in the "right" place (i.e.
+ on pixel boundaries).
+
+ For android, we record this geometry once and then draw it though various
+ scale factors as the user zooms, without re-recording. Thus this routine
+ should just leave the original geometry alone.
+
+ If we instead draw into bitmap tiles, we should then perform this
+ transform -> round -> inverse step.
+ */
FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect)
{
- if (paintingDisabled())
- return FloatRect();
-
- const SkMatrix& matrix = GC2Canvas(this)->getTotalMatrix();
- SkRect r(rect);
- matrix.mapRect(&r);
- FloatRect result(SkScalarToFloat(r.fLeft), SkScalarToFloat(r.fTop), SkScalarToFloat(r.width()), SkScalarToFloat(r.height()));
- return result;
+ return rect;
}
//////////////////////////////////////////////////////////////////////////////////////////////////