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

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

Issue 2145643002: Purge UnspecifiedBoolType from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 LayoutItem_h 5 #ifndef LayoutItem_h
6 #define LayoutItem_h 6 #define LayoutItem_h
7 7
8 #include "core/inspector/InspectorTraceEvents.h" 8 #include "core/inspector/InspectorTraceEvents.h"
9 #include "core/layout/LayoutObject.h" 9 #include "core/layout/LayoutObject.h"
10 10
(...skipping 14 matching lines...) Expand all
25 { 25 {
26 } 26 }
27 27
28 LayoutItem(std::nullptr_t) 28 LayoutItem(std::nullptr_t)
29 : m_layoutObject(0) 29 : m_layoutObject(0)
30 { 30 {
31 } 31 }
32 32
33 LayoutItem() : m_layoutObject(0) { } 33 LayoutItem() : m_layoutObject(0) { }
34 34
35 // TODO(leviw): This should be an UnspecifiedBoolType, but 35 // TODO(leviw): This should be "explicit operator bool", but
36 // using this operator allows the API to be landed in pieces. 36 // using this operator allows the API to be landed in pieces.
37 // https://crbug.com/499321 37 // https://crbug.com/499321
38 operator LayoutObject*() const { return m_layoutObject; } 38 operator LayoutObject*() const { return m_layoutObject; }
39 39
40 // TODO(pilgrim): Remove this when we replace the operator above with Unspec ifiedBoolType. 40 // TODO(pilgrim): Remove this when we replace the operator above with
41 // operator bool.
41 bool isNull() const 42 bool isNull() const
42 { 43 {
43 return !m_layoutObject; 44 return !m_layoutObject;
44 } 45 }
45 46
46 String debugName() const 47 String debugName() const
47 { 48 {
48 return m_layoutObject->debugName(); 49 return m_layoutObject->debugName();
49 } 50 }
50 51
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 300
300 private: 301 private:
301 LayoutObject* m_layoutObject; 302 LayoutObject* m_layoutObject;
302 303
303 friend class LayoutAPIShim; 304 friend class LayoutAPIShim;
304 }; 305 };
305 306
306 } // namespace blink 307 } // namespace blink
307 308
308 #endif // LayoutItem_h 309 #endif // LayoutItem_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/Nullable.h ('k') | third_party/WebKit/Source/core/layout/api/LineLayoutItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698