Closed Bug 1096131 Opened 10 years ago Closed 10 years ago

clarify docs for LayoutDevicePixels and LayerPixels

Categories

(Core :: Layout, defect)

36 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: karlt, Assigned: karlt)

Details

Attachments

(1 file)

The docs say that the size of LayoutDevicePixels is affected by "full zoom"
and "widget scale".  That may is true if measured in CSS pixels or app units,
but the size seen by the user, measured in physical (screen) units, is *un*affected.
Attachment #8519650 - Flags: review?(bugmail.mozilla)
Attachment #8519650 - Flags: review?(bugmail.mozilla) → review+
Comment on attachment 8519650 [details] [diff] [review]
clarify docs for LayoutDevicePixels and LayerPixels

> /*
>  * The pixels that layout rasterizes and delivers to the graphics code.
>- * These are generally referred to as "device pixels" in layout code. Layer
>- * pixels are affected by:
>+ * These also are generally referred to as "device pixels" in layout code.
>+ * Conversion between CSS pixels and LayerPixels is affected by:
>  * 1) the "display resolution" (see nsIPresShell::SetResolution)
>  * 2) the "full zoom" (see nsPresContext::SetFullZoom)
>  * 3) the "widget scale" (see nsIWidget::GetDefaultScale)
>  */

To make this even clearer we should also say that layer pixels are affected by CSS transformations, if they have a scale for example.
(In reply to Timothy Nikkel (:tn) from comment #2)
> Comment on attachment 8519650 [details] [diff] [review]
> clarify docs for LayoutDevicePixels and LayerPixels
> 
> > /*
> >  * The pixels that layout rasterizes and delivers to the graphics code.
> >- * These are generally referred to as "device pixels" in layout code. Layer
> >- * pixels are affected by:
> >+ * These also are generally referred to as "device pixels" in layout code.
> >+ * Conversion between CSS pixels and LayerPixels is affected by:
> >  * 1) the "display resolution" (see nsIPresShell::SetResolution)
> >  * 2) the "full zoom" (see nsPresContext::SetFullZoom)
> >  * 3) the "widget scale" (see nsIWidget::GetDefaultScale)
> >  */
> 
> To make this even clearer we should also say that layer pixels are affected
> by CSS transformations, if they have a scale for example.

I'm not familiar with CSS transforms.  Would it be appropriate to say
"4) CSS transformations"?

Is there something more specific than "transformations"?
Maybe something like

"If we choose to rasterize at a different scale due to CSS transforms"
Possibly:

 * Conversion between CSS pixels and LayerPixels is affected by:

 * 4) rasterizing at a different scale in the presence of some CSS transforms
https://hg.mozilla.org/mozilla-central/rev/7b6182fd38fc
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: