Closed Bug 1939220 Opened 1 month ago Closed 17 days ago

Make `WSRunScanner::TextFragmentData` free from editing host

Categories

(Core :: DOM: Editor, task)

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Regressed 1 open bug)

Details

Attachments

(6 files)

No description provided.

Its role is scanning the DOM. Therefore, it can know which node is an editing
host during a scan. Therefore, it does not require the editing host parameter.
To fix that, some utility methods of HTMLEditUtils needs to work with
non-editable nodes. Therefore, this patch also updates HTMLEditUtils.

Finally, this gets rid of the NS_ASSERTIONs in the constructor of
TextFragmentData because it'll be available with non-editable nodes too.
Although current all callers assume that it works as in an editing host.

Depends on D232933

It stores the editing host. However, its role is scan the DOM from a point in
a block containing the point. Therefore, it can know which node is editing
host when it scans without computing the editing host. So, it does not need
to be specified the editing host.

Then, it can scan non-editable DOM too. Therefore, this extends some utility
methods of HTMLEditUtils which are used by TextFragmentData and
BoundaryData.

Depends on D232936

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/f33e7201796d part 1: Split `WSRunObject` files for `WSRunScanner` and `WhiteSpaceVisibilityKeeper` r=m_kato https://hg.mozilla.org/integration/autoland/rev/81260f9e6677 part 2: Split `WSRunScanner.cpp` to define the methods of the nested classes r=m_kato https://hg.mozilla.org/integration/autoland/rev/cbd9e4f12bd2 part 3: Make `TextFragmentData::BoundaryData` not depend on the editing host r=m_kato https://hg.mozilla.org/integration/autoland/rev/b663c3b349f0 part 4: Make `TextFragmentData::Get(InclusiveNext|Previous)EditableCharPoint` possible to scan non-editable text too r=m_kato https://hg.mozilla.org/integration/autoland/rev/129d2cd2e11e part 5: Make `TextFragmentData::Get(EndOf|First)CollapsibleASCIIWhiteSpaces` possible to scan non-editable text too r=m_kato https://hg.mozilla.org/integration/autoland/rev/b15602e6fbf5 part 6: Make `TextFragmentData` free from the editing host r=m_kato

Hmm, I guess that it's caused by a failure of rebasing. Sorry for that.

Flags: needinfo?(masayuki)
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/e8e0c9b25e80 part 1: Split `WSRunObject` files for `WSRunScanner` and `WhiteSpaceVisibilityKeeper` r=m_kato https://hg.mozilla.org/integration/autoland/rev/aa3801613a81 part 2: Split `WSRunScanner.cpp` to define the methods of the nested classes r=m_kato https://hg.mozilla.org/integration/autoland/rev/71063939b39c part 3: Make `TextFragmentData::BoundaryData` not depend on the editing host r=m_kato https://hg.mozilla.org/integration/autoland/rev/11a706f516c2 part 4: Make `TextFragmentData::Get(InclusiveNext|Previous)EditableCharPoint` possible to scan non-editable text too r=m_kato https://hg.mozilla.org/integration/autoland/rev/afcb603e87d0 part 5: Make `TextFragmentData::Get(EndOf|First)CollapsibleASCIIWhiteSpaces` possible to scan non-editable text too r=m_kato https://hg.mozilla.org/integration/autoland/rev/00f73b8c51ab part 6: Make `TextFragmentData` free from the editing host r=m_kato
Regressions: 1942580
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: