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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutSearchField.cpp

Issue 2770123003: Replace ASSERT with DCHECK in core/layout/ excluding subdirs (Closed)
Patch Set: Split some DCHECKs and add DCHECK_ops wherever possible Created 3 years, 8 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 /** 1 /**
2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
3 * (C) 2008 Torch Mobile Inc. All rights reserved. 3 * (C) 2008 Torch Mobile Inc. All rights reserved.
4 * (http://www.torchmobile.com/) 4 * (http://www.torchmobile.com/)
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 19 matching lines...) Expand all
30 #include "core/html/shadow/ShadowElementNames.h" 30 #include "core/html/shadow/ShadowElementNames.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 using namespace HTMLNames; 34 using namespace HTMLNames;
35 35
36 // ---------------------------- 36 // ----------------------------
37 37
38 LayoutSearchField::LayoutSearchField(HTMLInputElement* element) 38 LayoutSearchField::LayoutSearchField(HTMLInputElement* element)
39 : LayoutTextControlSingleLine(element) { 39 : LayoutTextControlSingleLine(element) {
40 ASSERT(element->type() == InputTypeNames::search); 40 DCHECK_EQ(element->type(), InputTypeNames::search);
41 } 41 }
42 42
43 LayoutSearchField::~LayoutSearchField() {} 43 LayoutSearchField::~LayoutSearchField() {}
44 44
45 inline Element* LayoutSearchField::searchDecorationElement() const { 45 inline Element* LayoutSearchField::searchDecorationElement() const {
46 return inputElement()->userAgentShadowRoot()->getElementById( 46 return inputElement()->userAgentShadowRoot()->getElementById(
47 ShadowElementNames::searchDecoration()); 47 ShadowElementNames::searchDecoration());
48 } 48 }
49 49
50 inline Element* LayoutSearchField::cancelButtonElement() const { 50 inline Element* LayoutSearchField::cancelButtonElement() const {
(...skipping 21 matching lines...) Expand all
72 nonContentHeight = max(nonContentHeight, 72 nonContentHeight = max(nonContentHeight,
73 cancelLayoutObject->borderAndPaddingLogicalHeight() + 73 cancelLayoutObject->borderAndPaddingLogicalHeight() +
74 cancelLayoutObject->marginLogicalHeight()); 74 cancelLayoutObject->marginLogicalHeight());
75 lineHeight = max(lineHeight, cancelLayoutObject->logicalHeight()); 75 lineHeight = max(lineHeight, cancelLayoutObject->logicalHeight());
76 } 76 }
77 77
78 return lineHeight + nonContentHeight; 78 return lineHeight + nonContentHeight;
79 } 79 }
80 80
81 } // namespace blink 81 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutSlider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698