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

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

Issue 2510353004: Deprecating AutoplayExperimentHelper (Closed)
Patch Set: rebased Created 4 years 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 // 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/PaintInvalidator.h" 5 #include "core/paint/PaintInvalidator.h"
6 6
7 #include "core/editing/FrameSelection.h" 7 #include "core/editing/FrameSelection.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 &layoutView->containerForPaintInvalidation(); 356 &layoutView->containerForPaintInvalidation();
357 context.paintingLayer = layoutView->layer(); 357 context.paintingLayer = layoutView->layer();
358 358
359 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 359 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
360 ScopedUndoFrameViewContentClipAndScroll undo(frameView, context); 360 ScopedUndoFrameViewContentClipAndScroll undo(frameView, context);
361 frameView.invalidatePaintOfScrollControlsIfNeeded(context); 361 frameView.invalidatePaintOfScrollControlsIfNeeded(context);
362 } 362 }
363 363
364 if (frameView.frame().selection().isCaretBoundsDirty()) 364 if (frameView.frame().selection().isCaretBoundsDirty())
365 frameView.frame().selection().invalidateCaretRect(); 365 frameView.frame().selection().invalidateCaretRect();
366
367 // Temporary callback for crbug.com/487345,402044
368 // TODO(ojan): Make this more general to be used by PositionObserver
369 // and rAF throttling.
370 IntRect visibleRect =
371 frameView.rootFrameToContents(frameView.computeVisibleArea());
372 layoutView->sendMediaPositionChangeNotifications(visibleRect);
373 } 366 }
374 367
375 void PaintInvalidator::invalidatePaintIfNeeded( 368 void PaintInvalidator::invalidatePaintIfNeeded(
376 const LayoutObject& object, 369 const LayoutObject& object,
377 PaintInvalidatorContext& context) { 370 PaintInvalidatorContext& context) {
378 object.getMutableForPainting().ensureIsReadyForPaintInvalidation(); 371 object.getMutableForPainting().ensureIsReadyForPaintInvalidation();
379 372
380 if (!context.forcedSubtreeInvalidationFlags && 373 if (!context.forcedSubtreeInvalidationFlags &&
381 !object 374 !object
382 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState()) 375 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState())
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; 433 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate;
441 } 434 }
442 435
443 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 436 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
444 for (auto target : m_pendingDelayedPaintInvalidations) 437 for (auto target : m_pendingDelayedPaintInvalidations)
445 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 438 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
446 PaintInvalidationDelayedFull); 439 PaintInvalidationDelayedFull);
447 } 440 }
448 441
449 } // namespace blink 442 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LayoutViewItem.h ('k') | third_party/WebKit/Source/core/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698