[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:54:52 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ba578cc917a31c059dce618e66205b5e6ac04b6b
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 1 00:11:34 2002 +0000
Added document source .
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/khtml/html/html_headimpl.cpp b/WebCore/khtml/html/html_headimpl.cpp
index 6bc329b..6965c7b 100644
--- a/WebCore/khtml/html/html_headimpl.cpp
+++ b/WebCore/khtml/html/html_headimpl.cpp
@@ -149,8 +149,8 @@ void HTMLLinkElementImpl::attach()
void HTMLLinkElementImpl::detach()
{
// RJW: Why is this done here?
- if ( sheet() )
- getDocument()->createSelector();
+ //if ( sheet() )
+ // getDocument()->createSelector();
HTMLElementImpl::detach();
}
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index bb29342..4d66cb6 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -109,32 +109,15 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
- (void)WCURLHandle:(id)sender resourceDataDidBecomeAvailable:(NSData *)data offset:(int)offset length:(int)length userData:(void *)userData
{
- NSArray *byteBlocks;
char *bytes;
- int byteBlockCount;
- id object;
- id <WCByteBlock> byteBlock;
if (!m_data) {
m_data = [data retain];
}
-
- byteBlocks = nil;
- if ([data respondsToSelector:@selector(byteBlocksForRange:)]) {
- object = data;
- byteBlocks = [object byteBlocksForRange:NSMakeRange(offset, length)];
- }
- if (byteBlocks) {
- byteBlockCount = [byteBlocks count];
- for (int i = 0; i < byteBlockCount; i++) {
- byteBlock = [byteBlocks objectAtIndex:i];
- m_part->slotData(sender, (const char *)[byteBlock bytes], [byteBlock byteLength]);
- }
- }
- else {
- bytes = ((char *)[data bytes]) + offset;
- m_part->slotData(sender, (const char *)bytes, length);
- }
+
+ bytes = ((char *)[data bytes]) + offset;
+
+ m_part->slotData(sender, (const char *)bytes, length);
}
- (void)WCURLHandle:(id)sender resourceDidFailLoadingWithResult:(int)result userData:(void *)userData
@@ -190,6 +173,7 @@ public:
QString m_strSelectedURL;
QString m_referrer;
+ QString m_documentSource;
bool m_bMousePressed;
DOM::Node m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
@@ -232,6 +216,8 @@ public:
m_onlyLocalReferences = 0;
m_frameNameId = 1;
+
+ m_documentSource = "";
}
~KHTMLPartPrivate()
@@ -421,7 +407,7 @@ void KHTMLPart::setJScriptEnabled( bool enable )
bool KHTMLPart::jScriptEnabled() const
{
- _logNotYetImplemented();
+ //_logNotYetImplemented();
return TRUE;
}
@@ -651,8 +637,16 @@ void KHTMLPart::write(const char *str, int len)
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
totalWriteTime += thisTime;
- KWQDEBUGLEVEL3 (0x200, "tokenize/parse length = %d, milliseconds = %e, total = %e\n", len, thisTime, totalWriteTime);
+ KWQDEBUGLEVEL3 (0x200, "tokenize/parse length = %d, milliseconds = %f, total = %f\n", len, thisTime, totalWriteTime);
#endif
+
+ d->m_documentSource += str;
+}
+
+
+QString KHTMLPart::documentSource()
+{
+ return d->m_documentSource;
}
@@ -669,6 +663,7 @@ void KHTMLPart::write( const QString &str )
Tokenizer* t = d->m_doc->tokenizer();
if(t)
t->write( str, true );
+ d->m_documentSource += str;
}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index bb29342..4d66cb6 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -109,32 +109,15 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
- (void)WCURLHandle:(id)sender resourceDataDidBecomeAvailable:(NSData *)data offset:(int)offset length:(int)length userData:(void *)userData
{
- NSArray *byteBlocks;
char *bytes;
- int byteBlockCount;
- id object;
- id <WCByteBlock> byteBlock;
if (!m_data) {
m_data = [data retain];
}
-
- byteBlocks = nil;
- if ([data respondsToSelector:@selector(byteBlocksForRange:)]) {
- object = data;
- byteBlocks = [object byteBlocksForRange:NSMakeRange(offset, length)];
- }
- if (byteBlocks) {
- byteBlockCount = [byteBlocks count];
- for (int i = 0; i < byteBlockCount; i++) {
- byteBlock = [byteBlocks objectAtIndex:i];
- m_part->slotData(sender, (const char *)[byteBlock bytes], [byteBlock byteLength]);
- }
- }
- else {
- bytes = ((char *)[data bytes]) + offset;
- m_part->slotData(sender, (const char *)bytes, length);
- }
+
+ bytes = ((char *)[data bytes]) + offset;
+
+ m_part->slotData(sender, (const char *)bytes, length);
}
- (void)WCURLHandle:(id)sender resourceDidFailLoadingWithResult:(int)result userData:(void *)userData
@@ -190,6 +173,7 @@ public:
QString m_strSelectedURL;
QString m_referrer;
+ QString m_documentSource;
bool m_bMousePressed;
DOM::Node m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
@@ -232,6 +216,8 @@ public:
m_onlyLocalReferences = 0;
m_frameNameId = 1;
+
+ m_documentSource = "";
}
~KHTMLPartPrivate()
@@ -421,7 +407,7 @@ void KHTMLPart::setJScriptEnabled( bool enable )
bool KHTMLPart::jScriptEnabled() const
{
- _logNotYetImplemented();
+ //_logNotYetImplemented();
return TRUE;
}
@@ -651,8 +637,16 @@ void KHTMLPart::write(const char *str, int len)
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
totalWriteTime += thisTime;
- KWQDEBUGLEVEL3 (0x200, "tokenize/parse length = %d, milliseconds = %e, total = %e\n", len, thisTime, totalWriteTime);
+ KWQDEBUGLEVEL3 (0x200, "tokenize/parse length = %d, milliseconds = %f, total = %f\n", len, thisTime, totalWriteTime);
#endif
+
+ d->m_documentSource += str;
+}
+
+
+QString KHTMLPart::documentSource()
+{
+ return d->m_documentSource;
}
@@ -669,6 +663,7 @@ void KHTMLPart::write( const QString &str )
Tokenizer* t = d->m_doc->tokenizer();
if(t)
t->write( str, true );
+ d->m_documentSource += str;
}
diff --git a/WebCore/kwq/KWQString.h b/WebCore/kwq/KWQString.h
index 46878ff..91966b1 100644
--- a/WebCore/kwq/KWQString.h
+++ b/WebCore/kwq/KWQString.h
@@ -61,9 +61,9 @@
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
#define QSTRING_TO_NSSTRING(aString) \
- (NSString *)(aString.getCFMutableString())
+ [[(NSString *)(aString.getCFMutableString()) retain] autorelease]
#define QSTRING_TO_NSSTRING_LENGTH(aString,l) \
- [(NSString *)(aString.getCFMutableString()) substringToIndex: l]
+ [[[(NSString *)(aString.getCFMutableString()) substringToIndex: l] retain] autorelease]
#define NSSTRING_TO_QSTRING(aString) \
QString::fromCFMutableString((CFMutableStringRef)aString)
#endif
diff --git a/WebCore/kwq/qt/qstring.h b/WebCore/kwq/qt/qstring.h
index 46878ff..91966b1 100644
--- a/WebCore/kwq/qt/qstring.h
+++ b/WebCore/kwq/qt/qstring.h
@@ -61,9 +61,9 @@
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
#define QSTRING_TO_NSSTRING(aString) \
- (NSString *)(aString.getCFMutableString())
+ [[(NSString *)(aString.getCFMutableString()) retain] autorelease]
#define QSTRING_TO_NSSTRING_LENGTH(aString,l) \
- [(NSString *)(aString.getCFMutableString()) substringToIndex: l]
+ [[[(NSString *)(aString.getCFMutableString()) substringToIndex: l] retain] autorelease]
#define NSSTRING_TO_QSTRING(aString) \
QString::fromCFMutableString((CFMutableStringRef)aString)
#endif
diff --git a/WebCore/src/kdelibs/khtml/html/html_headimpl.cpp b/WebCore/src/kdelibs/khtml/html/html_headimpl.cpp
index 6bc329b..6965c7b 100644
--- a/WebCore/src/kdelibs/khtml/html/html_headimpl.cpp
+++ b/WebCore/src/kdelibs/khtml/html/html_headimpl.cpp
@@ -149,8 +149,8 @@ void HTMLLinkElementImpl::attach()
void HTMLLinkElementImpl::detach()
{
// RJW: Why is this done here?
- if ( sheet() )
- getDocument()->createSelector();
+ //if ( sheet() )
+ // getDocument()->createSelector();
HTMLElementImpl::detach();
}
diff --git a/WebCore/src/kwq/KWQKHTMLPart.h b/WebCore/src/kwq/KWQKHTMLPart.h
index b190c9d..185fded 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.h
+++ b/WebCore/src/kwq/KWQKHTMLPart.h
@@ -580,6 +580,8 @@ public:
#ifdef _KWQ_
+ QString documentSource();
+
void init();
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
void slotData(id handle, const char *bytes, int length);
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index bb29342..4d66cb6 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -109,32 +109,15 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
- (void)WCURLHandle:(id)sender resourceDataDidBecomeAvailable:(NSData *)data offset:(int)offset length:(int)length userData:(void *)userData
{
- NSArray *byteBlocks;
char *bytes;
- int byteBlockCount;
- id object;
- id <WCByteBlock> byteBlock;
if (!m_data) {
m_data = [data retain];
}
-
- byteBlocks = nil;
- if ([data respondsToSelector:@selector(byteBlocksForRange:)]) {
- object = data;
- byteBlocks = [object byteBlocksForRange:NSMakeRange(offset, length)];
- }
- if (byteBlocks) {
- byteBlockCount = [byteBlocks count];
- for (int i = 0; i < byteBlockCount; i++) {
- byteBlock = [byteBlocks objectAtIndex:i];
- m_part->slotData(sender, (const char *)[byteBlock bytes], [byteBlock byteLength]);
- }
- }
- else {
- bytes = ((char *)[data bytes]) + offset;
- m_part->slotData(sender, (const char *)bytes, length);
- }
+
+ bytes = ((char *)[data bytes]) + offset;
+
+ m_part->slotData(sender, (const char *)bytes, length);
}
- (void)WCURLHandle:(id)sender resourceDidFailLoadingWithResult:(int)result userData:(void *)userData
@@ -190,6 +173,7 @@ public:
QString m_strSelectedURL;
QString m_referrer;
+ QString m_documentSource;
bool m_bMousePressed;
DOM::Node m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
@@ -232,6 +216,8 @@ public:
m_onlyLocalReferences = 0;
m_frameNameId = 1;
+
+ m_documentSource = "";
}
~KHTMLPartPrivate()
@@ -421,7 +407,7 @@ void KHTMLPart::setJScriptEnabled( bool enable )
bool KHTMLPart::jScriptEnabled() const
{
- _logNotYetImplemented();
+ //_logNotYetImplemented();
return TRUE;
}
@@ -651,8 +637,16 @@ void KHTMLPart::write(const char *str, int len)
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
totalWriteTime += thisTime;
- KWQDEBUGLEVEL3 (0x200, "tokenize/parse length = %d, milliseconds = %e, total = %e\n", len, thisTime, totalWriteTime);
+ KWQDEBUGLEVEL3 (0x200, "tokenize/parse length = %d, milliseconds = %f, total = %f\n", len, thisTime, totalWriteTime);
#endif
+
+ d->m_documentSource += str;
+}
+
+
+QString KHTMLPart::documentSource()
+{
+ return d->m_documentSource;
}
@@ -669,6 +663,7 @@ void KHTMLPart::write( const QString &str )
Tokenizer* t = d->m_doc->tokenizer();
if(t)
t->write( str, true );
+ d->m_documentSource += str;
}
diff --git a/WebCore/src/kwq/qt/qstring.h b/WebCore/src/kwq/qt/qstring.h
index 46878ff..91966b1 100644
--- a/WebCore/src/kwq/qt/qstring.h
+++ b/WebCore/src/kwq/qt/qstring.h
@@ -61,9 +61,9 @@
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
#define QSTRING_TO_NSSTRING(aString) \
- (NSString *)(aString.getCFMutableString())
+ [[(NSString *)(aString.getCFMutableString()) retain] autorelease]
#define QSTRING_TO_NSSTRING_LENGTH(aString,l) \
- [(NSString *)(aString.getCFMutableString()) substringToIndex: l]
+ [[[(NSString *)(aString.getCFMutableString()) substringToIndex: l] retain] autorelease]
#define NSSTRING_TO_QSTRING(aString) \
QString::fromCFMutableString((CFMutableStringRef)aString)
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list