Skip to content

style: Kill some style sharing code. - #17713

Merged
bors-servo merged 3 commits into
servo:masterfrom
emilio:less-code-is-lovely
Jul 14, 2017
Merged

bors-servo merged 3 commits into
servo:masterfrom
emilio:less-code-is-lovely

Conversation

@emilio

@emilio emilio commented Jul 13, 2017 •

Copy link
Copy Markdown
Member

It's trivial to do so after #17688.


This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @bholley: components/style/data.rs, components/style/sharing/mod.rs, components/style/traversal.rs
  • @canaltinova: components/style/data.rs, components/style/sharing/mod.rs, components/style/traversal.rs

@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!

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

emilio commented Jul 13, 2017

Copy link
Copy Markdown
Member Author

r? @heycam or @SimonSapin

@highfive highfive assigned heycam and unassigned jdm Jul 13, 2017
emilio added 2 commits July 13, 2017 15:32
MozReview-Commit-ID: 42MyHx3QHuu
We can take it straight from the validation target.
@emilio
emilio force-pushed the less-code-is-lovely branch from bd84ea0 to 62310d9 Compare July 13, 2017 13:37
@emilio

emilio commented Jul 13, 2017

Copy link
Copy Markdown
Member Author

@emilio

emilio commented Jul 13, 2017

Copy link
Copy Markdown
Member Author

The failures in the above try run are fixed by #17710

context.thread_local.statistics.elements_matched += 1;

// This is only relevant for animations as of right now.
important_rules_changed = true;

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.

Hmm, was this a bug that we weren't setting this if we got the styles from the cache?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, we never cache styles with animations, so it was probably OK (except for web animations maybe?)

Comment thread components/style/traversal.rs Outdated
@@ -773,48 +773,52 @@ where

// Now that our bloom filter is set up, try the style sharing
// cache. If we get a match we can skip the rest of the work.

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.

Nit: Maybe move this comment down to just before we look up the cache?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sounds good, will do

Ok(shared_styles) => {
// Yay, cache hit. Share the style.
let child_cascade_requirement =
target.accumulate_damage_when_sharing(shared_context,

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.

Can you explain for me when we no longer need to do this? (I assume it's already done elsewhere.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right, with this patch se arrive to finish_restyle instead of early-returning, which does all this :)

@heycam

heycam commented Jul 14, 2017

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 62310d9 has been approved by heycam

@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. labels Jul 14, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 62310d9 with merge f98f2b4...

bors-servo pushed a commit that referenced this pull request Jul 14, 2017
style: Kill some style sharing code.

It's trivial to do so after #17688.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17713)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 14, 2017
@emilio

emilio commented Jul 14, 2017

Copy link
Copy Markdown
Member Author

@bors-servo r=heycam p=1

Moved the comment

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit bd10081 has been approved by heycam

@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. labels Jul 14, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit bd10081 with merge 1c85c55...

bors-servo pushed a commit that referenced this pull request Jul 14, 2017
style: Kill some style sharing code.

It's trivial to do so after #17688.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17713)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: heycam
Pushing 1c85c55 to master...

@bors-servo
bors-servo merged commit bd10081 into servo:master Jul 14, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 14, 2017
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