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

Side by Side Diff: third_party/WebKit/Source/core/style/BorderEdge.cpp

Issue 2751653003: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ (Closed)
Patch Set: Replace ASSERT and ASSERT_NOT_REACHED in core/style/ Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "core/style/BorderEdge.h" 5 #include "core/style/BorderEdge.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 BorderEdge::BorderEdge(float edgeWidth, 9 BorderEdge::BorderEdge(float edgeWidth,
10 const Color& edgeColor, 10 const Color& edgeColor,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return false; 51 return false;
52 52
53 return true; 53 return true;
54 } 54 }
55 55
56 float BorderEdge::usedWidth() const { 56 float BorderEdge::usedWidth() const {
57 return isPresent ? m_width : 0; 57 return isPresent ? m_width : 0;
58 } 58 }
59 59
60 float BorderEdge::getDoubleBorderStripeWidth(DoubleBorderStripe stripe) const { 60 float BorderEdge::getDoubleBorderStripeWidth(DoubleBorderStripe stripe) const {
61 ASSERT(stripe == DoubleBorderStripeOuter || 61 DCHECK(stripe == DoubleBorderStripeOuter ||
62 stripe == DoubleBorderStripeInner); 62 stripe == DoubleBorderStripeInner);
63 63
64 return roundf(stripe == DoubleBorderStripeOuter ? usedWidth() / 3 64 return roundf(stripe == DoubleBorderStripeOuter ? usedWidth() / 3
65 : (usedWidth() * 2) / 3); 65 : (usedWidth() * 2) / 3);
66 } 66 }
67 67
68 bool BorderEdge::sharesColorWith(const BorderEdge& other) const { 68 bool BorderEdge::sharesColorWith(const BorderEdge& other) const {
69 return color == other.color; 69 return color == other.color;
70 } 70 }
71 71
72 } // namespace blink 72 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698