Closed Bug 1767386 Opened 3 years ago Closed 3 years ago

WARNING: '!document', file /builds/worker/checkouts/gecko/editor/libeditor/CSSEditUtils.cpp:562

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

Details

Attachments

(2 files)

WARNING: '!document', file /builds/worker/checkouts/gecko/editor/libeditor/CSSEditUtils.cpp:562
WARNING: '!computedDOMStyle', file /builds/worker/checkouts/gecko/editor/libeditor/CSSEditUtils.cpp:511
WARNING: CSSEditUtils::GetComputedCSSInlinePropertyBase() failed: file /builds/worker/checkouts/gecko/editor/libeditor/CSSEditUtils.cpp:961
WARNING: CSSEditUtils::GetCSSEquivalentToHTMLInlineStyleSetInternal() failed: file /builds/worker/checkouts/gecko/editor/libeditor/CSSEditUtils.cpp:1011

CSSEditUtils::GetCSSEquivalentToHTMLInlineStyleSetInternal may return error
which is unexpected. And the methods changed by this patch may cause destroying
editor if and only if they treat computed style. Therefore, they should be
non-static members and they should return error to make each caller avoid the
unexpected cases if necessary.

CSSEditUtils will refer the composed document of the element to compute the
style of it. However, it'll fail if RemoveStyleInside has already removed
the element from the DOM tree. Therefore, RemoveInlinePropertyInternal
should stop handling the element immediately after calling RemoveStyleInside
if the element is removed.

Depends on D145303

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/55a42e3b6193 part 1: Make some `CSSEditUtils` methods using `GetCSSEquivalentToHTMLInlineStyleSetInternal` return error with `Result` r=m_kato https://hg.mozilla.org/integration/autoland/rev/d73edeb576a4 part 2: Make `HTMLEditor::RemoveInlinePropertyInternal` stop setting/removing style of an element if it's removed by `RemoveStyleInside` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: