Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2282413002: Replaced PassRefPtr copies with moves in Source/core. (Closed)
Patch Set: rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 2d88f2f710a33a441126e99ab60a724e53fb337d..37f163851d52e143dff84248748b9b67fc700f65 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1497,7 +1497,7 @@ void LayoutObject::setPseudoStyle(PassRefPtr<ComputedStyle> pseudoStyle)
return;
}
- setStyle(pseudoStyle);
+ setStyle(std::move(pseudoStyle));
}
void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle, const ComputedStyle& newStyle)
@@ -1567,7 +1567,7 @@ void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style)
styleWillChange(diff, *style);
RefPtr<ComputedStyle> oldStyle = m_style.release();
- setStyleInternal(style);
+ setStyleInternal(std::move(style));
updateFillImages(oldStyle ? &oldStyle->backgroundLayers() : 0, m_style->backgroundLayers());
updateFillImages(oldStyle ? &oldStyle->maskLayers() : 0, m_style->maskLayers());
@@ -1784,12 +1784,12 @@ void LayoutObject::setStyleWithWritingModeOf(PassRefPtr<ComputedStyle> style, La
{
if (parent)
style->setWritingMode(parent->styleRef().getWritingMode());
- setStyle(style);
+ setStyle(std::move(style));
}
void LayoutObject::setStyleWithWritingModeOfParent(PassRefPtr<ComputedStyle> style)
{
- setStyleWithWritingModeOf(style, parent());
+ setStyleWithWritingModeOf(std::move(style), parent());
}
void LayoutObject::addChildWithWritingModeOfParent(LayoutObject* newChild, LayoutObject* beforeChild)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698