- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Thu, 26 Jun 2014 10:13:34 +1200
- To: Justin Novosad <junov@google.com>
- Cc: Rik Cabanier <cabanier@gmail.com>, Kenneth Russell <kbr@google.com>, Stephen White <senorblanco@chromium.org>, WHAT Working Group <whatwg@whatwg.org>, Dean Jackson <dino@apple.com>, Ian Hickson <ian@hixie.ch>
On Thu, Jun 26, 2014 at 10:10 AM, Robert O'Callahan <robert@ocallahan.org> wrote: > On Thu, Jun 26, 2014 at 2:49 AM, Justin Novosad <junov@google.com> wrote: > >> I was wondering if there is anything we can do with this feature to >> prevent >> web apps from creating layout feedback loops. What I mean is that if the >> event listener for renderedsizechange changes the layout of the page in a >> way that does not preserve renderedPixelWidth/Height, we can get into a >> lot >> of trouble. Even if the resizing arithmetic in the event listener is >> sound, >> if the rounding logic does not match exactly what the browser does, >> fractional scales may cause instabilities. >> >> The main source of of the problem is that intrinsic size affects CSS size >> when width or height are set to 'auto', which is the default. Some ideas >> that come to mind for breaking the feedback loop: >> 1) renderedPixelWidth/Height return the intrinsic size when CSS >> width/height are set to 'auto' >> 2) renderedPixelWidth/Height do not change when CSS width/height are set >> to >> 'auto' >> > > We could do this and I think it would work. It's arguable whether the > complexity is justified, but I'd be OK with doing it. > To clarify, I think a version of option #1 would be the best way to go. renderedPixelWidth would return the current canvas buffer width when the canvas element's CSS specified value for 'width' is 'auto', and similar for height. Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w
Received on Wednesday, 25 June 2014 22:14:00 UTC