Skip to content

Added recognition of positioned offsets: top, bottom, right, and left - #1407

Merged
bors-servo merged 1 commit into
servo:masterfrom
ibnc:positioned_box_offsets
Dec 16, 2013
Merged

bors-servo merged 1 commit into
servo:masterfrom
ibnc:positioned_box_offsets

Conversation

@ibnc

@ibnc ibnc commented Dec 13, 2013

Copy link
Copy Markdown

For #1406

Not really sure about some of my naming conventions, but offset was kinda taken in box.rs :/

Also this doesn't fully implement the offsets, but I'll do that alongside #782.

@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify layout code, but no reftests are modified. Please consider adding a reftest!
  • @ibnc, please confirm that src/test/html/acid1.html and your favourite wikipedia page still render correctly!

@ibnc

ibnc commented Dec 16, 2013

Copy link
Copy Markdown
Author

Everything compiles, but I keep getting and "I tried" star when I try to load any page. I'm actually pretty confused as to why I am getting this error. I wasn't with the previous commit, and barely anything has changed :/

Any ideas?

task '<unnamed>' failed at 'Failed to load page URL file:/home/ibnc/dev/rust/servo/build/src/test/html/acid2.html', /home/ibnc/dev/rust/servo/src/components/script/html/hubbub_html_parser.rs:523
task '<unnamed>' failed at 'receiving on closed channel', /home/ibnc/dev/rust/servo/src/compiler/rust/src/libstd/rt/comm.rs:492
task '<unnamed>' failed at 'killed by linked failure', /home/ibnc/dev/rust/servo/src/compiler/rust/src/libstd/rt/kill.rs:639
task '<unnamed>' failed at 'killed by linked failure', /home/ibnc/dev/rust/servo/src/compiler/rust/src/libstd/rt/kill.rs:639
task '<unnamed>' failed at 'killed by linked failure', /home/ibnc/dev/rust/servo/src/compiler/rust/src/libstd/rt/kill.rs:639
task '<unnamed>' failed at 'killed by linked failure', /home/ibnc/dev/rust/servo/src/compiler/rust/src/libstd/rt/kill.rs:639

@dhedlund

Copy link
Copy Markdown
Contributor

I can't recreate this locally from your branch. What are the last 15-20 lines of output if you run:

RUST_LOG=script ./servo file:/home/ibnc/dev/rust/servo/build/src/test/html/acid2.html

@ibnc

ibnc commented Dec 16, 2013

Copy link
Copy Markdown
Author

Thanks for taking a look :)

These are the the lines before I shut down servo.

HTMLDocument finalize: 0x7fa9bc09b3a0
Window finalize: 0x7fa9bc08db30
ScriptTask: loading extra::url::Url{scheme: ~"file", user: None, host: ~"", port: None, path: ~"/home/ibnc/dev/rust/servo/src/test/html/failure.html", query: ~[], fragment: None} on page msg::constellation_msg::PipelineId(1u)
Hubbub: parsing extra::url::Url{scheme: ~"file", user: None, host: ~"", port: None, path: ~"/home/ibnc/dev/rust/servo/src/test/html/failure.html", query: ~[], fragment: None}
Fetched page; metadata is net::resource_task::Metadata{final_url: extra::url::Url{scheme: ~"file", user: None, host: ~"", port: None, path: ~"/home/ibnc/dev/rust/servo/src/test/html/failure.html", query: ~[], fragment: None}, content_type: None, charset: None}
created parser
set tree handler
loaded page
received data
set quirks mode
create element
-- attach attrs
append child 7fa9bc08d6a0 7fa9bc09fd80
create element
-- attach attrs
append child 7fa9bc09fd80 7fa9bc09ff50
create text
append child 7fa9bc09ff50 7fa9bc0b7220
create element
-- attach attrs
append child 7fa9bc09ff50 7fa9bc0b7c10
create text
append child 7fa9bc0b7c10 7fa9bc0876d0
create text
append child 7fa9bc09ff50 7fa9bc0b8a60
create text
append child 7fa9bc09fd80 7fa9bc0b8f90
create element
-- attach attrs
append child 7fa9bc09fd80 7fa9bc0b9980
create text
append child 7fa9bc0b9980 7fa9bc0b9f50
create element
-- attach attrs
append child 7fa9bc0b9980 7fa9bc0baa40
create text
append child 7fa9bc0b9980 7fa9bc0bb9d0
create text
append child 7fa9bc0b9980 7fa9bc0bbf00
not reflowing due to lack of a window size
js_scripts: ~[]
script got resize message
script got resize event: 800, 600
script: performing reflow for goal ReflowForDisplay
script: layout forked
Script: Reflow 1u complete for msg::constellation_msg::PipelineId(1u)
script got reflow event
script: performing reflow for goal ReflowForDisplay
script: layout forked
Script: Reflow 2u complete for msg::constellation_msg::PipelineId(1u)
script got resize message
script got resize event: 800, 600
script: performing reflow for goal ReflowForDisplay
script: layout forked
Script: Reflow 3u complete for msg::constellation_msg::PipelineId(1u)

@dhedlund

Copy link
Copy Markdown
Contributor

The "I tried" star occurs when one of the tasks fail that is trying to build and render the page. Lars B wrote a good description about three months ago:

Pipeline create is now wrapped in a task that supervises the tasks
created by script, rendering, and layout. When any of those fail,
the pipeline is removed from the FrameTree and a new one is created
with a failure HTML file.

The output that you returned turned out to be the debugging output from the "I tried" page and not the one that actually failed. The error you're looking for might be further up in the output, but it could also be somewhere else. The following gives you a list of other values you can set RUST_LOG to:

RUST_LOG=::help ./servo

Try RUST_LOG=servo, which prints the debug statements in the layout code amongst other things.

If you get really stuck, you could try pushing your changes that broke things to a new branch or create a gist at https://gist.github.com/ibnc so we can see what you have so far.

@dhedlund

Copy link
Copy Markdown
Contributor

Oh, I think I just found a better way (thanks Keegan!). You can prevent the failure page from showing up, by running servo -f or servo --hard-fail. It should hopefully return a better error message that way.

@ibnc

ibnc commented Dec 16, 2013

Copy link
Copy Markdown
Author

Okay, I am having the same issue with my (up to date) master branch, but not with a fresh clone of mozilla/servo.git :/

Given that and that @dhedlund can't reproduce the error, it's probably just my environment. This should be okay to merge.

@metajack

Copy link
Copy Markdown
Collaborator

This looks good other than that one commented out piece of code. r=me once that is addressed.

  top, bottom, right, and left
@ibnc

ibnc commented Dec 16, 2013

Copy link
Copy Markdown
Author

r=metajack

bors-servo pushed a commit that referenced this pull request Dec 16, 2013
For #1406

Not really sure about some of my naming conventions, but offset was kinda taken in box.rs :/

Also this doesn't fully implement the offsets, but I'll do that alongside #782.
@bors-servo
bors-servo merged commit 708bf47 into servo:master Dec 16, 2013
mark-ik pushed a commit to merely-made/genet that referenced this pull request Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants