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

Issue 2078143002: Make plugin elements return false from canStartSelection. (Closed)

Created:
4 years, 6 months ago by aelias_OOO_until_Jul13
Modified:
4 years, 6 months ago
CC:
ajuma+watch-canvas_chromium.org, amaralp, blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, Rik, chromium-reviews, dglazkov+blink, dshwang, eae+blinkwatch, Justin Novosad, kinuko+watch, rwlbuis, sof, yoichio
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make plugin elements return false from canStartSelection. The canStartSelection property of Node is to indicate that text selection can start there, i.e. it's some variety of text or editable. Image and media elements, for example, are excluded. After I switched long-press selection to consider this property in r385360, context menu events stopped being forwarded correctly to plugins because the events were absorbed by text selection instead. The root cause was this incorrectly assigned Node property. For completeness: - I made the long-press layout tests run on all platforms. After r385360, they were no longer Android-specific, and I only just learned of their existence now. BUG=621063 Committed: https://crrev.com/a1c7f43d9e5166bf0b21fc3690728e79bb6fd2a3 Cr-Commit-Position: refs/heads/master@{#401359}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Account for fallback content, remove canvas change #

Patch Set 3 : More testing #

Total comments: 2

Patch Set 4 : Boolean logic nit #

Patch Set 5 : Fix readonly-disabled-text-selection for changes in r401155 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -9 lines) Patch
M third_party/WebKit/LayoutTests/NeverFixTests View 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/readonly-disabled-text-selection.html View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPlugInElement.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/web/tests/data/long_press_object.html View 1 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/web/tests/data/long_press_object_fallback.html View 1 2 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
aelias_OOO_until_Jul13
Hi yosin@, PTAL.
4 years, 6 months ago (2016-06-18 02:31:04 UTC) #2
yosin_UTC9
https://codereview.chromium.org/2078143002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.h File third_party/WebKit/Source/core/html/HTMLCanvasElement.h (right): https://codereview.chromium.org/2078143002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.h#newcode215 third_party/WebKit/Source/core/html/HTMLCanvasElement.h:215: bool canStartSelection() const override { return false; } HTMLCanvasElement::canStartSelection() ...
4 years, 6 months ago (2016-06-21 08:09:32 UTC) #3
aelias_OOO_until_Jul13
https://codereview.chromium.org/2078143002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.h File third_party/WebKit/Source/core/html/HTMLCanvasElement.h (right): https://codereview.chromium.org/2078143002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.h#newcode215 third_party/WebKit/Source/core/html/HTMLCanvasElement.h:215: bool canStartSelection() const override { return false; } On ...
4 years, 6 months ago (2016-06-21 22:07:50 UTC) #5
yosin_UTC9
lgtm w/ small nit https://codereview.chromium.org/2078143002/diff/40001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp File third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp (right): https://codereview.chromium.org/2078143002/diff/40001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp#newcode107 third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp:107: if (!useFallbackContent()) How about below? ...
4 years, 6 months ago (2016-06-22 01:23:18 UTC) #6
aelias_OOO_until_Jul13
Adding yutak@ for core/html OWNERS. https://codereview.chromium.org/2078143002/diff/40001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp File third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp (right): https://codereview.chromium.org/2078143002/diff/40001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp#newcode107 third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp:107: if (!useFallbackContent()) On 2016/06/22 ...
4 years, 6 months ago (2016-06-22 01:33:03 UTC) #8
Yuta Kitamura
LGTM (but you may need to fix a layout test failure editing/selection/readonly-disabled-text-selection.html)
4 years, 6 months ago (2016-06-22 06:06:30 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2078143002/80001
4 years, 6 months ago (2016-06-22 18:21:32 UTC) #12
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-22 18:28:44 UTC) #13
commit-bot: I haz the power
4 years, 6 months ago (2016-06-22 18:34:07 UTC) #15
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a1c7f43d9e5166bf0b21fc3690728e79bb6fd2a3
Cr-Commit-Position: refs/heads/master@{#401359}

Powered by Google App Engine
This is Rietveld 408576698