Closed Bug 978653 Opened 6 years ago Closed 6 years ago
Wait longer to fire 'style-applied' event after updating a style sheet in Style
When you update a style sheet in the Style Editor, a global transition rule is inserted in the document so that any changes to the page style will have a smooth transition. bug 966805 is an orange caused by the Style Editor firing a 'style-applied' event before the style on the page is fully updated. It's instead fired in the middle of a transition.
Before we were waiting for the transition duration plus a small buffer. This patch increases the buffer. It also gets rid of a related line of code that wasn't being used. As we use a global transition rule and we're blind to what rules change when we replace the text of the style sheet, there's no way to know if we should expect a transition to occur or how many should occur, so we can't listen for an event like 'transitionend'. try: https://tbpl.mozilla.org/?tree=Try&rev=328e859ef789
Assignee: nobody → fayearthur
Attachment #8384411 - Flags: review?(pbrosset)
Actually, thought it was odd that the buffer was a multiplier before. Small change to add a constant buffer time instead of making it a multiple of the transition duration.
Comment on attachment 8384415 [details] [diff] [review] Increase wait time before firing 'style-applied' Review of attachment 8384415 [details] [diff] [review]: ----------------------------------------------------------------- If this solves the orange, then fine with me (I've re-launched a few bc runs on the try build). However, I'd like to suggest that, for tests only, we introduce a mode where there are no transitions. This should reduce the chances for failures, right?
Attachment #8384415 - Flags: review?(pbrosset) → review+
(In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #3) > If this solves the orange, then fine with me (I've re-launched a few bc runs > on the try build). > However, I'd like to suggest that, for tests only, we introduce a mode where > there are no transitions. This should reduce the chances for failures, right? That's a good point. We used to a pref to turn off the transitions, but it wasn't being used. Maybe we should add it back.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
You need to log in before you can comment on or make changes to this bug.