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

Implement `position: absolute` #787

Closed
pcwalton opened this issue Aug 26, 2013 · 8 comments
Closed

Implement `position: absolute` #787

pcwalton opened this issue Aug 26, 2013 · 8 comments

Comments

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Aug 26, 2013

Absolute positioning is needed for Acid2 lines 4 and 5 as well as a lot of Web sites.

Requires #1532 and #1537 and #1538

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Dec 10, 2013

Needed for #1366.

@metajack
Copy link
Contributor

@metajack metajack commented Jan 16, 2014

mentor: @larsbergstrom

@JoonWonLee @pradeep90 @ksh8281 are working on this

@pradeep90
Copy link
Contributor

@pradeep90 pradeep90 commented Jan 23, 2014

@larsbergstrom I've been reading the CSS reference to get all the details for absolute positioning.

I'll go through the Servo meeting notes pertaining to multiple display lists and containing block info.
If I have any doubts about these, I'll get back to you on IRC.

I will start coding after that.

@pradeep90
Copy link
Contributor

@pradeep90 pradeep90 commented Feb 5, 2014

Just to update my status: I've started implementing position absolute.

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Feb 5, 2014

@pradeep90 Absolute positioning has a lot in common with fixed positioning (it’s almost a subset), which @ibnc is working on. See #782 and other issues linked from there, and talk to each other to avoid duplicating work :)

@pradeep90
Copy link
Contributor

@pradeep90 pradeep90 commented Feb 6, 2014

@SimonSapin Yeah... fixed positioning is basically a special case of absolute positioning :)
Sure. There are a few cases that the current fixed position implementation doesn't take care of, IMHO (like the case where left or top is not specified).
Right now, I'm separating the whole width-margins-left-etc. calculation for absolute positioned elements into a different function separate from the block width-and-margins calculation so that we can work on it cleanly.
This is as per the different rules in http://www.w3.org/TR/CSS2/visudet.html#Computing_widths_and_margins

@ibnc just want to bring you into the loop so that there is no duplication of effort here. My plan is to implement absolute positioning by the end of next week.
Most probably, after that, the plan is to work on stacking contexts (paint order) unless you want to work on that.

@ibnc
Copy link

@ibnc ibnc commented Feb 6, 2014

Yeah, my implementation of position fixed isn't perfect. I intend to come back and fix/clean it up.

@pradeep90 Cool. I don't really see duplication being an issue, but I'll look for the PR and comment if I see anything :)

I didn't have any plans of working on stacking context unless I had to; go for it :)

bors-servo pushed a commit that referenced this issue Mar 3, 2014
+ Re-implement fixed positioning using the absolute positioning code.
+ Add reftests for absolute positioning and fixed positioning.
+ Refactor assign_widths in BlockFlow to isolate the calculation of
widths and margins.
+ Pass down details of the Containing Block for absolute and fixed flows
during layout. Use it to calculate the static position of absolute flows.
+ Defer calculation of absolute flow dimensions till we build the
display list.

This implements #1537 and #787
@pcwalton
Copy link
Contributor Author

@pcwalton pcwalton commented Sep 11, 2014

Fixed.

@pcwalton pcwalton closed this Sep 11, 2014
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 30, 2019
…elements (from pradeep90:absolute-position); r=pcwalton

+ Re-implement fixed positioning using the absolute positioning code.
+ Add reftests for absolute positioning and fixed positioning.
+ Refactor assign_widths in BlockFlow to isolate the calculation of
widths and margins.
+ Pass down details of the Containing Block for absolute and fixed flows
during layout. Use it to calculate the static position of absolute flows.
+ Defer calculation of absolute flow dimensions till we build the
display list.

This implements servo/servo#1537 and servo/servo#787

Source-Repo: https://github.com/servo/servo
Source-Revision: ada9224d0ef5b403562ebaaeb2e5f66729ffc589

UltraBlame original commit: e0ea27b18ffa174cf01fa1716652bc5f42f4fa3e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Sep 30, 2019
…elements (from pradeep90:absolute-position); r=pcwalton

+ Re-implement fixed positioning using the absolute positioning code.
+ Add reftests for absolute positioning and fixed positioning.
+ Refactor assign_widths in BlockFlow to isolate the calculation of
widths and margins.
+ Pass down details of the Containing Block for absolute and fixed flows
during layout. Use it to calculate the static position of absolute flows.
+ Defer calculation of absolute flow dimensions till we build the
display list.

This implements servo/servo#1537 and servo/servo#787

Source-Repo: https://github.com/servo/servo
Source-Revision: ada9224d0ef5b403562ebaaeb2e5f66729ffc589

UltraBlame original commit: e0ea27b18ffa174cf01fa1716652bc5f42f4fa3e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…elements (from pradeep90:absolute-position); r=pcwalton

+ Re-implement fixed positioning using the absolute positioning code.
+ Add reftests for absolute positioning and fixed positioning.
+ Refactor assign_widths in BlockFlow to isolate the calculation of
widths and margins.
+ Pass down details of the Containing Block for absolute and fixed flows
during layout. Use it to calculate the static position of absolute flows.
+ Defer calculation of absolute flow dimensions till we build the
display list.

This implements servo/servo#1537 and servo/servo#787

Source-Repo: https://github.com/servo/servo
Source-Revision: ada9224d0ef5b403562ebaaeb2e5f66729ffc589

UltraBlame original commit: e0ea27b18ffa174cf01fa1716652bc5f42f4fa3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.