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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Issue 2861773004: Move border-*-width out of BorderValue and store on SurroundData in ComputedStyle instead (Closed)
Patch Set: meade@'s suggestion Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ComputedStyleConstants.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
index ae5e07ab75492cd45695103badfe4ee9dfcc8ab3..8fd1c06fde2231811e7bfa36daa6441909dbd773 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
@@ -499,6 +499,16 @@ enum ScrollSnapType {
enum AutoRepeatType { kNoAutoRepeat, kAutoFill, kAutoFit };
+// In order to conserve memory, the border width uses fixed point,
+// which can be bitpacked. This fixed point implementation is
+// essentially the same as in LayoutUnit. Six bits are used for the
+// fraction, which leaves 20 bits for the integer part, making 1048575
+// the largest number.
+
+static const int kBorderWidthFractionalBits = 6;
+static const int kBorderWidthDenominator = 1 << kBorderWidthFractionalBits;
+static const int kMaxForBorderWidth = ((1 << 26) - 1) / kBorderWidthDenominator;
+
} // namespace blink
#endif // ComputedStyleConstants_h
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/core/style/OutlineValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698