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

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

Issue 2913233003: Move fixed point constants from ComputedStyleConstants to BorderValue. (Closed)
Patch Set: Created 3 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 | « third_party/WebKit/Source/core/style/BorderValue.h ('k') | no next file » | 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, 2009, 2010 Apple Inc. All rights 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // Page size type. 411 // Page size type.
412 // StyleRareNonInheritedData::page_size_ is meaningful only when 412 // StyleRareNonInheritedData::page_size_ is meaningful only when
413 // StyleRareNonInheritedData::page_size_type_ is kResolved. 413 // StyleRareNonInheritedData::page_size_type_ is kResolved.
414 enum class PageSizeType { 414 enum class PageSizeType {
415 kAuto, // size: auto 415 kAuto, // size: auto
416 kLandscape, // size: landscape 416 kLandscape, // size: landscape
417 kPortrait, // size: portrait 417 kPortrait, // size: portrait
418 kResolved // Size is fully resolved. 418 kResolved // Size is fully resolved.
419 }; 419 };
420 420
421 // In order to conserve memory, the border width uses fixed point,
422 // which can be bitpacked. This fixed point implementation is
423 // essentially the same as in LayoutUnit. Six bits are used for the
424 // fraction, which leaves 20 bits for the integer part, making 1048575
425 // the largest number.
426
427 static const int kBorderWidthFractionalBits = 6;
428 static const int kBorderWidthDenominator = 1 << kBorderWidthFractionalBits;
429 static const int kMaxForBorderWidth = ((1 << 26) - 1) / kBorderWidthDenominator;
430
431 } // namespace blink 421 } // namespace blink
432 422
433 #endif // ComputedStyleConstants_h 423 #endif // ComputedStyleConstants_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/BorderValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698