OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 m_overlayScrollbarHorizontal.get() : m_overlayScrollbarVertical.get(); | 195 m_overlayScrollbarHorizontal.get() : m_overlayScrollbarVertical.get(); |
196 OwnPtr<WebScrollbarLayer>& webScrollbarLayer = isHorizontal ? | 196 OwnPtr<WebScrollbarLayer>& webScrollbarLayer = isHorizontal ? |
197 m_webOverlayScrollbarHorizontal : m_webOverlayScrollbarVertical; | 197 m_webOverlayScrollbarHorizontal : m_webOverlayScrollbarVertical; |
198 | 198 |
199 const int overlayScrollbarThickness = m_frameHost.settings().pinchOverlayScr
ollbarThickness(); | 199 const int overlayScrollbarThickness = m_frameHost.settings().pinchOverlayScr
ollbarThickness(); |
200 | 200 |
201 if (!webScrollbarLayer) { | 201 if (!webScrollbarLayer) { |
202 ScrollingCoordinator* coordinator = m_frameHost.page().scrollingCoordina
tor(); | 202 ScrollingCoordinator* coordinator = m_frameHost.page().scrollingCoordina
tor(); |
203 ASSERT(coordinator); | 203 ASSERT(coordinator); |
204 ScrollbarOrientation webcoreOrientation = isHorizontal ? HorizontalScrol
lbar : VerticalScrollbar; | 204 ScrollbarOrientation webcoreOrientation = isHorizontal ? HorizontalScrol
lbar : VerticalScrollbar; |
205 webScrollbarLayer = coordinator->createSolidColorScrollbarLayer(webcoreO
rientation, overlayScrollbarThickness, false); | 205 webScrollbarLayer = coordinator->createSolidColorScrollbarLayer(webcoreO
rientation, overlayScrollbarThickness, 0, false); |
206 | 206 |
207 webScrollbarLayer->setClipLayer(m_innerViewportContainerLayer->platformL
ayer()); | 207 webScrollbarLayer->setClipLayer(m_innerViewportContainerLayer->platformL
ayer()); |
208 scrollbarGraphicsLayer->setContentsToPlatformLayer(webScrollbarLayer->la
yer()); | 208 scrollbarGraphicsLayer->setContentsToPlatformLayer(webScrollbarLayer->la
yer()); |
209 scrollbarGraphicsLayer->setDrawsContent(false); | 209 scrollbarGraphicsLayer->setDrawsContent(false); |
210 } | 210 } |
211 | 211 |
212 int xPosition = isHorizontal ? 0 : m_innerViewportContainerLayer->size().wid
th() - overlayScrollbarThickness; | 212 int xPosition = isHorizontal ? 0 : m_innerViewportContainerLayer->size().wid
th() - overlayScrollbarThickness; |
213 int yPosition = isHorizontal ? m_innerViewportContainerLayer->size().height(
) - overlayScrollbarThickness : 0; | 213 int yPosition = isHorizontal ? m_innerViewportContainerLayer->size().height(
) - overlayScrollbarThickness : 0; |
214 int width = isHorizontal ? m_innerViewportContainerLayer->size().width() - o
verlayScrollbarThickness : overlayScrollbarThickness; | 214 int width = isHorizontal ? m_innerViewportContainerLayer->size().width() - o
verlayScrollbarThickness : overlayScrollbarThickness; |
215 int height = isHorizontal ? overlayScrollbarThickness : m_innerViewportConta
inerLayer->size().height() - overlayScrollbarThickness; | 215 int height = isHorizontal ? overlayScrollbarThickness : m_innerViewportConta
inerLayer->size().height() - overlayScrollbarThickness; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 } else if (graphicsLayer == m_overlayScrollbarVertical.get()) { | 344 } else if (graphicsLayer == m_overlayScrollbarVertical.get()) { |
345 name = "Overlay Scrollbar Vertical Layer"; | 345 name = "Overlay Scrollbar Vertical Layer"; |
346 } else { | 346 } else { |
347 ASSERT_NOT_REACHED(); | 347 ASSERT_NOT_REACHED(); |
348 } | 348 } |
349 | 349 |
350 return name; | 350 return name; |
351 } | 351 } |
352 | 352 |
353 } // namespace WebCore | 353 } // namespace WebCore |
OLD | NEW |