Bug 48704

Summary: Percentage z offset in transform-origin should make the property invalid
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, rwlbuis, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
I noticed that unfortunately my previous patch caused regressions, sorry about that! This one causes no regressions but ofcourse needs to rechecked. Cheers, Rob simon.fraser: review+

Description Simon Fraser (smfr) 2010-10-29 18:11:39 PDT
transform-origin: 20% 10% 30%; should be ignored, since the % value for z offset is invalid.
Comment 1 Rob Buis 2010-11-21 01:54:46 PST
Created attachment 74497 [details]
Patch
Comment 2 Simon Fraser (smfr) 2010-11-21 08:31:41 PST
Comment on attachment 74497 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74497&action=review

> LayoutTests/fast/css/script-tests/transform-origin-parsing.js:18
> +shouldBe('test("-webkit-transform-origin: 10px 10px 10px", "-webkit-transform-origin")', '"10px 10px 10px"');

It might be good to also test a lack of units on the z value:
"-webkit-transform-origin: 10px 10px 10"
This should not parse.
Comment 3 Rob Buis 2010-11-21 09:25:32 PST
Hi Simon,

(In reply to comment #2)
> (From update of attachment 74497 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=74497&action=review
> 
> > LayoutTests/fast/css/script-tests/transform-origin-parsing.js:18
> > +shouldBe('test("-webkit-transform-origin: 10px 10px 10px", "-webkit-transform-origin")', '"10px 10px 10px"');
> 
> It might be good to also test a lack of units on the z value:
> "-webkit-transform-origin: 10px 10px 10"
> This should not parse.

I added it locally and unfortunately it does parse. It is due to the m_strict usage in
parseTransformOriginShorthand, should I force it to true? Or is that something for
another patch/bug?
Cheers,

Rob.
Comment 4 Rob Buis 2010-11-23 23:35:49 PST
Created attachment 74724 [details]
I noticed that unfortunately my previous patch caused regressions, sorry about that! This one causes no regressions but ofcourse needs to rechecked. Cheers, Rob
Comment 5 Simon Fraser (smfr) 2010-11-26 10:26:27 PST
(In reply to comment #3)
> I added it locally and unfortunately it does parse. It is due to the m_strict usage in
> parseTransformOriginShorthand, should I force it to true? Or is that something for
> another patch/bug?

Hm, maybe that is expected to work. Let's leave that for another patch (if indeed it needs fixing).
Comment 6 Rob Buis 2010-11-27 06:18:24 PST
Landed in r72776.