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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1622593003: Revert of Add size check for PaintLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #include "platform/transforms/TranslateTransformOperation.h" 87 #include "platform/transforms/TranslateTransformOperation.h"
88 #include "public/platform/Platform.h" 88 #include "public/platform/Platform.h"
89 #include "wtf/Partitions.h" 89 #include "wtf/Partitions.h"
90 #include "wtf/StdLibExtras.h" 90 #include "wtf/StdLibExtras.h"
91 #include "wtf/text/CString.h" 91 #include "wtf/text/CString.h"
92 92
93 namespace blink { 93 namespace blink {
94 94
95 namespace { 95 namespace {
96 96
97 #if !OS(WIN) // Compiler on windows seems to combine bit fields of inner structs .
98
99 struct SameSizeAsPaintLayer {
100 virtual ~SameSizeAsPaintLayer() { } // Allocate vtable pointer.
101 int type;
102 int bitFields;
103 void* pointers[13];
104 LayoutUnit layoutUnits[8];
105 int intFields[6];
106 uint64_t compositingReasons[2];
107 struct {
108 IntRect rect;
109 void* pointers[8];
110 int bitFields;
111 } ancestorCompositingInputs;
112 struct {
113 int bitFields;
114 } descendantCompositingInputs;
115 struct {
116 void* pointers[2];
117 } clipper;
118 struct {
119 IntSize size;
120 void* pointer;
121 LayoutRect rect;
122 } previousPaintStatus;
123 };
124
125 static_assert(sizeof(PaintLayer) == sizeof(SameSizeAsPaintLayer), "PaintLayer sh ould stay small");
126
127 #endif // !OS(WIN)
128
129 static CompositingQueryMode gCompositingQueryMode = 97 static CompositingQueryMode gCompositingQueryMode =
130 CompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases; 98 CompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases;
131 99
132 } // namespace 100 } // namespace
133 101
134 using namespace HTMLNames; 102 using namespace HTMLNames;
135 103
136 PaintLayer::PaintLayer(LayoutBoxModelObject* layoutObject, PaintLayerType type) 104 PaintLayer::PaintLayer(LayoutBoxModelObject* layoutObject, PaintLayerType type)
137 : m_layerType(type) 105 : m_layerType(type)
138 , m_hasSelfPaintingLayerDescendant(false) 106 , m_hasSelfPaintingLayerDescendant(false)
(...skipping 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 2831
2864 void showLayerTree(const blink::LayoutObject* layoutObject) 2832 void showLayerTree(const blink::LayoutObject* layoutObject)
2865 { 2833 {
2866 if (!layoutObject) { 2834 if (!layoutObject) {
2867 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2835 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2868 return; 2836 return;
2869 } 2837 }
2870 showLayerTree(layoutObject->enclosingLayer()); 2838 showLayerTree(layoutObject->enclosingLayer());
2871 } 2839 }
2872 #endif 2840 #endif
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