| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 // Ditto when not in compositing mode. | 316 // Ditto when not in compositing mode. |
| 317 if (!usesCompositing()) | 317 if (!usesCompositing()) |
| 318 return LayoutBlockFlow::visualOverflowRect(); | 318 return LayoutBlockFlow::visualOverflowRect(); |
| 319 | 319 |
| 320 // In normal compositing mode, LayoutView doesn't actually apply clipping | 320 // In normal compositing mode, LayoutView doesn't actually apply clipping |
| 321 // on its descendants. Instead their visual overflow is propagated to | 321 // on its descendants. Instead their visual overflow is propagated to |
| 322 // compositor()->m_rootContentLayer for accelerated scrolling. | 322 // compositor()->m_rootContentLayer for accelerated scrolling. |
| 323 return LayoutRect(documentRect()); | 323 return LayoutRect(documentRect()); |
| 324 } | 324 } |
| 325 | 325 |
| 326 LayoutRect LayoutView::localOverflowRectForPaintInvalidation() const |
| 327 { |
| 328 // TODO(wangxianzhu): This is only required without rootLayerScrolls (though
it is also correct |
| 329 // but unnecessary with rootLayerScrolls) because of the special LayoutView
overflow model. |
| 330 return visualOverflowRect(); |
| 331 } |
| 332 |
| 326 void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, Transf
ormState& transformState, MapCoordinatesFlags mode) const | 333 void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, Transf
ormState& transformState, MapCoordinatesFlags mode) const |
| 327 { | 334 { |
| 328 if (!ancestor && mode & UseTransforms && shouldUseTransformFromContainer(0))
{ | 335 if (!ancestor && mode & UseTransforms && shouldUseTransformFromContainer(0))
{ |
| 329 TransformationMatrix t; | 336 TransformationMatrix t; |
| 330 getTransformFromContainer(0, LayoutSize(), t); | 337 getTransformFromContainer(0, LayoutSize(), t); |
| 331 transformState.applyTransform(t); | 338 transformState.applyTransform(t); |
| 332 } | 339 } |
| 333 | 340 |
| 334 if ((mode & IsFixed) && m_frameView) { | 341 if ((mode & IsFixed) && m_frameView) { |
| 335 transformState.move(toIntSize(m_frameView->scrollPosition())); | 342 transformState.move(toIntSize(m_frameView->scrollPosition())); |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 // ASSERT(!frame()->isMainFrame()) here. All main frame scrolling should | 1042 // ASSERT(!frame()->isMainFrame()) here. All main frame scrolling should |
| 1036 // be handled by the ViewportScrollCallback. | 1043 // be handled by the ViewportScrollCallback. |
| 1037 | 1044 |
| 1038 if (!frameView()) | 1045 if (!frameView()) |
| 1039 return ScrollResult(false, false, delta.width(), delta.height()); | 1046 return ScrollResult(false, false, delta.width(), delta.height()); |
| 1040 | 1047 |
| 1041 return frameView()->getScrollableArea()->userScroll(granularity, delta); | 1048 return frameView()->getScrollableArea()->userScroll(granularity, delta); |
| 1042 } | 1049 } |
| 1043 | 1050 |
| 1044 } // namespace blink | 1051 } // namespace blink |
| OLD | NEW |