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

Side by Side Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 445263002: Remove cached bounds in RenderLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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) 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 LocalFrame* frame = box().frame(); 349 LocalFrame* frame = box().frame();
350 ASSERT(frame); 350 ASSERT(frame);
351 351
352 RefPtr<FrameView> frameView = box().frameView(); 352 RefPtr<FrameView> frameView = box().frameView();
353 353
354 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer", "data", InspectorScrollLayerEvent::data(&box())); 354 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer", "data", InspectorScrollLayerEvent::data(&box()));
355 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 355 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
356 InspectorInstrumentation::willScrollLayer(&box()); 356 InspectorInstrumentation::willScrollLayer(&box());
357 357
358 const RenderLayerModelObject* repaintContainer = box().containerForPaintInva lidation();
359
358 // Update the positions of our child layers (if needed as only fixed layers should be impacted by a scroll). 360 // Update the positions of our child layers (if needed as only fixed layers should be impacted by a scroll).
359 // We don't update compositing layers, because we need to do a deep update f rom the compositing ancestor. 361 // We don't update compositing layers, because we need to do a deep update f rom the compositing ancestor.
360 if (!frameView->isInPerformLayout()) { 362 if (!frameView->isInPerformLayout()) {
361 // If we're in the middle of layout, we'll just update layers once layou t has finished. 363 // If we're in the middle of layout, we'll just update layers once layou t has finished.
362 layer()->updateLayerPositionsAfterOverflowScroll(); 364 layer()->clipper().clearClipRectsIncludingDescendants();
365 box().setPreviousPaintInvalidationRect(box().boundsRectForPaintInvalidat ion(repaintContainer));
363 // Update regions, scrolling may change the clip of a particular region. 366 // Update regions, scrolling may change the clip of a particular region.
364 frameView->updateAnnotatedRegions(); 367 frameView->updateAnnotatedRegions();
365 // FIXME: We shouldn't call updateWidgetPositions() here since it might tear down the render tree, 368 // FIXME: We shouldn't call updateWidgetPositions() here since it might tear down the render tree,
366 // for now we just crash to avoid allowing an attacker to use after free . 369 // for now we just crash to avoid allowing an attacker to use after free .
367 frameView->updateWidgetPositions(); 370 frameView->updateWidgetPositions();
368 RELEASE_ASSERT(frameView->renderView()); 371 RELEASE_ASSERT(frameView->renderView());
369 updateCompositingLayersAfterScroll(); 372 updateCompositingLayersAfterScroll();
370 } 373 }
371 374
372 const RenderLayerModelObject* repaintContainer = box().containerForPaintInva lidation();
373 // The caret rect needs to be invalidated after scrolling 375 // The caret rect needs to be invalidated after scrolling
374 frame->selection().setCaretRectNeedsUpdate(); 376 frame->selection().setCaretRectNeedsUpdate();
375 377
376 FloatQuad quadForFakeMouseMoveEvent = FloatQuad(layer()->renderer()->previou sPaintInvalidationRect()); 378 FloatQuad quadForFakeMouseMoveEvent = FloatQuad(layer()->renderer()->previou sPaintInvalidationRect());
377 379
378 quadForFakeMouseMoveEvent = repaintContainer->localToAbsoluteQuad(quadForFak eMouseMoveEvent); 380 quadForFakeMouseMoveEvent = repaintContainer->localToAbsoluteQuad(quadForFak eMouseMoveEvent);
379 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent); 381 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent);
380 382
381 bool requiresRepaint = true; 383 bool requiresRepaint = true;
382 384
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 1461 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
1460 { 1462 {
1461 // We only want to track the topmost scroll child for scrollable areas with 1463 // We only want to track the topmost scroll child for scrollable areas with
1462 // overlay scrollbars. 1464 // overlay scrollbars.
1463 if (!hasOverlayScrollbars()) 1465 if (!hasOverlayScrollbars())
1464 return; 1466 return;
1465 m_nextTopmostScrollChild = scrollChild; 1467 m_nextTopmostScrollChild = scrollChild;
1466 } 1468 }
1467 1469
1468 } // namespace blink 1470 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698