Skip to content

compositing/script: Do not dispatch the resize event when initially l… - #10654

Merged
bors-servo merged 1 commit into
servo:masterfrom
notriddle:no_resize_on_initial_load
Apr 22, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
notriddle:no_resize_on_initial_load

Conversation

@notriddle

Copy link
Copy Markdown
Contributor

…oading.

No bug report corresponds to this, but I noticed it while trying to
reduce #10593


This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/script_thread.rs, components/script_traits/lib.rs, components/script_traits/lib.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 16, 2016
@Ms2ger

Ms2ger commented Apr 16, 2016

Copy link
Copy Markdown
Contributor

Do you have a spec to back this up?

@pcwalton

Copy link
Copy Markdown
Contributor

I don't think we need a spec cite for this, because it makes us stop doing something that the spec does not require us to do and that is nonsensical to begin with. (That is, this essentially corrects a pre-existing spec violation.)

@notriddle

notriddle commented Apr 16, 2016 •

Copy link
Copy Markdown
Contributor Author

You're only supposed to fire the event if the window size has changed since the last time the run the resize steps algorithm has been run. This is clearly false the first time the algorithm runs; it has not changed because it did not exist at all.

@pcwalton

Copy link
Copy Markdown
Contributor

compositing changes look fine to me.

@notriddle

Copy link
Copy Markdown
Contributor Author

Is there something wrong with the script part?

@asajeffrey

Copy link
Copy Markdown
Contributor

A probably dumb question... why have the compositor send a window size message with type Initial, rather than just have the window track whether it's had its initial size set? It seems like the code would be simpler if we just had script keep track of this.


Review status: 0 of 8 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@asajeffrey asajeffrey added S-awaiting-answer Someone asked a question that requires an answer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 18, 2016
@notriddle

Copy link
Copy Markdown
Contributor Author

The compositor knows how the message is supposed to be treated; it would be bad if the script were silently out of sync with that expectation. I admit it's just a heuristic "explicit is better than implicit" choice.

I can change it, if you would prefer it the other way.


Comments from Reviewable

@asajeffrey

Copy link
Copy Markdown
Contributor

It's just a question of who keeps track of that bit of state -- the compositor (as you have it) or script (by keeping track of an optional size). Personally I prefer the latter, but this is just taste.

@notriddle would you like me to finish doing the code review?

@bors-servo

Copy link
Copy Markdown
Contributor

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

@highfive highfive added S-needs-rebase There are merge conflict errors. S-awaiting-review There is new code that needs to be reviewed. labels Apr 19, 2016
@notriddle

Copy link
Copy Markdown
Contributor Author

I'd say yeah, finish the code review.

@notriddle notriddle removed the S-needs-rebase There are merge conflict errors. label Apr 19, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor

OK, looks good. If we're going to go with the compositor rather than script deciding which is the initial size, then this seems a good implementation. r=me if so.


Reviewed 1 of 8 files at r1, 1 of 1 files at r2, 5 of 6 files at r3.
Review status: 7 of 8 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@asajeffrey

Copy link
Copy Markdown
Contributor

Reviewed 1 of 6 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@asajeffrey asajeffrey removed the S-awaiting-review There is new code that needs to be reviewed. label Apr 19, 2016
@notriddle

Copy link
Copy Markdown
Contributor Author

Still awaiting answer?

@asajeffrey

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 419633c has been approved by asajeffrey

@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-answer Someone asked a question that requires an answer. labels Apr 20, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 419633c with merge 577239f...

bors-servo pushed a commit that referenced this pull request Apr 20, 2016
compositing/script: Do not dispatch the resize event when initially l…

…oading.

No bug report corresponds to this, but I noticed it while trying to
reduce #10593

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

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 20, 2016
@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 Apr 20, 2016
@notriddle

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 3e18116 with merge 3859d44...

bors-servo pushed a commit that referenced this pull request Apr 21, 2016
compositing/script: Do not dispatch the resize event when initially l…

…oading.

No bug report corresponds to this, but I noticed it while trying to
reduce #10593

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

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 21, 2016
@notriddle

Copy link
Copy Markdown
Contributor Author

@notriddle notriddle removed the S-tests-failed The changes caused existing tests to fail. label Apr 21, 2016
@notriddle

Copy link
Copy Markdown
Contributor Author

Pinging @asajeffrey

@asajeffrey

Copy link
Copy Markdown
Contributor

Oops. Minor nit below.


Reviewed 3 of 3 files at r4, 2 of 2 files at r5.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks broke.


components/script/script_thread.rs, line 1032 [r5] (raw file):
Does this reflow happen in the Resize case too? Should the force_reflow be moved out of the if? The code reads a bit oddly, like the reflow is only happening on initial sizing, not on resizing.


Comments from Reviewable

@asajeffrey asajeffrey added S-awaiting-answer Someone asked a question that requires an answer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 22, 2016
@notriddle

Copy link
Copy Markdown
Contributor Author

components/script/script_thread.rs, line 1032 [r5] (raw file):
You're right.


Comments from Reviewable

…oading.

No bug report corresponds to this, but I noticed it while trying to
reduce #10593
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 22, 2016
@notriddle

Copy link
Copy Markdown
Contributor Author

@asajeffrey

Copy link
Copy Markdown
Contributor

:lgtm:

@bors-servo r+


Reviewed 5 of 5 files at r6.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 7940b22 has been approved by asajeffrey

@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-awaiting-answer Someone asked a question that requires an answer. labels Apr 22, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 7940b22 with merge 47a0f58...

bors-servo pushed a commit that referenced this pull request Apr 22, 2016
compositing/script: Do not dispatch the resize event when initially l…

…oading.

No bug report corresponds to this, but I noticed it while trying to
reduce #10593

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

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 7940b22 into servo:master Apr 22, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 22, 2016
This was referenced Apr 22, 2016
@notriddle
notriddle deleted the no_resize_on_initial_load branch April 23, 2016 00:12
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.

6 participants