[webkit-dev] Making top-level style changes through window.internals

W. James MacLean wjmaclean at chromium.org
Thu Sep 29 08:52:51 PDT 2011


All of this discussion started with my wanting to write a layout test that
changes pageScaleFactor, without incurring scroll bars in the process. The
documentElement.style method below seems to be able to change, for example,
background colour, but it doesn't seem to work for
documentElement.style.overflow = "hidden". Is there somewhere else the
scroll bars should be suppressed?

On Thu, Sep 29, 2011 at 11:44 AM, Simon Fraser <simon.fraser at apple.com>wrote:

> On Sep 29, 2011, at 8:41 AM, Adam Roben wrote:
>
> > On Sep 29, 2011, at 11:37 AM, Fady Samuel wrote:
> >
> >> pageScaleFactor is a document level CSS scaling style. Often times, we'd
> like to be able to apply style at the document level when writing layout
> tests. As far as I'm aware, there's no way to do this in javascript in a
> layout test? Is this correct? If so, would anyone object to exposing
> document-level styles to window.internals? If not there, is there anywhere
> else where this can be exposed for testing purposes?
> >
> > In the particular case of pageScaleFactor I believe we already have
> eventSender.scalePageBy. (I think it's on eventSender rather than
> layoutTestController because it was first used to simulate Safari's
> pinch-to-zoom feature.)
> >
> > Moving this feature to window.internals and adding other similar features
> seems fine to me.
>
> Agreed.
>
> Fady, in what other instances do you need to change document-level style?
>
> Don't forget that it's possible to change style on the 'html' element
> (which is the document element) via
>
> document.documentElement.style.foo =...
>
> Simon
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110929/a910405c/attachment.html>


More information about the webkit-dev mailing list