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

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

Issue 2656733002: Moved clear property to be generated in ComputedStyleBase. (Closed)
Patch Set: Rebase Created 3 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) 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 public RefCounted<ComputedStyle> { 74 public RefCounted<ComputedStyle> {
75 void* dataRefs[7]; 75 void* dataRefs[7];
76 void* ownPtrs[1]; 76 void* ownPtrs[1];
77 void* dataRefSvgStyle; 77 void* dataRefSvgStyle;
78 78
79 struct InheritedData { 79 struct InheritedData {
80 unsigned m_bitfields[1]; 80 unsigned m_bitfields[1];
81 } m_inheritedData; 81 } m_inheritedData;
82 82
83 struct NonInheritedData { 83 struct NonInheritedData {
84 unsigned m_bitfields[3]; 84 unsigned m_bitfields[2];
85 } m_nonInheritedData; 85 } m_nonInheritedData;
86 }; 86 };
87 87
88 ASSERT_SIZE(ComputedStyle, SameSizeAsComputedStyle); 88 ASSERT_SIZE(ComputedStyle, SameSizeAsComputedStyle);
89 89
90 PassRefPtr<ComputedStyle> ComputedStyle::create() { 90 PassRefPtr<ComputedStyle> ComputedStyle::create() {
91 return adoptRef(new ComputedStyle()); 91 return adoptRef(new ComputedStyle());
92 } 92 }
93 93
94 PassRefPtr<ComputedStyle> ComputedStyle::createInitialStyle() { 94 PassRefPtr<ComputedStyle> ComputedStyle::createInitialStyle() {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // See comments for each skipped flag below. 365 // See comments for each skipped flag below.
366 m_nonInheritedData.m_effectiveDisplay = 366 m_nonInheritedData.m_effectiveDisplay =
367 other.m_nonInheritedData.m_effectiveDisplay; 367 other.m_nonInheritedData.m_effectiveDisplay;
368 m_nonInheritedData.m_originalDisplay = 368 m_nonInheritedData.m_originalDisplay =
369 other.m_nonInheritedData.m_originalDisplay; 369 other.m_nonInheritedData.m_originalDisplay;
370 m_nonInheritedData.m_overflowAnchor = 370 m_nonInheritedData.m_overflowAnchor =
371 other.m_nonInheritedData.m_overflowAnchor; 371 other.m_nonInheritedData.m_overflowAnchor;
372 m_nonInheritedData.m_overflowX = other.m_nonInheritedData.m_overflowX; 372 m_nonInheritedData.m_overflowX = other.m_nonInheritedData.m_overflowX;
373 m_nonInheritedData.m_overflowY = other.m_nonInheritedData.m_overflowY; 373 m_nonInheritedData.m_overflowY = other.m_nonInheritedData.m_overflowY;
374 m_nonInheritedData.m_verticalAlign = other.m_nonInheritedData.m_verticalAlign; 374 m_nonInheritedData.m_verticalAlign = other.m_nonInheritedData.m_verticalAlign;
375 m_nonInheritedData.m_clear = other.m_nonInheritedData.m_clear;
376 m_nonInheritedData.m_position = other.m_nonInheritedData.m_position; 375 m_nonInheritedData.m_position = other.m_nonInheritedData.m_position;
377 m_nonInheritedData.m_tableLayout = other.m_nonInheritedData.m_tableLayout; 376 m_nonInheritedData.m_tableLayout = other.m_nonInheritedData.m_tableLayout;
378 m_nonInheritedData.m_hasViewportUnits = 377 m_nonInheritedData.m_hasViewportUnits =
379 other.m_nonInheritedData.m_hasViewportUnits; 378 other.m_nonInheritedData.m_hasViewportUnits;
380 m_nonInheritedData.m_breakBefore = other.m_nonInheritedData.m_breakBefore; 379 m_nonInheritedData.m_breakBefore = other.m_nonInheritedData.m_breakBefore;
381 m_nonInheritedData.m_breakAfter = other.m_nonInheritedData.m_breakAfter; 380 m_nonInheritedData.m_breakAfter = other.m_nonInheritedData.m_breakAfter;
382 m_nonInheritedData.m_breakInside = other.m_nonInheritedData.m_breakInside; 381 m_nonInheritedData.m_breakInside = other.m_nonInheritedData.m_breakInside;
383 m_nonInheritedData.m_hasRemUnits = other.m_nonInheritedData.m_hasRemUnits; 382 m_nonInheritedData.m_hasRemUnits = other.m_nonInheritedData.m_hasRemUnits;
384 383
385 // Correctly set during selector matching: 384 // Correctly set during selector matching:
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 if (boxDirection() != other.boxDirection() || 809 if (boxDirection() != other.boxDirection() ||
811 rtlOrdering() != other.rtlOrdering() || 810 rtlOrdering() != other.rtlOrdering() ||
812 textAlign() != other.textAlign() || 811 textAlign() != other.textAlign() ||
813 textTransform() != other.textTransform() || 812 textTransform() != other.textTransform() ||
814 direction() != other.direction() || whiteSpace() != other.whiteSpace() || 813 direction() != other.direction() || whiteSpace() != other.whiteSpace() ||
815 getWritingMode() != other.getWritingMode()) 814 getWritingMode() != other.getWritingMode())
816 return true; 815 return true;
817 816
818 if (m_nonInheritedData.m_overflowX != other.m_nonInheritedData.m_overflowX || 817 if (m_nonInheritedData.m_overflowX != other.m_nonInheritedData.m_overflowX ||
819 m_nonInheritedData.m_overflowY != other.m_nonInheritedData.m_overflowY || 818 m_nonInheritedData.m_overflowY != other.m_nonInheritedData.m_overflowY ||
820 m_nonInheritedData.m_clear != other.m_nonInheritedData.m_clear || 819 clear() != other.clear() || getUnicodeBidi() != other.getUnicodeBidi() ||
821 getUnicodeBidi() != other.getUnicodeBidi() ||
822 floating() != other.floating() || 820 floating() != other.floating() ||
823 m_nonInheritedData.m_originalDisplay != 821 m_nonInheritedData.m_originalDisplay !=
824 other.m_nonInheritedData.m_originalDisplay) 822 other.m_nonInheritedData.m_originalDisplay)
825 return true; 823 return true;
826 824
827 if (isDisplayTableType(display())) { 825 if (isDisplayTableType(display())) {
828 if (borderCollapse() != other.borderCollapse() || 826 if (borderCollapse() != other.borderCollapse() ||
829 emptyCells() != other.emptyCells() || 827 emptyCells() != other.emptyCells() ||
830 captionSide() != other.captionSide() || 828 captionSide() != other.captionSide() ||
831 m_nonInheritedData.m_tableLayout != 829 m_nonInheritedData.m_tableLayout !=
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 if (value < 0) 2478 if (value < 0)
2481 fvalue -= 0.5f; 2479 fvalue -= 0.5f;
2482 else 2480 else
2483 fvalue += 0.5f; 2481 fvalue += 0.5f;
2484 } 2482 }
2485 2483
2486 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2484 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2487 } 2485 }
2488 2486
2489 } // namespace blink 2487 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698