Bug 160941 - Remove StyleCachedImageSet
Summary: Remove StyleCachedImageSet
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-17 07:21 PDT by Antti Koivisto
Modified: 2016-08-17 11:18 PDT (History)
7 users (show)

See Also:


Attachments
patch (29.11 KB, patch)
2016-08-17 07:26 PDT, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-yosemite (836.28 KB, application/zip)
2016-08-17 08:15 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (931.06 KB, application/zip)
2016-08-17 08:20 PDT, Build Bot
no flags Details
patch (29.58 KB, patch)
2016-08-17 08:23 PDT, Antti Koivisto
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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