Bug 120771

Summary: iOS build broke with change to make Mac use PDFKit for PDFDocumentImage
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: PDFAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, beidson
Priority: P2 Keywords: Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch andersca: review+

Description David Kilzer (:ddkilzer) 2013-09-05 06:50:18 PDT
The fix for Bug 120651 ([mac] PDFDocumentImage should use PDFKit to draw) caused in <http://trac.webkit.org/changeset/155069> caused a build failure on iOS because macros used to guard sharedBufferGetBytesAtPosition() are now inconsistent.

In these two files, !PLATFORM(MAC) is used:

Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp
Source/WebCore/platform/graphics/cg/ImageSourceCG.h

In this file, !USE(PDFKIT_FOR_PDFDOCUMENTIMAGE) is used:

Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp

I'm also seeing a new build failure (although I suspect this code wasn't being compiled before):

Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp:67:18: error: comparison o
f integers of different signs: 'off_t' (aka 'long long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
    if (position >= sourceSize)
        ~~~~~~~~ ^  ~~~~~~~~~~
Comment 1 Tim Horton 2013-09-05 09:15:51 PDT
Oh, I see. I never revised that part of the change after Alexey reminded me that PLATFORM(MAC) includes iOS. I'll post a patch.
Comment 2 Tim Horton 2013-09-05 10:31:22 PDT
Created attachment 210632 [details]
patch

This should fix the iOS build by restoring the code that was previously being used there.
This should also work fine on Windows, but I'm going to test on a trybot momentarily.
Comment 3 Tim Horton 2013-09-05 10:58:48 PDT
(In reply to comment #2)
> Created an attachment (id=210632) [details]
> patch
> 
> This should fix the iOS build by restoring the code that was previously being used there.
> This should also work fine on Windows, but I'm going to test on a trybot momentarily.

Looks good on Windows.
Comment 4 Tim Horton 2013-09-05 12:24:35 PDT
http://trac.webkit.org/changeset/155138