| 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 IntRect FrameView::visibleContentRectForPainting() const |
| 3371 { |
| 3372 if (m_visibleContentRectForPainting) |
| 3373 return *m_visibleContentRectForPainting; |
| 3374 return visibleContentRect(); |
| 3375 } |
| 3376 |
| 3377 void FrameView::setVisibleContentRectForPainting(const IntRect& rect) |
| 3378 { |
| 3379 m_visibleContentRectForPainting = IntRect(rect); |
| 3380 } |
| 3381 |
| 3382 void FrameView::resetVisibleContentRectForPainting() |
| 3383 { |
| 3384 m_visibleContentRectForPainting = WTF::nullopt; |
| 3385 } |
| 3386 |
| 3370 IntPoint FrameView::minimumScrollPosition() const | 3387 IntPoint FrameView::minimumScrollPosition() const |
| 3371 { | 3388 { |
| 3372 return IntPoint(-scrollOrigin().x(), -scrollOrigin().y()); | 3389 return IntPoint(-scrollOrigin().x(), -scrollOrigin().y()); |
| 3373 } | 3390 } |
| 3374 | 3391 |
| 3375 void FrameView::adjustScrollbarOpacity() | 3392 void FrameView::adjustScrollbarOpacity() |
| 3376 { | 3393 { |
| 3377 if (m_horizontalScrollbar && layerForHorizontalScrollbar()) { | 3394 if (m_horizontalScrollbar && layerForHorizontalScrollbar()) { |
| 3378 bool isOpaqueScrollbar = !m_horizontalScrollbar->isOverlayScrollbar(); | 3395 bool isOpaqueScrollbar = !m_horizontalScrollbar->isOverlayScrollbar(); |
| 3379 layerForHorizontalScrollbar()->setContentsOpaque(isOpaqueScrollbar); | 3396 layerForHorizontalScrollbar()->setContentsOpaque(isOpaqueScrollbar); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3438 } | 3455 } |
| 3439 | 3456 |
| 3440 if (m_didScrollTimer.isActive()) | 3457 if (m_didScrollTimer.isActive()) |
| 3441 m_didScrollTimer.stop(); | 3458 m_didScrollTimer.stop(); |
| 3442 m_didScrollTimer.startOneShot(resourcePriorityUpdateDelayAfterScroll, BLINK_
FROM_HERE); | 3459 m_didScrollTimer.startOneShot(resourcePriorityUpdateDelayAfterScroll, BLINK_
FROM_HERE); |
| 3443 | 3460 |
| 3444 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) | 3461 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) |
| 3445 cache->handleScrollPositionChanged(this); | 3462 cache->handleScrollPositionChanged(this); |
| 3446 | 3463 |
| 3447 frame().loader().saveScrollState(); | 3464 frame().loader().saveScrollState(); |
| 3448 frame().loader().client()->didChangeScrollOffset(); | 3465 didChangeScrollOffset(); |
| 3449 | 3466 |
| 3450 if (scrollType == CompositorScroll && m_frame->isMainFrame()) { | 3467 if (scrollType == CompositorScroll && m_frame->isMainFrame()) { |
| 3451 if (DocumentLoader* documentLoader = m_frame->loader().documentLoader()) | 3468 if (DocumentLoader* documentLoader = m_frame->loader().documentLoader()) |
| 3452 documentLoader->initialScrollState().wasScrolledByUser = true; | 3469 documentLoader->initialScrollState().wasScrolledByUser = true; |
| 3453 } | 3470 } |
| 3454 | 3471 |
| 3455 if (scrollType != AnchoringScroll) | 3472 if (scrollType != AnchoringScroll) |
| 3456 clearScrollAnchor(); | 3473 clearScrollAnchor(); |
| 3457 } | 3474 } |
| 3458 | 3475 |
| 3476 void FrameView::didChangeScrollOffset() |
| 3477 { |
| 3478 frame().loader().client()->didChangeScrollOffset(); |
| 3479 if (frame().isMainFrame()) |
| 3480 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); |
| 3481 } |
| 3482 |
| 3459 void FrameView::clearScrollAnchor() | 3483 void FrameView::clearScrollAnchor() |
| 3460 { | 3484 { |
| 3461 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) | 3485 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) |
| 3462 return; | 3486 return; |
| 3463 m_scrollAnchor.clear(); | 3487 m_scrollAnchor.clear(); |
| 3464 } | 3488 } |
| 3465 | 3489 |
| 3466 void FrameView::windowResizerRectChanged() | 3490 void FrameView::windowResizerRectChanged() |
| 3467 { | 3491 { |
| 3468 updateScrollbars(); | 3492 updateScrollbars(); |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4308 } | 4332 } |
| 4309 | 4333 |
| 4310 bool FrameView::canThrottleRendering() const | 4334 bool FrameView::canThrottleRendering() const |
| 4311 { | 4335 { |
| 4312 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4336 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4313 return false; | 4337 return false; |
| 4314 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4338 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4315 } | 4339 } |
| 4316 | 4340 |
| 4317 } // namespace blink | 4341 } // namespace blink |
| OLD | NEW |