[css-inline-3] Implement CSS "baseline-source: auto | first | last"
Categories
(Core :: Layout: Block and Inline, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox115 | --- | fixed |
People
(Reporter: dholbert, Assigned: dshin)
References
(Blocks 3 open bugs)
Details
(Keywords: dev-doc-needed)
Attachments
(3 files)
https://drafts.csswg.org/css-inline-3/#baseline-source
This lets you control which baseline to use, when baseline-aligning an inline-level box that has multiple baselines (e.g. inline-block or inline-flex).
Values:
auto
Specifies last-baseline alignment for inline-block,
first-baseline alignment for everything else.
first
Specifies first-baseline alignment.
last
Specifies last-baseline alignment.
WPT tests already exist; see bug 1805273 for the current test-failures that are testing this feature.
Reporter | ||
Comment 1•2 years ago
|
||
Some references:
- webkit bug: https://bugs.webkit.org/show_bug.cgi?id=249094
- gecko standards-position (where I say we should do this): https://github.com/mozilla/standards-positions/issues/727
- Blink bug (already implemented): https://bugs.chromium.org/p/chromium/issues/detail?id=1399711
- Blink intent-to-ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/gLNyu0lTRS0/m/yHcJhlDMBgAJ
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 2•2 years ago
|
||
IanK posted a demo on twitter.
Tweet: https://twitter.com/bfgeek/status/1612518098611089408
Demo (doesn't work anywhere right now, except maybe bleeding edge Chrome): https://jsfiddle.net/pj7vudxq/
Screenshot of the demo's rendering, with the feature implemented: https://twitter.com/bfgeek/status/1612518098611089408/photo/1
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Comment 4•2 years ago
|
||
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for inline-block
scroll containers
for 3 different baseline-source
values:
auto
: Last baseline, margin-endfirst
: Border-box clamped offset to the first linelast
: Border-box clamped offset to the last line
Depends on D173884
Assignee | ||
Comment 5•2 years ago
|
||
Remaining failures relate to table captions missing & webkit-line-clamp.
Depends on D173886
Comment 7•2 years ago
•
|
||
Backed out for causing build bustages on nsLineLayout.cpp.
LATER EDIT: some other failures appeared:
[task 2023-05-01T14:44:11.662Z] 14:44:11 INFO - gmake[4]: Entering directory '/builds/worker/workspace/obj-build/layout/generic'
[task 2023-05-01T14:44:11.665Z] 14:44:11 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -Qunused-arguments --target=i686-linux-android16 -o Unified_cpp_layout_generic3.o -c -I/builds/worker/workspace/obj-build/dist/stl_wrappers -I/builds/worker/workspace/obj-build/dist/system_wrappers -include /builds/worker/checkouts/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/layout/generic -I/builds/worker/workspace/obj-build/layout/generic -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/layout/base -I/builds/worker/checkouts/gecko/layout/forms -I/builds/worker/checkouts/gecko/layout/painting -I/builds/worker/checkouts/gecko/layout/style -I/builds/worker/checkouts/gecko/layout/tables -I/builds/worker/checkouts/gecko/layout/xul -I/builds/worker/checkouts/gecko/docshell/base -I/builds/worker/checkouts/gecko/dom/base -I/builds/worker/checkouts/gecko/dom/html -I/builds/worker/checkouts/gecko/dom/xul -I/builds/worker/checkouts/gecko/gfx/cairo/cairo/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h --sysroot=/builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --gcc-toolchain=/builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64 -fno-sized-deallocation -fno-aligned-new -fno-short-enums -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -gdwarf-4 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -Oz -mno-outline -fno-omit-frame-pointer -funwind-tables -Werror -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wenum-compare-conditional -Wenum-float-conversion -Wno-ambiguous-reversed-operator -Wno-error=deprecated -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-pragma -Wno-error=deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off -MD -MP -MF .deps/Unified_cpp_layout_generic3.o.pp Unified_cpp_layout_generic3.cpp
[task 2023-05-01T14:44:11.665Z] 14:44:11 INFO - In file included from Unified_cpp_layout_generic3.cpp:20:
[task 2023-05-01T14:44:11.665Z] 14:44:11 ERROR - /builds/worker/checkouts/gecko/layout/generic/nsLineLayout.cpp:1382:7: error: non-void lambda does not return a value in all control paths [-Werror,-Wreturn-type]
[task 2023-05-01T14:44:11.665Z] 14:44:11 INFO - }();
[task 2023-05-01T14:44:11.665Z] 14:44:11 INFO - ^
[task 2023-05-01T14:44:11.665Z] 14:44:11 INFO - 1 error generated.
[task 2023-05-01T14:44:11.666Z] 14:44:11 ERROR - gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:670: Unified_cpp_layout_generic3.o] Error 1
[task 2023-05-01T14:44:11.666Z] 14:44:11 INFO - gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/layout/generic'
Assignee | ||
Comment 8•2 years ago
|
||
Fix in to ensure that when the unreachable assert gets taken out in opt build, we return something
Comment 10•2 years ago
•
|
||
Backed out for causing build bustages on nsBlockFrame.cpp and other failures.
Failure logs:
- build bustages - https://treeherder.mozilla.org/logviewer?job_id=414289433&repo=autoland
- https://treeherder.mozilla.org/logviewer?job_id=414289439&repo=autoland
- mochitests - https://treeherder.mozilla.org/logviewer?job_id=414291821&repo=autoland
- https://treeherder.mozilla.org/logviewer?job_id=414292474&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/480a84dea65531d52a561c85ee85b329436a1dd1
Assignee | ||
Comment 11•2 years ago
|
||
Build bustage is interesting - Seems like the compiler matched the concrete LineIterator
type instead of the template parameter of the same name. Probably change the name to be distinct anyway
Mochitests fixed.
Comment 12•2 years ago
|
||
Comment 13•2 years ago
|
||
Backed out for causing build bustages
- Backout link
- Push with failures
- Failure Log
- Failure line: /builds/worker/checkouts/gecko/layout/generic/nsLineLayout.cpp:1348:1: error: control reaches end of non-void function [-Werror=return-type]
Assignee | ||
Comment 14•2 years ago
|
||
That is strange that the compiler doesn't like it. it's a switch statement for a enum class that handles all enums, so that should not cause any issues...
Nevertheless, the function in question isn't needed anymore.
Reporter | ||
Comment 15•2 years ago
•
|
||
(In reply to David Shin[:dshin] from comment #14)
That is strange that the compiler doesn't like it. it's a switch statement for a enum class that handles all enums, so that should not cause any issues...
I think that's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87950 and also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53479
(It sounds like gcc is erring on the side of caution, in case the enum instance was constructed from an integer literal; or if it represents a bitmask, for example, and there are masked combinations-of-bits that may not have names & aren't handled by the switch statement.)
Comment 16•2 years ago
|
||
Comment 17•2 years ago
|
||
Backed out for causing node devtools failures in devtools/client/debugger/src/components/test/QuickOpenModal.spec.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/6b1000bbb45e3bb5a8777629383b432a2d0e730b
Assignee | ||
Comment 18•2 years ago
|
||
Hm, this test passes locally, and doesn't seem related to changes I made, but I might be missing something.
:apoirot, does this test need to be updated for the CSS property?
Assignee | ||
Comment 19•2 years ago
|
||
Hm, retriggers were successful - seems like an intermittent. Bug 1833475 filed, re-landing.
Comment 20•2 years ago
|
||
Comment 21•2 years ago
|
||
Your changes seems unrelated to this failing test (QuickOpenModal).
So most likely some other changeset from autoland should have been backed out instead.
It is rare for these node tests to be intermittent, but I'm wondering if this test started to be intermittent starting from bug 1832567 landing.
I just requested to run these tests on:
https://treeherder.mozilla.org/jobs?repo=autoland&collapsedPushes=1241737%2C1241741&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception%2Crunning%2Cpending%2Crunnable&searchStr=source-test-node-devtools-tests&revision=21cb9d7c0aa874f93ff8378505c8ccc433f4f628
and
https://treeherder.mozilla.org/jobs?repo=autoland&collapsedPushes=1241737%2C1241741&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception%2Crunning%2Cpending%2Crunnable&searchStr=source-test-node-devtools-tests&revision=035b9c71b0426a44e2f8cf7ccdcd304300a02e1a
to see if that's that.
Comment 22•2 years ago
|
||
Backed out for causing for causing build bustages in layout/generic/nsLineLayout.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/620e1c545fa2d87c23d3d0bcacd7006d1b535c66
Assignee | ||
Comment 23•2 years ago
|
||
Sorry about the noise.
Build run: https://treeherder.mozilla.org/jobs?repo=try&revision=bf2f6868dbfb1fee7737d31840550cd55f12d922
Test run: https://treeherder.mozilla.org/jobs?repo=try&revision=4de463a2e0a0993a46ef7546b78dd0b352495180&selectedTaskRun=VNy9XfxLRtOZmr9Ys4qkIg.0
Comment 24•2 years ago
|
||
Comment 25•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•