Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling all rendering until page is full loaded



Mark,

The idea is leave what the webcontrol is presently displaying, then disable
all updates until it full loaded and then do a full and complete draw. So I
guess I've leave the else part of drawRect empty.

You could perhaps take a snapshot of the WebView when the new page load request happens (using NSCachedImageRep maybe?), and then have your subclass draw that instead of doing the NSRectFill().


I think the reason the sort of behaviour you're describing isn't supported (if, indeed, it isn't -- can anyone confirm?) is because it's generally considered better to see the new page loading, because users don't generally think "Okay, I'm twenty seconds away from finishing reading this page, so I'd better click on the link for the next page I want to see." (partly because the 'twenty' is not constant).

I guess I need to do [yourWebViewSubclass setNeedsDisplay:NO], when we start
to load the next page, and a [yourWebViewSubclass setNeedsDisplay:YES], when
fully loaded ???.

What setNeedsDisplay: does is simply mark a view or part of a view as needing redrawn next time around the event loop. With the asynchronous nature of HTTP loading, this will be happening all the time behind the scenes in your WebView and its internal WebFrameViews, so your original setNeedsDisplay:NO would quickly be overridden.


Best wishes,
Hamish

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Disabling all rendering until page is full loaded (From: Mark Thomas <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.