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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/layout/LayerFilterInfo.cpp ('k') | Source/core/layout/LayerStackingNode.h » ('j') | 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) 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 // Update regions, scrolling may change the clip of a particular region. 390 // Update regions, scrolling may change the clip of a particular region.
391 frameView->updateAnnotatedRegions(); 391 frameView->updateAnnotatedRegions();
392 frameView->setNeedsUpdateWidgetPositions(); 392 frameView->setNeedsUpdateWidgetPositions();
393 updateCompositingLayersAfterScroll(); 393 updateCompositingLayersAfterScroll();
394 } 394 }
395 395
396 const LayoutBoxModelObject* paintInvalidationContainer = box().containerForP aintInvalidation(); 396 const LayoutBoxModelObject* paintInvalidationContainer = box().containerForP aintInvalidation();
397 // The caret rect needs to be invalidated after scrolling 397 // The caret rect needs to be invalidated after scrolling
398 frame->selection().setCaretRectNeedsUpdate(); 398 frame->selection().setCaretRectNeedsUpdate();
399 399
400 FloatQuad quadForFakeMouseMoveEvent = FloatQuad(layer()->renderer()->previou sPaintInvalidationRect()); 400 FloatQuad quadForFakeMouseMoveEvent = FloatQuad(layer()->layoutObject()->pre viousPaintInvalidationRect());
401 401
402 quadForFakeMouseMoveEvent = paintInvalidationContainer->localToAbsoluteQuad( quadForFakeMouseMoveEvent); 402 quadForFakeMouseMoveEvent = paintInvalidationContainer->localToAbsoluteQuad( quadForFakeMouseMoveEvent);
403 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent); 403 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent);
404 404
405 bool requiresPaintInvalidation = true; 405 bool requiresPaintInvalidation = true;
406 406
407 { 407 {
408 // FIXME(420741): Since scrolling depends on compositing state, the scro ll should be 408 // FIXME(420741): Since scrolling depends on compositing state, the scro ll should be
409 // deferred until after the compositing update. 409 // deferred until after the compositing update.
410 DisableCompositingQueryAsserts disabler; 410 DisableCompositingQueryAsserts disabler;
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 896
897 ASSERT_NOT_REACHED(); 897 ASSERT_NOT_REACHED();
898 return IntSize(); 898 return IntSize();
899 } 899 }
900 900
901 static inline LayoutObject* rendererForScrollbar(LayoutObject& renderer) 901 static inline LayoutObject* rendererForScrollbar(LayoutObject& renderer)
902 { 902 {
903 if (Node* node = renderer.node()) { 903 if (Node* node = renderer.node()) {
904 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) { 904 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) {
905 if (shadowRoot->type() == ShadowRoot::ClosedShadowRoot) 905 if (shadowRoot->type() == ShadowRoot::ClosedShadowRoot)
906 return shadowRoot->host()->renderer(); 906 return shadowRoot->host()->layoutObject();
907 } 907 }
908 } 908 }
909 909
910 return &renderer; 910 return &renderer;
911 } 911 }
912 912
913 PassRefPtrWillBeRawPtr<Scrollbar> LayerScrollableArea::createScrollbar(Scrollbar Orientation orientation) 913 PassRefPtrWillBeRawPtr<Scrollbar> LayerScrollableArea::createScrollbar(Scrollbar Orientation orientation)
914 { 914 {
915 RefPtrWillBeRawPtr<Scrollbar> widget = nullptr; 915 RefPtrWillBeRawPtr<Scrollbar> widget = nullptr;
916 LayoutObject* actualRenderer = rendererForScrollbar(box()); 916 LayoutObject* actualRenderer = rendererForScrollbar(box());
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 if (!frame) 1306 if (!frame)
1307 return; 1307 return;
1308 1308
1309 FrameView* frameView = frame->view(); 1309 FrameView* frameView = frame->view();
1310 if (!frameView) 1310 if (!frameView)
1311 return; 1311 return;
1312 1312
1313 // FIXME: Does this need to be fixed later for OOPI? 1313 // FIXME: Does this need to be fixed later for OOPI?
1314 bool isVisibleToHitTest = box().visibleToHitTesting(); 1314 bool isVisibleToHitTest = box().visibleToHitTesting();
1315 if (HTMLFrameOwnerElement* owner = frame->deprecatedLocalOwner()) 1315 if (HTMLFrameOwnerElement* owner = frame->deprecatedLocalOwner())
1316 isVisibleToHitTest &= owner->renderer() && owner->renderer()->visibleToH itTesting(); 1316 isVisibleToHitTest &= owner->layoutObject() && owner->layoutObject()->vi sibleToHitTesting();
1317 1317
1318 bool didScrollOverflow = m_scrollsOverflow; 1318 bool didScrollOverflow = m_scrollsOverflow;
1319 1319
1320 m_scrollsOverflow = hasOverflow && isVisibleToHitTest; 1320 m_scrollsOverflow = hasOverflow && isVisibleToHitTest;
1321 if (didScrollOverflow == scrollsOverflow()) 1321 if (didScrollOverflow == scrollsOverflow())
1322 return; 1322 return;
1323 1323
1324 if (m_scrollsOverflow) { 1324 if (m_scrollsOverflow) {
1325 ASSERT(canHaveOverflowScrollbars(box())); 1325 ASSERT(canHaveOverflowScrollbars(box()));
1326 frameView->addScrollableArea(this); 1326 frameView->addScrollableArea(this);
(...skipping 29 matching lines...) Expand all
1356 } 1356 }
1357 1357
1358 static bool layerNeedsCompositedScrolling(LayerScrollableArea::LCDTextMode mode, const Layer* layer) 1358 static bool layerNeedsCompositedScrolling(LayerScrollableArea::LCDTextMode mode, const Layer* layer)
1359 { 1359 {
1360 if (mode == LayerScrollableArea::ConsiderLCDText && !layer->compositor()->pr eferCompositingToLCDTextEnabled()) 1360 if (mode == LayerScrollableArea::ConsiderLCDText && !layer->compositor()->pr eferCompositingToLCDTextEnabled())
1361 return false; 1361 return false;
1362 1362
1363 return layer->scrollsOverflow() 1363 return layer->scrollsOverflow()
1364 && !layer->hasDescendantWithClipPath() 1364 && !layer->hasDescendantWithClipPath()
1365 && !layer->hasAncestorWithClipPath() 1365 && !layer->hasAncestorWithClipPath()
1366 && !layer->renderer()->style()->hasBorderRadius(); 1366 && !layer->layoutObject()->style()->hasBorderRadius();
1367 } 1367 }
1368 1368
1369 void LayerScrollableArea::updateNeedsCompositedScrolling(LCDTextMode mode) 1369 void LayerScrollableArea::updateNeedsCompositedScrolling(LCDTextMode mode)
1370 { 1370 {
1371 const bool needsCompositedScrolling = layerNeedsCompositedScrolling(mode, la yer()); 1371 const bool needsCompositedScrolling = layerNeedsCompositedScrolling(mode, la yer());
1372 if (static_cast<bool>(m_needsCompositedScrolling) != needsCompositedScrollin g) { 1372 if (static_cast<bool>(m_needsCompositedScrolling) != needsCompositedScrollin g) {
1373 m_needsCompositedScrolling = needsCompositedScrolling; 1373 m_needsCompositedScrolling = needsCompositedScrolling;
1374 layer()->didUpdateNeedsCompositedScrolling(); 1374 layer()->didUpdateNeedsCompositedScrolling();
1375 } 1375 }
1376 } 1376 }
1377 1377
1378 void LayerScrollableArea::setTopmostScrollChild(Layer* scrollChild) 1378 void LayerScrollableArea::setTopmostScrollChild(Layer* scrollChild)
1379 { 1379 {
1380 // We only want to track the topmost scroll child for scrollable areas with 1380 // We only want to track the topmost scroll child for scrollable areas with
1381 // overlay scrollbars. 1381 // overlay scrollbars.
1382 if (!hasOverlayScrollbars()) 1382 if (!hasOverlayScrollbars())
1383 return; 1383 return;
1384 m_nextTopmostScrollChild = scrollChild; 1384 m_nextTopmostScrollChild = scrollChild;
1385 } 1385 }
1386 1386
1387 } // namespace blink 1387 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayerFilterInfo.cpp ('k') | Source/core/layout/LayerStackingNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698