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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LayoutTextFragmentItem.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LayoutTextFragmentItem_h 5 #ifndef LayoutTextFragmentItem_h
6 #define LayoutTextFragmentItem_h 6 #define LayoutTextFragmentItem_h
7 7
8 #include "core/layout/LayoutTextFragment.h" 8 #include "core/layout/LayoutTextFragment.h"
9 #include "core/layout/api/LayoutTextItem.h" 9 #include "core/layout/api/LayoutTextItem.h"
10 10
(...skipping 13 matching lines...) Expand all
24 { 24 {
25 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isTextFragment()); 25 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isTextFragment());
26 } 26 }
27 27
28 explicit LayoutTextFragmentItem(std::nullptr_t) : LayoutTextItem(nullptr) { } 28 explicit LayoutTextFragmentItem(std::nullptr_t) : LayoutTextItem(nullptr) { }
29 29
30 LayoutTextFragmentItem() { } 30 LayoutTextFragmentItem() { }
31 31
32 void setTextFragment(PassRefPtr<StringImpl> text, unsigned start, unsigned l ength) 32 void setTextFragment(PassRefPtr<StringImpl> text, unsigned start, unsigned l ength)
33 { 33 {
34 toTextFragment()->setTextFragment(text, start, length); 34 toTextFragment()->setTextFragment(std::move(text), start, length);
35 } 35 }
36 36
37 FirstLetterPseudoElement* firstLetterPseudoElement() const 37 FirstLetterPseudoElement* firstLetterPseudoElement() const
38 { 38 {
39 return toTextFragment()->firstLetterPseudoElement(); 39 return toTextFragment()->firstLetterPseudoElement();
40 } 40 }
41 41
42 private: 42 private:
43 LayoutTextFragment* toTextFragment() { return toLayoutTextFragment(layoutObj ect()); } 43 LayoutTextFragment* toTextFragment() { return toLayoutTextFragment(layoutObj ect()); }
44 const LayoutTextFragment* toTextFragment() const { return toLayoutTextFragme nt(layoutObject()); } 44 const LayoutTextFragment* toTextFragment() const { return toLayoutTextFragme nt(layoutObject()); }
45 }; 45 };
46 46
47 } // namespace blink 47 } // namespace blink
48 48
49 #endif // LayoutTextFragmentItem_h 49 #endif // LayoutTextFragmentItem_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LayoutItem.h ('k') | third_party/WebKit/Source/core/layout/api/LayoutTextItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698