| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 } | 368 } |
| 369 | 369 |
| 370 return container; | 370 return container; |
| 371 } | 371 } |
| 372 | 372 |
| 373 void LayoutView::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, Transf
ormState& transformState, MapCoordinatesFlags mode) const | 373 void LayoutView::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, Transf
ormState& transformState, MapCoordinatesFlags mode) const |
| 374 { | 374 { |
| 375 if (this == ancestor) | 375 if (this == ancestor) |
| 376 return; | 376 return; |
| 377 | 377 |
| 378 if (mode & IsFixed && m_frameView) | |
| 379 transformState.move(m_frameView->scrollOffset()); | |
| 380 | |
| 381 if (mode & UseTransforms && shouldUseTransformFromContainer(0)) { | |
| 382 TransformationMatrix t; | |
| 383 getTransformFromContainer(0, LayoutSize(), t); | |
| 384 transformState.applyTransform(t); | |
| 385 } | |
| 386 | |
| 387 if (mode & TraverseDocumentBoundaries) { | 378 if (mode & TraverseDocumentBoundaries) { |
| 388 if (LayoutPart* parentDocLayoutObject = frame()->ownerLayoutObject()) { | 379 if (LayoutPart* parentDocLayoutObject = frame()->ownerLayoutObject()) { |
| 389 // A LayoutView is a containing block for fixed-position elements, s
o don't carry this state across frames. | 380 // A LayoutView is a containing block for fixed-position elements, s
o don't carry this state across frames. |
| 390 mode &= ~IsFixed; | 381 parentDocLayoutObject->mapAncestorToLocal(ancestor, transformState,
mode & ~IsFixed); |
| 391 | 382 |
| 383 transformState.move(parentDocLayoutObject->contentBoxOffset()); |
| 392 transformState.move(-frame()->view()->scrollOffset()); | 384 transformState.move(-frame()->view()->scrollOffset()); |
| 393 transformState.move(parentDocLayoutObject->contentBoxOffset()); | |
| 394 | |
| 395 parentDocLayoutObject->mapAncestorToLocal(ancestor, transformState,
mode); | |
| 396 } | 385 } |
| 397 } else { | 386 } else { |
| 398 ASSERT(!ancestor); | 387 ASSERT(!ancestor); |
| 399 } | 388 } |
| 389 |
| 390 if (mode & IsFixed) |
| 391 transformState.move(frame()->view()->scrollOffset()); |
| 400 } | 392 } |
| 401 | 393 |
| 402 void LayoutView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout
Point&) const | 394 void LayoutView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout
Point&) const |
| 403 { | 395 { |
| 404 // Record the entire size of the contents of the frame. Note that we don't j
ust | 396 // Record the entire size of the contents of the frame. Note that we don't j
ust |
| 405 // use the viewport size (containing block) here because we want to ensure t
his includes | 397 // use the viewport size (containing block) here because we want to ensure t
his includes |
| 406 // all children (so we can avoid walking them explicitly). | 398 // all children (so we can avoid walking them explicitly). |
| 407 rects.append(LayoutRect(LayoutPoint::zero(), LayoutSize(frameView()->content
sSize()))); | 399 rects.append(LayoutRect(LayoutPoint::zero(), LayoutSize(frameView()->content
sSize()))); |
| 408 } | 400 } |
| 409 | 401 |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 // of this override. All frame scrolling should be handled by | 992 // of this override. All frame scrolling should be handled by |
| 1001 // ViewportScrollCallback. | 993 // ViewportScrollCallback. |
| 1002 | 994 |
| 1003 if (!frameView()) | 995 if (!frameView()) |
| 1004 return ScrollResult(false, false, delta.width(), delta.height()); | 996 return ScrollResult(false, false, delta.width(), delta.height()); |
| 1005 | 997 |
| 1006 return frameView()->getScrollableArea()->userScroll(granularity, delta); | 998 return frameView()->getScrollableArea()->userScroll(granularity, delta); |
| 1007 } | 999 } |
| 1008 | 1000 |
| 1009 } // namespace blink | 1001 } // namespace blink |
| OLD | NEW |