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

Side by Side Diff: third_party/WebKit/Source/core/style/BorderData.h

Issue 1574933002: Changed type of border-width longhands from unsigned to float. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added trivial tests safe to rebaseline to TestExpectations Created 4 years, 10 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return true; 61 return true;
62 if (!m_topRight.width().isZero()) 62 if (!m_topRight.width().isZero())
63 return true; 63 return true;
64 if (!m_bottomLeft.width().isZero()) 64 if (!m_bottomLeft.width().isZero())
65 return true; 65 return true;
66 if (!m_bottomRight.width().isZero()) 66 if (!m_bottomRight.width().isZero())
67 return true; 67 return true;
68 return false; 68 return false;
69 } 69 }
70 70
71 int borderLeftWidth() const 71 float borderLeftWidth() const
72 { 72 {
73 if (!m_image.hasImage() && (m_left.style() == BNONE || m_left.style() == BHIDDEN)) 73 if (!m_image.hasImage() && (m_left.style() == BNONE || m_left.style() == BHIDDEN))
74 return 0; 74 return 0;
75 return m_left.width(); 75 return m_left.width();
76 } 76 }
77 77
78 int borderRightWidth() const 78 float borderRightWidth() const
79 { 79 {
80 if (!m_image.hasImage() && (m_right.style() == BNONE || m_right.style() == BHIDDEN)) 80 if (!m_image.hasImage() && (m_right.style() == BNONE || m_right.style() == BHIDDEN))
81 return 0; 81 return 0;
82 return m_right.width(); 82 return m_right.width();
83 } 83 }
84 84
85 int borderTopWidth() const 85 float borderTopWidth() const
86 { 86 {
87 if (!m_image.hasImage() && (m_top.style() == BNONE || m_top.style() == B HIDDEN)) 87 if (!m_image.hasImage() && (m_top.style() == BNONE || m_top.style() == B HIDDEN))
88 return 0; 88 return 0;
89 return m_top.width(); 89 return m_top.width();
90 } 90 }
91 91
92 int borderBottomWidth() const 92 float borderBottomWidth() const
93 { 93 {
94 if (!m_image.hasImage() && (m_bottom.style() == BNONE || m_bottom.style( ) == BHIDDEN)) 94 if (!m_image.hasImage() && (m_bottom.style() == BNONE || m_bottom.style( ) == BHIDDEN))
95 return 0; 95 return 0;
96 return m_bottom.width(); 96 return m_bottom.width();
97 } 97 }
98 98
99 bool operator==(const BorderData& o) const 99 bool operator==(const BorderData& o) const
100 { 100 {
101 return m_left == o.m_left && m_right == o.m_right && m_top == o.m_top && m_bottom == o.m_bottom && m_image == o.m_image 101 return m_left == o.m_left && m_right == o.m_right && m_top == o.m_top && m_bottom == o.m_bottom && m_image == o.m_image
102 && m_topLeft == o.m_topLeft && m_topRight == o.m_topRight && m_bo ttomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight; 102 && m_topLeft == o.m_topLeft && m_topRight == o.m_topRight && m_bo ttomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 LengthSize m_topLeft; 143 LengthSize m_topLeft;
144 LengthSize m_topRight; 144 LengthSize m_topRight;
145 LengthSize m_bottomLeft; 145 LengthSize m_bottomLeft;
146 LengthSize m_bottomRight; 146 LengthSize m_bottomRight;
147 }; 147 };
148 148
149 } // namespace blink 149 } // namespace blink
150 150
151 #endif // BorderData_h 151 #endif // BorderData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPainter.cpp ('k') | third_party/WebKit/Source/core/style/BorderValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698