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)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
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•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
It does not make sense to make the static method take only EditorInlineStyle
.
Depends on D162501
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D162502
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D162503
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D162504
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D162505
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D162506
Assignee | ||
Comment 8•2 years ago
|
||
They are called each other. Therefore, this patch changes them once.
Depends on D162507
Assignee | ||
Comment 9•2 years ago
|
||
Depends on D162508
Assignee | ||
Comment 10•2 years ago
|
||
Depends on D162509
Assignee | ||
Comment 11•2 years ago
|
||
Depends on D162510
Assignee | ||
Comment 12•2 years ago
|
||
Depends on D162511
Assignee | ||
Comment 13•2 years ago
|
||
Depends on D162512
Assignee | ||
Comment 14•2 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•2 years ago
|
||
Depends on D162514
Assignee | ||
Comment 16•2 years ago
|
||
Depends on D162515
Assignee | ||
Comment 17•2 years ago
|
||
It can take const Element&
instead of nsINode*
, then most callers can be
simpler.
Depends on D162516
Assignee | ||
Comment 18•2 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•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 20•2 years ago
|
||
Comment 21•2 years ago
|
||
Comment 22•2 years ago
|
||
Comment 23•2 years ago
|
||
Comment 24•2 years ago
|
||
Comment 25•2 years ago
|
||
Comment 26•2 years ago
|
||
Comment 27•2 years ago
|
||
Comment 28•2 years ago
|
||
Comment 29•2 years ago
|
||
Comment 30•2 years ago
|
||
Comment 31•2 years ago
|
||
Comment 32•2 years ago
|
||
Comment 33•2 years ago
|
||
Comment 34•2 years ago
|
||
Comment 35•2 years ago
|
||
Comment 36•2 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•2 years ago
|
||
Comment 38•2 years ago
|
||
Comment 39•2 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•2 years ago
|
Description
•