mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
This commit is contained in:
parent
b3db01e20e
commit
b91c49364d
228 changed files with 461 additions and 461 deletions
|
@ -18,7 +18,7 @@ class CSSImportRule : public CSSRule {
|
|||
public:
|
||||
static NonnullRefPtr<CSSImportRule> create(URL url)
|
||||
{
|
||||
return adopt(*new CSSImportRule(move(url)));
|
||||
return adopt_ref(*new CSSImportRule(move(url)));
|
||||
}
|
||||
|
||||
~CSSImportRule();
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
|
||||
static NonnullRefPtr<CSSStyleDeclaration> create(Vector<StyleProperty>&& properties)
|
||||
{
|
||||
return adopt(*new CSSStyleDeclaration(move(properties)));
|
||||
return adopt_ref(*new CSSStyleDeclaration(move(properties)));
|
||||
}
|
||||
|
||||
virtual ~CSSStyleDeclaration();
|
||||
|
@ -48,7 +48,7 @@ private:
|
|||
|
||||
class ElementInlineCSSStyleDeclaration final : public CSSStyleDeclaration {
|
||||
public:
|
||||
static NonnullRefPtr<ElementInlineCSSStyleDeclaration> create(DOM::Element& element) { return adopt(*new ElementInlineCSSStyleDeclaration(element)); }
|
||||
static NonnullRefPtr<ElementInlineCSSStyleDeclaration> create(DOM::Element& element) { return adopt_ref(*new ElementInlineCSSStyleDeclaration(element)); }
|
||||
virtual ~ElementInlineCSSStyleDeclaration() override;
|
||||
|
||||
DOM::Element* element() { return m_element.ptr(); }
|
||||
|
|
|
@ -21,7 +21,7 @@ class CSSStyleRule : public CSSRule {
|
|||
public:
|
||||
static NonnullRefPtr<CSSStyleRule> create(Vector<Selector>&& selectors, NonnullRefPtr<CSSStyleDeclaration>&& declaration)
|
||||
{
|
||||
return adopt(*new CSSStyleRule(move(selectors), move(declaration)));
|
||||
return adopt_ref(*new CSSStyleRule(move(selectors), move(declaration)));
|
||||
}
|
||||
|
||||
~CSSStyleRule();
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
static NonnullRefPtr<CSSStyleSheet> create(NonnullRefPtrVector<CSSRule> rules)
|
||||
{
|
||||
return adopt(*new CSSStyleSheet(move(rules)));
|
||||
return adopt_ref(*new CSSStyleSheet(move(rules)));
|
||||
}
|
||||
|
||||
virtual ~CSSStyleSheet() override;
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
static NonnullRefPtr<Screen> create(DOM::Window& window)
|
||||
{
|
||||
return adopt(*new Screen(window));
|
||||
return adopt_ref(*new Screen(window));
|
||||
}
|
||||
|
||||
i32 width() const { return screen_rect().width(); }
|
||||
|
|
|
@ -28,7 +28,7 @@ StyleProperties::StyleProperties(const StyleProperties& other)
|
|||
|
||||
NonnullRefPtr<StyleProperties> StyleProperties::clone() const
|
||||
{
|
||||
return adopt(*new StyleProperties(*this));
|
||||
return adopt_ref(*new StyleProperties(*this));
|
||||
}
|
||||
|
||||
void StyleProperties::set_property(CSS::PropertyID id, NonnullRefPtr<StyleValue> value)
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
explicit StyleProperties(const StyleProperties&);
|
||||
|
||||
static NonnullRefPtr<StyleProperties> create() { return adopt(*new StyleProperties); }
|
||||
static NonnullRefPtr<StyleProperties> create() { return adopt_ref(*new StyleProperties); }
|
||||
|
||||
NonnullRefPtr<StyleProperties> clone() const;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
static NonnullRefPtr<StyleSheetList> create(DOM::Document& document)
|
||||
{
|
||||
return adopt(*new StyleSheetList(document));
|
||||
return adopt_ref(*new StyleSheetList(document));
|
||||
}
|
||||
|
||||
void add_sheet(NonnullRefPtr<CSSStyleSheet>);
|
||||
|
|
|
@ -232,7 +232,7 @@ class StringStyleValue : public StyleValue {
|
|||
public:
|
||||
static NonnullRefPtr<StringStyleValue> create(const String& string)
|
||||
{
|
||||
return adopt(*new StringStyleValue(string));
|
||||
return adopt_ref(*new StringStyleValue(string));
|
||||
}
|
||||
virtual ~StringStyleValue() override { }
|
||||
|
||||
|
@ -252,7 +252,7 @@ class LengthStyleValue : public StyleValue {
|
|||
public:
|
||||
static NonnullRefPtr<LengthStyleValue> create(const Length& length)
|
||||
{
|
||||
return adopt(*new LengthStyleValue(length));
|
||||
return adopt_ref(*new LengthStyleValue(length));
|
||||
}
|
||||
virtual ~LengthStyleValue() override { }
|
||||
|
||||
|
@ -282,7 +282,7 @@ private:
|
|||
|
||||
class InitialStyleValue final : public StyleValue {
|
||||
public:
|
||||
static NonnullRefPtr<InitialStyleValue> create() { return adopt(*new InitialStyleValue); }
|
||||
static NonnullRefPtr<InitialStyleValue> create() { return adopt_ref(*new InitialStyleValue); }
|
||||
virtual ~InitialStyleValue() override { }
|
||||
|
||||
String to_string() const override { return "initial"; }
|
||||
|
@ -296,7 +296,7 @@ private:
|
|||
|
||||
class InheritStyleValue final : public StyleValue {
|
||||
public:
|
||||
static NonnullRefPtr<InheritStyleValue> create() { return adopt(*new InheritStyleValue); }
|
||||
static NonnullRefPtr<InheritStyleValue> create() { return adopt_ref(*new InheritStyleValue); }
|
||||
virtual ~InheritStyleValue() override { }
|
||||
|
||||
String to_string() const override { return "inherit"; }
|
||||
|
@ -312,7 +312,7 @@ class ColorStyleValue : public StyleValue {
|
|||
public:
|
||||
static NonnullRefPtr<ColorStyleValue> create(Color color)
|
||||
{
|
||||
return adopt(*new ColorStyleValue(color));
|
||||
return adopt_ref(*new ColorStyleValue(color));
|
||||
}
|
||||
virtual ~ColorStyleValue() override { }
|
||||
|
||||
|
@ -341,7 +341,7 @@ class IdentifierStyleValue final : public StyleValue {
|
|||
public:
|
||||
static NonnullRefPtr<IdentifierStyleValue> create(CSS::ValueID id)
|
||||
{
|
||||
return adopt(*new IdentifierStyleValue(id));
|
||||
return adopt_ref(*new IdentifierStyleValue(id));
|
||||
}
|
||||
virtual ~IdentifierStyleValue() override { }
|
||||
|
||||
|
@ -371,7 +371,7 @@ class ImageStyleValue final
|
|||
: public StyleValue
|
||||
, public ImageResourceClient {
|
||||
public:
|
||||
static NonnullRefPtr<ImageStyleValue> create(const URL& url, DOM::Document& document) { return adopt(*new ImageStyleValue(url, document)); }
|
||||
static NonnullRefPtr<ImageStyleValue> create(const URL& url, DOM::Document& document) { return adopt_ref(*new ImageStyleValue(url, document)); }
|
||||
virtual ~ImageStyleValue() override { }
|
||||
|
||||
String to_string() const override { return String::formatted("Image({})", m_url.to_string()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue