Bug 120771 - iOS build broke with change to make Mac use PDFKit for PDFDocumentImage
Summary: iOS build broke with change to make Mac use PDFKit for PDFDocumentImage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: PDF (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2013-09-05 06:50 PDT by David Kilzer (:ddkilzer)
Modified: 2013-09-05 12:24 PDT (History)
2 users (show)

See Also:


Attachments
patch (2.33 KB, patch)
2013-09-05 10:31 PDT, Tim Horton
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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