Re: Resizing a WebView
Re: Resizing a WebView
- Subject: Re: Resizing a WebView
- From: John Stiles <email@hidden>
- Date: Wed, 15 Jun 2005 09:35:17 -0700
On Jun 15, 2005, at 7:06 AM, Mike O'Connor wrote:
On Jun 15, 2005, at 1:22 AM, John Stiles wrote:
I'm not sure a web view has an optimum size. Most real web pages have text that extends from one edge to the other (i.e. as you resize the window, the visible text area grows to match). Some poorly-designed web pages have text that always consumes a fixed amount of horizontal space, but those pages are in the minority and there's not really a good way to identify them at all (or how much space they consume).
Safari seems to do it. For example it will zoom the window to a width based on the content it is showing.
Will it? I can't make it do this. It can zoom, but the sizes it chooses basically seem arbitrary to me. Do you have a URL I could try that demonstrates this? And Webview knows when to show scroll bars and how far to scroll them, so it must know the size of the content.
Yes, the height of a web page is pretty well defined. The width, not so much.
In my case, I'm not displaying general Web pages, but usually custom content in the form of a table with specific (but not known in advance) width and height.
The DOM is now exposed, so you could dig into the content of the page and try asking the body for its width and height. That's just off the top of my head; I have no idea if it would really work. The Safari guys would know though :) |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden