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

Issue 2239853002: Hidden annotations should not be drawn (Closed)

Created:
4 years, 4 months ago by tonikitoo
Modified:
4 years, 4 months ago
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Hidden annotations should not be drawn Now that PDFium supports drawing of more annotation types, it should also respect the "hidden" flag that annotations might feature. For instance, in IE/Acroread if an annotation is flagged as "hidden" it does not get drawn. CL adds a check for the specific "hidden" flag, not drawing annotation that are flagged with it, in order to match IE + acrobat reader behavior. The "flags" definition can be seen by looking at "/F {value}" syntax in a PDF file source, where {value} is an predefined integer value. Test: PDF files being added in [1]. [1] https://codereview.chromium.org/2239713003/ BUG=62625 Committed: https://pdfium.googlesource.com/pdfium/+/66c26e84e6e154f0466db6fce4f3f36d445c579a

Patch Set 1 #

Total comments: 2

Patch Set 2 : Hidden annotations should not be drawn #

Patch Set 3 : Hidden annotations should not be drawn #

Patch Set 4 : Hidden annotations should not be drawn #

Total comments: 1

Patch Set 5 : Hidden annotations should not be drawn #

Total comments: 4

Patch Set 6 : Hidden annotations should not be drawn #

Total comments: 4

Patch Set 7 : Hidden annotations should not be drawn #

Total comments: 1

Patch Set 8 : addressed thestig@ feedback #

Patch Set 9 : roll testing/corpus DEPS #

Total comments: 1

Patch Set 10 : attempt to fix MSVC bots. #

Patch Set 11 : roll testing/corpus DEPS (take 2) #

Patch Set 12 : Suppressing failing tests on Mac #

Patch Set 13 : Factor out the duplicated logic in Field::SetDisplay #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -68 lines) Patch
M fpdfsdk/javascript/Field.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +48 lines, -68 lines 0 comments Download

Messages

Total messages: 79 (31 generated)
tonikitoo
PTAL (tests are being added here: https://codereview.chromium.org/2239713003)
4 years, 4 months ago (2016-08-11 21:12:14 UTC) #3
tonikitoo
4 years, 4 months ago (2016-08-11 21:21:13 UTC) #4
tonikitoo
On 2016/08/11 21:21:13, tonikitoo1 wrote: To compare the behavior of PDFium and IE/Acroread, load this ...
4 years, 4 months ago (2016-08-11 21:23:48 UTC) #5
Tom Sepez
Looks OK, but deferring to others. Thanks.
4 years, 4 months ago (2016-08-11 21:28:47 UTC) #6
jaepark
https://codereview.chromium.org/2239853002/diff/1/core/fpdfdoc/cpvt_generateap.cpp File core/fpdfdoc/cpvt_generateap.cpp (right): https://codereview.chromium.org/2239853002/diff/1/core/fpdfdoc/cpvt_generateap.cpp#newcode626 core/fpdfdoc/cpvt_generateap.cpp:626: Wouldn't the annotation still be drawn if it has ...
4 years, 4 months ago (2016-08-11 21:39:21 UTC) #7
tonikitoo
On 2016/08/11 21:39:21, jaepark wrote: > https://codereview.chromium.org/2239853002/diff/1/core/fpdfdoc/cpvt_generateap.cpp > File core/fpdfdoc/cpvt_generateap.cpp (right): > > https://codereview.chromium.org/2239853002/diff/1/core/fpdfdoc/cpvt_generateap.cpp#newcode626 > ...
4 years, 4 months ago (2016-08-11 21:41:56 UTC) #8
jaepark
On 2016/08/11 21:41:56, tonikitoo1 wrote: > On 2016/08/11 21:39:21, jaepark wrote: > in the current ...
4 years, 4 months ago (2016-08-11 21:59:30 UTC) #9
dsinclair
https://codereview.chromium.org/2239853002/diff/1/core/fpdfdoc/cpvt_generateap.cpp File core/fpdfdoc/cpvt_generateap.cpp (right): https://codereview.chromium.org/2239853002/diff/1/core/fpdfdoc/cpvt_generateap.cpp#newcode798 core/fpdfdoc/cpvt_generateap.cpp:798: if (flags & ANNOTFLAG_HIDDEN) if flags is just used ...
4 years, 4 months ago (2016-08-12 03:06:58 UTC) #10
tonikitoo
On 2016/08/11 21:59:30, jaepark wrote: > On 2016/08/11 21:41:56, tonikitoo1 wrote: > > On 2016/08/11 ...
4 years, 4 months ago (2016-08-12 03:16:52 UTC) #11
tonikitoo
On 2016/08/11 21:39:21, jaepark wrote: > https://codereview.chromium.org/2239853002/diff/1/core/fpdfdoc/cpvt_generateap.cpp > File core/fpdfdoc/cpvt_generateap.cpp (right): > > https://codereview.chromium.org/2239853002/diff/1/core/fpdfdoc/cpvt_generateap.cpp#newcode626 > ...
4 years, 4 months ago (2016-08-12 14:39:06 UTC) #12
jaepark
On 2016/08/12 14:39:06, tonikitoo1 wrote: > > I checked that in testing/corpus/fx/js/calculate_sum_a_b_c.pdf (which has an ...
4 years, 4 months ago (2016-08-12 18:08:35 UTC) #13
tonikitoo
On 2016/08/12 18:08:35, jaepark wrote: > On 2016/08/12 14:39:06, tonikitoo1 wrote: > > > > ...
4 years, 4 months ago (2016-08-12 18:17:49 UTC) #14
jaepark
On 2016/08/12 18:17:49, tonikitoo1 wrote: > > Awesome feedback, @jaepark. > > Based on it, ...
4 years, 4 months ago (2016-08-12 18:26:34 UTC) #15
tonikitoo
On 2016/08/12 18:26:34, jaepark wrote: > On 2016/08/12 18:17:49, tonikitoo1 wrote: > > > > ...
4 years, 4 months ago (2016-08-12 19:28:04 UTC) #16
jaepark
On 2016/08/12 19:28:04, tonikitoo1 wrote: > On 2016/08/12 18:26:34, jaepark wrote: > > On 2016/08/12 ...
4 years, 4 months ago (2016-08-12 21:43:27 UTC) #17
tonikitoo
> > We could expand the "if" clause indicated above with another > > "IsAnnotationHidden" ...
4 years, 4 months ago (2016-08-12 22:43:06 UTC) #19
tonikitoo
(adding @thestig to the review list)
4 years, 4 months ago (2016-08-13 15:44:21 UTC) #22
Lei Zhang
https://codereview.chromium.org/2239853002/diff/60001/core/fpdfdoc/cpvt_generateap.cpp File core/fpdfdoc/cpvt_generateap.cpp (right): https://codereview.chromium.org/2239853002/diff/60001/core/fpdfdoc/cpvt_generateap.cpp#newcode616 core/fpdfdoc/cpvt_generateap.cpp:616: static bool IsAnnotationHidden(CPDF_Dictionary* pAnnotDict) { Can you only implement ...
4 years, 4 months ago (2016-08-15 00:10:09 UTC) #23
tonikitoo
> https://codereview.chromium.org/2239853002/diff/60001/core/fpdfdoc/cpvt_generateap.cpp#newcode616 > core/fpdfdoc/cpvt_generateap.cpp:616: static bool > IsAnnotationHidden(CPDF_Dictionary* pAnnotDict) { > Can you only implement ...
4 years, 4 months ago (2016-08-15 04:25:13 UTC) #24
dsinclair
https://codereview.chromium.org/2239853002/diff/80001/core/fpdfdoc/cpdf_annot.cpp File core/fpdfdoc/cpdf_annot.cpp (right): https://codereview.chromium.org/2239853002/diff/80001/core/fpdfdoc/cpdf_annot.cpp#newcode137 core/fpdfdoc/cpdf_annot.cpp:137: FX_BOOL CPDF_Annot::IsAnnotationHidden(CPDF_Dictionary* pAnnotDict) { Add a // static. comment ...
4 years, 4 months ago (2016-08-15 13:39:01 UTC) #25
tonikitoo
https://codereview.chromium.org/2239853002/diff/80001/core/fpdfdoc/cpdf_annot.cpp File core/fpdfdoc/cpdf_annot.cpp (right): https://codereview.chromium.org/2239853002/diff/80001/core/fpdfdoc/cpdf_annot.cpp#newcode137 core/fpdfdoc/cpdf_annot.cpp:137: FX_BOOL CPDF_Annot::IsAnnotationHidden(CPDF_Dictionary* pAnnotDict) { On 2016/08/15 13:39:00, dsinclair wrote: ...
4 years, 4 months ago (2016-08-15 13:51:02 UTC) #26
dsinclair
I'm happy when jaepark@ is happy.
4 years, 4 months ago (2016-08-15 15:34:38 UTC) #27
jaepark
On 2016/08/15 15:34:38, dsinclair wrote: > I'm happy when jaepark@ is happy. I'm good with ...
4 years, 4 months ago (2016-08-15 18:25:22 UTC) #28
Lei Zhang
https://codereview.chromium.org/2239853002/diff/100001/core/fpdfdoc/cpvt_generateap.cpp File core/fpdfdoc/cpvt_generateap.cpp (right): https://codereview.chromium.org/2239853002/diff/100001/core/fpdfdoc/cpvt_generateap.cpp#newcode623 core/fpdfdoc/cpvt_generateap.cpp:623: if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) Maybe it is time to combine the ...
4 years, 4 months ago (2016-08-15 18:39:39 UTC) #29
tonikitoo
https://codereview.chromium.org/2239853002/diff/100001/core/fpdfdoc/cpvt_generateap.cpp File core/fpdfdoc/cpvt_generateap.cpp (right): https://codereview.chromium.org/2239853002/diff/100001/core/fpdfdoc/cpvt_generateap.cpp#newcode623 core/fpdfdoc/cpvt_generateap.cpp:623: if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) On 2016/08/15 18:39:39, Lei Zhang wrote: > ...
4 years, 4 months ago (2016-08-15 18:59:31 UTC) #30
Lei Zhang
https://codereview.chromium.org/2239853002/diff/120001/core/fpdfdoc/cpvt_generateap.cpp File core/fpdfdoc/cpvt_generateap.cpp (right): https://codereview.chromium.org/2239853002/diff/120001/core/fpdfdoc/cpvt_generateap.cpp#newcode616 core/fpdfdoc/cpvt_generateap.cpp:616: static bool ShouldGenerateAPForAnnotation(CPDF_Dictionary* pAnnotDict) { Move this into the ...
4 years, 4 months ago (2016-08-15 19:02:10 UTC) #31
jaepark
Looks good. Please update DEPS after landing the test cases.
4 years, 4 months ago (2016-08-15 20:20:59 UTC) #32
Lei Zhang
Looks good. Can you land https://codereview.chromium.org/2239713003/ or do you need help there?
4 years, 4 months ago (2016-08-15 20:47:28 UTC) #33
tonikitoo
On 2016/08/15 20:47:28, Lei Zhang wrote: > Looks good. Can you land https://codereview.chromium.org/2239713003/ or do ...
4 years, 4 months ago (2016-08-15 21:02:57 UTC) #34
jaepark
On 2016/08/15 21:02:57, tonikitoo1 wrote: > I believe to need some help there (specially if ...
4 years, 4 months ago (2016-08-16 02:15:30 UTC) #35
tonikitoo
Patchset 9 rolls DEPS in testing/corpus/ to e4926b9e.
4 years, 4 months ago (2016-08-16 02:20:26 UTC) #36
Lei Zhang
corpus tests are failing https://codereview.chromium.org/2239853002/diff/160001/core/fpdfdoc/cpdf_annot.cpp File core/fpdfdoc/cpdf_annot.cpp (right): https://codereview.chromium.org/2239853002/diff/160001/core/fpdfdoc/cpdf_annot.cpp#newcode139 core/fpdfdoc/cpdf_annot.cpp:139: return pAnnotDict->GetIntegerBy("F") & ANNOTFLAG_HIDDEN; Looks ...
4 years, 4 months ago (2016-08-16 02:27:36 UTC) #41
tonikitoo
On 2016/08/16 02:27:36, Lei Zhang wrote: > corpus tests are failing > > https://codereview.chromium.org/2239853002/diff/160001/core/fpdfdoc/cpdf_annot.cpp > ...
4 years, 4 months ago (2016-08-16 03:09:01 UTC) #42
Lei Zhang
Looks like we need another corpus update. I'll do that in ~2 hours and give ...
4 years, 4 months ago (2016-08-16 03:53:50 UTC) #55
Lei Zhang
On 2016/08/16 03:53:50, Lei Zhang wrote: > Looks like we need another corpus update. I'll ...
4 years, 4 months ago (2016-08-16 04:22:06 UTC) #56
tonikitoo
On 2016/08/16 04:22:06, Lei Zhang wrote: > On 2016/08/16 03:53:50, Lei Zhang wrote: > > ...
4 years, 4 months ago (2016-08-16 04:38:40 UTC) #57
Lei Zhang
On 2016/08/16 04:38:40, tonikitoo1 wrote: > Done. I tried a DRY run of the bots, ...
4 years, 4 months ago (2016-08-16 04:50:32 UTC) #62
tonikitoo
On 2016/08/16 04:50:32, Lei Zhang wrote: > On 2016/08/16 04:38:40, tonikitoo1 wrote: > > Done. ...
4 years, 4 months ago (2016-08-16 19:25:39 UTC) #63
dsinclair
On 2016/08/16 19:25:39, tonikitoo1 wrote: > On 2016/08/16 04:50:32, Lei Zhang wrote: > > On ...
4 years, 4 months ago (2016-08-16 19:52:38 UTC) #64
tonikitoo
> You need to suppress the tests on mac. There are font rendering differences > ...
4 years, 4 months ago (2016-08-16 20:05:43 UTC) #65
jaepark
On 2016/08/16 20:05:43, tonikitoo1 wrote: > > You need to suppress the tests on mac. ...
4 years, 4 months ago (2016-08-16 20:33:05 UTC) #70
Lei Zhang
On 2016/08/16 19:52:38, dsinclair wrote: > You need to suppress the tests on mac. There ...
4 years, 4 months ago (2016-08-16 20:34:02 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2239853002/220001
4 years, 4 months ago (2016-08-16 20:34:21 UTC) #73
commit-bot: I haz the power
Committed patchset #12 (id:220001) as https://pdfium.googlesource.com/pdfium/+/66c26e84e6e154f0466db6fce4f3f36d445c579a
4 years, 4 months ago (2016-08-16 20:34:40 UTC) #75
Lei Zhang
On 2016/08/16 20:34:02, Lei Zhang wrote: > Well, let me test and see why it's ...
4 years, 4 months ago (2016-08-16 20:36:47 UTC) #76
dsinclair
On 2016/08/16 20:34:02, Lei Zhang wrote: > On 2016/08/16 19:52:38, dsinclair wrote: > > You ...
4 years, 4 months ago (2016-08-16 20:37:05 UTC) #77
tonikitoo
On 2016/08/16 20:34:02, Lei Zhang wrote: > On 2016/08/16 19:52:38, dsinclair wrote: > > You ...
4 years, 4 months ago (2016-08-16 20:37:23 UTC) #78
Lei Zhang
4 years, 4 months ago (2016-08-16 20:48:59 UTC) #79
Message was sent while issue was closed.
On 2016/08/16 20:37:05, dsinclair wrote:
> I built and tested the first two files on my mac and they were both rendered
> identical just font differences.

Ok, and we have no per-platform expectation files, so this is all fine as is.

Powered by Google App Engine
This is Rietveld 408576698