| 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 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 // For hit-test rect visualization to work, the hit-test rect should | 1301 // For hit-test rect visualization to work, the hit-test rect should |
| 1302 // be relative to the scrolling layer and in this case the hit-test | 1302 // be relative to the scrolling layer and in this case the hit-test |
| 1303 // rect is relative to the element's own GraphicsLayer. So we will h
ave | 1303 // rect is relative to the element's own GraphicsLayer. So we will h
ave |
| 1304 // to adjust the rect to be relative to the scrolling layer here. | 1304 // to adjust the rect to be relative to the scrolling layer here. |
| 1305 // Only when the element's offsetParent == scroller's offsetParent w
e | 1305 // Only when the element's offsetParent == scroller's offsetParent w
e |
| 1306 // can compute the element's relative position to the scrolling cont
ent | 1306 // can compute the element's relative position to the scrolling cont
ent |
| 1307 // in this way. | 1307 // in this way. |
| 1308 if (searchRoot->layoutObject()->offsetParent() == searchRoot->parent
()->layoutObject()->offsetParent()) { | 1308 if (searchRoot->layoutObject()->offsetParent() == searchRoot->parent
()->layoutObject()->offsetParent()) { |
| 1309 LayoutBoxModelObject* current = searchRoot->layoutObject(); | 1309 LayoutBoxModelObject* current = searchRoot->layoutObject(); |
| 1310 LayoutBoxModelObject* parent = searchRoot->parent()->layoutObjec
t(); | 1310 LayoutBoxModelObject* parent = searchRoot->parent()->layoutObjec
t(); |
| 1311 layerOffset->setWidth((parent->offsetLeft(parent->offsetParent()
) - current->offsetLeft(parent->offsetParent())).toInt()); | 1311 layerOffset->setWidth((parent->offsetLeft() - current->offsetLef
t()).toInt()); |
| 1312 layerOffset->setHeight((parent->offsetTop(parent->offsetParent()
) - current->offsetTop(parent->offsetParent())).toInt()); | 1312 layerOffset->setHeight((parent->offsetTop() - current->offsetTop
()).toInt()); |
| 1313 return searchRoot->parent(); | 1313 return searchRoot->parent(); |
| 1314 } | 1314 } |
| 1315 } | 1315 } |
| 1316 | 1316 |
| 1317 LayoutRect rect; | 1317 LayoutRect rect; |
| 1318 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*searchRoot->la
youtObject(), rect); | 1318 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*searchRoot->la
youtObject(), rect); |
| 1319 *layerOffset = IntSize(rect.x(), rect.y()); | 1319 *layerOffset = IntSize(rect.x(), rect.y()); |
| 1320 return searchRoot; | 1320 return searchRoot; |
| 1321 } | 1321 } |
| 1322 | 1322 |
| (...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2602 } | 2602 } |
| 2603 | 2603 |
| 2604 String Internals::getProgrammaticScrollAnimationState(Node* node) const | 2604 String Internals::getProgrammaticScrollAnimationState(Node* node) const |
| 2605 { | 2605 { |
| 2606 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2606 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2607 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 2607 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
| 2608 return String(); | 2608 return String(); |
| 2609 } | 2609 } |
| 2610 | 2610 |
| 2611 } // namespace blink | 2611 } // namespace blink |
| OLD | NEW |