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

Side by Side Diff: Source/core/style/BorderValue.h

Issue 1182053003: Use plain int for borders widths when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/style/BorderData.h ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 void setColor(const StyleColor& color) 81 void setColor(const StyleColor& color)
82 { 82 {
83 m_color = color.resolve(Color()); 83 m_color = color.resolve(Color());
84 m_colorIsCurrentColor = color.isCurrentColor(); 84 m_colorIsCurrentColor = color.isCurrentColor();
85 } 85 }
86 86
87 StyleColor color() const { return m_colorIsCurrentColor ? StyleColor::curren tColor() : StyleColor(m_color); } 87 StyleColor color() const { return m_colorIsCurrentColor ? StyleColor::curren tColor() : StyleColor(m_color); }
88 88
89 unsigned width() const { return m_width; } 89 int width() const { return m_width; }
90 90
91 EBorderStyle style() const { return static_cast<EBorderStyle>(m_style); } 91 EBorderStyle style() const { return static_cast<EBorderStyle>(m_style); }
92 void setStyle(EBorderStyle style) { m_style = style; } 92 void setStyle(EBorderStyle style) { m_style = style; }
93 93
94 protected: 94 protected:
95 Color m_color; 95 Color m_color;
96 unsigned m_colorIsCurrentColor : 1; 96 unsigned m_colorIsCurrentColor : 1;
97 97
98 unsigned m_width : 26; 98 unsigned m_width : 26;
99 unsigned m_style : 4; // EBorderStyle 99 unsigned m_style : 4; // EBorderStyle
100 100
101 // This is only used by OutlineValue but moved here to keep the bits packed. 101 // This is only used by OutlineValue but moved here to keep the bits packed.
102 unsigned m_isAuto : 1; // OutlineIsAuto 102 unsigned m_isAuto : 1; // OutlineIsAuto
103 }; 103 };
104 104
105 } // namespace blink 105 } // namespace blink
106 106
107 #endif // BorderValue_h 107 #endif // BorderValue_h
OLDNEW
« no previous file with comments | « Source/core/style/BorderData.h ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698