Add a getter for resolution of scalable web content

RESOLVED FIXED in mozilla19

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

Trunk
mozilla19
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

No description provided.
Not sure who is available to review this yet... don't want to give this to someone who is too busy.
Attachment #675353 - Flags: review?(dholbert)
Adding dependency on bug 590294, which (in its "part 6" patch) added nsIDOMWindowUtils.setResolution. ( https://hg.mozilla.org/mozilla-central/rev/0b90c6b07933 )

(Incidentally, the header comment is "Get/set the resolution"... Perhaps cjones originally intended to add a getter along with a setter?)

Also: pretty sure interface changes still require sr, so you should request sr on this as well.
Depends on: 590294
(In reply to Daniel Holbert [:dholbert] from comment #2)
> Adding dependency on bug 590294, which (in its "part 6" patch) added
> nsIDOMWindowUtils.setResolution. (
> https://hg.mozilla.org/mozilla-central/rev/0b90c6b07933 )
> 
> (Incidentally, the header comment is "Get/set the resolution"... Perhaps
> cjones originally intended to add a getter along with a setter?)
> 

Yeah, that is why I think this is straightforward.

> Also: pretty sure interface changes still require sr, so you should request
> sr on this as well.

OK, I'll bring smaug on board?
Attachment #675353 - Flags: superreview?(bugs)
Comment on attachment 675353 [details] [diff] [review]
Introduce nsIDOMWindowUtils.getResolution

Looks good to me!

(I'm technically not a /dom reviewer, but I'm comfortable reviewing this since it's calling into layout code, it's pretty simple, and since it's getting additional eyes via super-review)
Attachment #675353 - Flags: review?(dholbert) → review+
...though -- I think this is exposed to web content. Is that intentional?  If so, this might (?) need a security review...  (It does expose another few bits of information about a given client for panopticlick-type fingerprinting.)
Comment on attachment 675353 [details] [diff] [review]
Introduce nsIDOMWindowUtils.getResolution

You must add 
   if (!IsUniversalXPConnectCapable()) {
     return NS_ERROR_DOM_SECURITY_ERR;
   }

with that, sr=me
Attachment #675353 - Flags: superreview?(bugs) → superreview+
(Yeah, that was the chunk in the setter that worried me about being missing from the getter.  That addresses my concerns from comment 5.)
With the landing of bug 804174 (still only on inbound), you need to use nsContentUtils::IsCallerChrome() instead of IsUniversalXPConnectCapable().
(In reply to Andrew McCreight [:mccr8] from comment #8)
> With the landing of bug 804174 (still only on inbound), you need to use
> nsContentUtils::IsCallerChrome() instead of IsUniversalXPConnectCapable().

Thanks for noticing this. I'll wait to land this tomorrow when the change is in MC.
https://hg.mozilla.org/mozilla-central/rev/a889ac063373

Should this have a test?
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.