New issue
Advanced search Search tips

Issue 711509 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

Code cleanup related to spell checker

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

Issue description

1. WebSpellCheckClient and WebTextCheckClient should be moved to WebKit/public/platform, so that we don't need to wrap them with SpellCheckerClientImpl and TextCheckerClientImpl

2. Ensure that SpellCheckPanel is compiled and used only on Mac. In this way we can get rid of some redundant #if USE_BROWSER_SPELLCHECK

3. Definitions of SpellCheck.* UMA should be moved to the public histograms.xml

4. Class renaming:
TextCheckerClient[Impl] --> SpellCheckerClient[Impl]
SpellCheckerClient[Impl] --> SpellingUIClient[Impl]
...
 
Components: Blink>Editing>Spellcheck UI>Browser>Spellcheck
Labels: -Type-Bug Type-Task
Owner: xiaoche...@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 14 2017

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

commit af00eab7c9c6666be2a8c6876280df4fbdb9c655
Author: xiaochengh <xiaochengh@chromium.org>
Date: Fri Apr 14 21:16:42 2017

Remove a TODO from components/spellcheck/renderer/BUILD.gn

BUG=711509

Review-Url: https://codereview.chromium.org/2820433007
Cr-Commit-Position: refs/heads/master@{#464796}

[modify] https://crrev.com/af00eab7c9c6666be2a8c6876280df4fbdb9c655/components/spellcheck/renderer/BUILD.gn

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 20 2017

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

commit 34b5b42e28359dad00ab6f66a2516539a87422f7
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Apr 20 01:35:20 2017

Change WebLocalFrame::SpellingMarkerOffsetsForTest to a local function in WebFrameTest

The above mentioned function is only used in WebFrameTest, so this patch
moves it to WebFrameTest.cpp as a static function for better code
health.

BUG=711509

Review-Url: https://codereview.chromium.org/2827913002
Cr-Commit-Position: refs/heads/master@{#465850}

[modify] https://crrev.com/34b5b42e28359dad00ab6f66a2516539a87422f7/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
[modify] https://crrev.com/34b5b42e28359dad00ab6f66a2516539a87422f7/third_party/WebKit/Source/web/WebLocalFrameImpl.h
[modify] https://crrev.com/34b5b42e28359dad00ab6f66a2516539a87422f7/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
[modify] https://crrev.com/34b5b42e28359dad00ab6f66a2516539a87422f7/third_party/WebKit/public/web/WebLocalFrame.h

Components: -UI>Browser>Spellcheck UI>Browser>Language>Spellcheck
Summary of current status:

> 1. WebSpellCheckClient and WebTextCheckClient should be moved to
> WebKit/public/platform, so that we don't need to wrap them with
> SpellCheckerClientImpl and TextCheckerClientImpl

Done (in a different way). dgozman@ removed the XXXClientImpl classes.

> 2. Ensure that SpellCheckPanel is compiled and used only on Mac.
> In this way we can get rid of some redundant #if USE_BROWSER_SPELLCHECK

Done.

> 3. Definitions of SpellCheck.* UMA should be moved to the public
> histograms.xml

Not done.

> 4. Class renaming:
> TextCheckerClient[Impl] --> SpellCheckerClient[Impl]
> SpellCheckerClient[Impl] --> SpellingUIClient[Impl]
> ...

Not needed.

I planned this renamining because there were too many XXXClient classes with confusing names. Now that we only have WebTextCheckClient and WebSpellCheckPanelHostClient, there's no longer confusion in names.
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 20 2017

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

commit 1ee3c4769225631dfb2c472234a6fc2f03743c46
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Dec 20 23:18:19 2017

Remove a TODO of renaming WebTextCheckClient

We used to have a lot of spellchecking-related classes with confusing
names [Web]{Spell,Text}XXXClient[Impl], making it hard to distinguish
them. So we planned to rename some of them for better clarity.

Now that we only have to such classes with clear names, the TODO
is no longer needed.

The only two remaining classes are:
- WebTextCheckClient
- WebSpellCheckPanelHostClient

Bug: 711509
Notry: True
Change-Id: Ieb52095aca9fbec19a4773e3104edb9e51760724
Reviewed-on: https://chromium-review.googlesource.com/837654
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525507}
[modify] https://crrev.com/1ee3c4769225631dfb2c472234a6fc2f03743c46/third_party/WebKit/public/web/WebTextCheckClient.h

Sign in to add a comment