[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 06:51:18 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 52002cfe99e2a06167cb3740340d77ed126eba16
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 19 00:27:26 2002 +0000

            Fixed khtml to ignore <title> tags after the first tag.
    
            Fixed setting document.title from JavaScript.
    
            * khtml/dom/html_document.cpp:
            (HTMLDocument::setTitle):
            * khtml/html/html_headimpl.cpp:
            (HTMLTitleElementImpl::insertedIntoDocument):
            (HTMLTitleElementImpl::childrenChanged):
    
            Changed name to setUsesBackForwardList: from
            setUseBackForwardList.  ditto for useBackForwardList
    
            * WebView.subproj/WebController.h:
            * WebView.subproj/WebController.m:
            (-[WebController setUsesBackForwardList:]):
            (-[WebController usesBackForwardList]):
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _transitionToCommitted]):
            (-[WebFrame _isLoadComplete]):
    
            Fixed history items that have "untitled" title after
            redirect. (3078577).
    
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSource _setTitle:]):
    
            Made title of snippet window change to match document title, if
            present.
    
            * Debug/SnippetController.h:
            * Debug/SnippetController.m:
            (-[SnippetController setTitle:]):
            (-[SnippetLocationChangeDelegate locationChangeDone:forDataSource:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2374 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 5eb6b09..8c22044 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-10-18  Richard Williamson   <rjw at apple.com>
+
+        Fixed khtml to ignore <title> tags after the first tag.
+        
+        Fixed setting document.title from JavaScript.
+        
+        * khtml/dom/html_document.cpp:
+        (HTMLDocument::setTitle):
+        * khtml/html/html_headimpl.cpp:
+        (HTMLTitleElementImpl::insertedIntoDocument):
+        (HTMLTitleElementImpl::childrenChanged):
+
 2002-10-18  Darin Adler  <darin at apple.com>
 
 	- fixed 3078293 -- Implement evaluateJavaScript on WebController
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5eb6b09..8c22044 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2002-10-18  Richard Williamson   <rjw at apple.com>
+
+        Fixed khtml to ignore <title> tags after the first tag.
+        
+        Fixed setting document.title from JavaScript.
+        
+        * khtml/dom/html_document.cpp:
+        (HTMLDocument::setTitle):
+        * khtml/html/html_headimpl.cpp:
+        (HTMLTitleElementImpl::insertedIntoDocument):
+        (HTMLTitleElementImpl::childrenChanged):
+
 2002-10-18  Darin Adler  <darin at apple.com>
 
 	- fixed 3078293 -- Implement evaluateJavaScript on WebController
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5eb6b09..8c22044 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2002-10-18  Richard Williamson   <rjw at apple.com>
+
+        Fixed khtml to ignore <title> tags after the first tag.
+        
+        Fixed setting document.title from JavaScript.
+        
+        * khtml/dom/html_document.cpp:
+        (HTMLDocument::setTitle):
+        * khtml/html/html_headimpl.cpp:
+        (HTMLTitleElementImpl::insertedIntoDocument):
+        (HTMLTitleElementImpl::childrenChanged):
+
 2002-10-18  Darin Adler  <darin at apple.com>
 
 	- fixed 3078293 -- Implement evaluateJavaScript on WebController
diff --git a/WebCore/khtml/dom/html_document.cpp b/WebCore/khtml/dom/html_document.cpp
index dce9d08..f26fde8 100644
--- a/WebCore/khtml/dom/html_document.cpp
+++ b/WebCore/khtml/dom/html_document.cpp
@@ -86,9 +86,14 @@ DOMString HTMLDocument::title() const
     return static_cast<HTMLDocumentImpl *>(impl)->title();
 }
 
-void HTMLDocument::setTitle( const DOMString &/*value*/ )
+void HTMLDocument::setTitle( const DOMString &v )
 {
+#ifdef APPLE_CHANGES
+    if (!impl) return;
+    ((HTMLDocumentImpl *)impl)->setTitle(v);
+#else
     // ###
+#endif
 }
 
 DOMString HTMLDocument::referrer() const
diff --git a/WebCore/khtml/html/html_headimpl.cpp b/WebCore/khtml/html/html_headimpl.cpp
index 67ebc38..41973aa 100644
--- a/WebCore/khtml/html/html_headimpl.cpp
+++ b/WebCore/khtml/html/html_headimpl.cpp
@@ -457,7 +457,13 @@ NodeImpl::Id HTMLTitleElementImpl::id() const
 void HTMLTitleElementImpl::insertedIntoDocument()
 {
     HTMLElementImpl::insertedIntoDocument();
-    getDocument()->setTitle(m_title);
+#ifdef APPLE_CHANGES
+    // Only allow title to be set by first <title> encountered.
+    if (getDocument()->title().isEmpty())
+        getDocument()->setTitle(m_title);
+#else
+        getDocument()->setTitle(m_title);
+#endif
 }
 
 void HTMLTitleElementImpl::removedFromDocument()
@@ -476,6 +482,11 @@ void HTMLTitleElementImpl::childrenChanged()
 	if ((c->nodeType() == Node::TEXT_NODE) || (c->nodeType() == Node::CDATA_SECTION_NODE))
 	    m_title += c->nodeValue();
     }
-    if (inDocument())
+#ifdef APPLE_CHANGES
+    // Only allow title to be set by first <title> encountered.
+    if (inDocument() && getDocument()->title().isEmpty())
+#else
+    if (inDocument()))
+#endif
 	getDocument()->setTitle(m_title);
 }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 93eb37f..b819fe8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,22 @@
+2002-10-18  Richard Williamson   <rjw at apple.com>
+
+        Changed name to setUsesBackForwardList: from
+        setUseBackForwardList.  ditto for useBackForwardList
+        
+        * WebView.subproj/WebController.h:
+        * WebView.subproj/WebController.m:
+        (-[WebController setUsesBackForwardList:]):
+        (-[WebController usesBackForwardList]):
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _transitionToCommitted]):
+        (-[WebFrame _isLoadComplete]):
+
+        Fixed history items that have "untitled" title after
+        redirect. (3078577).
+        
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _setTitle:]):
+
 2002-10-18  Darin Adler  <darin at apple.com>
 
         * WebView.subproj/WebController.h:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 93eb37f..b819fe8 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,22 @@
+2002-10-18  Richard Williamson   <rjw at apple.com>
+
+        Changed name to setUsesBackForwardList: from
+        setUseBackForwardList.  ditto for useBackForwardList
+        
+        * WebView.subproj/WebController.h:
+        * WebView.subproj/WebController.m:
+        (-[WebController setUsesBackForwardList:]):
+        (-[WebController usesBackForwardList]):
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _transitionToCommitted]):
+        (-[WebFrame _isLoadComplete]):
+
+        Fixed history items that have "untitled" title after
+        redirect. (3078577).
+        
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _setTitle:]):
+
 2002-10-18  Darin Adler  <darin at apple.com>
 
         * WebView.subproj/WebController.h:
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index e2cee58..3a5cb86 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -237,13 +237,13 @@ extern NSString *WebElementFrameKey;
     @abstract Enable or disable the use of a backforward list for this controller.
     @param flag turns use of the back forward list on or off
 */    
-- (void)setUseBackForwardList: (BOOL)flag;
+- (void)setUsesBackForwardList: (BOOL)flag;
 
 /*!
     @method useBackForwardList
     @result Returns YES if a backforward list is being used by this controller, NO otherwise.
 */    
-- (BOOL)useBackForwardList;
+- (BOOL)usesBackForwardList;
 
 /*!
     @method goBack
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index cc2cd54..db28a7e 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -56,7 +56,7 @@ NSString *WebElementFrameKey = @"WebElementFrame";
 	[WebControllerSets addController:self toSetNamed:_private->controllerSetName];
     }
 
-    [self setUseBackForwardList: YES];
+    [self setUsesBackForwardList: YES];
     
     ++WebControllerCount;
 
@@ -257,12 +257,12 @@ NSString *WebElementFrameKey = @"WebElementFrame";
     return _private->backForwardList;
 }
 
-- (void)setUseBackForwardList: (BOOL)flag
+- (void)setUsesBackForwardList: (BOOL)flag
 {
     _private->useBackForwardList = flag;
 }
 
-- (BOOL)useBackForwardList
+- (BOOL)usesBackForwardList
 {
     return _private->useBackForwardList;
 }
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
index 40f2d3c..ade64fa 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
@@ -180,6 +180,7 @@ typedef enum {
     @method webPolicyWithClickAction:andPath:
     @abstract WebClickPolicy constructor
     @param action The policy action of the WebClickPolicy.
+    @param URL
     @param thePath Path to where the file should be saved. Only applicable for
     WebClickPolicySave and WebClickPolicySaveAndOpenExternally WebClickActions.
 */
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index b688a03..9c779ab 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -248,13 +248,16 @@
             return;
     }
     
+    if (!trimmed || [trimmed length] == 0)
+        return;
+        
     [_private->pageTitle release];
     _private->pageTitle = [trimmed copy];
     
     // The title doesn't get communicated to the controller until we are committed.
     if (_private->committed) {
         WebHistoryItem *entry;
-        entry = [[WebHistory sharedHistory] entryForURL: [[[self request] URL] _web_canonicalize]];
+        entry = [[WebHistory sharedHistory] entryForURL: [[[self _originalRequest] URL] _web_canonicalize]];
         [entry setTitle: _private->pageTitle];
         [[_private->controller locationChangeDelegate] receivedPageTitle:_private->pageTitle forDataSource:self];
     }
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index a70bfec..2cca372 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -301,7 +301,7 @@ static const char * const stateNames[] = {
             WebHistoryItem *entry = nil;
             NSString *ptitle = [ds pageTitle];
 
-            if ([[self controller] useBackForwardList]){
+            if ([[self controller] usesBackForwardList]){
                 switch ([self _loadType]) {
                 case WebFrameLoadTypeForward:
                     [backForwardList goForward];
@@ -354,6 +354,7 @@ static const char * const stateNames[] = {
             
             // If we have a title let the controller know about it.
             if (ptitle){
+                printf ("WebFramePrivate:  setting title to %s\n", [ptitle cString]);
                 [entry setTitle: ptitle];
 		[[[self controller] locationChangeDelegate] receivedPageTitle:ptitle forDataSource:ds];
             }
@@ -485,7 +486,7 @@ static const char * const stateNames[] = {
                 // 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.
-                if ([[self controller] useBackForwardList]){
+                if ([[self controller] usesBackForwardList]){
                     switch ([self _loadType]) {
                     case WebFrameLoadTypeForward:
                         [self _restoreScrollPosition];
diff --git a/WebKit/WebView.subproj/WebPolicyDelegate.h b/WebKit/WebView.subproj/WebPolicyDelegate.h
index 40f2d3c..ade64fa 100644
--- a/WebKit/WebView.subproj/WebPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebPolicyDelegate.h
@@ -180,6 +180,7 @@ typedef enum {
     @method webPolicyWithClickAction:andPath:
     @abstract WebClickPolicy constructor
     @param action The policy action of the WebClickPolicy.
+    @param URL
     @param thePath Path to where the file should be saved. Only applicable for
     WebClickPolicySave and WebClickPolicySaveAndOpenExternally WebClickActions.
 */
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index e2cee58..3a5cb86 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -237,13 +237,13 @@ extern NSString *WebElementFrameKey;
     @abstract Enable or disable the use of a backforward list for this controller.
     @param flag turns use of the back forward list on or off
 */    
-- (void)setUseBackForwardList: (BOOL)flag;
+- (void)setUsesBackForwardList: (BOOL)flag;
 
 /*!
     @method useBackForwardList
     @result Returns YES if a backforward list is being used by this controller, NO otherwise.
 */    
-- (BOOL)useBackForwardList;
+- (BOOL)usesBackForwardList;
 
 /*!
     @method goBack
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index cc2cd54..db28a7e 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -56,7 +56,7 @@ NSString *WebElementFrameKey = @"WebElementFrame";
 	[WebControllerSets addController:self toSetNamed:_private->controllerSetName];
     }
 
-    [self setUseBackForwardList: YES];
+    [self setUsesBackForwardList: YES];
     
     ++WebControllerCount;
 
@@ -257,12 +257,12 @@ NSString *WebElementFrameKey = @"WebElementFrame";
     return _private->backForwardList;
 }
 
-- (void)setUseBackForwardList: (BOOL)flag
+- (void)setUsesBackForwardList: (BOOL)flag
 {
     _private->useBackForwardList = flag;
 }
 
-- (BOOL)useBackForwardList
+- (BOOL)usesBackForwardList
 {
     return _private->useBackForwardList;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list