Commit d4a14ac7 authored by hyatt's avatar hyatt
Browse files

Move text measurement and layout beyond onload. This

	shoudl speed up i-bench substantially and morrison's
	PLT test slightly.  Note that the adjustFrames layout
	stuff has been removed from isLoadComplete.

        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _timedLayout:]):
        (-[WebFrame _isLoadComplete]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5159d9c2
2002-11-14 David Hyatt <hyatt@apple.com>
Move text measurement and layout beyond onload. This
shoudl speed up i-bench substantially and morrison's
PLT test slightly. Note that the adjustFrames layout
stuff has been removed from isLoadComplete.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _timedLayout:]):
(-[WebFrame _isLoadComplete]):
2002-11-14 Darin Adler <darin@apple.com>
 
* English.lproj/Localizable.strings: Updated to include the new
......
2002-11-14 David Hyatt <hyatt@apple.com>
Move text measurement and layout beyond onload. This
shoudl speed up i-bench substantially and morrison's
PLT test slightly. Note that the adjustFrames layout
stuff has been removed from isLoadComplete.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _timedLayout:]):
(-[WebFrame _isLoadComplete]):
2002-11-14 Darin Adler <darin@apple.com>
 
* English.lproj/Localizable.strings: Updated to include the new
......
......@@ -309,7 +309,7 @@ - (void)_scheduleLayout:(NSTimeInterval)inSeconds
- (void)_timedLayout: (id)userInfo
{
LOG(Timing, "%@: state = %s", [self name], stateNames[_private->state]);
[_private->scheduledLayoutTimer release];
_private->scheduledLayoutTimer = nil;
......@@ -323,9 +323,7 @@ - (void)_timedLayout: (id)userInfo
if ([documentView isKindOfClass: [NSView class]]) {
NSView *dview = (NSView *)documentView;
NSRect frame = [dview frame];
NSRect frame = [dview frame];
if (frame.size.width == 0 || frame.size.height == 0){
// We must do the layout now, rather than depend on
......@@ -336,17 +334,17 @@ - (void)_timedLayout: (id)userInfo
// Force a layout now. At this point we could
// check to see if any CSS is pending and delay
// the layout further to avoid the flash of unstyled
// content.
// content.
[documentView layout];
}
}
[documentView setNeedsDisplay: YES];
}
else {
if ([self controller])
LOG(Timing, "%@: NOT performing timed layout (not needed), %f seconds since start of document load", [self name], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
}
}
else {
if ([self controller])
LOG(Timing, "%@: NOT performing timed layout (not needed), %f seconds since start of document load", [self name], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
}
}
......@@ -625,19 +623,12 @@ - (void)_isLoadComplete
// Tell the just loaded document to layout. This may be necessary
// for non-html content that needs a layout message.
[thisDocumentView setNeedsLayout:YES];
[thisDocumentView layout];
// Unfortunately if this frame has children we have to lay them
// out too. This could be an expensive operation.
// FIXME: If we can figure out how to avoid the layout of children,
// (just need for iframe placement/sizing) we could get a few percent
// speed improvement.
[ds _layoutChildren];
[thisDocumentView setNeedsDisplay:YES];
//[thisDocumentView display];
if (!([[self webView] isDocumentHTML])) {
[thisDocumentView setNeedsLayout:YES];
[thisDocumentView layout];
[thisDocumentView setNeedsDisplay:YES];
}
// If the user had a scroll point scroll to it. This will override
// the anchor point. After much discussion it was decided by folks
// that the user scroll point should override the anchor point.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment