OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 3349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 IntRect FrameView::visibleContentRect(IncludeScrollbarsInRect scrollbarInclusion
) const | 3360 IntRect FrameView::visibleContentRect(IncludeScrollbarsInRect scrollbarInclusion
) const |
3361 { | 3361 { |
3362 return IntRect(flooredIntPoint(m_scrollPosition), visibleContentSize(scrollb
arInclusion)); | 3362 return IntRect(flooredIntPoint(m_scrollPosition), visibleContentSize(scrollb
arInclusion)); |
3363 } | 3363 } |
3364 | 3364 |
3365 IntSize FrameView::contentsSize() const | 3365 IntSize FrameView::contentsSize() const |
3366 { | 3366 { |
3367 return m_contentsSize; | 3367 return m_contentsSize; |
3368 } | 3368 } |
3369 | 3369 |
| 3370 void FrameView::clipPaintRect(FloatRect* paintRect) const |
| 3371 { |
| 3372 paintRect->intersect( |
| 3373 page()->chromeClient().visibleContentRectForPainting().value_or( |
| 3374 visibleContentRect())); |
| 3375 } |
| 3376 |
3370 IntPoint FrameView::minimumScrollPosition() const | 3377 IntPoint FrameView::minimumScrollPosition() const |
3371 { | 3378 { |
3372 return IntPoint(-scrollOrigin().x(), -scrollOrigin().y()); | 3379 return IntPoint(-scrollOrigin().x(), -scrollOrigin().y()); |
3373 } | 3380 } |
3374 | 3381 |
3375 void FrameView::adjustScrollbarOpacity() | 3382 void FrameView::adjustScrollbarOpacity() |
3376 { | 3383 { |
3377 if (m_horizontalScrollbar && layerForHorizontalScrollbar()) { | 3384 if (m_horizontalScrollbar && layerForHorizontalScrollbar()) { |
3378 bool isOpaqueScrollbar = !m_horizontalScrollbar->isOverlayScrollbar(); | 3385 bool isOpaqueScrollbar = !m_horizontalScrollbar->isOverlayScrollbar(); |
3379 layerForHorizontalScrollbar()->setContentsOpaque(isOpaqueScrollbar); | 3386 layerForHorizontalScrollbar()->setContentsOpaque(isOpaqueScrollbar); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3438 } | 3445 } |
3439 | 3446 |
3440 if (m_didScrollTimer.isActive()) | 3447 if (m_didScrollTimer.isActive()) |
3441 m_didScrollTimer.stop(); | 3448 m_didScrollTimer.stop(); |
3442 m_didScrollTimer.startOneShot(resourcePriorityUpdateDelayAfterScroll, BLINK_
FROM_HERE); | 3449 m_didScrollTimer.startOneShot(resourcePriorityUpdateDelayAfterScroll, BLINK_
FROM_HERE); |
3443 | 3450 |
3444 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) | 3451 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) |
3445 cache->handleScrollPositionChanged(this); | 3452 cache->handleScrollPositionChanged(this); |
3446 | 3453 |
3447 frame().loader().saveScrollState(); | 3454 frame().loader().saveScrollState(); |
3448 frame().loader().client()->didChangeScrollOffset(); | 3455 didChangeScrollOffset(); |
3449 | 3456 |
3450 if (scrollType == CompositorScroll && m_frame->isMainFrame()) { | 3457 if (scrollType == CompositorScroll && m_frame->isMainFrame()) { |
3451 if (DocumentLoader* documentLoader = m_frame->loader().documentLoader()) | 3458 if (DocumentLoader* documentLoader = m_frame->loader().documentLoader()) |
3452 documentLoader->initialScrollState().wasScrolledByUser = true; | 3459 documentLoader->initialScrollState().wasScrolledByUser = true; |
3453 } | 3460 } |
3454 | 3461 |
3455 if (scrollType != AnchoringScroll) | 3462 if (scrollType != AnchoringScroll) |
3456 clearScrollAnchor(); | 3463 clearScrollAnchor(); |
3457 } | 3464 } |
3458 | 3465 |
| 3466 void FrameView::didChangeScrollOffset() |
| 3467 { |
| 3468 frame().loader().client()->didChangeScrollOffset(); |
| 3469 if (frame().isMainFrame()) |
| 3470 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); |
| 3471 } |
| 3472 |
3459 void FrameView::clearScrollAnchor() | 3473 void FrameView::clearScrollAnchor() |
3460 { | 3474 { |
3461 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) | 3475 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) |
3462 return; | 3476 return; |
3463 m_scrollAnchor.clear(); | 3477 m_scrollAnchor.clear(); |
3464 } | 3478 } |
3465 | 3479 |
3466 void FrameView::windowResizerRectChanged() | 3480 void FrameView::windowResizerRectChanged() |
3467 { | 3481 { |
3468 updateScrollbars(); | 3482 updateScrollbars(); |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4308 } | 4322 } |
4309 | 4323 |
4310 bool FrameView::canThrottleRendering() const | 4324 bool FrameView::canThrottleRendering() const |
4311 { | 4325 { |
4312 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4326 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
4313 return false; | 4327 return false; |
4314 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4328 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
4315 } | 4329 } |
4316 | 4330 |
4317 } // namespace blink | 4331 } // namespace blink |
OLD | NEW |