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 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2952 if (document->isActive()) | 2950 if (document->isActive()) |
2953 document->notifyResizeForViewportUnits(); | 2951 document->notifyResizeForViewportUnits(); |
2954 } | 2952 } |
2955 | 2953 |
2956 contentsResized(); | 2954 contentsResized(); |
2957 } | 2955 } |
2958 | 2956 |
2959 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien
tation) | 2957 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien
tation) |
2960 { | 2958 { |
2961 ScrollableArea::didAddScrollbar(scrollbar, orientation); | 2959 ScrollableArea::didAddScrollbar(scrollbar, orientation); |
2962 if (AXObjectCache* cache = axObjectCache()) | |
2963 cache->handleScrollbarUpdate(this); | |
2964 } | 2960 } |
2965 | 2961 |
2966 void FrameView::setTopControlsViewportAdjustment(float adjustment) | 2962 void FrameView::setTopControlsViewportAdjustment(float adjustment) |
2967 { | 2963 { |
2968 m_topControlsViewportAdjustment = adjustment; | 2964 m_topControlsViewportAdjustment = adjustment; |
2969 } | 2965 } |
2970 | 2966 |
2971 IntPoint FrameView::maximumScrollPosition() const | 2967 IntPoint FrameView::maximumScrollPosition() const |
2972 { | 2968 { |
2973 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() | 2969 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() |
(...skipping 17 matching lines...) Expand all Loading... |
2991 if (hasBar == !!m_horizontalScrollbar) | 2987 if (hasBar == !!m_horizontalScrollbar) |
2992 return; | 2988 return; |
2993 | 2989 |
2994 if (hasBar) { | 2990 if (hasBar) { |
2995 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); | 2991 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); |
2996 addChild(m_horizontalScrollbar.get()); | 2992 addChild(m_horizontalScrollbar.get()); |
2997 didAddScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); | 2993 didAddScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); |
2998 m_horizontalScrollbar->styleChanged(); | 2994 m_horizontalScrollbar->styleChanged(); |
2999 } else { | 2995 } else { |
3000 willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); | 2996 willRemoveScrollbar(m_horizontalScrollbar.get(), HorizontalScrollbar); |
3001 if (AXObjectCache* cache = axObjectCache()) | |
3002 cache->remove(m_horizontalScrollbar.get()); | |
3003 // If the scrollbar has been marked as overlapping the window resizer, | 2997 // If the scrollbar has been marked as overlapping the window resizer, |
3004 // then its removal should reduce the count. | 2998 // then its removal should reduce the count. |
3005 if (m_horizontalScrollbar->overlapsResizer()) | 2999 if (m_horizontalScrollbar->overlapsResizer()) |
3006 adjustScrollbarsAvoidingResizerCount(-1); | 3000 adjustScrollbarsAvoidingResizerCount(-1); |
3007 removeChild(m_horizontalScrollbar.get()); | 3001 removeChild(m_horizontalScrollbar.get()); |
3008 m_horizontalScrollbar->disconnectFromScrollableArea(); | 3002 m_horizontalScrollbar->disconnectFromScrollableArea(); |
3009 m_horizontalScrollbar = nullptr; | 3003 m_horizontalScrollbar = nullptr; |
3010 if (AXObjectCache* cache = axObjectCache()) | |
3011 cache->handleScrollbarUpdate(this); | |
3012 } | 3004 } |
3013 | 3005 |
3014 invalidateScrollCorner(scrollCornerRect()); | 3006 invalidateScrollCorner(scrollCornerRect()); |
3015 } | 3007 } |
3016 | 3008 |
3017 void FrameView::setHasVerticalScrollbar(bool hasBar) | 3009 void FrameView::setHasVerticalScrollbar(bool hasBar) |
3018 { | 3010 { |
3019 if (hasBar == !!m_verticalScrollbar) | 3011 if (hasBar == !!m_verticalScrollbar) |
3020 return; | 3012 return; |
3021 | 3013 |
3022 if (hasBar) { | 3014 if (hasBar) { |
3023 m_verticalScrollbar = createScrollbar(VerticalScrollbar); | 3015 m_verticalScrollbar = createScrollbar(VerticalScrollbar); |
3024 addChild(m_verticalScrollbar.get()); | 3016 addChild(m_verticalScrollbar.get()); |
3025 didAddScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); | 3017 didAddScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); |
3026 m_verticalScrollbar->styleChanged(); | 3018 m_verticalScrollbar->styleChanged(); |
3027 } else { | 3019 } else { |
3028 willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); | 3020 willRemoveScrollbar(m_verticalScrollbar.get(), VerticalScrollbar); |
3029 if (AXObjectCache* cache = axObjectCache()) | |
3030 cache->remove(m_verticalScrollbar.get()); | |
3031 // If the scrollbar has been marked as overlapping the window resizer, | 3021 // If the scrollbar has been marked as overlapping the window resizer, |
3032 // then its removal should reduce the count. | 3022 // then its removal should reduce the count. |
3033 if (m_verticalScrollbar->overlapsResizer()) | 3023 if (m_verticalScrollbar->overlapsResizer()) |
3034 adjustScrollbarsAvoidingResizerCount(-1); | 3024 adjustScrollbarsAvoidingResizerCount(-1); |
3035 removeChild(m_verticalScrollbar.get()); | 3025 removeChild(m_verticalScrollbar.get()); |
3036 m_verticalScrollbar->disconnectFromScrollableArea(); | 3026 m_verticalScrollbar->disconnectFromScrollableArea(); |
3037 m_verticalScrollbar = nullptr; | 3027 m_verticalScrollbar = nullptr; |
3038 if (AXObjectCache* cache = axObjectCache()) | |
3039 cache->handleScrollbarUpdate(this); | |
3040 } | 3028 } |
3041 | 3029 |
3042 invalidateScrollCorner(scrollCornerRect()); | 3030 invalidateScrollCorner(scrollCornerRect()); |
3043 } | 3031 } |
3044 | 3032 |
3045 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
rticalMode, | 3033 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
rticalMode, |
3046 bool horizontalLock, bool verticalLock) | 3034 bool horizontalLock, bool verticalLock) |
3047 { | 3035 { |
3048 bool needsUpdate = false; | 3036 bool needsUpdate = false; |
3049 | 3037 |
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3914 | 3902 |
3915 if (!graphicsLayer) | 3903 if (!graphicsLayer) |
3916 return; | 3904 return; |
3917 | 3905 |
3918 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3906 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
3919 | 3907 |
3920 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3908 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
3921 } | 3909 } |
3922 | 3910 |
3923 } // namespace blink | 3911 } // namespace blink |
OLD | NEW |