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

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

Issue 2863423002: Update SameSizeAsComputedStyle to reflect new changes. (Closed)
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 RGBA32 color_; 65 RGBA32 color_;
66 unsigned bitfield_; 66 unsigned bitfield_;
67 }; 67 };
68 68
69 ASSERT_SIZE(BorderValue, SameSizeAsBorderValue); 69 ASSERT_SIZE(BorderValue, SameSizeAsBorderValue);
70 70
71 // Since different compilers/architectures pack ComputedStyle differently, 71 // Since different compilers/architectures pack ComputedStyle differently,
72 // re-create the same structure for an accurate size comparison. 72 // re-create the same structure for an accurate size comparison.
73 struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> { 73 struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> {
74 struct ComputedStyleBase { 74 struct ComputedStyleBase {
75 void* data_refs[3];
75 unsigned bitfields_[4]; 76 unsigned bitfields_[4];
76 } base_; 77 } base_;
77 78
78 void* data_refs[7]; 79 void* data_refs[4];
79 void* own_ptrs[1]; 80 void* own_ptrs[1];
80 void* data_ref_svg_style; 81 void* data_ref_svg_style;
81 }; 82 };
82 83
83 // If this assert fails, it means that size of ComputedStyle has changed. Please 84 // If this assert fails, it means that size of ComputedStyle has changed. Please
84 // check that you really *do* what to increase the size of ComputedStyle, then 85 // check that you really *do* what to increase the size of ComputedStyle, then
85 // update the SameSizeAsComputedStyle struct to match the updated storage of 86 // update the SameSizeAsComputedStyle struct to match the updated storage of
86 // ComputedStyle. 87 // ComputedStyle.
87 ASSERT_SIZE(ComputedStyle, SameSizeAsComputedStyle); 88 ASSERT_SIZE(ComputedStyle, SameSizeAsComputedStyle);
88 89
(...skipping 2417 matching lines...) Expand 10 before | Expand all | Expand 10 after
2506 if (value < 0) 2507 if (value < 0)
2507 fvalue -= 0.5f; 2508 fvalue -= 0.5f;
2508 else 2509 else
2509 fvalue += 0.5f; 2510 fvalue += 0.5f;
2510 } 2511 }
2511 2512
2512 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2513 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2513 } 2514 }
2514 2515
2515 } // namespace blink 2516 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698