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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 getTransformFromContainer(0, LayoutSize(), t); | 242 getTransformFromContainer(0, LayoutSize(), t); |
243 transformState.applyTransform(t); | 243 transformState.applyTransform(t); |
244 } | 244 } |
245 } | 245 } |
246 | 246 |
247 void RenderView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout
Point&) const | 247 void RenderView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout
Point&) const |
248 { | 248 { |
249 // Record the entire size of the contents of the frame. Note that we don't j
ust | 249 // Record the entire size of the contents of the frame. Note that we don't j
ust |
250 // use the viewport size (containing block) here because we want to ensure t
his includes | 250 // use the viewport size (containing block) here because we want to ensure t
his includes |
251 // all children (so we can avoid walking them explicitly). | 251 // all children (so we can avoid walking them explicitly). |
252 rects.append(LayoutRect(LayoutPoint::zero(), frameView()->contentsSize())); | 252 rects.append(LayoutRect(LayoutPoint::zero(), frameView()->size())); |
253 } | 253 } |
254 | 254 |
255 void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | 255 void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
256 { | 256 { |
257 // If we ever require layout but receive a paint anyway, something has gone
horribly wrong. | 257 // If we ever require layout but receive a paint anyway, something has gone
horribly wrong. |
258 ASSERT(!needsLayout()); | 258 ASSERT(!needsLayout()); |
259 // RenderViews should never be called to paint with an offset not on device
pixels. | 259 // RenderViews should never be called to paint with an offset not on device
pixels. |
260 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse
t); | 260 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse
t); |
261 | 261 |
262 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 262 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // We have to flip by hand since the view's logical height has not been
determined. We | 371 // We have to flip by hand since the view's logical height has not been
determined. We |
372 // can use the viewport width and height. | 372 // can use the viewport width and height. |
373 if (style()->isHorizontalWritingMode()) | 373 if (style()->isHorizontalWritingMode()) |
374 rect.setY(viewHeight() - rect.maxY()); | 374 rect.setY(viewHeight() - rect.maxY()); |
375 else | 375 else |
376 rect.setX(viewWidth() - rect.maxX()); | 376 rect.setX(viewWidth() - rect.maxX()); |
377 } | 377 } |
378 | 378 |
379 if (viewportConstraint == IsFixedPosition && m_frameView) { | 379 if (viewportConstraint == IsFixedPosition && m_frameView) { |
380 rect.move(m_frameView->scrollOffsetForFixedPosition()); | 380 rect.move(m_frameView->scrollOffsetForFixedPosition()); |
381 // If we have a pending scroll, invalidate the previous scroll position. | |
382 if (!m_frameView->pendingScrollDelta().isZero()) { | |
383 rect.move(-m_frameView->pendingScrollDelta()); | |
384 } | |
385 } | 381 } |
386 | 382 |
387 // Apply our transform if we have one (because of full page zooming). | 383 // Apply our transform if we have one (because of full page zooming). |
388 if (!paintInvalidationContainer && layer() && layer()->transform()) | 384 if (!paintInvalidationContainer && layer() && layer()->transform()) |
389 rect = layer()->transform()->mapRect(rect); | 385 rect = layer()->transform()->mapRect(rect); |
390 } | 386 } |
391 | 387 |
392 | 388 |
393 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu
latedOffset) const | 389 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu
latedOffset) const |
394 { | 390 { |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 return viewWidth(IncludeScrollbars) / scale; | 814 return viewWidth(IncludeScrollbars) / scale; |
819 } | 815 } |
820 | 816 |
821 double RenderView::layoutViewportHeight() const | 817 double RenderView::layoutViewportHeight() const |
822 { | 818 { |
823 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 819 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
824 return viewHeight(IncludeScrollbars) / scale; | 820 return viewHeight(IncludeScrollbars) / scale; |
825 } | 821 } |
826 | 822 |
827 } // namespace blink | 823 } // namespace blink |
OLD | NEW |