summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebCoreFrameBridge.h
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-09-20 16:34:19 -0700
committerGrace Kloba <klobag@google.com>2009-09-21 13:43:58 -0700
commitf10585d69aaccf4c1b021df143ee0f08e338cf31 (patch)
tree235a1caed1645e53bd196e3cf024185e9f1e827f /WebKit/android/jni/WebCoreFrameBridge.h
parent19d8bd10cbc60aee378a8762c27b264a4813445b (diff)
downloadexternal_webkit-f10585d69aaccf4c1b021df143ee0f08e338cf31.zip
external_webkit-f10585d69aaccf4c1b021df143ee0f08e338cf31.tar.gz
external_webkit-f10585d69aaccf4c1b021df143ee0f08e338cf31.tar.bz2
Add dpi support for WebView.
In the "viewport" meta tag, you can specify "target-densityDpi". If it is not specified, it uses the default, 160dpi as of today. Then the 1.0 scale factor specified in the viewport tag means 100% on G1 and 150% on Sholes. If you set "target-densityDpi" to "device-dpi", then the 1.0 scale factor means 100% on both G1 and Sholes. Implemented Safari's window.devicePixelRatio and css media query device-pixel-ratio. So if you use "device-dpi" and modify the css for font-size and image src depending on window.devicePixelRatio, you can get a better page on Sholes/Passion. Here is a list of options for "target-densityDpi". device-dpi: Use the device's native dpi as target dpi. low-dpi: 120dpi medium-dpi: 160dpi, which is also the default as of today high-dpi: 240dpi <number>: We take any number between 70 and 400 as a valid target dpi. Fix http://b/issue?id=2071943
Diffstat (limited to 'WebKit/android/jni/WebCoreFrameBridge.h')
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebCoreFrameBridge.h b/WebKit/android/jni/WebCoreFrameBridge.h
index 353545e..609aecc 100644
--- a/WebKit/android/jni/WebCoreFrameBridge.h
+++ b/WebKit/android/jni/WebCoreFrameBridge.h
@@ -109,6 +109,8 @@ class WebFrame : public WebCoreRefObject {
WebCore::String getRawResourceFilename(RAW_RES_ID) const;
+ float density() const;
+
/**
* When the user initiates a click (via trackball, enter-press, or touch),
* we set mUserInitiatedClick to true. If a load happens due to this click,