[webkit-dev] iPhone Orientation and Scaling

Christopher Allen ChristopherA at iPhoneWebDev.com
Tue Jul 3 20:50:24 PDT 2007


On 7/3/07, Jacob Basham <jacob.basham at gmail.com> wrote:
> I'm not too familiar with this particular topic, but why/should you
> need to know when safari scales? If I'm interpreting scaling
> correctly, your refering to zooming in and out. That should only be
> the browser scaling and not effect any GUI changes correct?

It has a severe effect on webapps that are trying to emulate the
iPhone UI at native resolution. All of a sudden buttons that were in
easy to tap are hidden off-screen, UI that was designed to fit in the
320x480 or 480x320 cease to function properly. In addition, having
control over scaling is often useful for other purposes beyond webaps,
for instance when you want to focus the page on something new after an
action by the user, for instance, after you do text entry in a
section, you may want to focus the user on the save button.

Apple demonstrated a native resolution webapp at the WWDC keynote, but
note that they didn't show what happened when you turned that app
landscape, or how it probably broke when you entered text into a field
and the page scaled. We are trying to solve those problems.

Some of the threads related to this topic in iPhoneWebDev:

We have figured out how best to detect orientation change and change
UI for landscape vs portrait -- see
http://groups.google.com/group/iphonewebdev/browse_thread/thread/e041ae0357dc62dc

A lot of discussion about best practices re: viewport -- see
http://groups.google.com/group/iphonewebdev/browse_thread/thread/f43493a828dffdb3

Dealing with various problems of scaling -- see
http://groups.google.com/group/iphonewebdev/browse_thread/thread/b09a202d34daab51

The best way to hide the URL bar -- see
http://groups.google.com/group/iphonewebdev/browse_thread/thread/c064b183c1207a98/dd79332910e4695c

We are also figuring out how to create objects that drag using
two-finger drag since many mouse events are not passed to the iPhone's
javascript  -- see
http://groups.google.com/group/iphonewebdev/browse_thread/thread/991a04799ec841f7

-- Christopher Allen



More information about the webkit-dev mailing list