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

Issue 2855953003: Handle long press in PDF documents. (Closed)

Created:
3 years, 7 months ago by dsinclair
Modified:
3 years, 7 months ago
Reviewers:
Lei Zhang, Kevin McNee
CC:
chromium-reviews, arv+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle long press in PDF documents. This Cl updates the touch handlers for PDF documents to better support long press. The long press context menu is suppressed and the wonder under the press is of sufficient time. BUG=chromium:490184 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2855953003 Cr-Commit-Position: refs/heads/master@{#469849} Committed: https://chromium.googlesource.com/chromium/src/+/6e51653e06d1740b5fe70b3ef9c2e6fe959e3968

Patch Set 1 #

Total comments: 13

Patch Set 2 : Review feedback #

Patch Set 3 : Rebase to master #

Patch Set 4 : Rebase to master #

Total comments: 4

Patch Set 5 : Add long press test #

Total comments: 16

Patch Set 6 : Review feedback #

Total comments: 6

Patch Set 7 : Review feedback #

Patch Set 8 : Rebase to master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -51 lines) Patch
M chrome/browser/pdf/pdf_extension_test.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/resources/pdf/gesture_detector.js View 1 2 3 4 3 chunks +19 lines, -8 lines 0 comments Download
M chrome/browser/resources/pdf/pdf.js View 1 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/test/data/pdf/gesture_detector_test.js View 1 2 3 4 5 6 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/test/data/pdf/touch_handling_test.js View 1 2 3 4 5 1 chunk +72 lines, -0 lines 0 comments Download
M pdf/out_of_process_instance.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -0 lines 0 comments Download
M pdf/out_of_process_instance.cc View 1 2 3 4 5 6 7 7 chunks +52 lines, -25 lines 0 comments Download
M pdf/pdf_engine.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -2 lines 0 comments Download
M pdf/pdfium/pdfium_engine.h View 1 2 5 chunks +12 lines, -7 lines 0 comments Download
M pdf/pdfium/pdfium_engine.cc View 1 2 3 4 5 6 7 6 chunks +61 lines, -9 lines 0 comments Download
M pdf/preview_mode_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M pdf/preview_mode_client.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (25 generated)
dsinclair
PTAL. This is a first pass at getting long press handling working which makes text ...
3 years, 7 months ago (2017-05-02 19:44:05 UTC) #4
Kevin McNee
https://codereview.chromium.org/2855953003/diff/1/chrome/browser/resources/pdf/gesture_detector.js File chrome/browser/resources/pdf/gesture_detector.js (right): https://codereview.chromium.org/2855953003/diff/1/chrome/browser/resources/pdf/gesture_detector.js#newcode20 chrome/browser/resources/pdf/gesture_detector.js:20: 'touchstart', this.onTouchStart_.bind(this), { passive: false }); Since we're no ...
3 years, 7 months ago (2017-05-02 23:18:19 UTC) #5
Lei Zhang
https://codereview.chromium.org/2855953003/diff/1/pdf/out_of_process_instance.h File pdf/out_of_process_instance.h (right): https://codereview.chromium.org/2855953003/diff/1/pdf/out_of_process_instance.h#newcode241 pdf/out_of_process_instance.h:241: pp::Point scroll_offset_; BTW, there's another scroll offset below that's ...
3 years, 7 months ago (2017-05-03 01:52:53 UTC) #6
dsinclair
https://codereview.chromium.org/2855953003/diff/1/chrome/browser/resources/pdf/gesture_detector.js File chrome/browser/resources/pdf/gesture_detector.js (right): https://codereview.chromium.org/2855953003/diff/1/chrome/browser/resources/pdf/gesture_detector.js#newcode20 chrome/browser/resources/pdf/gesture_detector.js:20: 'touchstart', this.onTouchStart_.bind(this), { passive: false }); On 2017/05/02 23:18:18, ...
3 years, 7 months ago (2017-05-03 14:18:41 UTC) #7
Kevin McNee
https://codereview.chromium.org/2855953003/diff/60001/chrome/test/data/pdf/gesture_detector_test.js File chrome/test/data/pdf/gesture_detector_test.js (right): https://codereview.chromium.org/2855953003/diff/60001/chrome/test/data/pdf/gesture_detector_test.js#newcode222 chrome/test/data/pdf/gesture_detector_test.js:222: {clientX: 0, clientY: 0, touches: []} The array passed ...
3 years, 7 months ago (2017-05-03 17:25:43 UTC) #16
dsinclair
https://codereview.chromium.org/2855953003/diff/60001/chrome/test/data/pdf/gesture_detector_test.js File chrome/test/data/pdf/gesture_detector_test.js (right): https://codereview.chromium.org/2855953003/diff/60001/chrome/test/data/pdf/gesture_detector_test.js#newcode222 chrome/test/data/pdf/gesture_detector_test.js:222: {clientX: 0, clientY: 0, touches: []} On 2017/05/03 17:25:43, ...
3 years, 7 months ago (2017-05-03 18:13:38 UTC) #17
dsinclair
PTAL. I think this is ready to go, I added a test to make sure ...
3 years, 7 months ago (2017-05-04 13:55:08 UTC) #19
Kevin McNee
Just some nits. Mainly style. https://codereview.chromium.org/2855953003/diff/80001/chrome/test/data/pdf/gesture_detector_test.js File chrome/test/data/pdf/gesture_detector_test.js (right): https://codereview.chromium.org/2855953003/diff/80001/chrome/test/data/pdf/gesture_detector_test.js#newcode225 chrome/test/data/pdf/gesture_detector_test.js:225: stubElement.sendEvent(new MockTouchEvent('touchstart', [])); nit: ...
3 years, 7 months ago (2017-05-04 15:38:55 UTC) #24
dsinclair
https://codereview.chromium.org/2855953003/diff/80001/chrome/test/data/pdf/gesture_detector_test.js File chrome/test/data/pdf/gesture_detector_test.js (right): https://codereview.chromium.org/2855953003/diff/80001/chrome/test/data/pdf/gesture_detector_test.js#newcode225 chrome/test/data/pdf/gesture_detector_test.js:225: stubElement.sendEvent(new MockTouchEvent('touchstart', [])); On 2017/05/04 15:38:55, Kevin McNee wrote: ...
3 years, 7 months ago (2017-05-04 17:55:54 UTC) #25
Kevin McNee
https://codereview.chromium.org/2855953003/diff/100001/chrome/test/data/pdf/gesture_detector_test.js File chrome/test/data/pdf/gesture_detector_test.js (right): https://codereview.chromium.org/2855953003/diff/100001/chrome/test/data/pdf/gesture_detector_test.js#newcode229 chrome/test/data/pdf/gesture_detector_test.js:229: "Should not have a two finger touch with no ...
3 years, 7 months ago (2017-05-04 18:29:34 UTC) #26
dsinclair
thestig@ can you remove the c++ side of this CL?
3 years, 7 months ago (2017-05-04 19:18:17 UTC) #28
Lei Zhang
On 2017/05/04 19:18:17, dsinclair wrote: > thestig@ can you remove the c++ side of this ...
3 years, 7 months ago (2017-05-04 19:20:15 UTC) #29
Lei Zhang
BTW, I landed some C++ side cleanups. You may need to rebase.
3 years, 7 months ago (2017-05-04 19:21:02 UTC) #30
dsinclair
On 2017/05/04 19:20:15, Lei Zhang wrote: > On 2017/05/04 19:18:17, dsinclair wrote: > > thestig@ ...
3 years, 7 months ago (2017-05-04 19:23:08 UTC) #31
Lei Zhang
lgtm https://codereview.chromium.org/2855953003/diff/100001/pdf/out_of_process_instance.h File pdf/out_of_process_instance.h (right): https://codereview.chromium.org/2855953003/diff/100001/pdf/out_of_process_instance.h#newcode240 pdf/out_of_process_instance.h:240: // The scroll offset Can you mention the ...
3 years, 7 months ago (2017-05-04 19:29:26 UTC) #32
dsinclair
https://codereview.chromium.org/2855953003/diff/100001/chrome/test/data/pdf/gesture_detector_test.js File chrome/test/data/pdf/gesture_detector_test.js (right): https://codereview.chromium.org/2855953003/diff/100001/chrome/test/data/pdf/gesture_detector_test.js#newcode229 chrome/test/data/pdf/gesture_detector_test.js:229: "Should not have a two finger touch with no ...
3 years, 7 months ago (2017-05-04 20:26:18 UTC) #33
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/2855953003/140001
3 years, 7 months ago (2017-05-06 11:26:19 UTC) #40
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://chromium.googlesource.com/chromium/src/+/6e51653e06d1740b5fe70b3ef9c2e6fe959e3968
3 years, 7 months ago (2017-05-06 18:51:26 UTC) #43
findit-for-me
Findit (https://goo.gl/kROfz5) identified this CL at revision 469849 as the culprit for failures in the ...
3 years, 7 months ago (2017-05-06 20:06:56 UTC) #44
Avi (use Gerrit)
3 years, 7 months ago (2017-05-06 22:18:58 UTC) #45
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/2864603006/ by avi@chromium.org.

The reason for reverting is: Breaks Mac bots. See
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3Itb...

https://build.chromium.org/p/chromium.mac/builders/Mac10.11%20Tests/builds/12082

[ RUN      ] PDFExtensionTest.TouchHandling
[21973:14375:0506/122844.659425:WARNING:notification_platform_bridge_mac.mm(493)]
AlertNotificationService: XPC connection invalidated.
2017-05-06 12:28:44.811 browser_tests[21973:153848] NSWindow warning: adding an
unknown subview: <FullSizeContentView: 0x7fb0f2d756b0>. Break on NSLog to debug.
2017-05-06 12:28:44.812 browser_tests[21973:153848] Call stack:
(
    "+callStackSymbols disabled for performance reasons"
)
[21973:87319:0506/122847.139773:WARNING:embedded_test_server.cc(219)] Request
not handled. Returning 404: /favicon.ico
[21973:35843:0506/122850.985727:ERROR:service_manager.cc(137)] Connection
InterfaceProviderSpec prevented service: content_plugin from binding interface:
memory_instrumentation::mojom::Coordinator exposed by: content_browser
[21973:775:0506/122851.245843:INFO:CONSOLE(0)] "[SUCCESS]
testContextMenuSingleTouch", source:
chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
[21973:775:0506/122851.307976:INFO:CONSOLE(0)] "[SUCCESS]
testContextMenuDoubleTouch", source:
chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
[21973:775:0506/122851.669523:INFO:CONSOLE(0)] "[SUCCESS]
testLongPressSelectsText", source:
chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
[21973:775:0506/122851.674726:INFO:CONSOLE(0)] "[FAIL] testLongPressSelectsText:
API Test Error in testLongPressSelectsText
Actual: 
Expected: some
Error
    at Object.handleRequest (extensions::binding:63:27)
    at Object.<anonymous> (extensions::binding:422:32)
    at Object.<anonymous> (extensions::test:215:18)
    at Object.handleRequest (extensions::binding:63:27)
    at Object.<anonymous> (extensions::binding:422:32)
    at <anonymous>:192:21
    at safeFunctionApply (extensions::test:260:26)
    at PDFScriptingAPI.selectedTextCallback_ (extensions::test:285:18)
    at PDFScriptingAPI.<anonymous>
(chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/pdf_scripting_api.js:81:16)",
source: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
[21973:775:0506/122851.676537:INFO:CONSOLE(263)] "Uncaught chrome.test.failure",
source: extensions::test (263)
../../chrome/browser/pdf/pdf_extension_test.cc:165: Failure
Failed
Failed 1 of 3 tests
[  FAILED  ] PDFExtensionTest.TouchHandling, where TypeParam =  and GetParam() =
 (8405 ms)

.

Powered by Google App Engine
This is Rietveld 408576698