Skip to content

layout: Take relative position offsets for inlines and inline-blocks into account only once. - #7150

Merged
bors-servo merged 1 commit into
servo:masterfrom
pcwalton:position-relative-inline-block
Aug 12, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
pcwalton:position-relative-inline-block

Conversation

@pcwalton

Copy link
Copy Markdown
Contributor

There were two bugs here: (1) relative position applied to
scanned/unscanned text fragments independently of the container element
that applied that relative position, causing double-counting; (2)
relative position applied to inline block fragments independently of the
wrapped block itself, causing double-counting.

Closes #7067.

r? @mbrubeck

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 11, 2015
@pcwalton

Copy link
Copy Markdown
Contributor Author

This commit also removes the unused cascade_anonymous, since its functionality has been folded into the various modify_style_for_* functions.

@jdm

jdm commented Aug 11, 2015

Copy link
Copy Markdown
Member

These new reftests aren't added to basic.list.

@Ms2ger

Ms2ger commented Aug 11, 2015

Copy link
Copy Markdown
Contributor

Review status: 0 of 10 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


components/layout/construct.rs, line 735 [r1] (raw file):
Seems simpler to check the len() before calling into_iter().


Comments from the review on Reviewable.io

@pcwalton
pcwalton force-pushed the position-relative-inline-block branch from 9894291 to 4312b49 Compare August 11, 2015 18:37
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #7137) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 11, 2015
@mbrubeck mbrubeck self-assigned this Aug 11, 2015
@mbrubeck

Copy link
Copy Markdown
Contributor

Reviewed 10 of 10 files at r1, 2 of 2 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


components/style/properties.mako.rs, line 6419 [r1] (raw file):
This is missing from the modify_styles functions. This causes incorrect results when an inline element with an outline style contains multiple fragments. (Note: This bug isn't introduced by this patch; I just noticed it in this review.)


Comments from the review on Reviewable.io

@mbrubeck mbrubeck added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Aug 11, 2015
@mbrubeck

Copy link
Copy Markdown
Contributor

Actually, I see that correctly drawing outlines for elements with multiple boxes is quite tricky. (Gecko doesn't even do it correctly.) Let's leave that as a follow-up issue. r=mbrubeck after rebasing.

into account only once.

There were two bugs here: (1) relative position applied to
scanned/unscanned text fragments independently of the container element
that applied that relative position, causing double-counting; (2)
relative position applied to inline block fragments independently of the
wrapped block itself, causing double-counting.

This commit also removes the `cascade_anonymous` function and the
related `Fragment` constructor. They were unused, and their
functionality has been replaced by the `modify_style_for_*` series of
functions.

Closes servo#7067.
@pcwalton
pcwalton force-pushed the position-relative-inline-block branch from 4312b49 to 8640cf5 Compare August 12, 2015 15:34
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 12, 2015
@pcwalton

Copy link
Copy Markdown
Contributor Author

@bors-servo: r=mbrubeck

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 8640cf5 has been approved by mbrubeck

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 8640cf5 with merge 0bfde42...

bors-servo pushed a commit that referenced this pull request Aug 12, 2015
…beck

layout: Take relative position offsets for inlines and inline-blocks into account only once.

There were two bugs here: (1) relative position applied to
scanned/unscanned text fragments independently of the container element
that applied that relative position, causing double-counting; (2)
relative position applied to inline block fragments independently of the
wrapped block itself, causing double-counting.

Closes #7067.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7150)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Aug 12, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux1, linux2, mac1, mac2, mac3

@bors-servo
bors-servo merged commit 8640cf5 into servo:master Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants