Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1072)

Unified Diff: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp

Issue 22465006: pdfviewer: pass the page number, report failure if at least one render fails, and check that xref s… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp (revision 10543)
+++ experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp (working copy)
@@ -225,8 +225,13 @@
}
const unsigned char* SkNativeParsedPDF::readCrossReferenceSection(const unsigned char* xrefStart, const unsigned char* trailerEnd) {
- const unsigned char* current = ignoreLine(xrefStart, trailerEnd); // TODO(edisonn): verify next keyord is "xref", use nextObject here
+ SkPdfObject xref;
+ const unsigned char* current = nextObject(0, xrefStart, trailerEnd, &xref, NULL, NULL);
+ if (!xref.isKeyword("xref")) {
+ return trailerEnd;
+ }
+
SkPdfObject token;
while (current < trailerEnd) {
token.reset();
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698