| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 if (searchRoot->layoutObject()->offsetParent() == searchRoot->parent
()->layoutObject()->offsetParent()) { | 1296 if (searchRoot->layoutObject()->offsetParent() == searchRoot->parent
()->layoutObject()->offsetParent()) { |
| 1297 LayoutBoxModelObject* current = searchRoot->layoutObject(); | 1297 LayoutBoxModelObject* current = searchRoot->layoutObject(); |
| 1298 LayoutBoxModelObject* parent = searchRoot->parent()->layoutObjec
t(); | 1298 LayoutBoxModelObject* parent = searchRoot->parent()->layoutObjec
t(); |
| 1299 layerOffset->setWidth((parent->offsetLeft() - current->offsetLef
t()).toInt()); | 1299 layerOffset->setWidth((parent->offsetLeft() - current->offsetLef
t()).toInt()); |
| 1300 layerOffset->setHeight((parent->offsetTop() - current->offsetTop
()).toInt()); | 1300 layerOffset->setHeight((parent->offsetTop() - current->offsetTop
()).toInt()); |
| 1301 return searchRoot->parent(); | 1301 return searchRoot->parent(); |
| 1302 } | 1302 } |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 LayoutRect rect; | 1305 LayoutRect rect; |
| 1306 PaintLayer::mapRectToPaintBackingCoordinates(searchRoot->layoutObject(),
rect); | 1306 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*searchRoot->la
youtObject(), rect); |
| 1307 *layerOffset = IntSize(rect.x(), rect.y()); | 1307 *layerOffset = IntSize(rect.x(), rect.y()); |
| 1308 return searchRoot; | 1308 return searchRoot; |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 // If the |graphicsLayer| is a scroller's scrollingContent layer, | 1311 // If the |graphicsLayer| is a scroller's scrollingContent layer, |
| 1312 // consider this is a scrolling layer. | 1312 // consider this is a scrolling layer. |
| 1313 GraphicsLayer* layerForScrolling = searchRoot->getScrollableArea() ? searchR
oot->getScrollableArea()->layerForScrolling() : 0; | 1313 GraphicsLayer* layerForScrolling = searchRoot->getScrollableArea() ? searchR
oot->getScrollableArea()->layerForScrolling() : 0; |
| 1314 if (graphicsLayer == layerForScrolling) { | 1314 if (graphicsLayer == layerForScrolling) { |
| 1315 *layerType = "scrolling"; | 1315 *layerType = "scrolling"; |
| 1316 return searchRoot; | 1316 return searchRoot; |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 if (searchRoot->compositingState() == PaintsIntoGroupedBacking) { | 1319 if (searchRoot->compositingState() == PaintsIntoGroupedBacking) { |
| 1320 GraphicsLayer* squashingLayer = searchRoot->groupedMapping()->squashingL
ayer(); | 1320 GraphicsLayer* squashingLayer = searchRoot->groupedMapping()->squashingL
ayer(); |
| 1321 if (graphicsLayer == squashingLayer) { | 1321 if (graphicsLayer == squashingLayer) { |
| 1322 *layerType ="squashing"; | 1322 *layerType ="squashing"; |
| 1323 LayoutRect rect; | 1323 LayoutRect rect; |
| 1324 PaintLayer::mapRectToPaintBackingCoordinates(searchRoot->layoutObjec
t(), rect); | 1324 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*searchRoot
->layoutObject(), rect); |
| 1325 *layerOffset = IntSize(rect.x(), rect.y()); | 1325 *layerOffset = IntSize(rect.x(), rect.y()); |
| 1326 return searchRoot; | 1326 return searchRoot; |
| 1327 } | 1327 } |
| 1328 } | 1328 } |
| 1329 | 1329 |
| 1330 GraphicsLayer* layerForHorizontalScrollbar = searchRoot->getScrollableArea()
? searchRoot->getScrollableArea()->layerForHorizontalScrollbar() : 0; | 1330 GraphicsLayer* layerForHorizontalScrollbar = searchRoot->getScrollableArea()
? searchRoot->getScrollableArea()->layerForHorizontalScrollbar() : 0; |
| 1331 if (graphicsLayer == layerForHorizontalScrollbar) { | 1331 if (graphicsLayer == layerForHorizontalScrollbar) { |
| 1332 *layerType = "horizontalScrollbar"; | 1332 *layerType = "horizontalScrollbar"; |
| 1333 return searchRoot; | 1333 return searchRoot; |
| 1334 } | 1334 } |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2581 } | 2581 } |
| 2582 | 2582 |
| 2583 String Internals::getProgrammaticScrollAnimationState(Node* node) const | 2583 String Internals::getProgrammaticScrollAnimationState(Node* node) const |
| 2584 { | 2584 { |
| 2585 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2585 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2586 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 2586 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
| 2587 return String(); | 2587 return String(); |
| 2588 } | 2588 } |
| 2589 | 2589 |
| 2590 } // namespace blink | 2590 } // namespace blink |
| OLD | NEW |