Closed Bug 520614 Opened 15 years ago Closed 15 years ago

Fix usage of vbox in videocontrols.xml

Categories

(Toolkit :: Video/Audio Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: bas.schouten, Assigned: Dolske)

References

Details

Attachments

(1 file)

Currently the vbox in videocontrols.xml fills the entire video area (except the timeline bar). This means that if the background image update (like with the rotating throbber), the entire background is invalidated for each frame of the animation, causing significant composition overhead on larger video controller sizes.
Assignee: nobody → dolske
Enn's suggestion here was to center the box w/o using flex.
Attached patch Patch v.1Splinter Review
This shrinks the statusIcon box. At least, if I add a style rule to give it a border, it's tight around the throbber image instead of filling the whole <video> content area.

Bas: Would be useful if you could test with this patch and doublecheck that it fixes the problem you found.
Attachment #405620 - Flags: review?(enndeakin)
Comment on attachment 405620 [details] [diff] [review]
Patch v.1

> .statusOverlay {
>+    -moz-box-align: center;
>+    -moz-box-pack: center;

Is there a reason to do this instead of using align/pack attributes?
No, just seemed like since it was more of a presentational thing vs. structural, that having it in the CSS was better.
Comment on attachment 405620 [details] [diff] [review]
Patch v.1

The "presentational thing vs. structural" nonsense doesn't apply to xul.

What's relevant is whether a theme would want to override the values. In this case, other themes won't pick up this change and since this has a notable performance impact, it seems like something we'd want to have always applied.

That said, it doesn't matter too much to me which is used in this case, so the patch is ok as is if you like.
Attachment #405620 - Flags: review?(enndeakin) → review+
As a long-time themer, I agree with the patch, and with comment #3, use the align and pack attributes to center the icon, and this will also remove the need to add -moz-box-pack/align to all themes.
Pushed http://hg.mozilla.org/mozilla-central/rev/900079760c48
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Component: Video/Audio → Video/Audio Controls
Product: Core → Toolkit
QA Contact: video.audio → video.audio
Target Milestone: mozilla1.9.3a1 → mozilla1.9.2a1
Target Milestone: mozilla1.9.2a1 → mozilla1.9.3a1
Blocks: 558746
Comment on attachment 405620 [details] [diff] [review]
Patch v.1

>         <stack flex="1">
>+            <vbox flex="1" class="statusOverlay" hidden="true">
Flex on a stack child makes no sense either.

[Unusual mix of 2- and 4-space indent in this file...]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: