[css-lists] Implement the counter-set property
Categories
(Core :: Layout: Generated Content, Lists, and Counters, enhancement, P3)
Tracking
()
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
31.65 KB,
patch
|
Details | Diff | Splinter Review | |
5.77 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•6 years ago
|
||
It's basically the same as counter-increment except that it assigns an absolute value instead of incrementing. It's needed to implement <li value>, which will happen in bug 288704.
Assignee | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
•
|
||
Comment 4•6 years ago
•
|
||
Assignee | ||
Comment 5•6 years ago
•
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
+ void SetCounterSetAt(uint32_t aIndex, const nsString& aCounter, + int32_t aValue) {
nit: Please clang-format this before landing, indentation seems broken.
Thanks, but do reviewers still need to worry about code formatting?
Isn't it automated by a commit hook now?
Assignee | ||
Comment 6•6 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
+void Gecko_ClearAndResizeCounterSets(nsStyleContent* aContent,
If you fancy about it, you can refactor this as well so there's a single Clear / Copy function for all three properties that takes an nsTArray<nsStyleCounterData>*, and just call it with
&mut self.gecko.m${counter_property}s
from gecko.mako.rs to reduce the duplication on the C++ side as well (it should allow you to remove the Set / Allocate functions from nsStyleStruct.h.
That seems to be in generated code, so it's beyond my level of
understanding the internals of Stylo, sorry.
Instead, let's rename
CounterReset
toCounterSetOrReset
everywhere, and just use it in both .mako.rs entries.
OK, I've merged Set/Reset everywhere.
Assignee | ||
Comment 7•6 years ago
•
|
||
So Bugzilla defaults to markdown now? Hmm, how do I turn that off?
(there is a "LI value" tag in the last comment that was hidden)
Comment 8•6 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #6)
That seems to be in generated code, so it's beyond my level of
understanding the internals of Stylo, sorry.
No problem, I'm slowly trying to make it less magical... :)
(In reply to Mats Palmgren (:mats) from comment #5)
Thanks, but do reviewers still need to worry about code formatting?
Isn't it automated by a commit hook now?
I think it's not (yet?), but icbw. There's a Phabricator hook somewhere that leaves a comment if your patch is misformatted.
Comment 9•6 years ago
|
||
RE formatting: the commit hook that mats mentioned has to be enabled manually in order for it to work -- see bug 1507007 comment 11.
(I believe some piece of the phabricator workflow -- maybe "moz-phab" itself? -- does a local clang-format as well. And maybe there's a bot that posts too if you bypasss moz-phab by using "arc" directly. But anyway, that moz-phab autoformatting clearly doesn't happen for patches posted directly to bugzilla and landed directly on inbound.)
Comment 10•6 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #7)
So Bugzilla defaults to markdown now? Hmm, how do I turn that off?
(there is a "LI value" tag in the last comment that was hidden)
Apparently you cannot, see bug 1518304.
Assignee | ||
Comment 11•6 years ago
|
||
Apparently you cannot, see bug 1518304.
Yikes. :(
Comment 12•6 years ago
|
||
Updated•6 years ago
|
Comment 13•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/467284f16c74
https://hg.mozilla.org/mozilla-central/rev/9535b36adb21
Updated•6 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
Comment 16•5 years ago
|
||
I've created a property page for counter-set it is still waiting for some data to be merged. Also added a line to the Firefox 68 release notes.
Updated•5 years ago
|
Description
•