| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 m_visuallyNonEmptyCharacterCount = 0; | 214 m_visuallyNonEmptyCharacterCount = 0; |
| 215 m_visuallyNonEmptyPixelCount = 0; | 215 m_visuallyNonEmptyPixelCount = 0; |
| 216 m_isVisuallyNonEmpty = false; | 216 m_isVisuallyNonEmpty = false; |
| 217 clearScrollAnchor(); | 217 clearScrollAnchor(); |
| 218 m_viewportConstrainedObjects.clear(); | 218 m_viewportConstrainedObjects.clear(); |
| 219 m_layoutSubtreeRootList.clear(); | 219 m_layoutSubtreeRootList.clear(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void FrameView::removeFromAXObjectCache() | 222 void FrameView::removeFromAXObjectCache() |
| 223 { | 223 { |
| 224 if (AXObjectCache* cache = axObjectCache()) { | 224 if (AXObjectCache* cache = axObjectCache()) |
| 225 cache->remove(this); | |
| 226 cache->childrenChanged(m_frame->pagePopupOwner()); | 225 cache->childrenChanged(m_frame->pagePopupOwner()); |
| 227 } | |
| 228 } | 226 } |
| 229 | 227 |
| 230 void FrameView::init() | 228 void FrameView::init() |
| 231 { | 229 { |
| 232 reset(); | 230 reset(); |
| 233 | 231 |
| 234 m_size = LayoutSize(); | 232 m_size = LayoutSize(); |
| 235 | 233 |
| 236 // Propagate the marginwidth/height and scrolling modes to the view. | 234 // Propagate the marginwidth/height and scrolling modes to the view. |
| 237 // FIXME: Do we need to do this for OOPI? | 235 // FIXME: Do we need to do this for OOPI? |
| (...skipping 2725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2963 if (document->isActive()) | 2961 if (document->isActive()) |
| 2964 document->notifyResizeForViewportUnits(); | 2962 document->notifyResizeForViewportUnits(); |
| 2965 } | 2963 } |
| 2966 | 2964 |
| 2967 contentsResized(); | 2965 contentsResized(); |
| 2968 } | 2966 } |
| 2969 | 2967 |
| 2970 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien
tation) | 2968 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien
tation) |
| 2971 { | 2969 { |
| 2972 ScrollableArea::didAddScrollbar(scrollbar, orientation); | 2970 ScrollableArea::didAddScrollbar(scrollbar, orientation); |
| 2973 if (AXObjectCache* cache = axObjectCache()) | |
| 2974 cache->handleScrollbarUpdate(this); | |
| 2975 } | 2971 } |
| 2976 | 2972 |
| 2977 void FrameView::setTopControlsViewportAdjustment(float adjustment) | 2973 void FrameView::setTopControlsViewportAdjustment(float adjustment) |
| 2978 { | 2974 { |
| 2979 m_topControlsViewportAdjustment = adjustment; | 2975 m_topControlsViewportAdjustment = adjustment; |
| 2980 } | 2976 } |
| 2981 | 2977 |
| 2982 IntPoint FrameView::maximumScrollPosition() const | 2978 IntPoint FrameView::maximumScrollPosition() const |
| 2983 { | 2979 { |
| 2984 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() | 2980 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3002 if (hasBar == !!m_horizontalScrollbar) | 2998 if (hasBar == !!m_horizontalScrollbar) |
| 3003 return; | 2999 return; |
| 3004 | 3000 |
| 3005 if (hasBar) { | 3001 if (hasBar) { |
| 3006 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); | 3002 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); |
| 3007 addChild(m_horizontalScrollbar.get()); | 3003 addChild(m_horizontalScrollbar.get()); |
| 3008 didAddScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); | 3004 didAddScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); |
| 3009 m_horizontalScrollbar->styleChanged(); | 3005 m_horizontalScrollbar->styleChanged(); |
| 3010 } else { | 3006 } else { |
| 3011 willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); | 3007 willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); |
| 3012 if (AXObjectCache* cache = axObjectCache()) | |
| 3013 cache->remove(m_horizontalScrollbar.get()); | |
| 3014 // If the scrollbar has been marked as overlapping the window resizer, | 3008 // If the scrollbar has been marked as overlapping the window resizer, |
| 3015 // then its removal should reduce the count. | 3009 // then its removal should reduce the count. |
| 3016 if (m_horizontalScrollbar->overlapsResizer()) | 3010 if (m_horizontalScrollbar->overlapsResizer()) |
| 3017 adjustScrollbarsAvoidingResizerCount(-1); | 3011 adjustScrollbarsAvoidingResizerCount(-1); |
| 3018 removeChild(m_horizontalScrollbar.get()); | 3012 removeChild(m_horizontalScrollbar.get()); |
| 3019 m_horizontalScrollbar->disconnectFromScrollableArea(); | 3013 m_horizontalScrollbar->disconnectFromScrollableArea(); |
| 3020 m_horizontalScrollbar = nullptr; | 3014 m_horizontalScrollbar = nullptr; |
| 3021 if (AXObjectCache* cache = axObjectCache()) | |
| 3022 cache->handleScrollbarUpdate(this); | |
| 3023 } | 3015 } |
| 3024 | 3016 |
| 3025 invalidateScrollCorner(scrollCornerRect()); | 3017 invalidateScrollCorner(scrollCornerRect()); |
| 3026 } | 3018 } |
| 3027 | 3019 |
| 3028 void FrameView::setHasVerticalScrollbar(bool hasBar) | 3020 void FrameView::setHasVerticalScrollbar(bool hasBar) |
| 3029 { | 3021 { |
| 3030 if (hasBar == !!m_verticalScrollbar) | 3022 if (hasBar == !!m_verticalScrollbar) |
| 3031 return; | 3023 return; |
| 3032 | 3024 |
| 3033 if (hasBar) { | 3025 if (hasBar) { |
| 3034 m_verticalScrollbar = createScrollbar(VerticalScrollbar); | 3026 m_verticalScrollbar = createScrollbar(VerticalScrollbar); |
| 3035 addChild(m_verticalScrollbar.get()); | 3027 addChild(m_verticalScrollbar.get()); |
| 3036 didAddScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); | 3028 didAddScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); |
| 3037 m_verticalScrollbar->styleChanged(); | 3029 m_verticalScrollbar->styleChanged(); |
| 3038 } else { | 3030 } else { |
| 3039 willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); | 3031 willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); |
| 3040 if (AXObjectCache* cache = axObjectCache()) | |
| 3041 cache->remove(m_verticalScrollbar.get()); | |
| 3042 // If the scrollbar has been marked as overlapping the window resizer, | 3032 // If the scrollbar has been marked as overlapping the window resizer, |
| 3043 // then its removal should reduce the count. | 3033 // then its removal should reduce the count. |
| 3044 if (m_verticalScrollbar->overlapsResizer()) | 3034 if (m_verticalScrollbar->overlapsResizer()) |
| 3045 adjustScrollbarsAvoidingResizerCount(-1); | 3035 adjustScrollbarsAvoidingResizerCount(-1); |
| 3046 removeChild(m_verticalScrollbar.get()); | 3036 removeChild(m_verticalScrollbar.get()); |
| 3047 m_verticalScrollbar->disconnectFromScrollableArea(); | 3037 m_verticalScrollbar->disconnectFromScrollableArea(); |
| 3048 m_verticalScrollbar = nullptr; | 3038 m_verticalScrollbar = nullptr; |
| 3049 if (AXObjectCache* cache = axObjectCache()) | |
| 3050 cache->handleScrollbarUpdate(this); | |
| 3051 } | 3039 } |
| 3052 | 3040 |
| 3053 invalidateScrollCorner(scrollCornerRect()); | 3041 invalidateScrollCorner(scrollCornerRect()); |
| 3054 } | 3042 } |
| 3055 | 3043 |
| 3056 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
rticalMode, | 3044 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
rticalMode, |
| 3057 bool horizontalLock, bool verticalLock) | 3045 bool horizontalLock, bool verticalLock) |
| 3058 { | 3046 { |
| 3059 bool needsUpdate = false; | 3047 bool needsUpdate = false; |
| 3060 | 3048 |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3925 | 3913 |
| 3926 if (!graphicsLayer) | 3914 if (!graphicsLayer) |
| 3927 return; | 3915 return; |
| 3928 | 3916 |
| 3929 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3917 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
| 3930 | 3918 |
| 3931 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3919 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
| 3932 } | 3920 } |
| 3933 | 3921 |
| 3934 } // namespace blink | 3922 } // namespace blink |
| OLD | NEW |