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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1978933002: [Layout API] Use layoutViewItem() in Internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after
2000 } 2000 }
2001 2001
2002 LayoutViewItem layoutViewItem = document->layoutViewItem(); 2002 LayoutViewItem layoutViewItem = document->layoutViewItem();
2003 if (!layoutViewItem.isNull()) 2003 if (!layoutViewItem.isNull())
2004 layoutViewItem.invalidatePaintForViewAndCompositedLayers(); 2004 layoutViewItem.invalidatePaintForViewAndCompositedLayers();
2005 } 2005 }
2006 2006
2007 void Internals::startTrackingPaintInvalidationObjects() 2007 void Internals::startTrackingPaintInvalidationObjects()
2008 { 2008 {
2009 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 2009 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2010 GraphicsLayer* graphicsLayer = toLocalFrame(frame()->page()->mainFrame())->v iew()->layoutView()->layer()->graphicsLayerBacking(); 2010 GraphicsLayer* graphicsLayer = toLocalFrame(frame()->page()->mainFrame())->v iew()->layoutViewItem().layer()->graphicsLayerBacking();
2011 if (graphicsLayer->drawsContent()) 2011 if (graphicsLayer->drawsContent())
2012 graphicsLayer->getPaintController().startTrackingPaintInvalidationObject s(); 2012 graphicsLayer->getPaintController().startTrackingPaintInvalidationObject s();
2013 } 2013 }
2014 2014
2015 void Internals::stopTrackingPaintInvalidationObjects() 2015 void Internals::stopTrackingPaintInvalidationObjects()
2016 { 2016 {
2017 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 2017 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2018 GraphicsLayer* graphicsLayer = toLocalFrame(frame()->page()->mainFrame())->v iew()->layoutView()->layer()->graphicsLayerBacking(); 2018 GraphicsLayer* graphicsLayer = toLocalFrame(frame()->page()->mainFrame())->v iew()->layoutViewItem().layer()->graphicsLayerBacking();
2019 if (graphicsLayer->drawsContent()) 2019 if (graphicsLayer->drawsContent())
2020 graphicsLayer->getPaintController().stopTrackingPaintInvalidationObjects (); 2020 graphicsLayer->getPaintController().stopTrackingPaintInvalidationObjects ();
2021 } 2021 }
2022 2022
2023 Vector<String> Internals::trackedPaintInvalidationObjects() 2023 Vector<String> Internals::trackedPaintInvalidationObjects()
2024 { 2024 {
2025 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 2025 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2026 GraphicsLayer* graphicsLayer = toLocalFrame(frame()->page()->mainFrame())->v iew()->layoutView()->layer()->graphicsLayerBacking(); 2026 GraphicsLayer* graphicsLayer = toLocalFrame(frame()->page()->mainFrame())->v iew()->layoutViewItem().layer()->graphicsLayerBacking();
2027 if (!graphicsLayer->drawsContent()) 2027 if (!graphicsLayer->drawsContent())
2028 return Vector<String>(); 2028 return Vector<String>();
2029 return graphicsLayer->getPaintController().trackedPaintInvalidationObjects() ; 2029 return graphicsLayer->getPaintController().trackedPaintInvalidationObjects() ;
2030 } 2030 }
2031 2031
2032 ClientRectList* Internals::draggableRegions(Document* document, ExceptionState& exceptionState) 2032 ClientRectList* Internals::draggableRegions(Document* document, ExceptionState& exceptionState)
2033 { 2033 {
2034 return annotatedRegions(document, true, exceptionState); 2034 return annotatedRegions(document, true, exceptionState);
2035 } 2035 }
2036 2036
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 } 2582 }
2583 2583
2584 String Internals::getProgrammaticScrollAnimationState(Node* node) const 2584 String Internals::getProgrammaticScrollAnimationState(Node* node) const
2585 { 2585 {
2586 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) 2586 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
2587 return scrollableArea->programmaticScrollAnimator().runStateAsText(); 2587 return scrollableArea->programmaticScrollAnimator().runStateAsText();
2588 return String(); 2588 return String();
2589 } 2589 }
2590 2590
2591 } // namespace blink 2591 } // 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