Bug 143191

Summary: Serialized declaration for background-size/-webkit-mask-size should preserve identical values instead of coalescing them
Product: WebKit Reporter: Erik Aigner <aigner.erik>
Component: CSSAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, cdumez, commit-queue, dbates, hyatt, koivisto, mitz, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=67672
https://bugs.webkit.org/show_bug.cgi?id=67657
Bug Depends on: 146852    
Bug Blocks:    
Attachments:
Description Flags
Patch and layout tests
none
Patch and layout tests darin: review+

Description Erik Aigner 2015-03-29 03:01:32 PDT
When setting `background-size:100% 100%` on a BODY element, WebKit2 (WKWebView) rewrites it to `background-size:100%` which is equivalent to `100% auto`. This is a clear violation of the spec.

See http://stackoverflow.com/questions/29327537/css-background-size-ignores-2nd-value?noredirect=1#comment46845162_29327537 for discussion
Comment 1 Daniel Bates 2015-07-09 18:31:19 PDT
Created attachment 256552 [details]
Patch and layout tests
Comment 2 WebKit Commit Bot 2015-07-09 18:33:53 PDT
Attachment 256552 [details] did not pass style-queue:


ERROR: Source/WebCore/css/Pair.h:75:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
ERROR: Source/WebCore/css/Pair.h:76:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Daniel Bates 2015-07-09 18:34:49 PDT
Created attachment 256553 [details]
Patch and layout tests

Update Apple copyright line in file Source/WebCore/css/Pair.h
Comment 4 WebKit Commit Bot 2015-07-09 18:36:55 PDT
Attachment 256553 [details] did not pass style-queue:


ERROR: Source/WebCore/css/Pair.h:75:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
ERROR: Source/WebCore/css/Pair.h:76:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Radar WebKit Bug Importer 2015-07-09 18:39:15 PDT
<rdar://problem/21759393>
Comment 6 Radar WebKit Bug Importer 2015-07-09 18:39:17 PDT
<rdar://problem/21759395>
Comment 7 Daniel Bates 2015-07-09 18:42:00 PDT
(In reply to comment #6)
> <rdar://problem/21759395>

Disregard this comment.
Comment 8 Daniel Bates 2015-07-09 18:51:19 PDT
I
Comment 9 Darin Adler 2015-07-10 09:57:56 PDT
Comment on attachment 256553 [details]
Patch and layout tests

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

> Source/WebCore/css/Pair.h:50
> +    static Ref<Pair> create(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second, IdenticalValueEncoding encoding)

Arguments should be RefPtr&&, not PassRefPtr.

> Source/WebCore/css/Pair.h:76
> +    Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second) : m_first(first), m_second(second) { }
> +    Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second, IdenticalValueEncoding encoding) : m_first(first), m_second(second), m_encoding(encoding) { }

Arguments should be RefPtr&&, not PassRefPtr.
Comment 10 Daniel Bates 2015-07-10 10:17:27 PDT
(In reply to comment #9)
> > Source/WebCore/css/Pair.h:50
> > +    static Ref<Pair> create(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second, IdenticalValueEncoding encoding)
> 
> Arguments should be RefPtr&&, not PassRefPtr.
> 

Will fix before landing.

> > Source/WebCore/css/Pair.h:76
> > +    Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second) : m_first(first), m_second(second) { }
> > +    Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second, IdenticalValueEncoding encoding) : m_first(first), m_second(second), m_encoding(encoding) { }
> 
> Arguments should be RefPtr&&, not PassRefPtr.

Will fix before landing.
Comment 11 Daniel Bates 2015-07-10 13:41:36 PDT
Committed r186687: <http://trac.webkit.org/changeset/186687>