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

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

Issue 2266403007: [Layout API] Use ownerLayoutItem() in ObjectPaintInvalidator (Closed)
Patch Set: Created 4 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
« 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/ObjectPaintInvalidator.h" 5 #include "core/paint/ObjectPaintInvalidator.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/layout/LayoutBlockFlow.h" 9 #include "core/layout/LayoutBlockFlow.h"
10 #include "core/layout/compositing/CompositedLayerMapping.h" 10 #include "core/layout/compositing/CompositedLayerMapping.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return value; 192 return value;
193 } 193 }
194 194
195 static void invalidatePaintRectangleOnWindow(const LayoutBoxModelObject& paintIn validationContainer, const IntRect& dirtyRect) 195 static void invalidatePaintRectangleOnWindow(const LayoutBoxModelObject& paintIn validationContainer, const IntRect& dirtyRect)
196 { 196 {
197 FrameView* frameView = paintInvalidationContainer.frameView(); 197 FrameView* frameView = paintInvalidationContainer.frameView();
198 DCHECK(paintInvalidationContainer.isLayoutView() && paintInvalidationContain er.layer()->compositingState() == NotComposited); 198 DCHECK(paintInvalidationContainer.isLayoutView() && paintInvalidationContain er.layer()->compositingState() == NotComposited);
199 if (!frameView || paintInvalidationContainer.document().printing()) 199 if (!frameView || paintInvalidationContainer.document().printing())
200 return; 200 return;
201 201
202 DCHECK(!frameView->frame().ownerLayoutObject()); 202 DCHECK(frameView->frame().ownerLayoutItem().isNull());
203 203
204 IntRect paintRect = dirtyRect; 204 IntRect paintRect = dirtyRect;
205 paintRect.intersect(frameView->visibleContentRect()); 205 paintRect.intersect(frameView->visibleContentRect());
206 if (paintRect.isEmpty()) 206 if (paintRect.isEmpty())
207 return; 207 return;
208 208
209 if (HostWindow* window = frameView->getHostWindow()) 209 if (HostWindow* window = frameView->getHostWindow())
210 window->invalidateRect(frameView->contentsToRootFrame(paintRect)); 210 window->invalidateRect(frameView->contentsToRootFrame(paintRect));
211 } 211 }
212 212
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 m_object.invalidateDisplayItemClients(reason); 467 m_object.invalidateDisplayItemClients(reason);
468 return reason; 468 return reason;
469 } 469 }
470 470
471 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() 471 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts()
472 : m_disabler(&gDisablePaintInvalidationStateAsserts, true) 472 : m_disabler(&gDisablePaintInvalidationStateAsserts, true)
473 { 473 {
474 } 474 }
475 475
476 } // namespace blink 476 } // 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