Bug 150312 - Add ouput formatters for FillLayer and all it entails
Summary: Add ouput formatters for FillLayer and all it entails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-18 22:05 PDT by Simon Fraser (smfr)
Modified: 2015-10-19 15:22 PDT (History)
3 users (show)

See Also:


Attachments
Patch (19.41 KB, patch)
2015-10-18 22:06 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (23.31 KB, patch)
2015-10-19 12:11 PDT, Simon Fraser (smfr)
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2015-10-18 22:05:24 PDT
Add ouput formatters for FillLayer and all it entails
Comment 1 Simon Fraser (smfr) 2015-10-18 22:06:17 PDT
Created attachment 263440 [details]
Patch
Comment 2 Simon Fraser (smfr) 2015-10-18 22:07:09 PDT
Sample output:

(fill-layer
  (x-position [0%])
  (y-position [50%])
  (size-length width=[25%] height=[100%])
  (size-type size-length)
  (size type=size-length size=width=[25%] height=[100%])
  (background-origin left top)
  (repeat no-repeat no-repeat)
  (clip border)
  (origin padding)
  (composite 2)
  (blend-mode normal)
  (mask-type alpha)
  (fill-layer
    (x-position [100%])
    (y-position [50%])
    (size-length width=[45%] height=[100%])
    (size-type size-none)
    (size type=size-none size=width=[45%] height=[100%])
    (background-origin left top)
    (repeat no-repeat no-repeat)
    (clip border)
    (origin padding)
    (composite 2)
    (blend-mode normal)
    (mask-type alpha)))

I'm open to better Length formatting.
Comment 3 Tim Horton 2015-10-19 08:52:21 PDT
Two formatting questions:

(In reply to comment #2)
> Sample output:
> 
> (fill-layer
>   (x-position [0%])

What are the square brackets for? (Might be able to find out by reading the patch, but I haven't yet).

>   (size-length width=[25%] height=[100%])
>   (size-type size-length)
>   (size type=size-length size=width=[25%] height=[100%])

Why all three? It seems like the one with the 'size' key matches the other two. Also, the equal signs? This should probably read like below, no?

>   (size
>     (type length)
>     (width [25%])
>     (height [100%]))
Comment 4 Simon Fraser (smfr) 2015-10-19 12:11:37 PDT
Created attachment 263500 [details]
Patch
Comment 5 Simon Fraser (smfr) 2015-10-19 12:12:03 PDT
Output is now:

(fill-layer
  (position 0% 50%)
  (size size-length 25% 100%)
  (background-origin left top)
  (repeat no-repeat no-repeat)
  (clip border)
  (origin padding)
  (composite source-over)
  (blend-mode screen)
  (mask-type alpha)
  (fill-layer
    (position 100% 50%)
    (size size-none 45% 100%)
    (background-origin left top)
    (repeat no-repeat no-repeat)
    (clip border)
    (origin padding)
    (composite source-over)
    (blend-mode screen)
    (mask-type alpha)))
Comment 6 Ryan Haddad 2015-10-19 15:20:10 PDT
Simon is already investigating, but this caused 13 tests to crash in debug with ASSERTION FAILED: blendOp < numBlendOperatorNames
Comment 7 Simon Fraser (smfr) 2015-10-19 15:22:03 PDT
Fixed in https://trac.webkit.org/r191319
Comment 8 Simon Fraser (smfr) 2015-10-19 15:22:39 PDT
http://trac.webkit.org/changeset/191310