[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:37:24 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9ed174a453caee938f8e9e0d79835da9605c9bb3
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Apr 27 23:29:05 2004 +0000
Eliminate the preferences for timed/resource layouts. Accessing them is now taking 0.5% on the cvs-base
test, so we're just going to hardcode the values instead.
Reviewed by mjs
* WebView.subproj/WebFrame.m:
(-[WebFrame _transitionToLayoutAcceptable]):
(-[WebFrame _isLoadComplete]):
* WebView.subproj/WebPreferences.m:
(+[WebPreferences initialize]):
(-[WebPreferences _objectCacheSize]):
* WebView.subproj/WebPreferencesPrivate.h:
* WebView.subproj/WebView.m:
(-[WebView _mainReceivedBytesSoFar:fromDataSource:complete:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 704590f..9a5e0c6 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2004-04-27 David Hyatt <hyatt at apple.com>
+
+ Eliminate the preferences for timed/resource layouts. Accessing them is now taking 0.5% on the cvs-base
+ test, so we're just going to hardcode the values instead.
+
+ Reviewed by mjs
+
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame _transitionToLayoutAcceptable]):
+ (-[WebFrame _isLoadComplete]):
+ * WebView.subproj/WebPreferences.m:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences _objectCacheSize]):
+ * WebView.subproj/WebPreferencesPrivate.h:
+ * WebView.subproj/WebView.m:
+ (-[WebView _mainReceivedBytesSoFar:fromDataSource:complete:]):
+
2004-04-27 Ken Kocienda <kocienda at apple.com>
Reviewed by Hyatt
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 97dd32d..7fb615e 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -83,6 +83,8 @@ NSString *WebPageCacheEntryDateKey = @"WebPageCacheEntryDateKey";
NSString *WebPageCacheDataSourceKey = @"WebPageCacheDataSourceKey";
NSString *WebPageCacheDocumentViewKey = @"WebPageCacheDocumentViewKey";
+#define timedLayoutDelay 1.00
+
@interface NSObject (WebExtraPerformMethod)
- (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2 withObject:(id)object3;
@@ -642,24 +644,20 @@ NSString *WebPageCacheDocumentViewKey = @"WebPageCacheDocumentViewKey";
// Start a timer to guarantee that we get an initial layout after
// X interval, even if the document and resources are not completely
// loaded.
- BOOL timedDelayEnabled = [[WebPreferences standardPreferences] _initialTimedLayoutEnabled];
- if (timedDelayEnabled) {
- NSTimeInterval defaultTimedDelay = [[WebPreferences standardPreferences] _initialTimedLayoutDelay];
- double timeSinceStart;
-
- // If the delay getting to the commited state exceeds the initial layout delay, go
- // ahead and schedule a layout.
- timeSinceStart = (CFAbsoluteTimeGetCurrent() - [[self dataSource] _loadingStartedTime]);
- if (timeSinceStart > (double)defaultTimedDelay) {
- LOG(Timing, "performing early layout because commit time, %f, exceeded initial layout interval %f", timeSinceStart, defaultTimedDelay);
- [self _timedLayout: nil];
- }
- else {
- NSTimeInterval timedDelay = defaultTimedDelay - timeSinceStart;
-
- LOG(Timing, "registering delayed layout after %f seconds, time since start %f", timedDelay, timeSinceStart);
- [self _scheduleLayout: timedDelay];
- }
+ double timeSinceStart;
+
+ // If the delay getting to the commited state exceeds the initial layout delay, go
+ // ahead and schedule a layout.
+ timeSinceStart = (CFAbsoluteTimeGetCurrent() - [[self dataSource] _loadingStartedTime]);
+ if (timeSinceStart > timedLayoutDelay) {
+ LOG(Timing, "performing early layout because commit time, %f, exceeded initial layout interval %f", timeSinceStart, defaultTimedDelay);
+ [self _timedLayout: nil];
+ }
+ else {
+ NSTimeInterval timedDelay = timedLayoutDelay - timeSinceStart;
+
+ LOG(Timing, "registering delayed layout after %f seconds, time since start %f", timedDelay, timeSinceStart);
+ [self _scheduleLayout: timedDelay];
}
return;
}
@@ -1144,13 +1142,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
// A resource was loaded, but the entire frame isn't complete. Schedule a
// layout.
else {
- if ([self _state] == WebFrameStateLayoutAcceptable) {
- BOOL resourceTimedDelayEnabled = [[WebPreferences standardPreferences] _resourceTimedLayoutEnabled];
- if (resourceTimedDelayEnabled) {
- NSTimeInterval timedDelay = [[WebPreferences standardPreferences] _resourceTimedLayoutDelay];
- [self _scheduleLayout:timedDelay];
- }
- }
+ if ([self _state] == WebFrameStateLayoutAcceptable)
+ [self _scheduleLayout:timedLayoutDelay];
}
return;
}
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index 47fcb73..9c64840 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -34,11 +34,6 @@
#define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled"
#define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @"WebKitJavaScriptCanOpenWindowsAutomatically"
#define WebKitPluginsEnabledPreferenceKey @"WebKitPluginsEnabled"
-#define WebKitInitialTimedLayoutDelayPreferenceKey @"WebKitInitialTimedLayoutDelay"
-#define WebKitInitialTimedLayoutSizePreferenceKey @"WebKitInitialTimedLayoutSize"
-#define WebKitInitialTimedLayoutEnabledPreferenceKey @"WebKitInitialTimedLayoutEnabled"
-#define WebKitResourceTimedLayoutEnabledPreferenceKey @"WebKitResourceTimedLayoutEnabled"
-#define WebKitResourceTimedLayoutDelayPreferenceKey @"WebKitResourceTimedLayoutDelay"
#define WebKitAllowAnimatedImagesPreferenceKey @"WebKitAllowAnimatedImagesPreferenceKey"
#define WebKitAllowAnimatedImageLoopingPreferenceKey @"WebKitAllowAnimatedImageLoopingPreferenceKey"
#define WebKitDisplayImagesKey @"WebKitDisplayImagesKey"
@@ -216,13 +211,8 @@ NS_ENDHANDLER
@"16", WebKitDefaultFontSizePreferenceKey,
@"13", WebKitDefaultFixedFontSizePreferenceKey,
@"ISO-8859-1", WebKitDefaultTextEncodingNamePreferenceKey,
- @"1.00", WebKitInitialTimedLayoutDelayPreferenceKey,
- @"4096", WebKitInitialTimedLayoutSizePreferenceKey,
- @"1.00", WebKitResourceTimedLayoutDelayPreferenceKey,
@"4", WebKitPageCacheSizePreferenceKey,
@"4194304", WebKitObjectCacheSizePreferenceKey,
- [NSNumber numberWithBool:YES], WebKitInitialTimedLayoutEnabledPreferenceKey,
- [NSNumber numberWithBool:YES], WebKitResourceTimedLayoutEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitUserStyleSheetEnabledPreferenceKey,
@"", WebKitUserStyleSheetLocationPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShouldPrintBackgroundsPreferenceKey,
@@ -560,16 +550,6 @@ NS_ENDHANDLER
@implementation WebPreferences (WebPrivate)
-- (NSTimeInterval)_initialTimedLayoutDelay
-{
- return (NSTimeInterval)[[NSUserDefaults standardUserDefaults] floatForKey:WebKitInitialTimedLayoutDelayPreferenceKey];
-}
-
-- (int)_initialTimedLayoutSize
-{
- return [[NSUserDefaults standardUserDefaults] integerForKey:WebKitInitialTimedLayoutDelayPreferenceKey];
-}
-
- (int)_pageCacheSize
{
return [[NSUserDefaults standardUserDefaults] integerForKey:WebKitPageCacheSizePreferenceKey];
@@ -580,21 +560,6 @@ NS_ENDHANDLER
return [[NSUserDefaults standardUserDefaults] integerForKey:WebKitObjectCacheSizePreferenceKey];
}
-- (BOOL)_initialTimedLayoutEnabled
-{
- return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitInitialTimedLayoutEnabledPreferenceKey];
-}
-
-- (NSTimeInterval)_resourceTimedLayoutDelay
-{
- return [[NSUserDefaults standardUserDefaults] floatForKey:WebKitResourceTimedLayoutDelayPreferenceKey];
-}
-
-- (BOOL)_resourceTimedLayoutEnabled
-{
- return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitResourceTimedLayoutEnabledPreferenceKey];
-}
-
- (NSTimeInterval)_backForwardCacheExpirationInterval
{
return (NSTimeInterval)[[NSUserDefaults standardUserDefaults] floatForKey:WebKitBackForwardCacheExpirationIntervalKey];
diff --git a/WebKit/WebView.subproj/WebPreferencesPrivate.h b/WebKit/WebView.subproj/WebPreferencesPrivate.h
index 42429cc..27d37b9 100644
--- a/WebKit/WebView.subproj/WebPreferencesPrivate.h
+++ b/WebKit/WebView.subproj/WebPreferencesPrivate.h
@@ -7,11 +7,6 @@
@interface WebPreferences (WebPrivate)
-- (NSTimeInterval)_initialTimedLayoutDelay;
-- (int)_initialTimedLayoutSize;
-- (BOOL)_initialTimedLayoutEnabled;
-- (BOOL)_resourceTimedLayoutEnabled;
-- (NSTimeInterval)_resourceTimedLayoutDelay;
- (int)_pageCacheSize;
- (int)_objectCacheSize;
- (void)_postPreferencesChangesNotification;
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 589ef7a..ee0fce0 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -82,6 +82,7 @@ NSString *WebViewProgressFinishedNotification = @"WebProgressFinishedNot
enum { WebViewVersion = 2 };
+#define timedLayoutSize 4096
static NSMutableSet *schemesWithRepresentationsSet;
@@ -301,7 +302,6 @@ NSString *_WebMainFrameURLKey = @"mainFrameURL";
// If the frame isn't complete it might be ready for a layout. Perform that check here.
// Note that transitioning a frame to this state doesn't guarantee a layout, rather it
// just indicates that an early layout can be performed.
- int timedLayoutSize = [[WebPreferences standardPreferences] _initialTimedLayoutSize];
if ((int)bytesSoFar > timedLayoutSize)
[frame _transitionToLayoutAcceptable];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list