| 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 3291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3302 IntRect FrameView::visibleContentRect(IncludeScrollbarsInRect scrollbarInclusion
) const | 3302 IntRect FrameView::visibleContentRect(IncludeScrollbarsInRect scrollbarInclusion
) const |
| 3303 { | 3303 { |
| 3304 return IntRect(flooredIntPoint(m_scrollPosition), visibleContentSize(scrollb
arInclusion)); | 3304 return IntRect(flooredIntPoint(m_scrollPosition), visibleContentSize(scrollb
arInclusion)); |
| 3305 } | 3305 } |
| 3306 | 3306 |
| 3307 IntSize FrameView::contentsSize() const | 3307 IntSize FrameView::contentsSize() const |
| 3308 { | 3308 { |
| 3309 return m_contentsSize; | 3309 return m_contentsSize; |
| 3310 } | 3310 } |
| 3311 | 3311 |
| 3312 IntRect FrameView::visibleContentRectForPainting() const |
| 3313 { |
| 3314 if (m_visibleContentRectForPainting) |
| 3315 return *m_visibleContentRectForPainting; |
| 3316 return visibleContentRect(); |
| 3317 } |
| 3318 |
| 3319 void FrameView::setVisibleContentRectForPainting(const IntRect& rect) |
| 3320 { |
| 3321 m_visibleContentRectForPainting = IntRect(rect); |
| 3322 } |
| 3323 |
| 3324 void FrameView::resetVisibleContentRectForPainting() |
| 3325 { |
| 3326 m_visibleContentRectForPainting = WTF::nullopt; |
| 3327 } |
| 3328 |
| 3312 IntPoint FrameView::minimumScrollPosition() const | 3329 IntPoint FrameView::minimumScrollPosition() const |
| 3313 { | 3330 { |
| 3314 return IntPoint(-scrollOrigin().x(), -scrollOrigin().y()); | 3331 return IntPoint(-scrollOrigin().x(), -scrollOrigin().y()); |
| 3315 } | 3332 } |
| 3316 | 3333 |
| 3317 void FrameView::adjustScrollbarOpacity() | 3334 void FrameView::adjustScrollbarOpacity() |
| 3318 { | 3335 { |
| 3319 if (m_horizontalScrollbar && layerForHorizontalScrollbar()) { | 3336 if (m_horizontalScrollbar && layerForHorizontalScrollbar()) { |
| 3320 bool isOpaqueScrollbar = !m_horizontalScrollbar->isOverlayScrollbar(); | 3337 bool isOpaqueScrollbar = !m_horizontalScrollbar->isOverlayScrollbar(); |
| 3321 layerForHorizontalScrollbar()->setContentsOpaque(isOpaqueScrollbar); | 3338 layerForHorizontalScrollbar()->setContentsOpaque(isOpaqueScrollbar); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3380 } | 3397 } |
| 3381 | 3398 |
| 3382 if (m_didScrollTimer.isActive()) | 3399 if (m_didScrollTimer.isActive()) |
| 3383 m_didScrollTimer.stop(); | 3400 m_didScrollTimer.stop(); |
| 3384 m_didScrollTimer.startOneShot(resourcePriorityUpdateDelayAfterScroll, BLINK_
FROM_HERE); | 3401 m_didScrollTimer.startOneShot(resourcePriorityUpdateDelayAfterScroll, BLINK_
FROM_HERE); |
| 3385 | 3402 |
| 3386 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) | 3403 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) |
| 3387 cache->handleScrollPositionChanged(this); | 3404 cache->handleScrollPositionChanged(this); |
| 3388 | 3405 |
| 3389 frame().loader().saveScrollState(); | 3406 frame().loader().saveScrollState(); |
| 3390 frame().loader().client()->didChangeScrollOffset(); | 3407 didChangeScrollOffset(); |
| 3391 | 3408 |
| 3392 if (scrollType == CompositorScroll && m_frame->isMainFrame()) { | 3409 if (scrollType == CompositorScroll && m_frame->isMainFrame()) { |
| 3393 if (DocumentLoader* documentLoader = m_frame->loader().documentLoader()) | 3410 if (DocumentLoader* documentLoader = m_frame->loader().documentLoader()) |
| 3394 documentLoader->initialScrollState().wasScrolledByUser = true; | 3411 documentLoader->initialScrollState().wasScrolledByUser = true; |
| 3395 } | 3412 } |
| 3396 | 3413 |
| 3397 if (scrollType != AnchoringScroll) | 3414 if (scrollType != AnchoringScroll) |
| 3398 clearScrollAnchor(); | 3415 clearScrollAnchor(); |
| 3399 } | 3416 } |
| 3400 | 3417 |
| 3418 void FrameView::didChangeScrollOffset() |
| 3419 { |
| 3420 frame().loader().client()->didChangeScrollOffset(); |
| 3421 if (frame().isMainFrame()) |
| 3422 frame().host()->chromeClient().mainFrameScrollOffsetChanged(); |
| 3423 } |
| 3424 |
| 3401 void FrameView::clearScrollAnchor() | 3425 void FrameView::clearScrollAnchor() |
| 3402 { | 3426 { |
| 3403 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) | 3427 if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) |
| 3404 return; | 3428 return; |
| 3405 m_scrollAnchor.clear(); | 3429 m_scrollAnchor.clear(); |
| 3406 } | 3430 } |
| 3407 | 3431 |
| 3408 void FrameView::windowResizerRectChanged() | 3432 void FrameView::windowResizerRectChanged() |
| 3409 { | 3433 { |
| 3410 updateScrollbars(); | 3434 updateScrollbars(); |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4247 } | 4271 } |
| 4248 | 4272 |
| 4249 bool FrameView::canThrottleRendering() const | 4273 bool FrameView::canThrottleRendering() const |
| 4250 { | 4274 { |
| 4251 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4275 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4252 return false; | 4276 return false; |
| 4253 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4277 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4254 } | 4278 } |
| 4255 | 4279 |
| 4256 } // namespace blink | 4280 } // namespace blink |
| OLD | NEW |