[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
mitz at apple.com
mitz at apple.com
Fri Feb 26 22:18:55 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 6e3c5dbbcdbcbfa493d4d4606c492ebc1d9c5b79
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 12 19:43:13 2010 +0000
<rdar://problem/7615234> REGRESSION (r48586): Loading an HTML page causes
PDFKit to be loaded
Reviewed by Darin Adler.
* WebView/WebPDFDocumentExtras.h: Removed the category declaration and
addWebPDFDocumentExtras(). Declare allScriptsInPDFDocument().
* WebView/WebPDFDocumentExtras.mm:
(allScriptsInPDFDocument): Changed the -_web_allScripts method into this function.
* WebView/WebPDFRepresentation.mm: Removed +initialize.
(-[WebPDFRepresentation finishedLoadingWithDataSource:]): Use
allScriptsInPDFDocument() instead of -_web_allScripts.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 5e6271a..b545a40 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,18 @@
+2010-02-12 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7615234> REGRESSION (r48586): Loading an HTML page causes
+ PDFKit to be loaded
+
+ * WebView/WebPDFDocumentExtras.h: Removed the category declaration and
+ addWebPDFDocumentExtras(). Declare allScriptsInPDFDocument().
+ * WebView/WebPDFDocumentExtras.mm:
+ (allScriptsInPDFDocument): Changed the -_web_allScripts method into this function.
+ * WebView/WebPDFRepresentation.mm: Removed +initialize.
+ (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Use
+ allScriptsInPDFDocument() instead of -_web_allScripts.
+
2010-02-10 Geoffrey Garen <ggaren at apple.com>
Reviewed by Oliver Hunt.
diff --git a/WebKit/mac/WebView/WebPDFDocumentExtras.h b/WebKit/mac/WebView/WebPDFDocumentExtras.h
index 5a33ccf..0dce43e 100644
--- a/WebKit/mac/WebView/WebPDFDocumentExtras.h
+++ b/WebKit/mac/WebView/WebPDFDocumentExtras.h
@@ -23,10 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <PDFKit/PDFDocument.h>
+ at class PDFDocument;
- at interface PDFDocument (WebPDFDocumentExtras)
-- (NSArray *)_web_allScripts;
- at end
-
-void addWebPDFDocumentExtras(Class);
+NSArray *allScriptsInPDFDocument(PDFDocument *);
diff --git a/WebKit/mac/WebView/WebPDFDocumentExtras.mm b/WebKit/mac/WebView/WebPDFDocumentExtras.mm
index ec580ec..b7043df 100644
--- a/WebKit/mac/WebView/WebPDFDocumentExtras.mm
+++ b/WebKit/mac/WebView/WebPDFDocumentExtras.mm
@@ -68,10 +68,10 @@ static void getAllValuesInPDFNameTree(CGPDFDictionaryRef tree, Vector<CGPDFObjec
appendValuesInPDFNameSubtreeToVector(tree, allValues);
}
-static NSArray *web_PDFDocumentAllScripts(id self, SEL _cmd)
+NSArray *allScriptsInPDFDocument(PDFDocument *document)
{
NSMutableArray *scripts = [NSMutableArray array];
- CGPDFDocumentRef pdfDocument = [self documentRef];
+ CGPDFDocumentRef pdfDocument = [document documentRef];
if (!pdfDocument)
return scripts;
@@ -129,13 +129,3 @@ static NSArray *web_PDFDocumentAllScripts(id self, SEL _cmd)
return scripts;
}
-
-void addWebPDFDocumentExtras(Class pdfDocumentClass)
-{
-#ifndef BUILDING_ON_TIGER
- class_addMethod(pdfDocumentClass, @selector(_web_allScripts), (IMP)web_PDFDocumentAllScripts, "@@:");
-#else
- static struct objc_method_list methodList = { 0, 1, { @selector(_web_allScripts), (char*)"@@:", (IMP)web_PDFDocumentAllScripts } };
- class_addMethods(pdfDocumentClass, &methodList);
-#endif
-}
diff --git a/WebKit/mac/WebView/WebPDFRepresentation.mm b/WebKit/mac/WebView/WebPDFRepresentation.mm
index 924bda8..36449f3 100644
--- a/WebKit/mac/WebView/WebPDFRepresentation.mm
+++ b/WebKit/mac/WebView/WebPDFRepresentation.mm
@@ -70,16 +70,6 @@
return PDFDocumentClass;
}
-+ (void)initialize
-{
- if (self != [WebPDFRepresentation class])
- return;
-
- Class pdfDocumentClass = [self PDFDocumentClass];
- if (pdfDocumentClass)
- addWebPDFDocumentExtras(pdfDocumentClass);
-}
-
- (void)setDataSource:(WebDataSource *)dataSource;
{
}
@@ -136,7 +126,7 @@
PDFDocument *doc = [[[[self class] PDFDocumentClass] alloc] initWithData:data];
[view setPDFDocument:doc];
- NSArray *scripts = [doc _web_allScripts];
+ NSArray *scripts = allScriptsInPDFDocument(doc);
[doc release];
doc = nil;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list