New issue
Advanced search Search tips

Issue 832293 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 62400



Sign in to add a comment

PDF XFA: Text edit: Mouse click does not move cursor

Project Member Reported by hnakashima@chromium.org, Apr 12 2018

Issue description

On an XFA enabled build:

1. Open https://www.canada.ca/content/dam/ircc/migration/ircc/english/pdf/kits/forms/imm5257e.pdf
2. Select The Name text edit. Type 'abcdef'. Note the caret is at the end, right after the 'f'.
3. Click between the 'c' and the 'd'
Expected: Caret is between 'c' and 'd'
Actual: Caret is after 'f'
 
Status: Started (was: Assigned)
These are really two separate problems:
1 - Changing m_CursorPosition in CFWL_Edit::OnLButtonDown() does not cause it to be repainted in the new place.
2 - Clicking anywhere in a CFWL_Edit changes m_CursorPosition to 0 (start of box).
Correction for 2 - Clicking after the text changes m_CursorPosition to 0. Doing so again changes it to the end. Clicking below the text changes it to the end always.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/efb23f332bb3c17c1fa9f4cd5a0cf830d7d63a66

commit efb23f332bb3c17c1fa9f4cd5a0cf830d7d63a66
Author: Henrique Nakashima <hnakashima@chromium.org>
Date: Thu Apr 19 20:52:03 2018

Fix caret not moving to click target in XFA edit.

Bug:  chromium:832293 
Change-Id: Id7b90f7958e71350ecde31ef8891541eb4767ecf
Reviewed-on: https://pdfium-review.googlesource.com/31010
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>

[modify] https://crrev.com/efb23f332bb3c17c1fa9f4cd5a0cf830d7d63a66/xfa/fwl/cfwl_edit.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/8549ab48a5f8b613ea35dfd64f925fd0438efd0d

commit 8549ab48a5f8b613ea35dfd64f925fd0438efd0d
Author: Henrique Nakashima <hnakashima@chromium.org>
Date: Thu Apr 19 21:33:53 2018

Fix caret moving to start of edit on click after the text.

It now moves to the end of the edit text instead.

In a multiline edit, clicking after the end of a line in the middle
of the text moves the caret to the beginning of the next line. This
is a known issue to be addressed later.

Bug:  chromium:832293 
Change-Id: I55ca1f7eebf935fbb7d9526f115489bdfbd8ba1c
Reviewed-on: https://pdfium-review.googlesource.com/31012
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>

[modify] https://crrev.com/8549ab48a5f8b613ea35dfd64f925fd0438efd0d/xfa/fde/cfde_texteditengine.cpp
[modify] https://crrev.com/8549ab48a5f8b613ea35dfd64f925fd0438efd0d/xfa/fde/cfde_texteditengine_unittest.cpp
[modify] https://crrev.com/8549ab48a5f8b613ea35dfd64f925fd0438efd0d/DEPS

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/901f343328236cdb307c354d56a454c7c62f7ec3

commit 901f343328236cdb307c354d56a454c7c62f7ec3
Author: Henrique Nakashima <hnakashima@chromium.org>
Date: Thu Apr 19 21:59:43 2018

Caret moves after clicked char if closer to its right rect boundary.

Bug:  chromium:832293 
Change-Id: Idd240010a5ec99b836d9cb90c4c2aa3027ff5f67
Reviewed-on: https://pdfium-review.googlesource.com/31013
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>

[modify] https://crrev.com/901f343328236cdb307c354d56a454c7c62f7ec3/xfa/fde/cfde_texteditengine.cpp
[modify] https://crrev.com/901f343328236cdb307c354d56a454c7c62f7ec3/xfa/fde/cfde_texteditengine_unittest.cpp

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35fa35716150a4a7a222979e36b6f45e523e68c2

commit 35fa35716150a4a7a222979e36b6f45e523e68c2
Author: pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Fri Apr 20 00:42:15 2018

Roll src/third_party/pdfium/ 9914d4dc1..901f34332 (6 commits)

https://pdfium.googlesource.com/pdfium.git/+log/9914d4dc1e7a..901f34332823

$ git log 9914d4dc1..901f34332 --date=short --no-merges --format='%ad %ae %s'
2018-04-19 hnakashima Caret moves after clicked char if closer to its right rect boundary.
2018-04-19 hnakashima Fix duplicated text in each line in XFA widgets.
2018-04-19 hnakashima Fix caret moving to start of edit on click after the text.
2018-04-19 thestig Add public APIs for undo / redo in forms.
2018-04-19 thestig Change SHADING_STEPS from a #define to a constant.
2018-04-19 hnakashima Fix caret not moving to click target in XFA edit.

Created with:
  roll-dep src/third_party/pdfium
BUG= chromium:832293 , chromium:832909 , chromium:832293 , chromium:764260 , chromium:832293 


The AutoRoll server is located here: https://pdfium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


TBR=dsinclair@chromium.org

Change-Id: I0c49fb5b7d6ee39f132bf4c8e2daf7a9740e5c39
Reviewed-on: https://chromium-review.googlesource.com/1019973
Commit-Queue: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#552220}
[modify] https://crrev.com/35fa35716150a4a7a222979e36b6f45e523e68c2/DEPS

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/273c598ef5e7e9ee210a8e6645b3a83b9f21a1da

commit 273c598ef5e7e9ee210a8e6645b3a83b9f21a1da
Author: Henrique Nakashima <hnakashima@chromium.org>
Date: Tue Apr 24 16:19:08 2018

Fix caret moving to next line on click in multiline XFA edit.

On a mouse click after the end of a line (except for the last line)
in an XFA text edit, the caret was moved to the beginning of the next
line, as the position after the space was actually in the next line.

This CL changes the behavior so that the caret is positioned before
the space in this case.

Note it's possible to click directly to that position by clicking
on the beginning of the next line.

Bug:  chromium:832293 
Change-Id: Ib376e4cca7b32a87d478d3346cb3d8f3bd825daa
Reviewed-on: https://pdfium-review.googlesource.com/31110
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>

[modify] https://crrev.com/273c598ef5e7e9ee210a8e6645b3a83b9f21a1da/xfa/fde/cfde_texteditengine.cpp
[modify] https://crrev.com/273c598ef5e7e9ee210a8e6645b3a83b9f21a1da/xfa/fde/cfde_texteditengine_unittest.cpp

Status: Fixed (was: Started)
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/912dea659fa5a798c0bcf244c5fc7ad2e31da270

commit 912dea659fa5a798c0bcf244c5fc7ad2e31da270
Author: pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Tue Apr 24 20:34:53 2018

Roll src/third_party/pdfium/ 90e03b9b3..6453a67d8 (4 commits)

https://pdfium.googlesource.com/pdfium.git/+log/90e03b9b3f45..6453a67d84dc

$ git log 90e03b9b3..6453a67d8 --date=short --no-merges --format='%ad %ae %s'
2018-04-24 dsinclair Remove CFX_BlockBuffer
2018-04-24 hnakashima Fix edit text rendered with wrong offsets after deletion.
2018-04-24 dsinclair Cleanup CFX_XMLParser entity conversion
2018-04-24 hnakashima Fix caret moving to next line on click in multiline XFA edit.

Created with:
  roll-dep src/third_party/pdfium
BUG= chromium:835924 , chromium:832293 


The AutoRoll server is located here: https://pdfium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


TBR=dsinclair@chromium.org

Change-Id: I3b1032022230598dcb53c04384247169802053c9
Reviewed-on: https://chromium-review.googlesource.com/1024605
Commit-Queue: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#553253}
[modify] https://crrev.com/912dea659fa5a798c0bcf244c5fc7ad2e31da270/DEPS

Sign in to add a comment