Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start supporting images in layout 2020 #24928

Merged
merged 4 commits into from Dec 1, 2019
Merged

Start supporting images in layout 2020 #24928

merged 4 commits into from Dec 1, 2019

Conversation

@nox
Copy link
Member

nox commented Nov 29, 2019

No description provided.

@highfive
Copy link

highfive commented Nov 29, 2019

Heads up! This PR modifies the following files:

  • @emilio: components/style/properties/longhands/inherited_box.mako.rs
@highfive
Copy link

highfive commented Nov 29, 2019

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!
match (computed_margin_inline_start, computed_margin_inline_end) {
(LengthOrAuto::Auto, LengthOrAuto::Auto) => (inline_margins / 2., inline_margins / 2.),
(LengthOrAuto::Auto, LengthOrAuto::LengthPercentage(end)) => (inline_margins - end, end),
(LengthOrAuto::LengthPercentage(start), _) => (start, inline_margins - start),

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Nov 29, 2019

Member

Nit: This _ can only be Auto, right? Could we make it a specific pattern?

This comment has been minimized.

Copy link
@nox

nox Nov 29, 2019

Author Member

It can be LengthOrAuto::LengthPercentage too, which we ignore because that's over-constraining.

) -> IndependentLayout {
let (fragments, content_block_size) = match self.kind {
ReplacedContentKind::Image(ref image) => {
// FIXME(nox): We should not assume block size is known.

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Nov 29, 2019

Member

Or, on the contrary, isn’t it always known for replaced boxes and should we take DefiniteContainingBlock here instead?

This comment has been minimized.

Copy link
@nox

nox Nov 29, 2019

Author Member

You are right, at that point we should know both sizes, I'll make it use DefiniteContainingBlock.

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Nov 29, 2019

Member

Alright, r=me with that.

This comment has been minimized.

Copy link
@nox

nox Nov 30, 2019

Author Member

It turns out we can't do that: this is also called from IndependentFormattingContext::layout, where we don't know for sure the block size.

This comment has been minimized.

Copy link
@nox

nox Nov 30, 2019

Author Member

Tbh that makes me wonder if we shouldn't separate replaced content from independent formatting contexts.

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Nov 30, 2019

Member

Yeah I considered that when reading your previous message. Or if not separate data types, at least remove IndependentFormattingContext::layout and make parent boxes call IndependentFormattingContext::as_replaced themselves.

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Nov 30, 2019

Member

That doesn’t need to happen in this PR though. I’ll r+

@SimonSapin
Copy link
Member

SimonSapin commented Nov 30, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 30, 2019

📌 Commit 686243e has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Nov 30, 2019

Testing commit 686243e with merge c99b1ad...

bors-servo added a commit that referenced this pull request Nov 30, 2019
Start supporting images in layout 2020
@bors-servo
Copy link
Contributor

bors-servo commented Nov 30, 2019

💔 Test failed - status-taskcluster

@SimonSapin
Copy link
Member

SimonSapin commented Dec 1, 2019

One failure in layout 2020 mode, could be legit?

  ▶ FAIL [expected CRASH] /css/CSS2/box-display/containing-block-007.xht
  └   → /css/CSS2/box-display/containing-block-007.xht 8ad90a71ec464d4cd92c5f8f5343f88d4e6f4902
/css/CSS2/box-display/containing-block-007-ref.xht 46b4d6b0ef99e6a3b5982147134474a332c2e7a1
@SimonSapin SimonSapin force-pushed the 2020-images branch from 686243e to 5a360ac Dec 1, 2019
@SimonSapin
Copy link
Member

SimonSapin commented Dec 1, 2019

The fixed crash is due to removing on unimplemented!. I’ve updated WPT expectations.

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Dec 1, 2019

📌 Commit 5a360ac has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Dec 1, 2019

Testing commit 5a360ac with merge e2dd15a...

bors-servo added a commit that referenced this pull request Dec 1, 2019
Start supporting images in layout 2020
@bors-servo
Copy link
Contributor

bors-servo commented Dec 1, 2019

💔 Test failed - status-taskcluster

@SimonSapin
Copy link
Member

SimonSapin commented Dec 1, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Dec 1, 2019

Testing commit 5a360ac with merge 73ce1fa...

bors-servo added a commit that referenced this pull request Dec 1, 2019
Start supporting images in layout 2020
@bors-servo
Copy link
Contributor

bors-servo commented Dec 1, 2019

💔 Test failed - status-taskcluster

@SimonSapin
Copy link
Member

SimonSapin commented Dec 1, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Dec 1, 2019

Testing commit 5a360ac with merge 40fd791...

bors-servo added a commit that referenced this pull request Dec 1, 2019
Start supporting images in layout 2020
@bors-servo
Copy link
Contributor

bors-servo commented Dec 1, 2019

☀️ Test successful - status-taskcluster
Approved by: SimonSapin
Pushing 40fd791 to master...

@bors-servo bors-servo merged commit 5a360ac into master Dec 1, 2019
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@bors-servo bors-servo deleted the 2020-images branch Dec 1, 2019
@SimonSapin SimonSapin mentioned this pull request Dec 3, 2019
3 of 8 tasks complete
@SimonSapin SimonSapin added this to Done / resolved in Layout 2020 Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Layout 2020
  
Merged / resolved
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.