| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 // Frames are painted at rounded-int position. Since we cannot efficient
ly compute the subpixel offset | 483 // Frames are painted at rounded-int position. Since we cannot efficient
ly compute the subpixel offset |
| 484 // of painting at this point in a a bottom-up walk, round to the enclosi
ng int rect, which will enclose | 484 // of painting at this point in a a bottom-up walk, round to the enclosi
ng int rect, which will enclose |
| 485 // the actual visible rect. | 485 // the actual visible rect. |
| 486 rect = LayoutRect(enclosingIntRect(rect)); | 486 rect = LayoutRect(enclosingIntRect(rect)); |
| 487 | 487 |
| 488 // Adjust for frame border. | 488 // Adjust for frame border. |
| 489 rect.move(obj->contentBoxOffset()); | 489 rect.move(obj->contentBoxOffset()); |
| 490 return obj->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectFla
gs); | 490 return obj->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectFla
gs); |
| 491 } | 491 } |
| 492 | 492 |
| 493 return true; | 493 // This can happen, e.g., if the iframe element has display:none. |
| 494 rect = LayoutRect(); |
| 495 return false; |
| 494 } | 496 } |
| 495 | 497 |
| 496 void LayoutView::adjustOffsetForFixedPosition(LayoutRect& rect) const | 498 void LayoutView::adjustOffsetForFixedPosition(LayoutRect& rect) const |
| 497 { | 499 { |
| 498 if (m_frameView) { | 500 if (m_frameView) { |
| 499 rect.move(LayoutSize(m_frameView->scrollOffset())); | 501 rect.move(LayoutSize(m_frameView->scrollOffset())); |
| 500 if (hasOverflowClip()) | 502 if (hasOverflowClip()) |
| 501 rect.move(scrolledContentOffset()); | 503 rect.move(scrolledContentOffset()); |
| 502 | 504 |
| 503 // FIXME: Paint invalidation should happen after scroll updates, so ther
e should be no pending scroll delta. | 505 // FIXME: Paint invalidation should happen after scroll updates, so ther
e should be no pending scroll delta. |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 // of this override. All frame scrolling should be handled by | 1005 // of this override. All frame scrolling should be handled by |
| 1004 // ViewportScrollCallback. | 1006 // ViewportScrollCallback. |
| 1005 | 1007 |
| 1006 if (!frameView()) | 1008 if (!frameView()) |
| 1007 return ScrollResult(false, false, delta.width(), delta.height()); | 1009 return ScrollResult(false, false, delta.width(), delta.height()); |
| 1008 | 1010 |
| 1009 return frameView()->getScrollableArea()->userScroll(granularity, delta); | 1011 return frameView()->getScrollableArea()->userScroll(granularity, delta); |
| 1010 } | 1012 } |
| 1011 | 1013 |
| 1012 } // namespace blink | 1014 } // namespace blink |
| OLD | NEW |