[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 07:14:46 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit bdd26c11191260606350535f0138014f16ecad5d
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 13 21:13:14 2002 +0000

            Reviewed by Trey.
    
    	- moved KWQFontFamily and KWQPageState to new homes
    
            * kwq/KWQFontFamily.h: Added.
            * kwq/KWQFontFamily.mm: Added.
            * kwq/KWQPageState.h: Added.
            * kwq/KWQPageState.mm: Added.
            * WebCore.pbproj/project.pbxproj: Added new source files.
    
            * kwq/KWQFont.h: Removed KWQFontFamily.
            * kwq/KWQFont.mm:  Removed KWQFontFamily.
            * kwq/WebCoreBridge.mm: Removed KWQPageState.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 19e0941..9a30b66 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2002-12-13  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- moved KWQFontFamily and KWQPageState to new homes
+
+        * kwq/KWQFontFamily.h: Added.
+        * kwq/KWQFontFamily.mm: Added.
+        * kwq/KWQPageState.h: Added.
+        * kwq/KWQPageState.mm: Added.
+        * WebCore.pbproj/project.pbxproj: Added new source files.
+
+        * kwq/KWQFont.h: Removed KWQFontFamily.
+        * kwq/KWQFont.mm:  Removed KWQFontFamily.
+        * kwq/WebCoreBridge.mm: Removed KWQPageState.
+
 2002-12-13  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 19e0941..9a30b66 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2002-12-13  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- moved KWQFontFamily and KWQPageState to new homes
+
+        * kwq/KWQFontFamily.h: Added.
+        * kwq/KWQFontFamily.mm: Added.
+        * kwq/KWQPageState.h: Added.
+        * kwq/KWQPageState.mm: Added.
+        * WebCore.pbproj/project.pbxproj: Added new source files.
+
+        * kwq/KWQFont.h: Removed KWQFontFamily.
+        * kwq/KWQFont.mm:  Removed KWQFontFamily.
+        * kwq/WebCoreBridge.mm: Removed KWQPageState.
+
 2002-12-13  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 391b7df..984ab9f 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -470,6 +470,8 @@
 				931C8A180380288B008635CE,
 				BC7294FA03804B3C00A80166,
 				BC7294FE03804B5600A80166,
+				9394E0A603AA5BBE008635CE,
+				9394E0AB03AA60FB008635CE,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -704,6 +706,8 @@
 				931C8A190380288B008635CE,
 				BC7294F903804B3C00A80166,
 				BC7294FD03804B5600A80166,
+				9394E0A703AA5BBE008635CE,
+				9394E0AC03AA60FB008635CE,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -974,6 +978,54 @@
 			settings = {
 			};
 		};
+		9394E0A403AA5BBE008635CE = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = KWQPageState.h;
+			refType = 4;
+		};
+		9394E0A503AA5BBE008635CE = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = KWQPageState.mm;
+			refType = 4;
+		};
+		9394E0A603AA5BBE008635CE = {
+			fileRef = 9394E0A403AA5BBE008635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		9394E0A703AA5BBE008635CE = {
+			fileRef = 9394E0A503AA5BBE008635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		9394E0A903AA60FB008635CE = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = KWQFontFamily.h;
+			refType = 4;
+		};
+		9394E0AA03AA60FB008635CE = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = KWQFontFamily.mm;
+			refType = 4;
+		};
+		9394E0AB03AA60FB008635CE = {
+			fileRef = 9394E0A903AA60FB008635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		9394E0AC03AA60FB008635CE = {
+			fileRef = 9394E0AA03AA60FB008635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		93CCF7D4033BD43C008635CE = {
 			fileEncoding = 30;
 			isa = PBXFileReference;
@@ -1137,6 +1189,8 @@
 				931C8A170380288B008635CE,
 				93CCF7D4033BD43C008635CE,
 				93CCF7D5033BD43C008635CE,
+				9394E0A903AA60FB008635CE,
+				9394E0AA03AA60FB008635CE,
 				F58784EE02DE375901EA4122,
 				F58784EF02DE375901EA4122,
 				F58784FA02DE375901EA4122,
@@ -1147,6 +1201,8 @@
 				F587850302DE375901EA4122,
 				93861DDF032C2E52008635CE,
 				93861DE0032C2E52008635CE,
+				9394E0A403AA5BBE008635CE,
+				9394E0A503AA5BBE008635CE,
 				93386B90037045B3008635CE,
 				93386B91037045B3008635CE,
 				F587851B02DE375901EA4122,
diff --git a/WebCore/kwq/KWQFont.h b/WebCore/kwq/KWQFont.h
index 833031b..6cc8921 100644
--- a/WebCore/kwq/KWQFont.h
+++ b/WebCore/kwq/KWQFont.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,55 +26,14 @@
 #ifndef QFONT_H_
 #define QFONT_H_
 
-#include "KWQString.h"
+#include "KWQFontFamily.h"
 
 #ifdef __OBJC__
 @class NSFont;
- at class NSString;
 #else
 class NSFont;
-class NSString;
 #endif
 
-class KWQFontFamily {
-public:
-    KWQFontFamily();
-    ~KWQFontFamily() { if (_next) _next->deref();  }
-    
-    KWQFontFamily(const KWQFontFamily &);    
-    KWQFontFamily &operator=(const KWQFontFamily &);
-        
-    void setFamily(const QString &);
-    QString family() const { return _family; }
-    bool familyIsEmpty() const { return _family.isEmpty(); }
-    
-    NSString *getNSFamily() const;
-
-    KWQFontFamily *next() { return _next; }
-    const KWQFontFamily *next() const { return _next; }
-
-    void appendFamily(KWQFontFamily *family) 
-    {
-        if (family)
-            family->ref();
-        if (_next) 
-            _next->deref(); 
-        _next = family; 
-    }
-    
-    bool operator==(const KWQFontFamily &) const;
-    bool operator!=(const KWQFontFamily &x) const { return !(*this == x); }
-    
-    void ref() { _refCnt++; }
-    void deref() { _refCnt--; if (_refCnt == 0) delete this; }
-    
-private:
-    QString _family;
-    KWQFontFamily *_next;
-    int _refCnt;
-    mutable NSString *_NSFamily;
-};
-
 class QFont {
 public:
     enum Weight { Normal = 50, Bold = 63 };
@@ -115,32 +74,4 @@ private:
     mutable NSFont *_nsfont;
 };
 
-// Macro to create a stack array containing non-retained NSString names
-// of CSS font families.  This can be used to avoid allocations in
-// performance critical code.  Create a NSSString ** name families
-// and populates with a NSString * for each family name.  Null terminates
-// the array.
-#define CREATE_FAMILY_ARRAY(font,families)\
-int __numFamilies = 0;\
-{\
-    const KWQFontFamily *__ff = (font).firstFamily();\
-    while (__ff)\
-    {\
-        __numFamilies++;\
-        __ff = __ff->next();\
-    }\
-}\
-NSString *families[__numFamilies+1];\
-{\
-    int __i = 0;\
-    const KWQFontFamily *__ff = (font).firstFamily();\
-    while (__ff)\
-    {\
-        families[__i++] = __ff->getNSFamily();\
-        __ff = __ff->next();\
-    }\
-    families[__i] = 0;\
-}
-
-
 #endif
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index 84b2bfa..85c2961 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,72 +28,6 @@
 #import "KWQString.h"
 #import "WebCoreTextRendererFactory.h"
 
-KWQFontFamily::KWQFontFamily()
-    : _next(0)
-    , _refCnt(0)
-    , _NSFamily(0)
-{
-}
-
-KWQFontFamily::KWQFontFamily(const KWQFontFamily& other)
-    : _family(other._family)
-    , _next(other._next)
-    , _refCnt(0)
-    , _NSFamily(other._NSFamily)
-{
-    if (_next)
-        _next->ref();
-}
-
-KWQFontFamily& KWQFontFamily::operator=(const KWQFontFamily& other)
-{
-    if (other._next)
-        other._next->ref();
-    if (_next)
-        _next->deref();
-    _family = other._family;
-    _next = other._next;
-    _NSFamily = other._NSFamily;
-    return *this;
-}
-
-NSString *KWQFontFamily::getNSFamily() const
-{
-    if (!_NSFamily) {
-        // Use an immutable copy of the name, but keep a set of
-        // all family names so we don't end up with too many objects.
-        static CFMutableDictionaryRef families;
-        if (families == NULL) {
-            families = CFDictionaryCreateMutable(NULL, 0, &CFDictionaryQStringKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-        }
-        _NSFamily = (NSString *)CFDictionaryGetValue(families, &_family);
-        if (!_NSFamily) {
-            _NSFamily = _family.getNSString();
-            CFDictionarySetValue(families, &_family, _NSFamily);
-        }
-    }
-    return _NSFamily;
-}
-
-void KWQFontFamily::setFamily(const QString &family)
-{
-    if (family == _family) {
-        return;
-    }
-    _family = family;
-    _NSFamily = nil;
-}
-
-bool KWQFontFamily::operator==(const KWQFontFamily &compareFontFamily) const
-{
-    if ((!_next && compareFontFamily._next) || 
-        (_next && !compareFontFamily._next) ||
-        ((_next && compareFontFamily._next) && (*_next != *(compareFontFamily._next))))
-        return false;
-    
-    return getNSFamily() == compareFontFamily.getNSFamily();
-}
-
 QFont::QFont()
     : _trait(0)
     , _size(12.0)
diff --git a/WebCore/kwq/KWQFont.h b/WebCore/kwq/KWQFontFamily.h
similarity index 74%
copy from WebCore/kwq/KWQFont.h
copy to WebCore/kwq/KWQFontFamily.h
index 833031b..e2c050a 100644
--- a/WebCore/kwq/KWQFont.h
+++ b/WebCore/kwq/KWQFontFamily.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2001 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2002 Apple Computer, Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -23,16 +23,11 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef QFONT_H_
-#define QFONT_H_
-
 #include "KWQString.h"
 
 #ifdef __OBJC__
- at class NSFont;
 @class NSString;
 #else
-class NSFont;
 class NSString;
 #endif
 
@@ -75,45 +70,6 @@ private:
     mutable NSString *_NSFamily;
 };
 
-class QFont {
-public:
-    enum Weight { Normal = 50, Bold = 63 };
-
-    QFont();
-    ~QFont();
-    
-    void setFamily(const QString &);
-    QString family() const;
-
-    const KWQFontFamily *firstFamily() const { return &_family; }
-    KWQFontFamily *firstFamily() { return &_family; }
-    void setFirstFamily(const KWQFontFamily &family);
-    
-    void setWeight(int);
-    int weight() const;
-    bool bold() const;
-
-    void setItalic(bool);
-    bool italic() const;
-
-    void setPixelSize(float s);
-    int pixelSize() const { return (int)_size; }
-
-    bool operator==(const QFont &x) const;
-    bool operator!=(const QFont &x) const { return !(*this == x); }
-    
-    NSString *getNSFamily() const { return _family.getNSFamily(); }
-    int getNSTraits() const { return _trait; }
-    float getNSSize() const { return _size; }
-    
-    NSFont *getNSFont() const;
-
-private:
-    KWQFontFamily _family;
-    int _trait;
-    float _size;
-    mutable NSFont *_nsfont;
-};
 
 // Macro to create a stack array containing non-retained NSString names
 // of CSS font families.  This can be used to avoid allocations in
@@ -141,6 +97,3 @@ NSString *families[__numFamilies+1];\
     }\
     families[__i] = 0;\
 }
-
-
-#endif
diff --git a/WebCore/kwq/KWQFontFamily.mm b/WebCore/kwq/KWQFontFamily.mm
new file mode 100644
index 0000000..3351e7f
--- /dev/null
+++ b/WebCore/kwq/KWQFontFamily.mm
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2001, 2002 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "KWQFontFamily.h"
+
+KWQFontFamily::KWQFontFamily()
+    : _next(0)
+    , _refCnt(0)
+    , _NSFamily(0)
+{
+}
+
+KWQFontFamily::KWQFontFamily(const KWQFontFamily& other)
+    : _family(other._family)
+    , _next(other._next)
+    , _refCnt(0)
+    , _NSFamily(other._NSFamily)
+{
+    if (_next)
+        _next->ref();
+}
+
+KWQFontFamily& KWQFontFamily::operator=(const KWQFontFamily& other)
+{
+    if (other._next)
+        other._next->ref();
+    if (_next)
+        _next->deref();
+    _family = other._family;
+    _next = other._next;
+    _NSFamily = other._NSFamily;
+    return *this;
+}
+
+NSString *KWQFontFamily::getNSFamily() const
+{
+    if (!_NSFamily) {
+        // Use an immutable copy of the name, but keep a set of
+        // all family names so we don't end up with too many objects.
+        static CFMutableDictionaryRef families;
+        if (families == NULL) {
+            families = CFDictionaryCreateMutable(NULL, 0, &CFDictionaryQStringKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+        }
+        _NSFamily = (NSString *)CFDictionaryGetValue(families, &_family);
+        if (!_NSFamily) {
+            _NSFamily = _family.getNSString();
+            CFDictionarySetValue(families, &_family, _NSFamily);
+        }
+    }
+    return _NSFamily;
+}
+
+void KWQFontFamily::setFamily(const QString &family)
+{
+    if (family == _family) {
+        return;
+    }
+    _family = family;
+    _NSFamily = nil;
+}
+
+bool KWQFontFamily::operator==(const KWQFontFamily &compareFontFamily) const
+{
+    if ((!_next && compareFontFamily._next) || 
+        (_next && !compareFontFamily._next) ||
+        ((_next && compareFontFamily._next) && (*_next != *(compareFontFamily._next))))
+        return false;
+    
+    return getNSFamily() == compareFontFamily.getNSFamily();
+}
diff --git a/WebCore/kwq/WebCoreHistory.m b/WebCore/kwq/KWQPageState.h
similarity index 67%
copy from WebCore/kwq/WebCoreHistory.m
copy to WebCore/kwq/KWQPageState.h
index e8199ff..3869aee 100644
--- a/WebCore/kwq/WebCoreHistory.m
+++ b/WebCore/kwq/KWQPageState.h
@@ -25,32 +25,37 @@
 
 #import <Foundation/Foundation.h>
 
-#import "WebCoreHistory.h"
+class KURL;
 
- at implementation WebCoreHistory
-
-static WebCoreHistory *_sharedHistory = nil;
-
-+ (void)setSharedHistory: (WebCoreHistory *)h
-{
-    if (_sharedHistory != h && _sharedHistory != nil)
-        [_sharedHistory release];
-    _sharedHistory = [h retain];
+namespace DOM {
+    class DocumentImpl;
 }
 
-+ (WebCoreHistory *)sharedHistory
-{
-    return _sharedHistory;
+namespace khtml {
+    class RenderObject;
 }
 
-- (void)addEntryForURLString: (NSString *)urlString
-{
+namespace KJS {
+    class SavedProperties;
 }
 
-- (BOOL)containsEntryForURLString: (NSString *)urlString;
+ at interface KWQPageState : NSObject
 {
-    return false;
+    DOM::DocumentImpl *document;
+    KURL *URL;
+    KJS::SavedProperties *windowProperties;
+    KJS::SavedProperties *locationProperties;
+    khtml::RenderObject *docRenderer; 
 }
 
+- initWithDocument:(DOM::DocumentImpl *)doc URL:(const KURL &)u windowProperties:(KJS::SavedProperties *)wp locationProperties:(KJS::SavedProperties *)lp;
+
+- (DOM::DocumentImpl *)document;
+- (KURL *)URL;
+- (KJS::SavedProperties *)windowProperties;
+- (KJS::SavedProperties *)locationProperties;
+- (khtml::RenderObject *)renderer;
+
+- (void)invalidate;
 
 @end
diff --git a/WebCore/kwq/KWQPageState.mm b/WebCore/kwq/KWQPageState.mm
new file mode 100644
index 0000000..aacced7
--- /dev/null
+++ b/WebCore/kwq/KWQPageState.mm
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2002 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import "KWQPageState.h"
+
+#import <JavaScriptCore/property_map.h>
+
+#import "dom_docimpl.h"
+#import "khtmlview.h"
+
+#import "KWQAssertions.h"
+#import "KWQKHTMLPart.h"
+
+using DOM::DocumentImpl;
+
+using KJS::SavedProperties;
+
+ at implementation KWQPageState
+
+- initWithDocument:(DocumentImpl *)doc URL:(const KURL &)u windowProperties:(SavedProperties *)wp locationProperties:(SavedProperties *)lp
+{
+    [super init];
+    doc->ref();
+    document = doc;
+    docRenderer = doc->renderer();
+    document->setInPageCache(YES);
+    URL = new KURL(u);
+    windowProperties = wp;
+    locationProperties = lp;
+    return self;
+}
+
+// Called when the KWQPageState is restored.  It should relinquish ownership
+// of objects to core.
+- (void)invalidate
+{
+    // Should only ever invalidate once.
+    ASSERT(document);
+    
+    document->setInPageCache(NO);
+    document->deref();
+    document = 0;
+
+    delete URL;
+    URL = 0;
+    
+    delete windowProperties;
+    windowProperties = 0;
+    delete locationProperties;
+    locationProperties = 0;
+}
+
+- (void)dealloc
+{
+    if (document) {
+        KHTMLView *view = document->view();
+
+        KWQKHTMLPart::clearTimers(view);
+
+        document->setInPageCache(NO);
+        document->detach();
+        document->deref();
+        
+        view->clearPart();
+        delete view;
+    }
+    
+    delete URL;
+    delete windowProperties;
+    delete locationProperties;
+
+    [super dealloc];
+}
+
+- (DocumentImpl *)document
+{
+    return document;
+}
+
+- (KURL *)URL
+{
+    return URL;
+}
+
+- (SavedProperties *)windowProperties
+{
+    return windowProperties;
+}
+
+- (SavedProperties *)locationProperties
+{
+    return locationProperties;
+}
+
+- (RenderObject *)renderer
+{
+    return docRenderer;
+}
+
+ at end
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 8cf8363..b5d7354 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -25,37 +25,34 @@
 
 #import "WebCoreBridge.h"
 
+#import "csshelper.h"
 #import "dom_node.h"
 #import "dom_docimpl.h"
 #import "dom_nodeimpl.h"
+#import "html_documentimpl.h"
+#import "htmlattrs.h"
+#import "htmltags.h"
 #import "khtml_part.h"
 #import "khtmlview.h"
+#import "loader.h"
 #import "render_frames.h"
 #import "render_image.h"
 #import "render_object.h"
 #import "render_root.h"
 #import "render_style.h"
 
-#import "KWQFont.h"
+#import <JavaScriptCore/property_map.h>
 
 #import "KWQAssertions.h"
-#import "html_documentimpl.h"
-#import "dom_nodeimpl.h"
-#import "htmlattrs.h"
-#import "htmltags.h"
-#import "csshelper.h"
-#import "KWQDOMNode.h"
-#import "WebCoreImageRenderer.h"
-#import "WebCoreTextRendererFactory.h"
 #import "KWQCharsets.h"
+#import "KWQFont.h"
+#import "KWQDOMNode.h"
 #import "KWQFrame.h"
-#import "loader.h"
+#import "KWQPageState.h"
 
 #import "WebCoreDOMPrivate.h"
-
-#import <JavaScriptCore/property_map.h>
-
-using KParts::URLArgs;
+#import "WebCoreImageRenderer.h"
+#import "WebCoreTextRendererFactory.h"
 
 using DOM::DocumentImpl;
 using DOM::Node;
@@ -69,6 +66,8 @@ using khtml::RenderStyle;
 
 using KJS::SavedProperties;
 
+using KParts::URLArgs;
+
 NSString *WebCoreElementFrameKey = 		@"WebElementFrame";
 NSString *WebCoreElementImageAltStringKey = 	@"WebElementImageAltString";
 NSString *WebCoreElementImageKey = 		@"WebElementImage";
@@ -81,23 +80,6 @@ NSString *WebCoreElementLinkTitleKey = 		@"WebElementLinkTitle";
 NSString *WebCoreElementNameKey = 		@"WebElementName";
 NSString *WebCoreElementStringKey = 		@"WebElementString";
 
- at interface KWQPageState : NSObject
-{
-    DocumentImpl *document;
-    KURL *URL;
-    SavedProperties *windowProperties;
-    SavedProperties *locationProperties;
-    RenderObject *docRenderer; 
-}
-- initWithDocument:(DocumentImpl *)doc URL:(const KURL &)u windowProperties:(SavedProperties *)wp locationProperties:(SavedProperties *)lp;
-- (DocumentImpl *)document;
-- (KURL *)URL;
-- (SavedProperties *)windowProperties;
-- (SavedProperties *)locationProperties;
-- (RenderObject *)renderer;
-- (void)invalidate;
- at end
-
 @implementation WebCoreBridge
 
 static bool initializedObjectCacheSize = FALSE;
@@ -681,87 +663,3 @@ static bool initializedObjectCacheSize = FALSE;
 }
 
 @end
-
- at implementation KWQPageState
-
-- initWithDocument:(DocumentImpl *)doc URL:(const KURL &)u windowProperties:(SavedProperties *)wp locationProperties:(SavedProperties *)lp
-{
-    [super init];
-    doc->ref();
-    document = doc;
-    docRenderer = doc->renderer();
-    document->setInPageCache(YES);
-    URL = new KURL(u);
-    windowProperties = wp;
-    locationProperties = lp;
-    return self;
-}
-
-// Called when the KWQPageState is restored.  It should relinquish ownership
-// of objects to core.
-- (void)invalidate
-{
-    // Should only ever invalidate once.
-    ASSERT(document);
-    
-    document->setInPageCache(NO);
-    document->deref();
-    document = 0;
-
-    delete URL;
-    URL = 0;
-    
-    delete windowProperties;
-    windowProperties = 0;
-    delete locationProperties;
-    locationProperties = 0;
-}
-
-- (void)dealloc
-{
-    if (document) {
-        KHTMLView *view = document->view();
-
-        KWQKHTMLPart::clearTimers(view);
-
-        document->setInPageCache(NO);
-        document->detach();
-        document->deref();
-        
-        view->clearPart();
-        delete view;
-    }
-    
-    delete URL;
-    delete windowProperties;
-    delete locationProperties;
-
-    [super dealloc];
-}
-
-- (DocumentImpl *)document
-{
-    return document;
-}
-
-- (KURL *)URL
-{
-    return URL;
-}
-
-- (SavedProperties *)windowProperties
-{
-    return windowProperties;
-}
-
-- (SavedProperties *)locationProperties
-{
-    return locationProperties;
-}
-
-- (RenderObject *)renderer
-{
-    return docRenderer;
-}
-
- at end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list