| 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 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 // For hit-test rect visualization to work, the hit-test rect should | 1295 // For hit-test rect visualization to work, the hit-test rect should |
| 1296 // be relative to the scrolling layer and in this case the hit-test | 1296 // be relative to the scrolling layer and in this case the hit-test |
| 1297 // rect is relative to the element's own GraphicsLayer. So we will h
ave | 1297 // rect is relative to the element's own GraphicsLayer. So we will h
ave |
| 1298 // to adjust the rect to be relative to the scrolling layer here. | 1298 // to adjust the rect to be relative to the scrolling layer here. |
| 1299 // Only when the element's offsetParent == scroller's offsetParent w
e | 1299 // Only when the element's offsetParent == scroller's offsetParent w
e |
| 1300 // can compute the element's relative position to the scrolling cont
ent | 1300 // can compute the element's relative position to the scrolling cont
ent |
| 1301 // in this way. | 1301 // in this way. |
| 1302 if (searchRoot->layoutObject()->offsetParent() == searchRoot->parent
()->layoutObject()->offsetParent()) { | 1302 if (searchRoot->layoutObject()->offsetParent() == searchRoot->parent
()->layoutObject()->offsetParent()) { |
| 1303 LayoutBoxModelObject* current = searchRoot->layoutObject(); | 1303 LayoutBoxModelObject* current = searchRoot->layoutObject(); |
| 1304 LayoutBoxModelObject* parent = searchRoot->parent()->layoutObjec
t(); | 1304 LayoutBoxModelObject* parent = searchRoot->parent()->layoutObjec
t(); |
| 1305 layerOffset->setWidth((parent->offsetLeft() - current->offsetLef
t()).toInt()); | 1305 layerOffset->setWidth((parent->offsetLeft(parent->offsetParent()
) - current->offsetLeft(parent->offsetParent())).toInt()); |
| 1306 layerOffset->setHeight((parent->offsetTop() - current->offsetTop
()).toInt()); | 1306 layerOffset->setHeight((parent->offsetTop(parent->offsetParent()
) - current->offsetTop(parent->offsetParent())).toInt()); |
| 1307 return searchRoot->parent(); | 1307 return searchRoot->parent(); |
| 1308 } | 1308 } |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 LayoutRect rect; | 1311 LayoutRect rect; |
| 1312 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*searchRoot->la
youtObject(), rect); | 1312 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*searchRoot->la
youtObject(), rect); |
| 1313 *layerOffset = IntSize(rect.x(), rect.y()); | 1313 *layerOffset = IntSize(rect.x(), rect.y()); |
| 1314 return searchRoot; | 1314 return searchRoot; |
| 1315 } | 1315 } |
| 1316 | 1316 |
| (...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2564 } | 2564 } |
| 2565 | 2565 |
| 2566 String Internals::getProgrammaticScrollAnimationState(Node* node) const | 2566 String Internals::getProgrammaticScrollAnimationState(Node* node) const |
| 2567 { | 2567 { |
| 2568 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2568 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2569 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 2569 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
| 2570 return String(); | 2570 return String(); |
| 2571 } | 2571 } |
| 2572 | 2572 |
| 2573 } // namespace blink | 2573 } // namespace blink |
| OLD | NEW |