Simon Sapin
dd9dfc66e3
Use a new BoxContentSizes
enum instead of Option<ContentSizes>
2019-12-04 15:36:05 +01:00
Simon Sapin
38e8fd1e99
Replace boolean parameters by a new ContentSizesRequest
enum
2019-12-04 15:10:11 +01:00
Simon Sapin
6763e7e4ae
Review nits
2019-12-04 14:22:13 +01:00
Simon Sapin
607df04849
Replace a large tuple return type with a new struct
2019-12-04 13:56:42 +01:00
Simon Sapin
038f83fbc5
Replace a pair of macros by methods
2019-12-04 13:47:59 +01:00
Simon Sapin
01034b10e1
Use Sides::inline_sum
method
2019-12-04 13:47:13 +01:00
Simon Sapin
77d2c45991
Fix incorrect variable name
...
This was not the specified value
2019-12-04 13:37:20 +01:00
Simon Sapin
34e8cda801
Rename ReplacedContent::layout to make_fragments and simplify its API
2019-12-03 15:11:35 +01:00
Simon Sapin
b8db9459bc
Add layout for 'inline-block' and other atomic inline-level boxes
2019-12-03 15:11:35 +01:00
Simon Sapin
46f0f7d7e2
Implement shrink-to-fit for abspos
2019-12-03 15:11:35 +01:00
Simon Sapin
efa1885e1b
Remove IndependentFormattingContext::layout
...
Callers should handle replaced v.s. not separately
2019-12-03 15:11:35 +01:00
Simon Sapin
c056e5b6b0
Finish plumbing intrinsic min/max-content through box construction
2019-12-03 15:11:35 +01:00
Simon Sapin
da36fcddb0
Add box construction for 'inline-block'…
...
… and other atomic inline-level boxes.
2019-12-03 15:11:35 +01:00
Simon Sapin
303b36f17b
Add content sizes computation for block containers
2019-12-03 15:11:35 +01:00
Simon Sapin
78bfa45eab
Add a Target
struct for mapfold_reduce_into
call
2019-12-03 15:11:35 +01:00
Simon Sapin
cfdd23ac16
Add a request_content_sizes
parameter to IndependentFormattingContext::construct
2019-12-03 15:11:35 +01:00
Simon Sapin
2c124b9d0b
Add inline_size_is_auto
2019-12-03 15:11:35 +01:00
Simon Sapin
6a5b8337a1
Rename IntrinsicSizes to ContentSizes
2019-12-03 15:11:35 +01:00
Simon Sapin
4e6e31a76c
Pass a LayoutContext through box construction
2019-12-02 22:26:49 +01:00
Simon Sapin
9c5a595044
Add intrinsic size computation for inline formatting contexts
2019-12-02 22:11:54 +01:00
Simon Sapin
8fe37f3ed6
Implement "outer min/max-content" (based on a given min/max-content)
...
https://dbaron.org/css/intrinsic/#outer-intrinsic
2019-12-02 17:36:33 +01:00
Simon Sapin
aa925a5984
Un-allow and fix warnings in components/layout_2020
2019-12-02 16:32:34 +01:00
bors-servo
6cd42bdcfb
Auto merge of #24980 - servo-wpt-sync:wpt_update_01-12-2019, r=servo-wpt-sync
...
Sync WPT with upstream (01-12-2019)
Automated downstream sync of changes from upstream as of 01-12-2019.
[no-wpt-sync]
r? @servo-wpt-sync
2019-12-02 01:07:08 -05:00
bors-servo
40fd7910a5
Auto merge of #24928 - servo:2020-images, r=SimonSapin
...
Start supporting images in layout 2020
2019-12-01 09:53:45 -05:00
WPT Sync Bot
f170d55d3e
Update web-platform-tests to revision 5df56b25e1cb81f81fe16c88be839f9fd538b41e
2019-12-01 14:26:32 +00:00
Anthony Ramine
5a360ac63d
Start supporting images in layout 2020
2019-12-01 10:56:33 +01:00
Anthony Ramine
f24e8d0557
Fix inline margins of in flow blocks in 2020
2019-12-01 10:52:34 +01:00
Anthony Ramine
48a4a82a49
Make InlineLevelBox::Atomic store an IndependentFormattingContext
2019-12-01 10:51:25 +01:00
Anthony Ramine
ecfb82260c
Fix an unimplemented in layout 2020
2019-12-01 10:51:19 +01:00
bors-servo
1dd6ad7063
Auto merge of #24978 - emilio:gecko-sync, r=emilio
...
style: Sync changes from mozilla-central.
See individual commits for details.
2019-11-30 16:11:15 -05:00
Emilio Cobos Álvarez
6712e316df
style: Update wpt expectations.
...
transform-scale-percent-001.html has been updated upstream, as the test is
invalid per CSSWG resolution.
2019-11-30 22:09:59 +01:00
Emilio Cobos Álvarez
226c9807df
style: Fix servo build.
2019-11-30 20:45:08 +01:00
Emilio Cobos Álvarez
85da1dda29
Remove no-longer-needed arrayvec feature.
2019-11-30 20:45:07 +01:00
Emilio Cobos Álvarez
006417e40a
style: Rustfmt recent changes.
2019-11-30 20:45:07 +01:00
Emilio Cobos Álvarez
59eef57eb7
style: Undo minor debugging change.
2019-11-30 20:45:07 +01:00
Emilio Cobos Álvarez
f8e924f86a
style: Don't specify minor version for cssparser.
2019-11-30 20:45:06 +01:00
Emilio Cobos Álvarez
31837a1efa
style: Make Rust static atoms able to be used in const contexts.
...
I see atom dropping code generated in release builds for stuff like dropping the
"class" atom here:
https://searchfox.org/mozilla-central/rev/4df8821c1b824db5f40f381f48432f219d99ae36/servo/components/style/gecko/wrapper.rs#592
That is silly, and I hope making Atom be able to be used in const context will
help the compiler see that yeah, we're not doing anything interesting and the
atom shouldn't get dropped.
It also allows us to get rid of a few lazy_static!s, so we should do it anyway.
In order to accomplish this, compute the offset into gGkAtoms manually instead
of going through the static_atoms() array and then back to the byte offset.
Differential Revision: https://phabricator.services.mozilla.com/D55039
2019-11-30 20:45:06 +01:00
enordin
001c511f9c
style: Have scale function and scale property accept percentage value.
...
Differential Revision: https://phabricator.services.mozilla.com/D55012
2019-11-30 20:45:06 +01:00
Emilio Cobos Álvarez
d06212c6c0
style: Fix Servo_IsCssPropertyRecordedInUseCounter so that we also report disabled properties.
...
When zoom is disabled, we still count it, but with the current code the testing
function will throw instead of returning the right value, which means we'd fail
layout/style/test/test_use_counters.html.
Differential Revision: https://phabricator.services.mozilla.com/D55005
2019-11-30 20:45:06 +01:00
jeffin143
22509ac3d0
style: convert NS_STYLE_TEXT_ORIENTATION_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D54252
2019-11-30 20:45:05 +01:00
Emilio Cobos Álvarez
d9aa0571e3
style: Simplify some code now that lifetimes are non-lexical.
...
Differential Revision: https://phabricator.services.mozilla.com/D54529
2019-11-30 20:45:05 +01:00
jeffin143
1ef7c2f96b
style: convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D53920
2019-11-30 20:45:05 +01:00
jeffin143
f777c17f3f
style: convert NS_STYLE_OBJECT_FIT_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D54153
2019-11-30 20:45:05 +01:00
jeffin143
aa1ad6036d
style: convert NS_STYLE_IME_MODE_* to an enum class in nsStyleConsts.h
...
Differential Revision: https://phabricator.services.mozilla.com/D54255
2019-11-30 20:45:04 +01:00
Mats Palmgren
4359b3bd47
style: Make 'grid-area'/'grid-column'/'grid-row' shorthands serialize to shortest possible form.
...
Differential Revision: https://phabricator.services.mozilla.com/D54386
2019-11-30 20:45:04 +01:00
Mats Palmgren
70ec6ffe36
style: Make some grid/grid-template values serialize to a shorter form.
...
Differential Revision: https://phabricator.services.mozilla.com/D53913
2019-11-30 20:45:04 +01:00
Mats Palmgren
014c41f54a
style: Don't accept two trailing <line-names> in the grid/grid-template shorthands.
...
Differential Revision: https://phabricator.services.mozilla.com/D53909
2019-11-30 20:45:03 +01:00
Boris Chiou
5582de5d7e
style: Add a preference for offset-path:ray().
...
Differential Revision: https://phabricator.services.mozilla.com/D53110
2019-11-30 20:45:03 +01:00
Emilio Cobos Álvarez
f8ceb5cb84
style: Invalidate parts in nested shadow trees correctly.
...
Differential Revision: https://phabricator.services.mozilla.com/D54010
2019-11-30 20:45:03 +01:00
Emilio Cobos Álvarez
e3009a4de9
style: Implement shadow part forwarding (minus invalidation).
...
Some of the stuff, in particular inside GeckoBindings stuff should be
refactored to be less ugly and duplicate a bit less code, but the rest of the
code should be landable as is.
Some invalidation changes are already needed because we weren't matching with
the right shadow host during invalidation (which made existing ::part() tests
fail).
Pending invalidation work:
* Making exportparts work right on the snapshots.
* Invalidating parts from descendant hosts.
They're not very hard but I need to think how to best implement it:
* Maybe get rid of ShadowRoot::mParts and just walk DOM descendants in the
Shadow DOM.
* Maybe implement a ElementHasExportPartsAttr much like HasPartAttr and use
that to keep the list of elements.
* Maybe invalidate :host and ::part() together in here[1]
* Maybe something else.
Opinions?
[1]: https://searchfox.org/mozilla-central/rev/131338e5017bc0283d86fb73844407b9a2155c98/servo/components/style/invalidation/element/invalidator.rs#561
Differential Revision: https://phabricator.services.mozilla.com/D53730
2019-11-30 20:45:03 +01:00