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

Side by Side Diff: Source/core/layout/LayoutBoxModelObject.cpp

Issue 1337233002: Invalidate paint when allocating a DeprecatedPaintLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 if (newStyleIsViewportConstained && layer()) 277 if (newStyleIsViewportConstained && layer())
278 frameView->addViewportConstrainedObject(this); 278 frameView->addViewportConstrainedObject(this);
279 else 279 else
280 frameView->removeViewportConstrainedObject(this); 280 frameView->removeViewportConstrainedObject(this);
281 } 281 }
282 } 282 }
283 } 283 }
284 284
285 void LayoutBoxModelObject::createLayer(DeprecatedPaintLayerType type) 285 void LayoutBoxModelObject::createLayer(DeprecatedPaintLayerType type)
286 { 286 {
287 DisablePaintInvalidationStateAsserts invalidationDisabler;
288 DisableCompositingQueryAsserts compositingDisabler;
289
290 // Acquiring a DeprecatedPaintLayer may change the paint invalidation contai ner. Therefore we must eagerly
291 // invalidate paint for this object before creating the layer.
292 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted())
pdr. 2015/09/14 23:29:26 Can you put the disablers in this block?
293 invalidatePaintIncludingNonCompositingDescendants();
287 ASSERT(!m_layer); 294 ASSERT(!m_layer);
288 m_layer = adoptPtr(new DeprecatedPaintLayer(this, type)); 295 m_layer = adoptPtr(new DeprecatedPaintLayer(this, type));
289 setHasLayer(true); 296 setHasLayer(true);
290 m_layer->insertOnlyThisLayer(); 297 m_layer->insertOnlyThisLayer();
291 } 298 }
292 299
293 void LayoutBoxModelObject::destroyLayer() 300 void LayoutBoxModelObject::destroyLayer()
294 { 301 {
295 setHasLayer(false); 302 setHasLayer(false);
296 m_layer = nullptr; 303 m_layer = nullptr;
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 if (rootElementStyle->hasBackground()) 1022 if (rootElementStyle->hasBackground())
1016 return false; 1023 return false;
1017 1024
1018 if (node() != document().firstBodyElement()) 1025 if (node() != document().firstBodyElement())
1019 return false; 1026 return false;
1020 1027
1021 return true; 1028 return true;
1022 } 1029 }
1023 1030
1024 } // namespace blink 1031 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698