Chromium Code Reviews

Issue 376083002: Export a function from the PDF plugin to get the dimensions of a PDF page. (Closed)

Created:
6 years, 5 months ago by ivandavid
Modified:
6 years, 5 months ago
Reviewers:
Lei Zhang, Dan Beam
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Added GetPDFPageSizeByIndex to expose FPDF_GetPageSizeByIndex. The function outputs the width and height, in points, of a given PDF document page. BUG=388517 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282300

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fixed merge problem that accidentally deleted code. Refactored GetPDFPageSizeByIndex. #

Patch Set 3 : Rewrote GetPDFPageSizeByIndex. Added comments about how the function works. #

Patch Set 4 : Redid comments to conform to the style of existing comment. Rename parameters for same reason. #

Total comments: 7

Patch Set 5 : Fixed typo in comments. Moved all the comments over to pdf_engine.h. #

Total comments: 5

Patch Set 6 : Fixed comments and a typo. #

Total comments: 6
Unified diffs Side-by-side diffs Stats (+66 lines, -10 lines)
M pdf/pdf.cc View 2 chunks +41 lines, -10 lines 5 comments
M pdf/pdf_engine.h View 1 chunk +6 lines, -0 lines 1 comment
M pdf/pdfium/pdfium_engine.h View 1 chunk +5 lines, -0 lines 0 comments
M pdf/pdfium/pdfium_engine.cc View 1 chunk +14 lines, -0 lines 0 comments

Messages

Total messages: 20 (0 generated)
ivandavid
6 years, 5 months ago (2014-07-09 01:36:43 UTC) #1
Dan Beam
see comments on original CL: https://codereview.chromium.org/335583004/#msg53
6 years, 5 months ago (2014-07-09 02:10:36 UTC) #2
Lei Zhang
Please change the CL description to what this CL actually does. https://codereview.chromium.org/376083002/diff/1/pdf/libpdf.map File pdf/libpdf.map (right): ...
6 years, 5 months ago (2014-07-09 02:10:48 UTC) #3
ivandavid
I added comments to document the behavior of the function. I also renamed the parameters ...
6 years, 5 months ago (2014-07-09 21:28:50 UTC) #4
Lei Zhang
Can you rewrite the CL description to avoid using the past tense? "Added a function ...
6 years, 5 months ago (2014-07-09 21:59:51 UTC) #5
Dan Beam
lgtm https://codereview.chromium.org/376083002/diff/60001/pdf/pdf.cc File pdf/pdf.cc (right): https://codereview.chromium.org/376083002/diff/60001/pdf/pdf.cc#newcode210 pdf/pdf.cc:210: // Returns false if the document or the ...
6 years, 5 months ago (2014-07-09 22:18:22 UTC) #6
ivandavid
I fixed the typo and I moved all the comments over to pdf_engine.h PDFEngineExports to ...
6 years, 5 months ago (2014-07-09 22:53:40 UTC) #7
Lei Zhang
lgtm with a proper commit message in the description field.
6 years, 5 months ago (2014-07-09 22:58:13 UTC) #8
Dan Beam
not lgtm until i understand what's going on in pdfium_engine.h https://codereview.chromium.org/376083002/diff/110001/pdf/pdf_engine.h File pdf/pdf_engine.h (right): https://codereview.chromium.org/376083002/diff/110001/pdf/pdf_engine.h#newcode302 ...
6 years, 5 months ago (2014-07-09 23:18:24 UTC) #9
Lei Zhang
You guys are confusing the exported function with the internal implementation. e.g. RenderPDFPageToDC in pdf.cc ...
6 years, 5 months ago (2014-07-09 23:29:23 UTC) #10
ivandavid
Everything is back to how it was. I changed pdf_buffer to |pdf_buffer| and I shifted ...
6 years, 5 months ago (2014-07-10 00:59:47 UTC) #11
Lei Zhang
Still lgtm
6 years, 5 months ago (2014-07-10 01:32:27 UTC) #12
Dan Beam
lgtm https://codereview.chromium.org/376083002/diff/90005/pdf/pdf.cc File pdf/pdf.cc (right): https://codereview.chromium.org/376083002/diff/90005/pdf/pdf.cc#newcode121 pdf/pdf.cc:121: // value is -1, the dpi from the ...
6 years, 5 months ago (2014-07-10 02:19:59 UTC) #13
ivandavid
The CQ bit was checked by ivandavid@chromium.org
6 years, 5 months ago (2014-07-10 02:49:44 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ivandavid@chromium.org/376083002/90005
6 years, 5 months ago (2014-07-10 02:52:15 UTC) #15
Dan Beam
On 2014/07/10 02:49:44, ivandavid wrote: > The CQ bit was checked by mailto:ivandavid@chromium.org Generally you ...
6 years, 5 months ago (2014-07-10 02:59:06 UTC) #16
ivandavid
On 2014/07/10 02:59:06, Dan Beam wrote: > On 2014/07/10 02:49:44, ivandavid wrote: > > The ...
6 years, 5 months ago (2014-07-10 03:03:51 UTC) #17
Dan Beam
On 2014/07/10 03:03:51, ivandavid wrote: > On 2014/07/10 02:59:06, Dan Beam wrote: > > On ...
6 years, 5 months ago (2014-07-10 03:42:38 UTC) #18
Dan Beam
btw: the only real reason i ask you revert these is that it messes with ...
6 years, 5 months ago (2014-07-10 03:43:47 UTC) #19
commit-bot: I haz the power
6 years, 5 months ago (2014-07-10 10:57:55 UTC) #20
Message was sent while issue was closed.
Change committed as 282300

Powered by Google App Engine