Skip to content
Permalink
Browse files
More PassRefPtr purging in WebCore.
<https://webkit.org/b/163895>

Reviewed by Antti Koivisto.

Source/WebCore:

Remove PassRefPtr usage in RenderStyle, RenderTheme and Scrollbar, then fix up all the fallout.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::contentToCSSValue):
(WebCore::shapePropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertQuotes):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::usesMenuList):
(WebCore::HTMLSelectElement::platformHandleKeydownEvent):
(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
* html/InputType.cpp:
(WebCore::InputType::themeSupportsDataListUI):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::shouldHaveSpinButton):
(WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
* page/FrameView.cpp:
(WebCore::FrameView::createScrollbar):
* page/FrameView.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
(WebCore::PropertyWrapperClipPath::PropertyWrapperClipPath):
(WebCore::PropertyWrapperShape::PropertyWrapperShape):
(WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
(WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
(WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
* platform/PopupMenuClient.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::createScrollbar):
* platform/ScrollView.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::createNativeScrollbar):
* platform/Scrollbar.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
* rendering/FilterEffectRenderer.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar):
(WebCore::RenderLayer::createLocalTransformState):
(WebCore::RenderLayer::hitTestLayerByApplyingTransform):
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::createScrollbar):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.cpp:
(RenderMenuList::createScrollbar):
* rendering/RenderMenuList.h:
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::createCustomScrollbar):
* rendering/RenderScrollbar.h:
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::createScrollbar):
* rendering/RenderSearchField.h:
* rendering/RenderTheme.h:
(WebCore::RenderTheme::defaultTheme):
* rendering/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::create):
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeEfl.h:
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeMac.mm:
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderTheme::themeForPage):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidget):
* rendering/RenderWidget.h:
* rendering/style/CursorData.h:
(WebCore::CursorData::CursorData):
(WebCore::CursorData::setImage):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::setImage):
* rendering/style/QuotesData.cpp:
(WebCore::QuotesData::create):
* rendering/style/QuotesData.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::addCursor):
(WebCore::RenderStyle::setCursorList):
(WebCore::RenderStyle::setQuotes):
(WebCore::RenderStyle::setWillChange):
(WebCore::RenderStyle::setContent):
(WebCore::RenderStyle::setListStyleImage):
(WebCore::RenderStyle::setBorderImageSource):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setMaskImage):
(WebCore::RenderStyle::setMaskBoxImageSource):
(WebCore::RenderStyle::setBoxReflect):
(WebCore::RenderStyle::setShapeOutside):
(WebCore::RenderStyle::setClipPath):
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::cssValue):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::cssValue):
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
* rendering/style/StyleMultiColData.h:
* rendering/style/StyleRareInheritedData.h:

Source/WebKit2:

* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar):


Canonical link: https://commits.webkit.org/181671@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Andreas Kling committed Oct 25, 2016
1 parent 2516da3 commit e8afd66158b108408474446cd2bf2cdb43715284
Showing with 240 additions and 140 deletions.
  1. +112 −0 Source/WebCore/ChangeLog
  2. +4 −4 Source/WebCore/css/CSSComputedStyleDeclaration.cpp
  3. +2 −2 Source/WebCore/css/StyleBuilderConverter.h
  4. +3 −9 Source/WebCore/html/HTMLSelectElement.cpp
  5. +1 −2 Source/WebCore/html/InputType.cpp
  6. +2 −6 Source/WebCore/html/TextFieldInputType.cpp
  7. +1 −1 Source/WebCore/loader/SubframeLoader.cpp
  8. +1 −1 Source/WebCore/page/FrameView.cpp
  9. +1 −1 Source/WebCore/page/FrameView.h
  10. +8 −8 Source/WebCore/page/animation/CSSPropertyAnimation.cpp
  11. +1 −1 Source/WebCore/platform/PopupMenuClient.h
  12. +1 −1 Source/WebCore/platform/ScrollView.cpp
  13. +1 −1 Source/WebCore/platform/ScrollView.h
  14. +2 −2 Source/WebCore/platform/Scrollbar.cpp
  15. +1 −2 Source/WebCore/platform/Scrollbar.h
  16. +1 −1 Source/WebCore/rendering/FilterEffectRenderer.cpp
  17. +1 −2 Source/WebCore/rendering/FilterEffectRenderer.h
  18. +6 −6 Source/WebCore/rendering/RenderLayer.cpp
  19. +2 −2 Source/WebCore/rendering/RenderLayer.h
  20. +2 −2 Source/WebCore/rendering/RenderListBox.cpp
  21. +1 −1 Source/WebCore/rendering/RenderListBox.h
  22. +3 −6 Source/WebCore/rendering/RenderMenuList.cpp
  23. +1 −1 Source/WebCore/rendering/RenderMenuList.h
  24. +2 −2 Source/WebCore/rendering/RenderScrollbar.cpp
  25. +1 −1 Source/WebCore/rendering/RenderScrollbar.h
  26. +3 −6 Source/WebCore/rendering/RenderSearchField.cpp
  27. +1 −1 Source/WebCore/rendering/RenderSearchField.h
  28. +4 −4 Source/WebCore/rendering/RenderTheme.h
  29. +4 −4 Source/WebCore/rendering/RenderThemeEfl.cpp
  30. +1 −1 Source/WebCore/rendering/RenderThemeEfl.h
  31. +2 −2 Source/WebCore/rendering/RenderThemeGtk.cpp
  32. +2 −2 Source/WebCore/rendering/RenderThemeIOS.mm
  33. +2 −2 Source/WebCore/rendering/RenderThemeMac.mm
  34. +2 −2 Source/WebCore/rendering/RenderThemeWin.cpp
  35. +1 −1 Source/WebCore/rendering/RenderWidget.cpp
  36. +1 −1 Source/WebCore/rendering/RenderWidget.h
  37. +3 −3 Source/WebCore/rendering/style/CursorData.h
  38. +1 −1 Source/WebCore/rendering/style/FillLayer.h
  39. +2 −2 Source/WebCore/rendering/style/QuotesData.cpp
  40. +1 −2 Source/WebCore/rendering/style/QuotesData.h
  41. +13 −13 Source/WebCore/rendering/style/RenderStyle.cpp
  42. +14 −14 Source/WebCore/rendering/style/RenderStyle.h
  43. +2 −2 Source/WebCore/rendering/style/StyleCachedImage.cpp
  44. +1 −1 Source/WebCore/rendering/style/StyleCachedImage.h
  45. +2 −2 Source/WebCore/rendering/style/StyleGeneratedImage.cpp
  46. +1 −1 Source/WebCore/rendering/style/StyleGeneratedImage.h
  47. +1 −2 Source/WebCore/rendering/style/StyleImage.h
  48. +0 −1 Source/WebCore/rendering/style/StyleMultiColData.h
  49. +0 −1 Source/WebCore/rendering/style/StyleRareInheritedData.h
  50. +11 −0 Source/WebKit2/ChangeLog
  51. +1 −1 Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h
  52. +3 −3 Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm
@@ -1,3 +1,115 @@
2016-10-25 Andreas Kling <akling@apple.com>

More PassRefPtr purging in WebCore.
<https://webkit.org/b/163895>

Reviewed by Antti Koivisto.

Remove PassRefPtr usage in RenderStyle, RenderTheme and Scrollbar, then fix up all the fallout.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::contentToCSSValue):
(WebCore::shapePropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertQuotes):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::usesMenuList):
(WebCore::HTMLSelectElement::platformHandleKeydownEvent):
(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
* html/InputType.cpp:
(WebCore::InputType::themeSupportsDataListUI):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::shouldHaveSpinButton):
(WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
* page/FrameView.cpp:
(WebCore::FrameView::createScrollbar):
* page/FrameView.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
(WebCore::PropertyWrapperClipPath::PropertyWrapperClipPath):
(WebCore::PropertyWrapperShape::PropertyWrapperShape):
(WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
(WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
(WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
* platform/PopupMenuClient.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::createScrollbar):
* platform/ScrollView.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::createNativeScrollbar):
* platform/Scrollbar.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
* rendering/FilterEffectRenderer.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar):
(WebCore::RenderLayer::createLocalTransformState):
(WebCore::RenderLayer::hitTestLayerByApplyingTransform):
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::createScrollbar):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.cpp:
(RenderMenuList::createScrollbar):
* rendering/RenderMenuList.h:
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::createCustomScrollbar):
* rendering/RenderScrollbar.h:
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::createScrollbar):
* rendering/RenderSearchField.h:
* rendering/RenderTheme.h:
(WebCore::RenderTheme::defaultTheme):
* rendering/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::create):
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeEfl.h:
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeMac.mm:
(WebCore::RenderTheme::themeForPage):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderTheme::themeForPage):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidget):
* rendering/RenderWidget.h:
* rendering/style/CursorData.h:
(WebCore::CursorData::CursorData):
(WebCore::CursorData::setImage):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::setImage):
* rendering/style/QuotesData.cpp:
(WebCore::QuotesData::create):
* rendering/style/QuotesData.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::addCursor):
(WebCore::RenderStyle::setCursorList):
(WebCore::RenderStyle::setQuotes):
(WebCore::RenderStyle::setWillChange):
(WebCore::RenderStyle::setContent):
(WebCore::RenderStyle::setListStyleImage):
(WebCore::RenderStyle::setBorderImageSource):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setMaskImage):
(WebCore::RenderStyle::setMaskBoxImageSource):
(WebCore::RenderStyle::setBoxReflect):
(WebCore::RenderStyle::setShapeOutside):
(WebCore::RenderStyle::setClipPath):
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::cssValue):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::cssValue):
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
* rendering/style/StyleMultiColData.h:
* rendering/style/StyleRareInheritedData.h:

2016-10-24 Ryosuke Niwa <rniwa@webkit.org>

Custom elements reactions should have a queue per element
@@ -1861,7 +1861,7 @@ static Ref<CSSValueList> contentToCSSValue(const RenderStyle* style)
if (is<CounterContentData>(*contentData))
list.get().append(cssValuePool.createValue(downcast<CounterContentData>(*contentData).counter().identifier(), CSSPrimitiveValue::CSS_COUNTER_NAME));
else if (is<ImageContentData>(*contentData))
list.get().append(*downcast<ImageContentData>(*contentData).image().cssValue());
list.get().append(downcast<ImageContentData>(*contentData).image().cssValue());
else if (is<TextContentData>(*contentData))
list.get().append(cssValuePool.createValue(downcast<TextContentData>(*contentData).text(), CSSPrimitiveValue::CSS_STRING));
}
@@ -2437,7 +2437,7 @@ static Ref<CSSValue> shapePropertyValue(const RenderStyle& style, const ShapeVal

if (shapeValue->type() == ShapeValue::Type::Image) {
if (shapeValue->image())
return *shapeValue->image()->cssValue();
return shapeValue->image()->cssValue();
return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
}

@@ -2584,7 +2584,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
if (currLayer->image())
list->append(*currLayer->image()->cssValue());
list->append(currLayer->image()->cssValue());
else
list->append(cssValuePool.createIdentifierValue(CSSValueNone));
}
@@ -2837,7 +2837,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
list = CSSValueList::createCommaSeparated();
for (unsigned i = 0; i < cursors->size(); ++i)
if (StyleImage* image = cursors->at(i).image())
list->append(*image->cssValue());
list->append(image->cssValue());
}
auto value = cssValuePool.createValue(style->cursor());
if (list) {
@@ -86,7 +86,7 @@ class StyleBuilderConverter {
static EResize convertResize(StyleResolver&, CSSValue&);
static int convertMarqueeRepetition(StyleResolver&, CSSValue&);
static int convertMarqueeSpeed(StyleResolver&, CSSValue&);
static PassRefPtr<QuotesData> convertQuotes(StyleResolver&, CSSValue&);
static Ref<QuotesData> convertQuotes(StyleResolver&, CSSValue&);
static TextUnderlinePosition convertTextUnderlinePosition(StyleResolver&, CSSValue&);
static RefPtr<StyleReflection> convertReflection(StyleResolver&, CSSValue&);
static IntSize convertInitialLetter(StyleResolver&, CSSValue&);
@@ -585,7 +585,7 @@ inline int StyleBuilderConverter::convertMarqueeSpeed(StyleResolver&, CSSValue&
return speed;
}

inline PassRefPtr<QuotesData> StyleBuilderConverter::convertQuotes(StyleResolver&, CSSValue& value)
inline Ref<QuotesData> StyleBuilderConverter::convertQuotes(StyleResolver&, CSSValue& value)
{
if (is<CSSPrimitiveValue>(value)) {
ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
@@ -196,9 +196,7 @@ void HTMLSelectElement::listBoxSelectItem(int listIndex, bool allowMultiplySelec
bool HTMLSelectElement::usesMenuList() const
{
#if !PLATFORM(IOS)
const Page* page = document().page();
RefPtr<RenderTheme> renderTheme = page ? &page->theme() : RenderTheme::defaultTheme();
if (renderTheme->delegatesMenuListRendering())
if (RenderTheme::themeForPage(document().page())->delegatesMenuListRendering())
return true;

return !m_multiple && m_size <= 1;
@@ -1092,10 +1090,7 @@ void HTMLSelectElement::reset()

bool HTMLSelectElement::platformHandleKeydownEvent(KeyboardEvent* event)
{
const Page* page = document().page();
RefPtr<RenderTheme> renderTheme = page ? &page->theme() : RenderTheme::defaultTheme();

if (!renderTheme->popsMenuByArrowKeys())
if (!RenderTheme::themeForPage(document().page())->popsMenuByArrowKeys())
return false;

if (!isSpatialNavigationEnabled(document().frame())) {
@@ -1129,8 +1124,7 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event& event)
ASSERT(renderer());
ASSERT(renderer()->isMenuList());

const Page* page = document().page();
RefPtr<RenderTheme> renderTheme = page ? &page->theme() : RenderTheme::defaultTheme();
RefPtr<RenderTheme> renderTheme = RenderTheme::themeForPage(document().page());

if (event.type() == eventNames().keydownEvent) {
if (!is<KeyboardEvent>(event))
@@ -173,8 +173,7 @@ InputType::~InputType()
bool InputType::themeSupportsDataListUI(InputType* type)
{
Document& document = type->element().document();
RefPtr<RenderTheme> theme = document.page() ? &document.page()->theme() : RenderTheme::defaultTheme();
return theme->supportsDataListUI(type->formControlType());
return RenderTheme::themeForPage(document.page())->supportsDataListUI(type->formControlType());
}

bool InputType::isTextField() const
@@ -244,16 +244,12 @@ bool TextFieldInputType::needsContainer() const

bool TextFieldInputType::shouldHaveSpinButton() const
{
Document& document = element().document();
RefPtr<RenderTheme> theme = document.page() ? &document.page()->theme() : RenderTheme::defaultTheme();
return theme->shouldHaveSpinButton(element());
return RenderTheme::themeForPage(element().document().page())->shouldHaveSpinButton(element());
}

bool TextFieldInputType::shouldHaveCapsLockIndicator() const
{
Document& document = element().document();
RefPtr<RenderTheme> theme = document.page() ? &document.page()->theme() : RenderTheme::defaultTheme();
return theme->shouldHaveCapsLockIndicator(element());
return RenderTheme::themeForPage(element().document().page())->shouldHaveCapsLockIndicator(element());
}

void TextFieldInputType::createShadowSubtree()
@@ -421,7 +421,7 @@ bool SubframeLoader::loadPlugin(HTMLPlugInImageElement& pluginElement, const URL
}

pluginElement.subframeLoaderDidCreatePlugIn(*widget);
renderer->setWidget(widget);
renderer->setWidget(WTFMove(widget));
m_containsPlugins = true;
return true;
}
@@ -609,7 +609,7 @@ void FrameView::updateCanHaveScrollbars()
setCanHaveScrollbars(true);
}

PassRefPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation)
Ref<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation)
{
if (!frame().settings().allowCustomScrollbarInMainFrame() && frame().isMainFrame())
return ScrollView::createScrollbar(orientation);
@@ -98,7 +98,7 @@ class FrameView final : public ScrollView {
WEBCORE_EXPORT void setCanHaveScrollbars(bool) override;
WEBCORE_EXPORT void updateCanHaveScrollbars();

PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation) override;
Ref<Scrollbar> createScrollbar(ScrollbarOrientation) override;

bool avoidScrollbarCreation() const override;

@@ -474,7 +474,7 @@ template <typename T>
class RefCountedPropertyWrapper : public PropertyWrapperGetter<T*> {
WTF_MAKE_FAST_ALLOCATED;
public:
RefCountedPropertyWrapper(CSSPropertyID prop, T* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(PassRefPtr<T>))
RefCountedPropertyWrapper(CSSPropertyID prop, T* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<T>&&))
: PropertyWrapperGetter<T*>(prop, getter)
, m_setter(setter)
{
@@ -486,7 +486,7 @@ class RefCountedPropertyWrapper : public PropertyWrapperGetter<T*> {
}

protected:
void (RenderStyle::*m_setter)(PassRefPtr<T>);
void (RenderStyle::*m_setter)(RefPtr<T>&&);
};

template <typename T>
@@ -511,7 +511,7 @@ class LengthPropertyWrapper : public PropertyWrapperGetter<const T&> {
class PropertyWrapperClipPath : public RefCountedPropertyWrapper<ClipPathOperation> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperClipPath(CSSPropertyID prop, ClipPathOperation* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(PassRefPtr<ClipPathOperation>))
PropertyWrapperClipPath(CSSPropertyID prop, ClipPathOperation* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<ClipPathOperation>&&))
: RefCountedPropertyWrapper<ClipPathOperation>(prop, getter, setter)
{
}
@@ -563,7 +563,7 @@ class PropertyWrapperFontVariationSettings : public PropertyWrapper<FontVariatio
class PropertyWrapperShape : public RefCountedPropertyWrapper<ShapeValue> {
WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperShape(CSSPropertyID prop, ShapeValue* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(PassRefPtr<ShapeValue>))
PropertyWrapperShape(CSSPropertyID prop, ShapeValue* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<ShapeValue>&&))
: RefCountedPropertyWrapper<ShapeValue>(prop, getter, setter)
{
}
@@ -590,7 +590,7 @@ class PropertyWrapperShape : public RefCountedPropertyWrapper<ShapeValue> {
class StyleImagePropertyWrapper : public RefCountedPropertyWrapper<StyleImage> {
WTF_MAKE_FAST_ALLOCATED;
public:
StyleImagePropertyWrapper(CSSPropertyID prop, StyleImage* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(PassRefPtr<StyleImage>))
StyleImagePropertyWrapper(CSSPropertyID prop, StyleImage* (RenderStyle::*getter)() const, void (RenderStyle::*setter)(RefPtr<StyleImage>&&))
: RefCountedPropertyWrapper<StyleImage>(prop, getter, setter)
{
}
@@ -1014,7 +1014,7 @@ template <typename T>
class FillLayerRefCountedPropertyWrapper : public FillLayerPropertyWrapperGetter<T*> {
WTF_MAKE_FAST_ALLOCATED;
public:
FillLayerRefCountedPropertyWrapper(T* (FillLayer::*getter)() const, void (FillLayer::*setter)(PassRefPtr<T>))
FillLayerRefCountedPropertyWrapper(T* (FillLayer::*getter)() const, void (FillLayer::*setter)(RefPtr<T>&&))
: FillLayerPropertyWrapperGetter<T*>(getter)
, m_setter(setter)
{
@@ -1026,13 +1026,13 @@ class FillLayerRefCountedPropertyWrapper : public FillLayerPropertyWrapperGetter
}

protected:
void (FillLayer::*m_setter)(PassRefPtr<T>);
void (FillLayer::*m_setter)(RefPtr<T>&&);
};

class FillLayerStyleImagePropertyWrapper : public FillLayerRefCountedPropertyWrapper<StyleImage> {
WTF_MAKE_FAST_ALLOCATED;
public:
FillLayerStyleImagePropertyWrapper(StyleImage* (FillLayer::*getter)() const, void (FillLayer::*setter)(PassRefPtr<StyleImage>))
FillLayerStyleImagePropertyWrapper(StyleImage* (FillLayer::*getter)() const, void (FillLayer::*setter)(RefPtr<StyleImage>&&))
: FillLayerRefCountedPropertyWrapper<StyleImage>(getter, setter)
{
}
@@ -74,7 +74,7 @@ class PopupMenuClient {
virtual FontSelector* fontSelector() const = 0;
virtual HostWindow* hostWindow() const = 0;

virtual PassRefPtr<Scrollbar> createScrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize) = 0;
virtual Ref<Scrollbar> createScrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize) = 0;
};

}
@@ -118,7 +118,7 @@ bool ScrollView::setHasScrollbarInternal(RefPtr<Scrollbar>& scrollbar, Scrollbar
return false;
}

PassRefPtr<Scrollbar> ScrollView::createScrollbar(ScrollbarOrientation orientation)
Ref<Scrollbar> ScrollView::createScrollbar(ScrollbarOrientation orientation)
{
return Scrollbar::createNativeScrollbar(*this, orientation, RegularScrollbar);
}
@@ -140,7 +140,7 @@ class ScrollView : public Widget, public ScrollableArea {
WEBCORE_EXPORT void setDelegatesScrolling(bool);

// Overridden by FrameView to create custom CSS scrollbars if applicable.
virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
virtual Ref<Scrollbar> createScrollbar(ScrollbarOrientation);

void styleDidChange();

@@ -43,9 +43,9 @@

namespace WebCore {

PassRefPtr<Scrollbar> Scrollbar::createNativeScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size)
Ref<Scrollbar> Scrollbar::createNativeScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size)
{
return adoptRef(new Scrollbar(scrollableArea, orientation, size));
return adoptRef(*new Scrollbar(scrollableArea, orientation, size));
}

int Scrollbar::maxOverlapBetweenPages()
@@ -29,7 +29,6 @@
#include "ScrollTypes.h"
#include "Timer.h"
#include "Widget.h"
#include <wtf/PassRefPtr.h>
#include <wtf/WeakPtr.h>

namespace WebCore {
@@ -43,7 +42,7 @@ class ScrollbarTheme;
class Scrollbar : public Widget {
public:
// Must be implemented by platforms that can't simply use the Scrollbar base class. Right now the only platform that is not using the base class is GTK.
WEBCORE_EXPORT static PassRefPtr<Scrollbar> createNativeScrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize);
WEBCORE_EXPORT static Ref<Scrollbar> createNativeScrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize);

virtual ~Scrollbar();

@@ -85,7 +85,7 @@ GraphicsContext* FilterEffectRenderer::inputContext()
return sourceImage() ? &sourceImage()->context() : nullptr;
}

PassRefPtr<FilterEffect> FilterEffectRenderer::buildReferenceFilter(RenderElement* renderer, PassRefPtr<FilterEffect> previousEffect, ReferenceFilterOperation* filterOperation)
RefPtr<FilterEffect> FilterEffectRenderer::buildReferenceFilter(RenderElement* renderer, PassRefPtr<FilterEffect> previousEffect, ReferenceFilterOperation* filterOperation)
{
if (!renderer)
return nullptr;

0 comments on commit e8afd66

Please sign in to comment.