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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LineLayoutItem.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 LineLayoutItem_h 5 #ifndef LineLayoutItem_h
6 #define LineLayoutItem_h 6 #define LineLayoutItem_h
7 7
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 #include "core/layout/LayoutObjectInlines.h" 9 #include "core/layout/LayoutObjectInlines.h"
10 10
(...skipping 29 matching lines...) Expand all
40 { 40 {
41 } 41 }
42 42
43 LineLayoutItem(std::nullptr_t) 43 LineLayoutItem(std::nullptr_t)
44 : m_layoutObject(0) 44 : m_layoutObject(0)
45 { 45 {
46 } 46 }
47 47
48 LineLayoutItem() : m_layoutObject(0) { } 48 LineLayoutItem() : m_layoutObject(0) { }
49 49
50 typedef LayoutObject* LineLayoutItem::*UnspecifiedBoolType; 50 explicit operator bool() const { return m_layoutObject; }
51 operator UnspecifiedBoolType() const { return m_layoutObject ? &LineLayoutIt em::m_layoutObject : nullptr; }
52 51
53 bool isEqual(const LayoutObject* layoutObject) const 52 bool isEqual(const LayoutObject* layoutObject) const
54 { 53 {
55 return m_layoutObject == layoutObject; 54 return m_layoutObject == layoutObject;
56 } 55 }
57 56
58 bool operator==(const LineLayoutItem& other) const 57 bool operator==(const LineLayoutItem& other) const
59 { 58 {
60 return m_layoutObject == other.m_layoutObject; 59 return m_layoutObject == other.m_layoutObject;
61 } 60 }
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 495
497 template <> 496 template <>
498 struct HashTraits<blink::LineLayoutItem> : SimpleClassHashTraits<blink::LineLayo utItem> { 497 struct HashTraits<blink::LineLayoutItem> : SimpleClassHashTraits<blink::LineLayo utItem> {
499 STATIC_ONLY(HashTraits); 498 STATIC_ONLY(HashTraits);
500 }; 499 };
501 500
502 } // namespace WTF 501 } // namespace WTF
503 502
504 503
505 #endif // LineLayoutItem_h 504 #endif // LineLayoutItem_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LayoutItem.h ('k') | third_party/WebKit/Source/wtf/RetainPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698