Diff
Modified: trunk/Source/WebCore/ChangeLog (161065 => 161066)
--- trunk/Source/WebCore/ChangeLog 2013-12-25 14:48:26 UTC (rev 161065)
+++ trunk/Source/WebCore/ChangeLog 2013-12-25 18:58:00 UTC (rev 161066)
@@ -1,3 +1,20 @@
+2013-12-25 David Kilzer <[email protected]>
+
+ [iOS] Upstream WebCore/pdf changes
+ http://webkit.org/b/126097
+
+ Reviewed by Sam Weinig.
+
+ * WebCore.xcodeproj/project.pbxproj: Added files to project.
+ * pdf/ios/PDFDocument.cpp: Added.
+ (WebCore::PDFDocumentParser::create):
+ (WebCore::PDFDocumentParser::document):
+ (WebCore::PDFDocumentParser::PDFDocumentParser):
+ (WebCore::PDFDocument::createParser):
+ * pdf/ios/PDFDocument.h: Added.
+ (WebCore::PDFDocument::create):
+ (WebCore::PDFDocument::PDFDocument):
+
2013-12-24 Commit Queue <[email protected]>
Unreviewed, rolling out r160959.
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (161065 => 161066)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2013-12-25 14:48:26 UTC (rev 161065)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2013-12-25 18:58:00 UTC (rev 161066)
@@ -1779,6 +1779,8 @@
51771C8E182DB4B7008E781E /* IDBDatabaseBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51771C8C182DB4B7008E781E /* IDBDatabaseBackend.cpp */; };
51771C8F182DB4B7008E781E /* IDBDatabaseBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 51771C8D182DB4B7008E781E /* IDBDatabaseBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
517FBA1E151AB17C00B57959 /* DOMWindowExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */; };
+ 51889F0B1554AF3D004427F7 /* PDFDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51889F091554AF3D004427F7 /* PDFDocument.cpp */; };
+ 51889F0C1554AF3D004427F7 /* PDFDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 51889F0A1554AF3D004427F7 /* PDFDocument.h */; };
5189F01D10B37BD900F3C739 /* JSPopStateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */; };
5189F01E10B37BD900F3C739 /* JSPopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5189F01C10B37BD900F3C739 /* JSPopStateEvent.h */; };
5189F0DE10B46B0E00F3C739 /* PopStateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5189F0DD10B46B0E00F3C739 /* PopStateEvent.cpp */; };
@@ -8546,6 +8548,8 @@
51771C8D182DB4B7008E781E /* IDBDatabaseBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackend.h; sourceTree = "<group>"; };
517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowExtension.cpp; sourceTree = "<group>"; };
517FBA18151AA71B00B57959 /* DOMWindowExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowExtension.h; sourceTree = "<group>"; };
+ 51889F091554AF3D004427F7 /* PDFDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PDFDocument.cpp; sourceTree = "<group>"; };
+ 51889F0A1554AF3D004427F7 /* PDFDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDFDocument.h; sourceTree = "<group>"; };
5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPopStateEvent.cpp; sourceTree = "<group>"; };
5189F01C10B37BD900F3C739 /* JSPopStateEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPopStateEvent.h; sourceTree = "<group>"; };
5189F0DD10B46B0E00F3C739 /* PopStateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PopStateEvent.cpp; sourceTree = "<group>"; };
@@ -14022,6 +14026,7 @@
BCB16BFB0979C38700467741 /* loader */,
FABE72EC1059C1EB00D999DD /* mathml */,
65BF02180974806300C43196 /* page */,
+ 51889F071554AF3D004427F7 /* pdf */,
BCF1A5BA097832090061A123 /* platform */,
5DCF83690D59157800953BC6 /* plugins */,
F523D2F302DE443B018635CA /* rendering */,
@@ -15368,6 +15373,23 @@
tabWidth = 4;
usesTabs = 0;
};
+ 51889F071554AF3D004427F7 /* pdf */ = {
+ isa = PBXGroup;
+ children = (
+ 51889F081554AF3D004427F7 /* ios */,
+ );
+ path = pdf;
+ sourceTree = "<group>";
+ };
+ 51889F081554AF3D004427F7 /* ios */ = {
+ isa = PBXGroup;
+ children = (
+ 51889F091554AF3D004427F7 /* PDFDocument.cpp */,
+ 51889F0A1554AF3D004427F7 /* PDFDocument.h */,
+ );
+ path = ios;
+ sourceTree = "<group>";
+ };
59B5977111086556007159E8 /* jsc */ = {
isa = PBXGroup;
children = (
@@ -24317,6 +24339,7 @@
A88DD4870B4629A300C02990 /* PathTraversalState.h in Headers */,
A8FA6E5D0E4CFDED00D5CF49 /* Pattern.h in Headers */,
B22279710D00BF220071B782 /* PatternAttributes.h in Headers */,
+ 51889F0C1554AF3D004427F7 /* PDFDocument.h in Headers */,
B27535650B053814002CE64F /* PDFDocumentImage.h in Headers */,
8A7CC96B12076D73001D4588 /* PendingScript.h in Headers */,
070363E6181A1CDC00C074A5 /* AVVideoCaptureSource.h in Headers */,
@@ -27643,6 +27666,7 @@
A88DD4890B4629B000C02990 /* PathTraversalState.cpp in Sources */,
A8FA6E5E0E4CFDED00D5CF49 /* Pattern.cpp in Sources */,
A80A38FE0E50CC8200A25EBC /* PatternCG.cpp in Sources */,
+ 51889F0B1554AF3D004427F7 /* PDFDocument.cpp in Sources */,
B27535640B053814002CE64F /* PDFDocumentImage.cpp in Sources */,
8A7CC97012076F8A001D4588 /* PendingScript.cpp in Sources */,
E526AF3F1727F8F200E41781 /* Performance.cpp in Sources */,
Added: trunk/Source/WebCore/pdf/ios/PDFDocument.cpp (0 => 161066)
--- trunk/Source/WebCore/pdf/ios/PDFDocument.cpp (rev 0)
+++ trunk/Source/WebCore/pdf/ios/PDFDocument.cpp 2013-12-25 18:58:00 UTC (rev 161066)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2012 Apple 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 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 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 "config.h"
+#include "PDFDocument.h"
+
+#if PLATFORM(IOS)
+
+#include "RawDataDocumentParser.h"
+
+namespace WebCore {
+
+class PDFDocumentParser : public RawDataDocumentParser {
+public:
+ static PassRefPtr<PDFDocumentParser> create(PDFDocument& document)
+ {
+ return adoptRef(new PDFDocumentParser(document));
+ }
+
+ PDFDocument* document() const
+ {
+ return static_cast<PDFDocument*>(RawDataDocumentParser::document());
+ }
+
+private:
+ PDFDocumentParser(PDFDocument& document)
+ : RawDataDocumentParser(document)
+ {
+ }
+
+ virtual void appendBytes(DocumentWriter&, const char*, size_t) OVERRIDE
+ {
+ // Ignore all calls
+ }
+};
+
+
+//------------
+
+PassRefPtr<DocumentParser> PDFDocument::createParser()
+{
+ return PDFDocumentParser::create(*this);
+}
+
+} // namespace WebCore
+
+#endif // PLATFORM(IOS)
Added: trunk/Source/WebCore/pdf/ios/PDFDocument.h (0 => 161066)
--- trunk/Source/WebCore/pdf/ios/PDFDocument.h (rev 0)
+++ trunk/Source/WebCore/pdf/ios/PDFDocument.h 2013-12-25 18:58:00 UTC (rev 161066)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2012 Apple 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,
+ * 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.
+ */
+
+#ifndef PDFDocument_h
+#define PDFDocument_h
+
+#if PLATFORM(IOS)
+
+#include "PlaceholderDocument.h"
+
+namespace WebCore {
+
+class PDFDocument : public PlaceholderDocument {
+public:
+ static PassRefPtr<PDFDocument> create(Frame* frame, const URL& url)
+ {
+ return adoptRef(new PDFDocument(frame, url));
+ }
+private:
+ PDFDocument(Frame* frame, const URL& url)
+ : PlaceholderDocument(frame, url)
+ {
+ }
+
+ virtual PassRefPtr<DocumentParser> createParser() OVERRIDE;
+};
+
+}
+
+#endif // PLATFORM(IOS)
+
+#endif // PDFDocument_h