|
|
Created:
3 years, 7 months ago by Shimi Zhang Modified:
3 years, 7 months ago CC:
agrieve+watch_chromium.org, chromium-reviews, sgurun-gerrit only Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionRemove "paste as plain text" from selection menu
"paste as plain text" introduced an empty option in selection menu due
to the runtime string resource setting. Since we need to update
|canEditRichly| flag for the option in selection menu, there is no
simple way to do so right now, so simply remove this option.
Need to add it back later.
BUG=718330
Review-Url: https://codereview.chromium.org/2858333002
Cr-Commit-Position: refs/heads/master@{#469483}
Committed: https://chromium.googlesource.com/chromium/src/+/a038875de60252fb6bf6fb429e5feab5b1d0c3de
Patch Set 1 #
Total comments: 1
Patch Set 2 : remove the option for now #Messages
Total messages: 29 (17 generated)
The CQ bit was checked by ctzsm@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
ctzsm@chromium.org changed reviewers: + aelias@chromium.org, amaralp@chromium.org
PTAL, taking care of SelectionPopup menu for paste as plain text, thanks!
lgtm
https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java (right): https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java:499: if (!canPasteAsPlainText()) { Doesn't this rely on having a fresh value for |mCanEditRichlyForPastePopup|? Since |mCanEditRichlyForPastePopup| is only set for the paste popup I think you will be using a stale value. I have a CL (crrev.com/2785853002) that should fix this problem. I'd recommend waiting for that CL to land.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2017/05/04 18:48:18, amaralp wrote: > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > File > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java > (right): > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java:499: > if (!canPasteAsPlainText()) { > Doesn't this rely on having a fresh value for |mCanEditRichlyForPastePopup|? > Since |mCanEditRichlyForPastePopup| is only set for the paste popup I think you > will be using a stale value. I have a CL (crrev.com/2785853002) that should fix > this problem. I'd recommend waiting for that CL to land. |mCanEditRichlyForPastePopup| is an attribute of text area, it won't stale. But you are right, I didn't get this attribute for selection popup, so when we select some text before any paste popups, this option won't show in the menu. This CL is actually fixing the bug that an empty option is showing in selection popup for blew O, and the feature itself only exist in O and above, so I think it is OK to land this one first, then wait for your CL so I can fix the |mCanEditRichlyForPastePopup| issue. WDYT?
On 2017/05/04 19:10:55, Shimi Zhang wrote: > On 2017/05/04 18:48:18, amaralp wrote: > > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > > File > > > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java > > (right): > > > > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > > > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java:499: > > if (!canPasteAsPlainText()) { > > Doesn't this rely on having a fresh value for |mCanEditRichlyForPastePopup|? > > Since |mCanEditRichlyForPastePopup| is only set for the paste popup I think > you > > will be using a stale value. I have a CL (crrev.com/2785853002) that should > fix > > this problem. I'd recommend waiting for that CL to land. > > |mCanEditRichlyForPastePopup| is an attribute of text area, it won't stale. But > you are right, I didn't get this attribute for selection popup, so when we > select some text before any paste popups, this option won't show in the menu. > > This CL is actually fixing the bug that an empty option is showing in selection > popup for blew O, and the feature itself only exist in O and above, so I think > it is OK to land this one first, then wait for your CL so I can fix the > |mCanEditRichlyForPastePopup| issue. WDYT? Please expand the CL description.
On 2017/05/04 at 19:10:55, ctzsm wrote: > On 2017/05/04 18:48:18, amaralp wrote: > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > > File > > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java > > (right): > > > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java:499: > > if (!canPasteAsPlainText()) { > > Doesn't this rely on having a fresh value for |mCanEditRichlyForPastePopup|? > > Since |mCanEditRichlyForPastePopup| is only set for the paste popup I think you > > will be using a stale value. I have a CL (crrev.com/2785853002) that should fix > > this problem. I'd recommend waiting for that CL to land. > > |mCanEditRichlyForPastePopup| is an attribute of text area, it won't stale. But you are right, I didn't get this attribute for selection popup, so when we select some text before any paste popups, this option won't show in the menu. > What if there are multiple text areas? For example if you long-press in a text area that allows for rich editing and then select some text in a different text area that doesn't allow rich editing. Couldn't that lead to showing the option when you shouldn't? > This CL is actually fixing the bug that an empty option is showing in selection popup for blew O, and the feature itself only exist in O and above, so I think it is OK to land this one first, then wait for your CL so I can fix the |mCanEditRichlyForPastePopup| issue. WDYT? Why not always remove the option for the selection menu?
Description was changed from ========== Add "paste as plain text" to SelectionPopup menu BUG=718330 ========== to ========== Add "paste as plain text" to SelectionPopup menu a) Remove blank option in selection popup for below O, b) Set MenuItem title for "paste as plain text" for O and above. BUG=718330 ==========
On 2017/05/04 19:18:39, amaralp wrote: > On 2017/05/04 at 19:10:55, ctzsm wrote: > > On 2017/05/04 18:48:18, amaralp wrote: > > > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > > > File > > > > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java > > > (right): > > > > > > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > > > > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java:499: > > > if (!canPasteAsPlainText()) { > > > Doesn't this rely on having a fresh value for |mCanEditRichlyForPastePopup|? > > > Since |mCanEditRichlyForPastePopup| is only set for the paste popup I think > you > > > will be using a stale value. I have a CL (crrev.com/2785853002) that should > fix > > > this problem. I'd recommend waiting for that CL to land. > > > > |mCanEditRichlyForPastePopup| is an attribute of text area, it won't stale. > But you are right, I didn't get this attribute for selection popup, so when we > select some text before any paste popups, this option won't show in the menu. > > > What if there are multiple text areas? For example if you long-press in a text > area that allows for rich editing and then select some text in a different text > area that doesn't allow rich editing. Couldn't that lead to showing the option > when you shouldn't? > > > This CL is actually fixing the bug that an empty option is showing in > selection popup for blew O, and the feature itself only exist in O and above, so > I think it is OK to land this one first, then wait for your CL so I can fix the > |mCanEditRichlyForPastePopup| issue. WDYT? > Why not always remove the option for the selection menu? That could also work. Either way I need to take care of selection menu after your CL landed, but I intend to keep this one simple.
On 2017/05/04 at 19:29:03, ctzsm wrote: > On 2017/05/04 19:18:39, amaralp wrote: > > On 2017/05/04 at 19:10:55, ctzsm wrote: > > > On 2017/05/04 18:48:18, amaralp wrote: > > > > > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > > > > File > > > > > > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java > > > > (right): > > > > > > > > > > https://codereview.chromium.org/2858333002/diff/1/content/public/android/java... > > > > > > content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java:499: > > > > if (!canPasteAsPlainText()) { > > > > Doesn't this rely on having a fresh value for |mCanEditRichlyForPastePopup|? > > > > Since |mCanEditRichlyForPastePopup| is only set for the paste popup I think > > you > > > > will be using a stale value. I have a CL (crrev.com/2785853002) that should > > fix > > > > this problem. I'd recommend waiting for that CL to land. > > > > > > |mCanEditRichlyForPastePopup| is an attribute of text area, it won't stale. > > But you are right, I didn't get this attribute for selection popup, so when we > > select some text before any paste popups, this option won't show in the menu. > > > > > What if there are multiple text areas? For example if you long-press in a text > > area that allows for rich editing and then select some text in a different text > > area that doesn't allow rich editing. Couldn't that lead to showing the option > > when you shouldn't? > > > > > This CL is actually fixing the bug that an empty option is showing in > > selection popup for blew O, and the feature itself only exist in O and above, so > > I think it is OK to land this one first, then wait for your CL so I can fix the > > |mCanEditRichlyForPastePopup| issue. WDYT? > > Why not always remove the option for the selection menu? > > That could also work. Either way I need to take care of selection menu after your CL landed, but I intend to keep this one simple. Let's remove the option for now and add it back after my CL lands.
> Let's remove the option for now and add it back after my CL lands. Updated, PTAL, thanks! :)
The CQ bit was checked by ctzsm@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/05/04 at 20:49:52, ctzsm wrote: > > Let's remove the option for now and add it back after my CL lands. > > Updated, PTAL, thanks! :) thanks! lgtm
Description was changed from ========== Add "paste as plain text" to SelectionPopup menu a) Remove blank option in selection popup for below O, b) Set MenuItem title for "paste as plain text" for O and above. BUG=718330 ========== to ========== Remove "paste as plain text" from selection menu "paste as plain text" introduced an empty option in selection menu due to the runtime string resource setting. Since we need to update |canEditRichly| flag for the option in selection menu, there is no simple way to do so right now, so simply remove this option. Need to add it back later. BUG=718330 ==========
Description was changed from ========== Remove "paste as plain text" from selection menu "paste as plain text" introduced an empty option in selection menu due to the runtime string resource setting. Since we need to update |canEditRichly| flag for the option in selection menu, there is no simple way to do so right now, so simply remove this option. Need to add it back later. BUG=718330 ========== to ========== Remove "paste as plain text" from selection menu "paste as plain text" introduced an empty option in selection menu due to the runtime string resource setting. Since we need to update |canEditRichly| flag for the option in selection menu, there is no simple way to do so right now, so simply remove this option. Need to add it back later. BUG=718330 ==========
Description was changed from ========== Remove "paste as plain text" from selection menu "paste as plain text" introduced an empty option in selection menu due to the runtime string resource setting. Since we need to update |canEditRichly| flag for the option in selection menu, there is no simple way to do so right now, so simply remove this option. Need to add it back later. BUG=718330 ========== to ========== Remove "paste as plain text" from selection menu "paste as plain text" introduced an empty option in selection menu due to the runtime string resource setting. Since we need to update |canEditRichly| flag for the option in selection menu, there is no simple way to do so right now, so simply remove this option. Need to add it back later. BUG=718330 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by ctzsm@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from aelias@chromium.org Link to the patchset: https://codereview.chromium.org/2858333002/#ps20001 (title: "remove the option for now")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1493934043734640, "parent_rev": "3ca7863c41560e94efdfdb21f0b1b4231e4a589e", "commit_rev": "a038875de60252fb6bf6fb429e5feab5b1d0c3de"}
Message was sent while issue was closed.
Description was changed from ========== Remove "paste as plain text" from selection menu "paste as plain text" introduced an empty option in selection menu due to the runtime string resource setting. Since we need to update |canEditRichly| flag for the option in selection menu, there is no simple way to do so right now, so simply remove this option. Need to add it back later. BUG=718330 ========== to ========== Remove "paste as plain text" from selection menu "paste as plain text" introduced an empty option in selection menu due to the runtime string resource setting. Since we need to update |canEditRichly| flag for the option in selection menu, there is no simple way to do so right now, so simply remove this option. Need to add it back later. BUG=718330 Review-Url: https://codereview.chromium.org/2858333002 Cr-Commit-Position: refs/heads/master@{#469483} Committed: https://chromium.googlesource.com/chromium/src/+/a038875de60252fb6bf6fb429e5f... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/a038875de60252fb6bf6fb429e5f... |