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

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

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month 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 LayoutTextControlItem_h 5 #ifndef LayoutTextControlItem_h
6 #define LayoutTextControlItem_h 6 #define LayoutTextControlItem_h
7 7
8 #include "core/layout/LayoutTextControl.h" 8 #include "core/layout/LayoutTextControl.h"
9 #include "core/layout/api/LayoutBoxModel.h" 9 #include "core/layout/api/LayoutBoxModel.h"
10 #include "platform/scroll/ScrollTypes.h" 10 #include "platform/scroll/ScrollTypes.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class LayoutTextControlItem : public LayoutBoxModel { 14 class LayoutTextControlItem : public LayoutBoxModel {
15 public: 15 public:
16 explicit LayoutTextControlItem(LayoutTextControl* layoutTextControl) 16 explicit LayoutTextControlItem(LayoutTextControl* layoutTextControl)
17 : LayoutBoxModel(layoutTextControl) {} 17 : LayoutBoxModel(layoutTextControl) {}
18 18
19 explicit LayoutTextControlItem(const LayoutItem& item) 19 explicit LayoutTextControlItem(const LayoutItem& item)
20 : LayoutBoxModel(item) { 20 : LayoutBoxModel(item) {
21 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isTextControl()); 21 SECURITY_DCHECK(!item || item.isTextControl());
22 } 22 }
23 23
24 explicit LayoutTextControlItem(std::nullptr_t) : LayoutBoxModel(nullptr) {} 24 explicit LayoutTextControlItem(std::nullptr_t) : LayoutBoxModel(nullptr) {}
25 25
26 LayoutTextControlItem() {} 26 LayoutTextControlItem() {}
27 27
28 PassRefPtr<ComputedStyle> createInnerEditorStyle( 28 PassRefPtr<ComputedStyle> createInnerEditorStyle(
29 const ComputedStyle& startStyle) const { 29 const ComputedStyle& startStyle) const {
30 return toTextControl()->createInnerEditorStyle(startStyle); 30 return toTextControl()->createInnerEditorStyle(startStyle);
31 } 31 }
32 32
33 private: 33 private:
34 LayoutTextControl* toTextControl() { 34 LayoutTextControl* toTextControl() {
35 return toLayoutTextControl(layoutObject()); 35 return toLayoutTextControl(layoutObject());
36 } 36 }
37 37
38 const LayoutTextControl* toTextControl() const { 38 const LayoutTextControl* toTextControl() const {
39 return toLayoutTextControl(layoutObject()); 39 return toLayoutTextControl(layoutObject());
40 } 40 }
41 }; 41 };
42 42
43 } // namespace blink 43 } // namespace blink
44 44
45 #endif // LayoutTextControlItem_h 45 #endif // LayoutTextControlItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698