Skip to content

Implement getComputedStyle - #6798

Merged
bors-servo merged 1 commit into
servo:masterfrom
dzbarsky:gCS
Jul 30, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
dzbarsky:gCS

Conversation

@dzbarsky

Copy link
Copy Markdown
Contributor

It's not quite done but can probably be reviewed anyway.
I still need to finish up a few of the ToCss impls, I just got lazy and wanted to make sure things worked.

The computation of the used values is definitely not right, I'm going to investigate that.

Review on Reviewable

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

Copy link
Copy Markdown

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@pcwalton

Copy link
Copy Markdown
Contributor

16,100 lines added?!

@dzbarsky

Copy link
Copy Markdown
Contributor Author

15000+ of those were components/style/properties/mod.rs

@jdm

jdm commented Jul 28, 2015

Copy link
Copy Markdown
Member

@SimonSapin is there a way to avoid duplicating so much of the serialization work for specified and computed values?

@SimonSapin

Copy link
Copy Markdown
Member

I’ll think about it but I don’t have a clever idea right now, sorry. I have tried to make adding a new property less involved than in Gecko, but there might be more to do in that direction.

Comment thread components/layout/layout_task.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just say FIXME: Implement pseudo-elements here—I'm not a fan of commented-out code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fixed it instead.

@bors-servo

Copy link
Copy Markdown
Contributor

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

@metajack

Copy link
Copy Markdown
Collaborator

@pcwalton re-r?

@metajack metajack added the S-needs-rebase There are merge conflict errors. label Jul 29, 2015
@metajack

Copy link
Copy Markdown
Collaborator

This also needs rebasing.

@dzbarsky

Copy link
Copy Markdown
Contributor Author

I kept the parts split up in case you had already reviewed some of it. Let me know if you want me to squash

@pcwalton

Copy link
Copy Markdown
Contributor

Looks good, squash and I'll r+!

@pcwalton

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 9eb7b5b has been approved by pcwalton

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 9eb7b5b with merge 621eb39...

bors-servo pushed a commit that referenced this pull request Jul 29, 2015
Implement getComputedStyle

It's not quite done but can probably be reviewed anyway.
I still need to finish up a few of the ToCss impls, I just got lazy and wanted to make sure things worked.

The computation of the used values is definitely not right, I'm going to investigate that.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6798)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac3

@jdm

jdm commented Jul 29, 2015

Copy link
Copy Markdown
Member
 0:08.72 TEST_START: Thread-TestrunnerManager-1 /css21_dev/html4/events-006.htm
 0:09.50 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) Full command: /Users/servo/buildbot/slave/mac3/build/target/release/servo --cpu --hard-fail -u Servo/wptrunner -z http://localhost:8000/css21_dev/html4/events-006.htm
(pid:33239) "thread 'LayoutTask PipelineId(0)' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:362"
 0:09.50 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "stack backtrace:"
 0:09.50 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   1:        0x10c0b73f5 - sys::backtrace::write::hde88a3e3a343e9f8zms"
 0:09.50 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   2:        0x10c0ba9e5 - panicking::on_panic::h8c73c8f1e33f6d60hIw"
0:09.50 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   3:        0x10c0a84d2 - rt::unwind::begin_unwind_inner::h781ff1cd39e7f47etqw"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   4:        0x10c0a8b39 - rt::unwind::begin_unwind_fmt::h9c0f8818a5804071zpw"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   5:        0x10c0ba3bc - rust_begin_unwind"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   6:        0x10c0e32e5 - panicking::panic_fmt::h205f328075c6fc3cneC"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   7:        0x10c0dfd91 - panicking::panic::habb48a185771b51cUcC"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   8:        0x10aec8661 - layout_task::LayoutTask::handle_reflow::h4843497fddc22e4909m"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "   9:        0x10aebab4e - layout_task::LayoutTask::handle_request_helper::h4e8baeb014c70ec7Gym"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "  10:        0x10aea9e9e - layout_task::LayoutTask::handle_request::h66f5e9bbb0c75727Itm"
  0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "  11:        0x10ae5a2da - boxed::F.FnBox<A>::call_box::h1109022376905816815"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "  12:        0x10ae593f7 - rt::unwind::try::try_fn::h3240056550223645986"
 0:09.51 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "  13:        0x10c0bc3e8 - rust_try_inner"
 0:09.52 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "  14:        0x10c0bc3d5 - rust_try"
 0:09.52 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "  15:        0x10c0b5995 - rt::unwind::try::inner_try::h9e58480e93edc0cdmmw"
 0:09.52 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "  16:        0x10ae59620 - boxed::F.FnBox<A>::call_box::h13621746252331544906"
 0:09.52 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:33239) "  17:        0x10c0b93ad - sys::thread::Thread::new::thread_start::hf153915745363fa7wKv"

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jul 29, 2015
@pcwalton

Copy link
Copy Markdown
Contributor

@dzbarsky Did you discover what was wrong with the test?

@pcwalton

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c75d92a has been approved by pcwalton

@pcwalton

Copy link
Copy Markdown
Contributor

@bors-servo: r-

@pcwalton

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c75d92a has been approved by pcwalton

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c75d92a with merge a6bda6c...

bors-servo pushed a commit that referenced this pull request Jul 29, 2015
Implement getComputedStyle

It's not quite done but can probably be reviewed anyway.
I still need to finish up a few of the ToCss impls, I just got lazy and wanted to make sure things worked.

The computation of the used values is definitely not right, I'm going to investigate that.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6798)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac1

@jdm

jdm commented Jul 30, 2015

Copy link
Copy Markdown
Member
/dom/nodes/Element-classlist.html
---------------------------------
PASS expected FAIL CSS .foo selectors must not match elements without any class
PASS expected FAIL computed style must update when setting .className
PASS expected FAIL classList.add must not cause the CSS selector to stop matching
PASS expected FAIL classList.remove must not break case-sensitive CSS selector matching
PASS expected FAIL classList.toggle must not break case-sensitive CSS selector matching
PASS expected FAIL CSS class selectors must stop matching when all classes have been removed
/html/dom/elements/global-attributes/id-attribute.html
------------------------------------------------------
PASS expected FAIL User agents must associate the element with an id value for purposes of CSS.
PASS expected FAIL Association for CSS is exact and therefore case-sensitive.
PASS expected FAIL Spaces are allowed in an id and still make an association.
PASS expected FAIL Non-ASCII is allowed in an id and still make an association for CSS.
PASS expected FAIL After setting id via id attribute, CSS association is via the new ID.
PASS expected FAIL After setting id via setAttribute attribute, CSS association is via the new ID.
/html/semantics/edits/the-del-element/del_effect.html
-----------------------------------------------------
PASS expected FAIL HTML Test: Text in the del element should be 'line-through'
/html/semantics/edits/the-ins-element/ins_effect.html
-----------------------------------------------------
PASS expected FAIL HTML Test: Text in the ins element should be 'underline'

@jdm jdm added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 30, 2015
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jul 30, 2015
@pcwalton

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit e484d6b has been approved by pcwalton

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit e484d6b with merge acbca7b...

bors-servo pushed a commit that referenced this pull request Jul 30, 2015
Implement getComputedStyle

It's not quite done but can probably be reviewed anyway.
I still need to finish up a few of the ToCss impls, I just got lazy and wanted to make sure things worked.

The computation of the used values is definitely not right, I'm going to investigate that.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6798)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants