Last Comment Bug 740235 - Prevent about:home from creating a full window component alpha layer
: Prevent about:home from creating a full window component alpha layer
Status: RESOLVED FIXED
[qa-]
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: 13 Branch
: All All
: -- normal (vote)
: Firefox 14
Assigned To: Frank Yan (:fryn)
:
:
Mentors:
Depends on: 746466
Blocks: 711157
  Show dependency treegraph
 
Reported: 2012-03-28 18:54 PDT by Bas Schouten (:bas.schouten)
Modified: 2013-11-13 02:20 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
patch (889 bytes, patch)
2012-03-29 09:12 PDT, Frank Yan (:fryn)
mak77: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Bas Schouten (:bas.schouten) 2012-03-28 18:54:50 PDT
The google interface at about:home in our nightlies appears to create a full window size component alpha layer. From the looks of the page that seems needlessly complicated. It's possible we're doing something suboptimal.
Comment 1 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-28 22:24:38 PDT
It's the fixed background:

html {
  background-color: hsl(0,0%,90%);
  background-image: url(chrome://browser/content/abouthome/noise.png),
                    -moz-linear-gradient(hsla(0,0%,100%,.7), hsla(0,0%,100%,.4));
}

I can't actually tell what the background images are doing ... the background looks like a solid color to me.
Comment 2 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-28 22:26:26 PDT
oh, there's a "background-attachment: fixed;" rule in aboutHome.css that I accidentally trimmed.

I'm pretty sure we don't need that rule, at least.
Comment 3 Frank Yan (:fryn) 2012-03-29 08:13:34 PDT
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #1)
> I can't actually tell what the background images are doing ... the
> background looks like a solid color to me.

It's not a solid color. It's a noise texture, but yes it is subtle and intentionally so.
See the following sites for other examples of this type of noise texture in their backgrounds:
https://www.youtube.com/
http://cl.ly/2F3M1T0L3E3h2C3A3f2X

(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #2)
> oh, there's a "background-attachment: fixed;" rule in aboutHome.css that I
> accidentally trimmed.
> 
> I'm pretty sure we don't need that rule, at least.

No, we don't. Does removing that rule fix this bug?
Comment 4 Frank Yan (:fryn) 2012-03-29 09:12:51 PDT
Created attachment 610565 [details] [diff] [review]
patch

The background-attachment shouldn't be `fixed` anyway.
Comment 5 Marco Bonardo [::mak] 2012-03-29 15:15:35 PDT
Comment on attachment 610565 [details] [diff] [review]
patch

Review of attachment 610565 [details] [diff] [review]:
-----------------------------------------------------------------

I thought was part of the design specs, good to know it's not.

Btw, it's still unclear, if this is really a perf problem, of which size? This is becoming more common on the Web (the transparent texture) as pointed out, is there a problem at the platform level or just it's something we should evangelize against?
And finally, if just removing the fixed is enough to solve the perf problem.
Comment 6 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-29 16:09:07 PDT
The problem is not the texture, it's 'background-attachment:fixed'.

It's not a big problem. Probably no-one would have noticed if Bas hadn't been doing some testing. But making about:home a bit faster to render, with a bit less memory usage, is worth it.

We could fix this case with an optimization in the engine. The reason we use extra resources here is so that we create a separate layer for the fixed background so that scrolling is snappy if you scroll the page. about:home usually doesn't need a scrollbar so we can expect that scrolling won't happen. We could detect that and turn off the separate layer for that case. But we have no data to indicate whether that would be worth doing in general.
Comment 7 Frank Yan (:fryn) 2012-03-29 17:20:07 PDT
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #6)
> The problem is not the texture, it's 'background-attachment:fixed'.

Great! I'm glad you and Bas caught this, since background-attachment should have been `scroll` design-wise anyway, but we didn't notice it, since as you noted "about:home usually doesn't need a scrollbar". :)

Thanks, mak, for the review. :)

https://hg.mozilla.org/integration/fx-team/rev/7cc16b3f172d

Should this get ported to aurora?
Comment 8 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-29 17:50:10 PDT
Might as well, it's minimal risk.
Comment 9 Frank Yan (:fryn) 2012-03-29 18:19:24 PDT
Comment on attachment 610565 [details] [diff] [review]
patch

[Approval Request Comment]
User impact if declined: Slower rendering and more memory usage for about:home.
Risk to taking this patch: None.
String changes made by this patch: None.
Comment 10 Tim Taubert [:ttaubert] 2012-03-30 09:35:36 PDT
https://hg.mozilla.org/mozilla-central/rev/7cc16b3f172d
Comment 11 Alex Keybl [:akeybl] 2012-04-02 10:57:26 PDT
Comment on attachment 610565 [details] [diff] [review]
patch

[Triage Comment]
Very simple, low-risk change in support of about:home perf. Approved for Aurora 13.
Comment 13 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-05-10 12:20:35 PDT
Is there a test QA can use to verify this fix?
Comment 14 Frank Yan (:fryn) 2012-05-10 12:21:46 PDT
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #13)
> Is there a test QA can use to verify this fix?

I don't know, but it's not necessary, imho.

Note You need to log in before you can comment on or make changes to this bug.