[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:59:06 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c26ab578bea8fd32f00d5e1ff33ba6f438af3b75
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 12 17:22:24 2002 +0000
WebCore:
- fixed 3083043 -- Alex doesn't decode % sequences in javascript: URLs
Some places here did KURL::decode_string, but others didn't.
* khtml/khtml_part.cpp:
(KHTMLPart::slotShowDocument): Added call to KURL::decode_string.
(KHTMLPart::overURL): Ditto.
(KHTMLPart::urlSelected): Ditto.
(KHTMLPart::requestFrame): Ditto.
(KHTMLPart::slotChildURLRequest): Ditto.
WebKit:
- improved the code that manages observing the window and superview
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView addSuperviewObservers]): Added.
(-[WebHTMLView removeSuperviewObservers]): Added.
(-[WebHTMLView addWindowObservers]): Added.
(-[WebHTMLView removeWindowObservers]): Added.
(-[WebHTMLView viewWillMoveToSuperview:]): Call removeSuperviewObservers.
(-[WebHTMLView viewDidMoveToSuperview]): Call addSuperviewObservers.
(-[WebHTMLView viewWillMoveToWindow:]): Call removeWindowObservers and
removeSuperviewObservers.
(-[WebHTMLView viewDidMoveToWindow]): Call addWindowObservers and
addSuperviewObservers.
WebBrowser:
- fixed 3083043 -- Alex doesn't decode % sequences in javascript: URLs
* BrowserWebBookmarkExtras.m: (-[WebBookmark _goToWithWindowPolicy:]):
Call CFURLCreateStringByReplacingPercentEscapes on the URL fragment before
passing it to stringByEvaluatingJavaScriptFromString:.
* BrowserWindowController.m: (-[BrowserWindowController goToToolbarLocation:]):
Ditto.
- fixed world leaks seen when playing with the snippet window
* Debug/SnippetController.m:
(-[SnippetController dealloc]): Release the location change delegate to avoid a leak.
Also release the data source now that we retain it.
(-[SnippetController windowWillClose:]): Release everything here. If we don't we get
a world leak. Also remove the WebView from the superview. If we don't, it leaks.
At some point we should look into this because it may indicate a WebKit problem, so
I marked it with a FIXME.
(-[SnippetController load]): Retain the data source.
(-[SnippetController loadComplete]): Release the old text storage.
* Debug/SnippetController.h: Tweaks.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 5735962..9354623 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-11-12 Darin Adler <darin at apple.com>
+
+ - fixed 3083043 -- Alex doesn't decode % sequences in javascript: URLs
+
+ Some places here did KURL::decode_string, but others didn't.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::slotShowDocument): Added call to KURL::decode_string.
+ (KHTMLPart::overURL): Ditto.
+ (KHTMLPart::urlSelected): Ditto.
+ (KHTMLPart::requestFrame): Ditto.
+ (KHTMLPart::slotChildURLRequest): Ditto.
+
2002-11-11 Darin Adler <darin at apple.com>
* kwq/KWQWidget.mm: (QWidget::setCursor): Remove printf I left
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5735962..9354623 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2002-11-12 Darin Adler <darin at apple.com>
+
+ - fixed 3083043 -- Alex doesn't decode % sequences in javascript: URLs
+
+ Some places here did KURL::decode_string, but others didn't.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::slotShowDocument): Added call to KURL::decode_string.
+ (KHTMLPart::overURL): Ditto.
+ (KHTMLPart::urlSelected): Ditto.
+ (KHTMLPart::requestFrame): Ditto.
+ (KHTMLPart::slotChildURLRequest): Ditto.
+
2002-11-11 Darin Adler <darin at apple.com>
* kwq/KWQWidget.mm: (QWidget::setCursor): Remove printf I left
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5735962..9354623 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2002-11-12 Darin Adler <darin at apple.com>
+
+ - fixed 3083043 -- Alex doesn't decode % sequences in javascript: URLs
+
+ Some places here did KURL::decode_string, but others didn't.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::slotShowDocument): Added call to KURL::decode_string.
+ (KHTMLPart::overURL): Ditto.
+ (KHTMLPart::urlSelected): Ditto.
+ (KHTMLPart::requestFrame): Ditto.
+ (KHTMLPart::slotChildURLRequest): Ditto.
+
2002-11-11 Darin Adler <darin at apple.com>
* kwq/KWQWidget.mm: (QWidget::setCursor): Remove printf I left
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 3afa29f..07eb15f 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -808,7 +808,7 @@ void KHTMLPart::slotShowDocument( const QString &url, const QString &target )
// TODO: handle child target correctly! currently the script are always executed fur the parent
if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
- executeScript( url.right( url.length() - 11) );
+ executeScript( KURL::decode_string( url.right( url.length() - 11) ) );
return;
}
@@ -2167,7 +2167,7 @@ void KHTMLPart::overURL( const QString &url, const QString &target, bool shiftPr
if (url.find( QString::fromLatin1( "javascript:" ),0, false ) != -1 )
{
- emit setStatusBarText( url.mid( url.find( "javascript:", 0, false ) ) );
+ emit setStatusBarText( KURL::decode_string( url.mid( url.find( "javascript:", 0, false ) ) ) );
return;
}
@@ -2327,7 +2327,7 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
- executeScript( url.right( url.length() - 11) );
+ executeScript( KURL::decode_string( url.right( url.length() - 11) ) );
return;
}
@@ -2651,7 +2651,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
// Support for <frame src="javascript:string">
if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
- QVariant res = executeScript( DOM::Node(frame->element()), url.right( url.length() - 11) );
+ QVariant res = executeScript( DOM::Node(frame->element()), KURL::decode_string( url.right( url.length() - 11) ) );
KURL myurl;
myurl.setProtocol("javascript");
if ( res.type() == QVariant::String )
@@ -3294,7 +3294,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg
// TODO: handle child target correctly! currently the script are always executed fur the parent
QString urlStr = url.url();
if ( urlStr.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
- executeScript( urlStr.right( urlStr.length() - 11) );
+ executeScript( KURL::decode_string( urlStr.right( urlStr.length() - 11) ) );
return;
}
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index d2a3860..ba463ef 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-11-12 Darin Adler <darin at apple.com>
+
+ - improved the code that manages observing the window and superview
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView addSuperviewObservers]): Added.
+ (-[WebHTMLView removeSuperviewObservers]): Added.
+ (-[WebHTMLView addWindowObservers]): Added.
+ (-[WebHTMLView removeWindowObservers]): Added.
+ (-[WebHTMLView viewWillMoveToSuperview:]): Call removeSuperviewObservers.
+ (-[WebHTMLView viewDidMoveToSuperview]): Call addSuperviewObservers.
+ (-[WebHTMLView viewWillMoveToWindow:]): Call removeWindowObservers and
+ removeSuperviewObservers.
+ (-[WebHTMLView viewDidMoveToWindow]): Call addWindowObservers and
+ addSuperviewObservers.
+
2002-11-11 Maciej Stachowiak <mjs at apple.com>
Remove contentPolicy parameter from _downloadURL, and remove
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index d2a3860..ba463ef 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-11-12 Darin Adler <darin at apple.com>
+
+ - improved the code that manages observing the window and superview
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView addSuperviewObservers]): Added.
+ (-[WebHTMLView removeSuperviewObservers]): Added.
+ (-[WebHTMLView addWindowObservers]): Added.
+ (-[WebHTMLView removeWindowObservers]): Added.
+ (-[WebHTMLView viewWillMoveToSuperview:]): Call removeSuperviewObservers.
+ (-[WebHTMLView viewDidMoveToSuperview]): Call addSuperviewObservers.
+ (-[WebHTMLView viewWillMoveToWindow:]): Call removeWindowObservers and
+ removeSuperviewObservers.
+ (-[WebHTMLView viewDidMoveToWindow]): Call addWindowObservers and
+ addSuperviewObservers.
+
2002-11-11 Maciej Stachowiak <mjs at apple.com>
Remove contentPolicy parameter from _downloadURL, and remove
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 9110efa..0354d1b 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -164,7 +164,7 @@
name:NSMouseMovedNotification object:nil];
}
-- (void)viewWillMoveToSuperview:(NSView *)newSuperview
+- (void)addSuperviewObservers
{
// We watch the bounds of our superview, so that we can do a layout when the size
// of the superview changes. This is different from other scrollable things that don't
@@ -173,43 +173,72 @@
// We need to pay attention to both height and width because, our "layout" has to change
// to extend the background the full height of the space.
- NSView *oldSuperview = [self superview];
-
- if (oldSuperview) {
+ NSView *superview = [self superview];
+ if (superview && [self window]) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_frameOrBoundsChanged)
+ name:NSViewFrameDidChangeNotification object:superview];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_frameOrBoundsChanged)
+ name:NSViewBoundsDidChangeNotification object:superview];
+ }
+}
+
+- (void)removeSuperviewObservers
+{
+ NSView *superview = [self superview];
+ if (superview && [self window]) {
[[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSViewFrameDidChangeNotification object:oldSuperview];
+ name:NSViewFrameDidChangeNotification object:superview];
[[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSViewBoundsDidChangeNotification object:oldSuperview];
+ name:NSViewBoundsDidChangeNotification object:superview];
}
+}
- if (newSuperview) {
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_frameOrBoundsChanged)
- name:NSViewFrameDidChangeNotification object:newSuperview];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_frameOrBoundsChanged)
- name:NSViewBoundsDidChangeNotification object:newSuperview];
+- (void)addWindowObservers
+{
+ NSWindow *window = [self window];
+ if (window) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidBecomeMain:)
+ name:NSWindowDidBecomeMainNotification object:window];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidResignMain:)
+ name:NSWindowDidResignMainNotification object:window];
}
}
-- (void)viewWillMoveToWindow:(NSWindow *)window
+- (void)removeWindowObservers
{
- if ([self window]) {
+ NSWindow *window = [self window];
+ if (window) {
[[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSWindowDidBecomeMainNotification object:[self window]];
+ name:NSWindowDidBecomeMainNotification object:window];
[[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSWindowDidResignMainNotification object:[self window]];
+ name:NSWindowDidResignMainNotification object:window];
}
+}
+
+- (void)viewWillMoveToSuperview:(NSView *)newSuperview
+{
+ [self removeSuperviewObservers];
+}
+
+- (void)viewDidMoveToSuperview
+{
+ [self addSuperviewObservers];
+}
+
+- (void)viewWillMoveToWindow:(NSWindow *)window
+{
[self removeMouseMovedObserver];
+ [self removeWindowObservers];
+ [self removeSuperviewObservers];
}
- (void)viewDidMoveToWindow
{
if ([self window]) {
+ [self addWindowObservers];
+ [self addSuperviewObservers];
if ([[self window] isMainWindow] && ![self _insideAnotherHTMLView]) {
[self addMouseMovedObserver];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidBecomeMain:)
- name:NSWindowDidBecomeMainNotification object:[self window]];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidResignMain:)
- name:NSWindowDidResignMainNotification object:[self window]];
}
_private->inWindow = YES;
} else {
@@ -218,7 +247,6 @@
// This is only needed because viewDidMoveToWindow is called even when
// the window is not changing (bug in AppKit).
if (_private->inWindow) {
- [self removeMouseMovedObserver];
[self _reset];
_private->inWindow = NO;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list