+2014-08-31 Tim Horton <timothy_horton@apple.com>
+
+ Use SinkDocument instead of PDFDocument; get rid of PDFDocument
+ https://bugs.webkit.org/show_bug.cgi?id=136414
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * loader/DocumentWriter.cpp:
+ (WebCore::DocumentWriter::createDocument):
+ * pdf/ios/PDFDocument.cpp: Removed.
+ * pdf/ios/PDFDocument.h: Removed.
+ Use the generic SinkDocument, which ignores all incoming data just like PDFDocument.
+ Delete the unnecessary and iOS-specific PDFDocument.cpp/h
+
2014-08-31 Tim Horton <timothy_horton@apple.com>
Adjust an antique comment in Image::drawPattern
5179CE36195CAC7E0019C198 /* HIDGamepadProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5179CE34195CAC7E0019C198 /* HIDGamepadProvider.cpp */; };
5179CE37195CAC7E0019C198 /* HIDGamepadProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 5179CE35195CAC7E0019C198 /* HIDGamepadProvider.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 */; };
5179CE35195CAC7E0019C198 /* HIDGamepadProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HIDGamepadProvider.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>"; };
BCB16BFB0979C38700467741 /* loader */,
FABE72EC1059C1EB00D999DD /* mathml */,
65BF02180974806300C43196 /* page */,
- 51889F071554AF3D004427F7 /* pdf */,
BCF1A5BA097832090061A123 /* platform */,
5DCF83690D59157800953BC6 /* plugins */,
F523D2F302DE443B018635CA /* rendering */,
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>";
- };
518F4FE9194CA4B60081BAAE /* gamepad */ = {
isa = PBXGroup;
children = (
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 */,
8A844D0511D3C18E0014065C /* Performance.h in Headers */,
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 */,
2D6E468417D660F500ECF8BB /* PDFDocumentImageMac.mm in Sources */,
8A7CC97012076F8A001D4588 /* PendingScript.cpp in Sources */,
#include "TextResourceDecoder.h"
#include <wtf/Ref.h>
-#if PLATFORM(IOS)
-#include "PDFDocument.h"
-#endif
-
namespace WebCore {
static inline bool canReferToParentFrameEncoding(const Frame* frame, const Frame* parentFrame)
return PluginDocument::create(m_frame, url);
#if PLATFORM(IOS)
if (MIMETypeRegistry::isPDFMIMEType(m_mimeType) && (m_frame->isMainFrame() || !m_frame->settings().useImageDocumentForSubframePDF()))
- return PDFDocument::create(m_frame, url);
+ return SinkDocument::create(m_frame, url);
#endif
if (!m_frame->loader().client().hasHTMLView())
return Document::createNonRenderedPlaceholder(m_frame, url);
+++ /dev/null
-/*
- * 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)
+++ /dev/null
-/*
- * 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,
- * 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 "Document.h"
-
-namespace WebCore {
-
-class PDFDocument : public Document {
-public:
- static PassRefPtr<PDFDocument> create(Frame* frame, const URL& url)
- {
- return adoptRef(new PDFDocument(frame, url));
- }
-private:
- PDFDocument(Frame* frame, const URL& url)
- : Document(frame, url, DefaultDocumentClass, NonRenderedPlaceholder)
- {
- }
-
- virtual PassRefPtr<DocumentParser> createParser() override;
-};
-
-}
-
-#endif // PLATFORM(IOS)
-
-#endif // PDFDocument_h