Make style editor methods which take HTML property and attribute separately take EditorInlineStyle instead
Categories
(Core :: DOM: Editor, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox109 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(18 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
I'm now afraid to touch the logic in CSSEditUtils because an user sets HTML property to nullptr and attribute to nsGkAtoms::align.
https://searchfox.org/mozilla-central/rev/d7d2cc647772de15c4c5aa47f74d25d0e379e404/editor/libeditor/HTMLEditorState.cpp#346
For avoiding regressions, I think that we should make all of them take EditorInlineStyle or EditorInlineStyleAndValue to check the relation at the root callers. Then, perhaps, they should be renamed to EditorElementStyle and EditorElementStyleAndValue since only setting attribute works as generic attribute change of any elements.
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
It does not make sense to make the static method take only EditorInlineStyle.
Depends on D162501
| Assignee | ||
Comment 3•3 years ago
|
||
Depends on D162502
| Assignee | ||
Comment 4•3 years ago
|
||
Depends on D162503
| Assignee | ||
Comment 5•3 years ago
|
||
Depends on D162504
| Assignee | ||
Comment 6•3 years ago
|
||
Depends on D162505
| Assignee | ||
Comment 7•3 years ago
|
||
Depends on D162506
| Assignee | ||
Comment 8•3 years ago
|
||
They are called each other. Therefore, this patch changes them once.
Depends on D162507
| Assignee | ||
Comment 9•3 years ago
|
||
Depends on D162508
| Assignee | ||
Comment 10•3 years ago
|
||
Depends on D162509
| Assignee | ||
Comment 11•3 years ago
|
||
Depends on D162510
| Assignee | ||
Comment 12•3 years ago
|
||
Depends on D162511
| Assignee | ||
Comment 13•3 years ago
|
||
Depends on D162512
| Assignee | ||
Comment 14•3 years ago
|
||
This patch creates a base class of EditorInlineStyle, the name is
EditorElementStyle. It requires only attribute of HTML. However, it's
obviously different from EditorInlineStyle's rule which is mHTMLProperty
cannot be nullptr. Therefore, the methods which can treat only
EditorInlineStyle do not want the data only whose attribute is not nullptr.
For solving this issue at build time, this approach is better than renaming
EditorInlineStyle and make it have the new mode.
Depends on D162513
| Assignee | ||
Comment 15•3 years ago
|
||
Depends on D162514
| Assignee | ||
Comment 16•3 years ago
|
||
Depends on D162515
| Assignee | ||
Comment 17•3 years ago
|
||
It can take const Element& instead of nsINode*, then most callers can be
simpler.
Depends on D162516
| Assignee | ||
Comment 18•3 years ago
|
||
And also making it and BuildCSSDeclarations return pairs of CSS property and
value with an array makes their callers simpler.
Depends on D162517
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Comment 20•3 years ago
|
||
Comment 21•3 years ago
|
||
Comment 22•3 years ago
|
||
Comment 23•3 years ago
|
||
Comment 24•3 years ago
|
||
Comment 25•3 years ago
|
||
Comment 26•3 years ago
|
||
Comment 27•3 years ago
|
||
Comment 28•3 years ago
|
||
Comment 29•3 years ago
|
||
Comment 30•3 years ago
|
||
Comment 31•3 years ago
|
||
Comment 32•3 years ago
|
||
Comment 33•3 years ago
|
||
Comment 34•3 years ago
|
||
Comment 35•3 years ago
|
||
Comment 36•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6123f16df995
https://hg.mozilla.org/mozilla-central/rev/c53e1725fcd7
https://hg.mozilla.org/mozilla-central/rev/43809c02bf7e
https://hg.mozilla.org/mozilla-central/rev/cec746f53e3f
https://hg.mozilla.org/mozilla-central/rev/6423b58e19d9
https://hg.mozilla.org/mozilla-central/rev/80add9777122
https://hg.mozilla.org/mozilla-central/rev/e30ed4ad5e7e
https://hg.mozilla.org/mozilla-central/rev/87a1b8d813d2
https://hg.mozilla.org/mozilla-central/rev/98fc9276e73c
Comment 37•3 years ago
|
||
Comment 38•3 years ago
|
||
Comment 39•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/883bf0a6d10e
https://hg.mozilla.org/mozilla-central/rev/9252b81cc71c
https://hg.mozilla.org/mozilla-central/rev/d6224033594d
https://hg.mozilla.org/mozilla-central/rev/4f790bc14ced
https://hg.mozilla.org/mozilla-central/rev/b20755464664
https://hg.mozilla.org/mozilla-central/rev/4f07e20564d4
https://hg.mozilla.org/mozilla-central/rev/e59040efaf3b
https://hg.mozilla.org/mozilla-central/rev/13da38d1f15e
https://hg.mozilla.org/mozilla-central/rev/59d691febda1
| Assignee | ||
Updated•3 years ago
|
Description
•