| 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 2972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2983 | 2983 |
| 2984 void FrameView::setTopControlsViewportAdjustment(float adjustment) | 2984 void FrameView::setTopControlsViewportAdjustment(float adjustment) |
| 2985 { | 2985 { |
| 2986 m_topControlsViewportAdjustment = adjustment; | 2986 m_topControlsViewportAdjustment = adjustment; |
| 2987 } | 2987 } |
| 2988 | 2988 |
| 2989 IntPoint FrameView::maximumScrollPosition() const | 2989 IntPoint FrameView::maximumScrollPosition() const |
| 2990 { | 2990 { |
| 2991 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() | 2991 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() |
| 2992 // FIXME: We probably shouldn't be storing the bounds in a float. crbug.com/
422331. | 2992 // FIXME: We probably shouldn't be storing the bounds in a float. crbug.com/
422331. |
| 2993 FloatSize visibleSize = visibleContentSize(ExcludeScrollbars); | 2993 IntSize visibleSize = visibleContentSize(ExcludeScrollbars) + topControlsSiz
e(); |
| 2994 visibleSize.expand(0, m_topControlsViewportAdjustment); | 2994 IntSize contentBounds = contentsSize(); |
| 2995 | 2995 IntPoint maximumPosition = -scrollOrigin() + (contentBounds - visibleSize); |
| 2996 FloatSize contentBounds = contentsSize(); | 2996 return maximumPosition.expandedTo(minimumScrollPosition()); |
| 2997 contentBounds = flooredIntSize(contentBounds); | |
| 2998 | |
| 2999 FloatSize maximumOffset = contentBounds - visibleSize - toIntSize(scrollOrig
in()); | |
| 3000 | |
| 3001 IntPoint snappedMaximumOffset = flooredIntPoint(maximumOffset); | |
| 3002 snappedMaximumOffset = snappedMaximumOffset.expandedTo(minimumScrollPosition
()); | |
| 3003 return snappedMaximumOffset; | |
| 3004 } | 2997 } |
| 3005 | 2998 |
| 3006 void FrameView::addChild(PassRefPtrWillBeRawPtr<Widget> prpChild) | 2999 void FrameView::addChild(PassRefPtrWillBeRawPtr<Widget> prpChild) |
| 3007 { | 3000 { |
| 3008 Widget* child = prpChild.get(); | 3001 Widget* child = prpChild.get(); |
| 3009 ASSERT(child != this && !child->parent()); | 3002 ASSERT(child != this && !child->parent()); |
| 3010 child->setParent(this); | 3003 child->setParent(this); |
| 3011 m_children.add(prpChild); | 3004 m_children.add(prpChild); |
| 3012 } | 3005 } |
| 3013 | 3006 |
| (...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3941 | 3934 |
| 3942 if (!graphicsLayer) | 3935 if (!graphicsLayer) |
| 3943 return; | 3936 return; |
| 3944 | 3937 |
| 3945 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3938 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
| 3946 | 3939 |
| 3947 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3940 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
| 3948 } | 3941 } |
| 3949 | 3942 |
| 3950 } // namespace blink | 3943 } // namespace blink |
| OLD | NEW |