[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:59:18 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a55625ca68064ccea860761dd7db95d6ae359170
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 28 19:03:28 2002 +0000
Modified the initial layout policy. We now try to layout as close
as possible to WebKitInitialTimedLayoutDelay seconds after the
load was started, not after the provisional-to-committed transition.
If the time to the provisional-to-committed transition exceeds
WebKitInitialTimedLayoutDelay we layout immediately.
Fixed crasher. Removed unnecessary cleanup to widget that was called after the
widget was already disposed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 6e7187e..a413ba5 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,10 @@
+2002-03-28 Richard Williamson <rjw at apple.com>
+
+ Fixed crasher. Removed unnecessary cleanup to widget that was called after the
+ widget was already disposed.
+
+ * src/kdelibs/khtml/rendering/render_replaced.cpp: (RenderWidget::detach):
+
2002-03-27 Richard Williamson <rjw at apple.com>
Removed problematic code. Not sure why it was necessary. For now
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 6e7187e..a413ba5 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,10 @@
+2002-03-28 Richard Williamson <rjw at apple.com>
+
+ Fixed crasher. Removed unnecessary cleanup to widget that was called after the
+ widget was already disposed.
+
+ * src/kdelibs/khtml/rendering/render_replaced.cpp: (RenderWidget::detach):
+
2002-03-27 Richard Williamson <rjw at apple.com>
Removed problematic code. Not sure why it was necessary. For now
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6e7187e..a413ba5 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,10 @@
+2002-03-28 Richard Williamson <rjw at apple.com>
+
+ Fixed crasher. Removed unnecessary cleanup to widget that was called after the
+ widget was already disposed.
+
+ * src/kdelibs/khtml/rendering/render_replaced.cpp: (RenderWidget::detach):
+
2002-03-27 Richard Williamson <rjw at apple.com>
Removed problematic code. Not sure why it was necessary. For now
diff --git a/WebCore/khtml/rendering/render_replaced.cpp b/WebCore/khtml/rendering/render_replaced.cpp
index 3400725..ef55f05 100644
--- a/WebCore/khtml/rendering/render_replaced.cpp
+++ b/WebCore/khtml/rendering/render_replaced.cpp
@@ -142,8 +142,11 @@ void RenderWidget::detach()
if ( m_view )
m_view->removeChild( m_widget );
+#ifdef APPLE_CHANGES
+ // References the widget here is not safe.
m_widget->removeEventFilter( this );
m_widget->setMouseTracking( false );
+#endif
}
deref();
}
diff --git a/WebCore/src/kdelibs/khtml/rendering/render_replaced.cpp b/WebCore/src/kdelibs/khtml/rendering/render_replaced.cpp
index 3400725..ef55f05 100644
--- a/WebCore/src/kdelibs/khtml/rendering/render_replaced.cpp
+++ b/WebCore/src/kdelibs/khtml/rendering/render_replaced.cpp
@@ -142,8 +142,11 @@ void RenderWidget::detach()
if ( m_view )
m_view->removeChild( m_widget );
+#ifdef APPLE_CHANGES
+ // References the widget here is not safe.
m_widget->removeEventFilter( this );
m_widget->setMouseTracking( false );
+#endif
}
deref();
}
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b425781..318e74f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-03-28 Richard Williamson <rjw at apple.com>
+
+ Modified the initial layout policy. We now try to layout as close
+ as possible to WebKitInitialTimedLayoutDelay seconds after the
+ load was started, not after the provisional-to-committed transition.
+ If the time to the provisional-to-committed transition exceeds
+ WebKitInitialTimedLayoutDelay we layout immediately.
+
+ * WebView.subproj/IFWebDataSourcePrivate.h:
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _startLoading:]),
+ (-[IFWebDataSource _recursiveStopLoading]), (-[IFWebDataSource
+ _loadingStartedTime]):
+ * WebView.subproj/IFWebFramePrivate.h:
+ * WebView.subproj/IFWebFramePrivate.mm: (-[IFWebFrame
+ _transitionProvisionalToCommitted]), (-[IFWebFrame _initialLayout:]):
+
2002-03-28 John Sullivan <sullivan at apple.com>
* History.subproj/IFWebHistoryPrivate.m:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b425781..318e74f 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-03-28 Richard Williamson <rjw at apple.com>
+
+ Modified the initial layout policy. We now try to layout as close
+ as possible to WebKitInitialTimedLayoutDelay seconds after the
+ load was started, not after the provisional-to-committed transition.
+ If the time to the provisional-to-committed transition exceeds
+ WebKitInitialTimedLayoutDelay we layout immediately.
+
+ * WebView.subproj/IFWebDataSourcePrivate.h:
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _startLoading:]),
+ (-[IFWebDataSource _recursiveStopLoading]), (-[IFWebDataSource
+ _loadingStartedTime]):
+ * WebView.subproj/IFWebFramePrivate.h:
+ * WebView.subproj/IFWebFramePrivate.mm: (-[IFWebFrame
+ _transitionProvisionalToCommitted]), (-[IFWebFrame _initialLayout:]):
+
2002-03-28 John Sullivan <sullivan at apple.com>
* History.subproj/IFWebHistoryPrivate.m:
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
index e8695cd..4a17f1b 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
@@ -38,6 +38,9 @@
// Active IFURLHandles for resources associated with the
// datasource.
NSMutableArray *urlHandles;
+
+ // The time when the data source was told to start loading.
+ double loadingStartedTime;
bool primaryLoadComplete;
}
@@ -58,4 +61,5 @@
- (void)_addURLHandle: (IFURLHandle *)handle;
- (void)_removeURLHandle: (IFURLHandle *)handle;
- (void)_setPrimaryLoadComplete: (BOOL)flag;
+- (double)_loadingStartedTime;
@end
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index 5120416..d9fcefa 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -106,8 +106,15 @@
// terminal callback.
handle = [[IFURLHandle alloc] initWithURL:theURL];
[handle addClient: data->mainURLHandleClient];
+
+ // Mark the start loading time.
+ data->loadingStartedTime = CFAbsoluteTimeGetCurrent();
+
+ // Fire this guy up.
[handle loadInBackground];
+ // FIXME: Do any work need in the kde engine. This should be removed.
+ // We should move any code needed out of KWQ.
[self _part]->openURL (url);
[[self controller] locationChangeStartedForFrame: [self frame]];
@@ -168,5 +175,11 @@
}
}
+- (double)_loadingStartedTime
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+ return data->loadingStartedTime;
+}
+
@end
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.h b/WebKit/WebView.subproj/IFWebFramePrivate.h
index 78ad6d8..db74a94 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.h
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.h
@@ -57,4 +57,5 @@ typedef enum {
- (void)_checkLoadCompleteResource: (NSString *)resourceDescription error: (IFError *)error isMainDocument: (BOOL)flag;
- (void)_clearErrors;
- (void)_setMainDocumentError: (IFError *)error;
+- (void)_initialLayout: userInfo;
@end
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.mm b/WebKit/WebView.subproj/IFWebFramePrivate.mm
index a07b033..2236c92 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.mm
@@ -144,12 +144,26 @@
[[self controller] locationChangeCommittedForFrame: self];
// Start a timer to guarantee that we get an initial layout after
- // X internal, even if the document and resources are not completely
+ // X interval, even if the document and resources are not completely
// loaded.
BOOL timedDelayEnabled = [[IFPreferences standardPreferences] _initialTimedLayoutEnabled];
if (timedDelayEnabled){
- NSTimeInterval timedDelay = [[IFPreferences standardPreferences] _initialTimedLayoutDelay];
- [NSTimer scheduledTimerWithTimeInterval:timedDelay target:self selector: @selector(_initialLayout:) userInfo: nil repeats:FALSE];
+ NSTimeInterval defaultTimedDelay = [[IFPreferences 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){
+ WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "performing early layout because commit time, %f, exceeded initial layout interval %f\n", timeSinceStart, defaultTimedDelay);
+ [self _initialLayout: nil];
+ }
+ else {
+ NSTimeInterval timedDelay = defaultTimedDelay - timeSinceStart;
+
+ WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "registering delayed layout after %f seconds, time since start %f\n", timedDelay, timeSinceStart);
+ [NSTimer scheduledTimerWithTimeInterval:timedDelay target:self selector: @selector(_initialLayout:) userInfo: nil repeats:FALSE];
+ }
}
break;
}
@@ -180,10 +194,13 @@ char *stateNames[5] = {
WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "state = %s\n", stateNames[data->state]);
if (data->state == IFWEBFRAMESTATE_COMMITTED){
- WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "performing timed layout\n");
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "performing initial layout\n");
[[self view] setNeedsLayout: YES];
[[self view] setNeedsDisplay: YES];
}
+ else {
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "timed initial layout not required\n");
+ }
}
- (IFWebFrameState)_state
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index e8695cd..4a17f1b 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -38,6 +38,9 @@
// Active IFURLHandles for resources associated with the
// datasource.
NSMutableArray *urlHandles;
+
+ // The time when the data source was told to start loading.
+ double loadingStartedTime;
bool primaryLoadComplete;
}
@@ -58,4 +61,5 @@
- (void)_addURLHandle: (IFURLHandle *)handle;
- (void)_removeURLHandle: (IFURLHandle *)handle;
- (void)_setPrimaryLoadComplete: (BOOL)flag;
+- (double)_loadingStartedTime;
@end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 5120416..d9fcefa 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -106,8 +106,15 @@
// terminal callback.
handle = [[IFURLHandle alloc] initWithURL:theURL];
[handle addClient: data->mainURLHandleClient];
+
+ // Mark the start loading time.
+ data->loadingStartedTime = CFAbsoluteTimeGetCurrent();
+
+ // Fire this guy up.
[handle loadInBackground];
+ // FIXME: Do any work need in the kde engine. This should be removed.
+ // We should move any code needed out of KWQ.
[self _part]->openURL (url);
[[self controller] locationChangeStartedForFrame: [self frame]];
@@ -168,5 +175,11 @@
}
}
+- (double)_loadingStartedTime
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+ return data->loadingStartedTime;
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 78ad6d8..db74a94 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -57,4 +57,5 @@ typedef enum {
- (void)_checkLoadCompleteResource: (NSString *)resourceDescription error: (IFError *)error isMainDocument: (BOOL)flag;
- (void)_clearErrors;
- (void)_setMainDocumentError: (IFError *)error;
+- (void)_initialLayout: userInfo;
@end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index a07b033..2236c92 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -144,12 +144,26 @@
[[self controller] locationChangeCommittedForFrame: self];
// Start a timer to guarantee that we get an initial layout after
- // X internal, even if the document and resources are not completely
+ // X interval, even if the document and resources are not completely
// loaded.
BOOL timedDelayEnabled = [[IFPreferences standardPreferences] _initialTimedLayoutEnabled];
if (timedDelayEnabled){
- NSTimeInterval timedDelay = [[IFPreferences standardPreferences] _initialTimedLayoutDelay];
- [NSTimer scheduledTimerWithTimeInterval:timedDelay target:self selector: @selector(_initialLayout:) userInfo: nil repeats:FALSE];
+ NSTimeInterval defaultTimedDelay = [[IFPreferences 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){
+ WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "performing early layout because commit time, %f, exceeded initial layout interval %f\n", timeSinceStart, defaultTimedDelay);
+ [self _initialLayout: nil];
+ }
+ else {
+ NSTimeInterval timedDelay = defaultTimedDelay - timeSinceStart;
+
+ WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "registering delayed layout after %f seconds, time since start %f\n", timedDelay, timeSinceStart);
+ [NSTimer scheduledTimerWithTimeInterval:timedDelay target:self selector: @selector(_initialLayout:) userInfo: nil repeats:FALSE];
+ }
}
break;
}
@@ -180,10 +194,13 @@ char *stateNames[5] = {
WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "state = %s\n", stateNames[data->state]);
if (data->state == IFWEBFRAMESTATE_COMMITTED){
- WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "performing timed layout\n");
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "performing initial layout\n");
[[self view] setNeedsLayout: YES];
[[self view] setNeedsDisplay: YES];
}
+ else {
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "timed initial layout not required\n");
+ }
}
- (IFWebFrameState)_state
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list