- From: Kenneth Rohde Christiansen <kenneth.christiansen@gmail.com>
- Date: Wed, 25 Aug 2010 03:15:05 -0300
- To: Rune Lillesveen <rune@opera.com>
- Cc: Øyvind Stenhaug <oyvinds@opera.com>, www-style list <www-style@w3.org>, Eduardo Fleury <eduardo.fleury@openbossa.org>
Hi Rune and Øyvind,
Thanks for your answers.
I find the wording 'computed value' a bit confusing but given the
definition it is OK, though maybe a better word could be found.
Yes, swapping them should be fine. Personally I did the following:
114 // Resolve initial-scale value.
115 result.initialScale = args.initialScale;
116 if (result.initialScale == ViewportArguments::ValueAuto) {
117 result.initialScale = availableWidth / desktopWidth;
118 if (args.width != ViewportArguments::ValueAuto)
119 result.initialScale = availableWidth / args.width;
120 if (args.height != ViewportArguments::ValueAuto) {
121 // if 'auto', the initial-scale will be negative here
and thus ignored.
122 result.initialScale = max(result.initialScale,
availableHeight / args.height);
123 }
124 }
You can find my latest patch for WebKit here:
https://bugs.webkit.org/show_bug.cgi?id=44201
Cheers,
Kenneth
On Tue, Aug 24, 2010 at 5:15 PM, Rune Lillesveen <rune@opera.com> wrote:
> On Thu, 19 Aug 2010 12:27:16 +0200, Øyvind Stenhaug <oyvinds@opera.com>
> wrote:
>
>> On Tue, 17 Aug 2010 14:03:02 +0200, Kenneth Rohde Christiansen
>> <kenneth.christiansen@gmail.com> wrote:
>>
>>> I guess what you want is the following:
>>>
>>> 10. If the computed value of initial-scale is ‘auto’ and width is not
>>> ‘auto’, set initial-scale = (available-width / width)
>>> 11. If the computed value of initial-scale is ‘auto’ and height is not
>>> ‘auto’, set initial-scale = MAX(initial-scale, (available-height /
>>> height))
>>> 12. If initial-scale is ‘auto’, set initial-scale = (available-width /
>>> desktop-width)
>>>
>>> swap 11 and 12.
>>>
>>> 10. If the computed value of initial-scale is ‘auto’ and width is not
>>> ‘auto’, set CALCULATED initial-scale = (available-width / width)
>>> 12. If initial-scale is ‘auto’, set CALCULATED initial-scale =
>>> (available-width / desktop-width)
>>> 11. If the computed value of initial-scale is ‘auto’ and height is
>>> not ‘auto’, set initial-scale = MAX(CALCULATED initial-scale,
>>> (available-height / height))
>>
>> I tried <meta name="viewport" content="height=2000"> on Safari and it
>> looks like initial-scale gets resolved to available-width/desktop-width, so
>> yes, they should probably be swapped. (If I understand your usage of
>> "CALCULATED" correctly, itshould apply everywhere it doesn't say "computed
>> value of", so you seem to have missed a couple of cases.)
>
> Kenneth: given that "initial-scale" refer to what you call "CALCULATED
> initial-scale" because of this part from 6.1:
>
> "Computed values refer to the computed values from the property definitions.
> Other values refer to the values resolved/constrained to at that point in
> the procedure. The values are initially resolved to their computed values."
>
> Am I right to assume that I can keep the wording, but swap 11 and 12?
>
> --
> Rune Lillesveen
> Senior Core Developer / Architect
> Opera Software ASA
>
--
Kenneth Rohde Christiansen
Technical Lead / Senior Software Engineer
Qt Labs Americas, Nokia Technology Institute, INdT
Phone +55 81 8895 6002 / E-mail kenneth.christiansen at openbossa.org
http://codeposts.blogspot.com ﹆﹆﹆
Received on Wednesday, 25 August 2010 06:15:54 UTC