New issue
Advanced search Search tips

Issue 695359 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Document should own editing related classes instead of LocalFrame

Project Member Reported by yosin@chromium.org, Feb 23 2017

Issue description

The lifetime of FrameSeleciton is as same as DOMWindow. There are no good reasons to hold FrameSelection in LocalFrame.

This also implies rename FrameSelection to WindowSelection.
Note: Selection is reserved for new name of DOMSelection.
 
It appears to me that some other objects owned by LocalFrame should be better owned by DOMWindow:
- Editor
- SpellChecker
- InputMethodController
- IdleSpellCheckCallback

Is there any reason that they are better owned by LocalFrame?

Comment 2 by yosin@chromium.org, Feb 24 2017

>Is there any reason that they are better owned by LocalFrame?
No, it is historical reason; ease of lifetime management with ref-counting(?) 
Oilpan solves ref-counting issue.

Comment 3 by yosin@chromium.org, Feb 24 2017

Summary: DOMWIndow should own editing related classes instead of LocalFrame (was: Owner of FrameSeleciton should be DOMWindow)
We extend coverage of this issue.

We should transfer ownership of following classes to DOMWindow from LocalFrame
 - FamreSelection; should be renamed to WindowSeleciton
 - Editor
 - SpellChecker; we also move IdleSpellCheckerCallback to SpellChecker, since IdleSpellCheckerCallback is implementation detail
 - InputMethodCOntroller

Since lifetime of these classes is as same as DOMWindow.

Project Member

Comment 4 by bugdroid1@chromium.org, Feb 27 2017

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

commit d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403
Author: xiaochengh <xiaochengh@chromium.org>
Date: Mon Feb 27 05:20:49 2017

Move ownership of IdleSpellCheckCallback from LocalFrame to SpellChecker

IdleSpellCheckCallback is an implementation detail of Blink's SpellChecker,
and should better be owned by and hidden in SpellChecker, instead of being
exposed from LocalFrame.

This patch hence moves ownership of IdleSpellCheckCallback to SpellChecker.

BUG= 517298 , 695359

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

[modify] https://crrev.com/d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp
[modify] https://crrev.com/d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
[modify] https://crrev.com/d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h
[modify] https://crrev.com/d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/d9e6a0b2197094e8fd4b4f4cb66f19bdfd213403/third_party/WebKit/Source/web/WebLeakDetector.cpp

Comment 5 by yosin@chromium.org, Jun 23 2017

We should not move them to Page even if they work on active frame. 
When Page owns them, we need to consider OOPIF[1]


[1] https://codereview.chromium.org/2953503004#msg18

Comment 6 by yosin@chromium.org, Jun 23 2017

Summary: Document should own editing related classes instead of LocalFrame (was: DOMWIndow should own editing related classes instead of LocalFrame)
Because of lifetime of DOMWindow is longer than Document, we want to move Editor, etc, to Document. But, some Document doesn't associate to Frame.

We need to think more about lifetime of Editor...
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 25 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment