New issue
Advanced search Search tips

Issue 712395 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 638351
issue 733880



Sign in to add a comment

SpellCheckPanel is a RenderViewObserver

Project Member Reported by xiaoche...@chromium.org, Apr 17 2017

Issue description

With SpellCheckPanel being a RenderViewObserver, it doesn't work correctly in OOPIF.

Repro steps (Mac only):

1. Open http://csreis.github.io/tests/cross-site-iframe-simple.html
2. Type some misspelled words in an input field in the subframe

3a. Press ⌘+;
Expected: The next misspelled word is marked
Actual: Nothing happens

3b. Press ⌘+:
Expected: Spell check panel appears showing the next misspelled word
Actual: Spell check panel appears but shows nothing
 
Blocking: 638351
Note: steps in #1 requires --site-per-process or --top-document-isolation flag

I'm not sure if the correct fix is changing SpellCheckPanel into a RenderFrameObserver:

SpellCheckPanel currently holds a |bool spelling_panel_visible_| field. Since there is only one panel for the entire browser, if the field is moved as frame-based, it must be synced across all frames, which doesn't seem to be a clean solution.

...Or do we really want to sync this field? Even without any site isolation flag, the field is currently not synced across different tabs, so if we press ⌘+: to open the panel in another tab, and then go to another tab and press ⌘+: again, the panel is not dismissed --- and it can't be dismissed regardless of how many times ⌘+: is pressed or which tabs we switch into.

So it seems that the synchronization of this field is already broken. So a possible solution is to forget about the synchronization so that at least it checks something...
Components: -UI>Browser>Spellcheck UI>Browser>Language>Spellcheck

Comment 4 by noel@chromium.org, May 30 2017

About making it RenderFrameObserver: we'd need that at least to have any chance of the spelling panel working in OOPIF.

Agree with your comments about the |bool spelling_panel_visible_| field.

> ...Or do we really want to sync this field?

Good question.  Not sure it needed, and as you noted the synchronization of this field is already broken, across tabs, outside of site isolation.

Anyho, I have a patch [1] to make the spelling panel RenderFrame associated, rather than RenderView associated, as the first step to resolve this issue.  The example site from the OP works with that patch.

[1] https://chromium-review.googlesource.com/c/515323

Comment 5 by noel@chromium.org, May 30 2017

Owner: noel@chromium.org
I'll take the bug while we attempt to fix the RenderFrame associated part of this issue.
Thanks for working on this issue!

Comment 7 by noel@chromium.org, May 31 2017

Status: Started (was: Available)
No worries, patch sent for review.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 15 2017

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

commit 08fdafe21e81711142065b8251af2e5ecd268707
Author: Noel Gordon <noel@chromium.org>
Date: Thu Jun 15 10:39:24 2017

Convert SpellCheckPanel SpellCheckPanelHost IPC to mojo

The spelling and grammar checking panel is an OSX feature [1],
available in Mac Chrome via BUILDFLAG(HAS_SPELLCHECK_PANEL),
used as a spell-correction aid for contentEditable, <input>
and <textarea>, and designMode document content that has the
focus on the current web page.

- Replace the spell check panel host and client chrome IPCs
  with mojo ( bug 714480 ).
- Move the spelling panel client interface from RenderView to
  RenderFrame, so that it works with OOPIF ( bug 712395 ).
- Update the browser Mac render view delegate to send spelling
  panel client messages to the focused RenderFrame.
- In Blink, move the WebSpellCheckClient off WebView and make
  it WebLocalFrame associated so it works with OOPIF.
- Rename it to WebSpellCheckPanelHostClient and remove its API
  from the SpellCheckerClientImpl class to address TODO.
- Make WebSpellCheckPanelHostClient pure virtual, add an empty
  impl of it to EmptyClients.h to satisfy LocalFrameClient.
- Add an OOPIF browser test to verify that the spelling panel
  can be shown from an OOPIF frame ( bug 712395 ).

[1] https://support.apple.com/kb/PH18451?locale=en_US

Bug:  714480 , 712395 
Change-Id: I964111685b2bf22bf54fd4e6e20f0861edf68b51
Reviewed-on: https://chromium-review.googlesource.com/515323
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Rachel Blum <groby@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Johan Tibell <tibell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479664}
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/BUILD.gn
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/chrome_content_browser_manifest_overlay.json
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/chrome_content_renderer_manifest_overlay.json
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/chrome_site_per_process_browsertest.cc
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
[add] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/spellchecker/spell_check_panel_host_impl.cc
[add] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/spellchecker/spell_check_panel_host_impl.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac.cc
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/chrome/renderer/chrome_content_renderer_client.cc
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/components/spellcheck/browser/spellcheck_message_filter_platform.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/components/spellcheck/browser/spellcheck_message_filter_platform_android.cc
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/components/spellcheck/common/BUILD.gn
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/components/spellcheck/common/spellcheck_messages.h
[add] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/components/spellcheck/common/spellcheck_panel.mojom
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/components/spellcheck/renderer/spellcheck_panel.cc
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/components/spellcheck/renderer/spellcheck_panel.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerClient.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerClientImpl.cpp
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerClientImpl.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/exported/WebViewBase.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/frame/LocalFrameClient.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/core/loader/EmptyClients.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/web/LocalFrameClientImpl.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/web/WebLocalFrameImpl.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/web/WebViewImpl.cpp
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/Source/web/WebViewImpl.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/public/platform/WebSpellCheckPanelHostClient.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/public/web/WebLocalFrame.h
[delete] https://crrev.com/56f1632a383ddb22bbbdf8b25000d36032ff1231/third_party/WebKit/public/web/WebSpellCheckClient.h
[modify] https://crrev.com/08fdafe21e81711142065b8251af2e5ecd268707/third_party/WebKit/public/web/WebView.h

Comment 9 by noel@chromium.org, Jun 16 2017

Cc: -xiaoche...@chromium.org noel@chromium.org
Owner: xiaoche...@chromium.org
OK that's the first part.  Next would be |bool spelling_panel_visible_| field issue, so over to you.

Comment 10 by noel@chromium.org, Jun 16 2017

Status: Assigned (was: Started)
Status: Fixed (was: Assigned)
Filed a new bug for the field maintenance issue.

Let's close this one since SpellCheckPanel is already an RFO.

Comment 12 by noel@chromium.org, Jun 16 2017

Sounds good to me.

Comment 13 by noel@chromium.org, Jun 16 2017

Blocking: 733880

Sign in to add a comment