Closed
Bug 1483787
Opened 6 years ago
Closed 3 years ago
Implement fieldset/legend in terms of '-webkit-appearance'
Categories
(Core :: Layout, enhancement, P3)
Core
Layout
Tracking
()
RESOLVED
WONTFIX
Tracking | Status | |
---|---|---|
firefox63 | --- | affected |
People
(Reporter: zcorpan, Assigned: MatsPalmgren_bugz)
References
(Depends on 1 open bug, Blocks 3 open bugs)
Details
Attachments
(3 files, 2 obsolete files)
3.34 KB,
text/html
|
Details | |
7.32 KB,
image/png
|
Details | |
23.95 KB,
patch
|
Details | Diff | Splinter Review |
See proposal in https://github.com/whatwg/html/issues/3912
Comment 1•6 years ago
|
||
This would need fixing bug 1435658 to make dynamic changes work properly.
Depends on: 1435658
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 2•6 years ago
|
||
I took a stab at implementing the legend part of the draft spec to see if there are any implementation issues with it. It seems fairly straightforward to implement (although we also need to amend bug 1435658 for these values eventually). This patch allows an arbitrary (in-flow) box to become the rendered legend by setting -webkit-appearance:fieldset-legend. It's a bit unfortunate that the spec chose that property though, since setting it on <input> etc (that already have values in the UA sheet) loses its theme styling in that case, which seems unfortunate. So I wonder if a new property for this wouldn't be better after all, e.g. "legend: none | auto" so we don't interfere with an element's normal appearance. Thoughts? Also, is there a way to put individual -webkit-appearance values behind a pref? (FTR, I suspect we can probably get rid of the nsLegendFrame class as a follow-up after this, since it really doesn't do much.)
Assignee | ||
Comment 3•6 years ago
|
||
Also, this patch adds NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS *after* the <legend> frame subtree have been created rather than at the time the nsLegendFrame is created (before its kids). So I'm making the assumption that that bit doesn't influence frame construction of its descendants. Is that a valid assumption?
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #2) > Also, is there a way to put individual -webkit-appearance > values behind a pref? This can be done with #[parse(condition = "foo")], see the display values for an example. (In reply to Mats Palmgren (:mats) from comment #3) > Also, this patch adds NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS > *after* the <legend> frame subtree have been created rather > than at the time the nsLegendFrame is created (before its > kids). So I'm making the assumption that that bit doesn't > influence frame construction of its descendants. > Is that a valid assumption? I haven't seen anything that would break, but I haven't checked that carefully...
Reporter | ||
Comment 7•6 years ago
|
||
Does this need an intent to implement?
Summary: Implement fieldset/legend in terms of 'appearance' → Implement fieldset/legend in terms of '-webkit-appearance'
Assignee | ||
Comment 8•6 years ago
|
||
Assignee: nobody → mats
Attachment #9003499 -
Attachment is obsolete: true
Assignee | ||
Comment 9•6 years ago
|
||
(In reply to Simon Pieters from comment #7) > Does this need an intent to implement? I'd like the draft spec to stabilize a bit more before that. In particular, I don't think '-webkit-appearance' is the right property to use to trigger the rendered legend layout. I've filed a spec issue: https://github.com/whatwg/html/issues/3968
Assignee | ||
Comment 10•6 years ago
|
||
Note to self: dom/html/test/test_bug557087-3.html asserts: MOZ_CRASH(nsFieldSetFrame::InsertFrames not supported) at layout/forms/nsFieldSetFrame.cpp:692
Assignee | ||
Comment 11•6 years ago
|
||
Implemented legend:none|auto. Put all the new stuff behind a pref: layout.css.new-fieldset-legend.enabled
Attachment #9004570 -
Attachment is obsolete: true
Assignee | ||
Comment 12•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=21707c03032030a80f08906358a671cad3a43fda
Assignee | ||
Comment 13•3 years ago
|
||
Using appearance
for this is probably not the right solution.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•