Bug 160941

Summary: Remove StyleCachedImageSet
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bdakin, buildbot, dino, ossy, rniwa, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
buildbot: commit-queue-
Archive of layout-test-results from ews102 for mac-yosemite
none
Archive of layout-test-results from ews106 for mac-yosemite-wk2
none
patch simon.fraser: review+

Description Antti Koivisto 2016-08-17 07:21:44 PDT
It is basically the same as StyleCachedImage.
Comment 1 Antti Koivisto 2016-08-17 07:26:35 PDT
Created attachment 286297 [details]
patch
Comment 2 Build Bot 2016-08-17 08:15:45 PDT
Comment on attachment 286297 [details]
patch

Attachment 286297 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1887539

New failing tests:
fast/events/mouse-cursor-image-set.html
Comment 3 Build Bot 2016-08-17 08:15:50 PDT
Created attachment 286299 [details]
Archive of layout-test-results from ews102 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 4 Build Bot 2016-08-17 08:20:18 PDT
Comment on attachment 286297 [details]
patch

Attachment 286297 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1887550

New failing tests:
fast/events/mouse-cursor-image-set.html
Comment 5 Build Bot 2016-08-17 08:20:21 PDT
Created attachment 286300 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 6 Antti Koivisto 2016-08-17 08:23:26 PDT
Created attachment 286301 [details]
patch
Comment 7 Simon Fraser (smfr) 2016-08-17 09:29:52 PDT
Comment on attachment 286301 [details]
patch

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

> Source/WebCore/rendering/style/StyleCachedImage.h:40
> +    static Ref<StyleCachedImage> createForImageSet(CachedImage* image, float scaleFactor, CSSImageSetValue& cssValue) { return adoptRef(*new StyleCachedImage(image, scaleFactor, &cssValue)); }

What is scaleFactor? a deviceScaleFactor, or something else?
Comment 8 Antti Koivisto 2016-08-17 09:35:45 PDT
> What is scaleFactor? a deviceScaleFactor, or something else?

It is the scale factor of the best-fit image in an image set, picked based on deviceScaleFactor.
Comment 9 Antti Koivisto 2016-08-17 09:40:37 PDT
https://trac.webkit.org/r204560
Comment 10 Csaba Osztrogon√°c 2016-08-17 11:06:25 PDT
(In reply to comment #9)
> https://trac.webkit.org/r204560

It broke the Apple Mac cmake build:

/Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WebCore/rendering/style/StyleCachedImage.cpp:50:16: error: no viable conversion from 'WebCore::CSSImageSetValue *' to 'PassRefPtr<WebCore::CSSValue>'
        return const_cast<CSSImageSetValue*>(m_cssImageSetValue);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WTF/wtf/PassRefPtr.h:49:9: note: candidate constructor not viable: cannot convert argument of incomplete type 'WebCore::CSSImageSetValue *' to 'WebCore::CSSValue *'
        PassRefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
        ^
/Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WTF/wtf/PassRefPtr.h:53:9: note: candidate constructor not viable: cannot convert argument of incomplete type 'WebCore::CSSImageSetValue *' to 'const WTF::PassRefPtr<WebCore::CSSValue> &'
        PassRefPtr(const PassRefPtr& o) : m_ptr(o.leakRef()) { }
        ^
/Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WTF/wtf/PassRefPtr.h:54:30: note: candidate template ignored: could not match 'PassRefPtr<type-parameter-0-0>' against 'WebCore::CSSImageSetValue *'
        template<typename U> PassRefPtr(const PassRefPtr<U>& o) : m_ptr(o.leakRef()) { }
                             ^
/Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WTF/wtf/PassRefPtr.h:58:30: note: candidate template ignored: could not match 'RefPtr<type-parameter-0-0>' against 'WebCore::CSSImageSetValue *'
        template<typename U> PassRefPtr(const RefPtr<U>&);
                             ^
/Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WTF/wtf/PassRefPtr.h:59:30: note: candidate template ignored: could not match 'Ref<type-parameter-0-0>' against 'WebCore::CSSImageSetValue *'
        template<typename U> PassRefPtr(Ref<U>&& reference) : m_ptr(&reference.leakRef()) { }
                             ^
/Volumes/Data/slave/elcapitan-cmake-debug/build/Source/WTF/wtf/PassRefPtr.h:60:30: note: candidate template ignored: could not match 'RefPtr<type-parameter-0-0>' against 'WebCore::CSSImageSetValue *'
        template<typename U> PassRefPtr(RefPtr<U>&& reference) : m_ptr(reference.leakRef()) { }
Comment 11 Antti Koivisto 2016-08-17 11:18:04 PDT
https://trac.webkit.org/r204564 should help