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

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

Issue 21084007: Set overflowControlsHost layer bounds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« 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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1122 }
1123 1123
1124 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO ffset) 1124 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO ffset)
1125 { 1125 {
1126 if (m_overflowControlsHostLayer) 1126 if (m_overflowControlsHostLayer)
1127 m_overflowControlsHostLayer->setPosition(contentsOffset); 1127 m_overflowControlsHostLayer->setPosition(contentsOffset);
1128 } 1128 }
1129 1129
1130 void RenderLayerCompositor::frameViewDidChangeSize() 1130 void RenderLayerCompositor::frameViewDidChangeSize()
1131 { 1131 {
1132 FrameView* frameView = m_renderView->frameView();
1132 if (m_containerLayer) { 1133 if (m_containerLayer) {
1133 FrameView* frameView = m_renderView->frameView();
1134 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); 1134 m_containerLayer->setSize(frameView->unscaledVisibleContentSize());
1135 1135
1136 frameViewDidScroll(); 1136 frameViewDidScroll();
1137 updateOverflowControlsLayers(); 1137 updateOverflowControlsLayers();
1138 1138
1139 #if ENABLE(RUBBER_BANDING) 1139 #if ENABLE(RUBBER_BANDING)
1140 if (m_layerForOverhangAreas) 1140 if (m_layerForOverhangAreas)
1141 m_layerForOverhangAreas->setSize(frameView->frameRect().size()); 1141 m_layerForOverhangAreas->setSize(frameView->frameRect().size());
1142 #endif 1142 #endif
1143 } 1143 }
1144 if (m_overflowControlsHostLayer)
1145 m_overflowControlsHostLayer->setSize(frameView->unscaledVisibleContentSi ze(ScrollableArea::IncludeScrollbars));
1144 } 1146 }
1145 1147
1146 void RenderLayerCompositor::frameViewDidScroll() 1148 void RenderLayerCompositor::frameViewDidScroll()
1147 { 1149 {
1148 FrameView* frameView = m_renderView->frameView(); 1150 FrameView* frameView = m_renderView->frameView();
1149 IntPoint scrollPosition = frameView->scrollPosition(); 1151 IntPoint scrollPosition = frameView->scrollPosition();
1150 1152
1151 if (!m_scrollLayer) 1153 if (!m_scrollLayer)
1152 return; 1154 return;
1153 1155
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 clearBackingForLayerIncludingDescendants(m_renderView->layer()); 1483 clearBackingForLayerIncludingDescendants(m_renderView->layer());
1482 } 1484 }
1483 1485
1484 void RenderLayerCompositor::updateRootLayerPosition() 1486 void RenderLayerCompositor::updateRootLayerPosition()
1485 { 1487 {
1486 if (m_rootContentLayer) { 1488 if (m_rootContentLayer) {
1487 const IntRect& documentRect = m_renderView->documentRect(); 1489 const IntRect& documentRect = m_renderView->documentRect();
1488 m_rootContentLayer->setSize(documentRect.size()); 1490 m_rootContentLayer->setSize(documentRect.size());
1489 m_rootContentLayer->setPosition(documentRect.location()); 1491 m_rootContentLayer->setPosition(documentRect.location());
1490 } 1492 }
1491 if (m_containerLayer) { 1493 FrameView* frameView = m_renderView->frameView();
1492 FrameView* frameView = m_renderView->frameView(); 1494 if (m_containerLayer)
1493 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); 1495 m_containerLayer->setSize(frameView->unscaledVisibleContentSize());
1494 } 1496 if (m_overflowControlsHostLayer)
1497 m_overflowControlsHostLayer->setSize(frameView->unscaledVisibleContentSi ze(ScrollableArea::IncludeScrollbars));
1495 1498
1496 #if ENABLE(RUBBER_BANDING) 1499 #if ENABLE(RUBBER_BANDING)
1497 if (m_contentShadowLayer) { 1500 if (m_contentShadowLayer) {
1498 m_contentShadowLayer->setPosition(m_rootContentLayer->position()); 1501 m_contentShadowLayer->setPosition(m_rootContentLayer->position());
1499 1502
1500 FloatSize rootContentLayerSize = m_rootContentLayer->size(); 1503 FloatSize rootContentLayerSize = m_rootContentLayer->size();
1501 if (m_contentShadowLayer->size() != rootContentLayerSize) { 1504 if (m_contentShadowLayer->size() != rootContentLayerSize) {
1502 m_contentShadowLayer->setSize(rootContentLayerSize); 1505 m_contentShadowLayer->setSize(rootContentLayerSize);
1503 ScrollbarTheme::theme()->setUpContentShadowLayer(m_contentShadowLaye r.get()); 1506 ScrollbarTheme::theme()->setUpContentShadowLayer(m_contentShadowLaye r.get());
1504 } 1507 }
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 2718
2716 Page* RenderLayerCompositor::page() const 2719 Page* RenderLayerCompositor::page() const
2717 { 2720 {
2718 if (Frame* frame = m_renderView->frameView()->frame()) 2721 if (Frame* frame = m_renderView->frameView()->frame())
2719 return frame->page(); 2722 return frame->page();
2720 2723
2721 return 0; 2724 return 0;
2722 } 2725 }
2723 2726
2724 } // namespace WebCore 2727 } // namespace WebCore
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