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

Issue 2801003004: Add "Paste as plain text" into text selection toolbar overflow (Closed)

Created:
3 years, 8 months ago by Shimi Zhang
Modified:
3 years, 7 months ago
CC:
agrieve+watch_chromium.org, amaralp, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, kinuko+watch, sgurun-gerrit only
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add "Paste as plain text" into text selection toolbar overflow Only show this option when a) clipboard content has additional format. b) target text field has the ability to accept formatted content. BUG=707857 Review-Url: https://codereview.chromium.org/2801003004 Cr-Commit-Position: refs/heads/master@{#468887} Committed: https://chromium.googlesource.com/chromium/src/+/56e68afe8f6fbe6e9d5fb234795034601b475298

Patch Set 1 #

Patch Set 2 : remove unused canPaste in ContentViewCore #

Patch Set 3 : implementation for a) #

Patch Set 4 : revert coerceToHtmlText since it will break tests #

Patch Set 5 : check more styles #

Total comments: 16

Patch Set 6 : review fixes #

Patch Set 7 : remove one more unnecessary place #

Patch Set 8 : rebase #

Patch Set 9 : check for O #

Patch Set 10 : check paste as plain text menu item #

Total comments: 8

Patch Set 11 : review update #

Total comments: 12

Patch Set 12 : add comments #

Total comments: 1

Patch Set 13 : add comments #

Patch Set 14 : add comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -19 lines) Patch
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_android.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -0 lines 0 comments Download
M content/public/android/java/res/menu/select_action_menu.xml View 1 2 3 4 5 6 7 8 9 10 4 chunks +14 lines, -7 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -8 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +69 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/FloatingPastePopupMenu.java View 1 2 3 4 5 6 7 8 9 10 2 chunks +16 lines, -2 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java View 1 2 3 4 5 2 chunks +10 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/WebContents.java View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java View 1 2 3 4 5 6 7 8 4 chunks +64 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ContextMenuClientImpl.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebContextMenuData.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 57 (37 generated)
Shimi Zhang
3 years, 8 months ago (2017-04-07 00:49:31 UTC) #1
amaralp
I landed a CL (https://codereview.chromium.org/2722273002) that made in the same places you are changing so ...
3 years, 8 months ago (2017-04-13 20:40:18 UTC) #15
Shimi Zhang
amaralp@, fixed all comments and added tests for canPasteAsPlainText. PTAL. Still waiting for the string ...
3 years, 8 months ago (2017-04-15 01:17:15 UTC) #18
Shimi Zhang
PTAL, thanks!
3 years, 7 months ago (2017-05-01 22:28:01 UTC) #28
aelias_OOO_until_Jul13
Is there a strong reason to restrict this to O and up? It seems there ...
3 years, 7 months ago (2017-05-01 22:40:19 UTC) #29
Shimi Zhang
On 2017/05/01 22:40:19, aelias wrote: > Is there a strong reason to restrict this to ...
3 years, 7 months ago (2017-05-01 22:42:21 UTC) #30
aelias_OOO_until_Jul13
lgtm modulo minor comments https://codereview.chromium.org/2801003004/diff/180001/content/public/android/java/res/menu/select_action_menu.xml File content/public/android/java/res/menu/select_action_menu.xml (right): https://codereview.chromium.org/2801003004/diff/180001/content/public/android/java/res/menu/select_action_menu.xml#newcode59 content/public/android/java/res/menu/select_action_menu.xml:59: android:title="@android:string/paste" Can this field be ...
3 years, 7 months ago (2017-05-01 23:25:41 UTC) #31
Shimi Zhang
android:title attribute is required for compilation, so only replaced "@android:string/paste" with "". https://codereview.chromium.org/2801003004/diff/180001/content/public/android/java/res/menu/select_action_menu.xml File content/public/android/java/res/menu/select_action_menu.xml ...
3 years, 7 months ago (2017-05-02 00:17:46 UTC) #34
Shimi Zhang
dtrainor@, could you PTAL at select_action_menu.xml, thanks!
3 years, 7 months ago (2017-05-02 01:02:47 UTC) #38
amaralp
lgtm % comment https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/res/menu/select_action_menu.xml File content/public/android/java/res/menu/select_action_menu.xml (right): https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/res/menu/select_action_menu.xml#newcode25 content/public/android/java/res/menu/select_action_menu.xml:25: <item Did you mean to add ...
3 years, 7 months ago (2017-05-02 01:29:53 UTC) #39
Shimi Zhang
https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/res/menu/select_action_menu.xml File content/public/android/java/res/menu/select_action_menu.xml (right): https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/res/menu/select_action_menu.xml#newcode25 content/public/android/java/res/menu/select_action_menu.xml:25: <item On 2017/05/02 01:29:52, amaralp wrote: > Did you ...
3 years, 7 months ago (2017-05-02 01:44:37 UTC) #40
David Trainor- moved to gerrit
select_action_menu.xml lgtm
3 years, 7 months ago (2017-05-02 15:45:47 UTC) #43
boliu
https://codereview.chromium.org/2801003004/diff/200001/content/browser/web_contents/web_contents_android.cc File content/browser/web_contents/web_contents_android.cc (right): https://codereview.chromium.org/2801003004/diff/200001/content/browser/web_contents/web_contents_android.cc#newcode277 content/browser/web_contents/web_contents_android.cc:277: web_contents_->PasteAndMatchStyle(); why does this method sound like the exact ...
3 years, 7 months ago (2017-05-02 17:31:57 UTC) #44
aelias_OOO_until_Jul13
https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java File content/public/android/java/src/org/chromium/content_public/browser/WebContents.java (right): https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java#newcode114 content/public/android/java/src/org/chromium/content_public/browser/WebContents.java:114: void pasteAsPlainText(); On 2017/05/02 at 17:31:57, boliu wrote: > ...
3 years, 7 months ago (2017-05-02 19:17:38 UTC) #45
Shimi Zhang
boliu@, PTAL, thanks! https://codereview.chromium.org/2801003004/diff/200001/content/browser/web_contents/web_contents_android.cc File content/browser/web_contents/web_contents_android.cc (right): https://codereview.chromium.org/2801003004/diff/200001/content/browser/web_contents/web_contents_android.cc#newcode277 content/browser/web_contents/web_contents_android.cc:277: web_contents_->PasteAndMatchStyle(); On 2017/05/02 17:31:57, boliu wrote: ...
3 years, 7 months ago (2017-05-03 00:37:17 UTC) #46
boliu
https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java File content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java (right): https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java#newcode559 content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java:559: if (hasStyleSpan(spanned)) return true; On 2017/05/03 00:37:17, Shimi Zhang ...
3 years, 7 months ago (2017-05-03 00:44:44 UTC) #49
Shimi Zhang
On 2017/05/03 00:44:44, boliu wrote: > https://codereview.chromium.org/2801003004/diff/200001/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java > File > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java > (right): > > ...
3 years, 7 months ago (2017-05-03 01:18:17 UTC) #50
boliu
lgtm after comments are added On 2017/05/03 01:18:17, Shimi Zhang wrote: > On 2017/05/03 00:44:44, ...
3 years, 7 months ago (2017-05-03 01:27:46 UTC) #51
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/2801003004/260001
3 years, 7 months ago (2017-05-03 02:13:39 UTC) #54
commit-bot: I haz the power
3 years, 7 months ago (2017-05-03 04:03:32 UTC) #57
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/56e68afe8f6fbe6e9d5fb2347950...

Powered by Google App Engine
This is Rietveld 408576698