| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { | 238 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { |
| 239 if (!child->isLocalFrame()) | 239 if (!child->isLocalFrame()) |
| 240 continue; | 240 continue; |
| 241 if (FrameView* childView = toLocalFrame(child)->view()) | 241 if (FrameView* childView = toLocalFrame(child)->view()) |
| 242 childView->forAllNonThrottledFrameViews(function); | 242 childView->forAllNonThrottledFrameViews(function); |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 void FrameView::removeFromAXObjectCache() | 246 void FrameView::removeFromAXObjectCache() |
| 247 { | 247 { |
| 248 if (AXObjectCache* cache = axObjectCache()) { | 248 if (AXObjectCache* cache = axObjectCache()) |
| 249 cache->remove(this); | |
| 250 cache->childrenChanged(m_frame->pagePopupOwner()); | 249 cache->childrenChanged(m_frame->pagePopupOwner()); |
| 251 } | |
| 252 } | 250 } |
| 253 | 251 |
| 254 void FrameView::init() | 252 void FrameView::init() |
| 255 { | 253 { |
| 256 reset(); | 254 reset(); |
| 257 | 255 |
| 258 m_size = LayoutSize(); | 256 m_size = LayoutSize(); |
| 259 | 257 |
| 260 // Propagate the marginwidth/height and scrolling modes to the view. | 258 // Propagate the marginwidth/height and scrolling modes to the view. |
| 261 if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlways
Off) | 259 if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlways
Off) |
| (...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2992 if (document->isActive()) | 2990 if (document->isActive()) |
| 2993 document->notifyResizeForViewportUnits(); | 2991 document->notifyResizeForViewportUnits(); |
| 2994 } | 2992 } |
| 2995 | 2993 |
| 2996 contentsResized(); | 2994 contentsResized(); |
| 2997 } | 2995 } |
| 2998 | 2996 |
| 2999 void FrameView::didAddScrollbar(Scrollbar& scrollbar, ScrollbarOrientation orien
tation) | 2997 void FrameView::didAddScrollbar(Scrollbar& scrollbar, ScrollbarOrientation orien
tation) |
| 3000 { | 2998 { |
| 3001 ScrollableArea::didAddScrollbar(scrollbar, orientation); | 2999 ScrollableArea::didAddScrollbar(scrollbar, orientation); |
| 3002 if (AXObjectCache* cache = axObjectCache()) | |
| 3003 cache->handleScrollbarUpdate(this); | |
| 3004 } | 3000 } |
| 3005 | 3001 |
| 3006 void FrameView::setTopControlsViewportAdjustment(float adjustment) | 3002 void FrameView::setTopControlsViewportAdjustment(float adjustment) |
| 3007 { | 3003 { |
| 3008 m_topControlsViewportAdjustment = adjustment; | 3004 m_topControlsViewportAdjustment = adjustment; |
| 3009 } | 3005 } |
| 3010 | 3006 |
| 3011 IntPoint FrameView::maximumScrollPosition() const | 3007 IntPoint FrameView::maximumScrollPosition() const |
| 3012 { | 3008 { |
| 3013 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() | 3009 // Make the same calculation as in CC's LayerImpl::MaxScrollOffset() |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3031 if (hasBar == !!m_horizontalScrollbar) | 3027 if (hasBar == !!m_horizontalScrollbar) |
| 3032 return; | 3028 return; |
| 3033 | 3029 |
| 3034 if (hasBar) { | 3030 if (hasBar) { |
| 3035 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); | 3031 m_horizontalScrollbar = createScrollbar(HorizontalScrollbar); |
| 3036 addChild(m_horizontalScrollbar.get()); | 3032 addChild(m_horizontalScrollbar.get()); |
| 3037 didAddScrollbar(*m_horizontalScrollbar, HorizontalScrollbar); | 3033 didAddScrollbar(*m_horizontalScrollbar, HorizontalScrollbar); |
| 3038 m_horizontalScrollbar->styleChanged(); | 3034 m_horizontalScrollbar->styleChanged(); |
| 3039 } else { | 3035 } else { |
| 3040 willRemoveScrollbar(*m_horizontalScrollbar, HorizontalScrollbar); | 3036 willRemoveScrollbar(*m_horizontalScrollbar, HorizontalScrollbar); |
| 3041 if (AXObjectCache* cache = axObjectCache()) | |
| 3042 cache->remove(m_horizontalScrollbar.get()); | |
| 3043 // If the scrollbar has been marked as overlapping the window resizer, | 3037 // If the scrollbar has been marked as overlapping the window resizer, |
| 3044 // then its removal should reduce the count. | 3038 // then its removal should reduce the count. |
| 3045 if (m_horizontalScrollbar->overlapsResizer()) | 3039 if (m_horizontalScrollbar->overlapsResizer()) |
| 3046 adjustScrollbarsAvoidingResizerCount(-1); | 3040 adjustScrollbarsAvoidingResizerCount(-1); |
| 3047 removeChild(m_horizontalScrollbar.get()); | 3041 removeChild(m_horizontalScrollbar.get()); |
| 3048 m_horizontalScrollbar->disconnectFromScrollableArea(); | 3042 m_horizontalScrollbar->disconnectFromScrollableArea(); |
| 3049 m_horizontalScrollbar = nullptr; | 3043 m_horizontalScrollbar = nullptr; |
| 3050 if (AXObjectCache* cache = axObjectCache()) | |
| 3051 cache->handleScrollbarUpdate(this); | |
| 3052 } | 3044 } |
| 3053 | 3045 |
| 3054 setScrollCornerNeedsPaintInvalidation(); | 3046 setScrollCornerNeedsPaintInvalidation(); |
| 3055 } | 3047 } |
| 3056 | 3048 |
| 3057 void FrameView::setHasVerticalScrollbar(bool hasBar) | 3049 void FrameView::setHasVerticalScrollbar(bool hasBar) |
| 3058 { | 3050 { |
| 3059 if (hasBar == !!m_verticalScrollbar) | 3051 if (hasBar == !!m_verticalScrollbar) |
| 3060 return; | 3052 return; |
| 3061 | 3053 |
| 3062 if (hasBar) { | 3054 if (hasBar) { |
| 3063 m_verticalScrollbar = createScrollbar(VerticalScrollbar); | 3055 m_verticalScrollbar = createScrollbar(VerticalScrollbar); |
| 3064 addChild(m_verticalScrollbar.get()); | 3056 addChild(m_verticalScrollbar.get()); |
| 3065 didAddScrollbar(*m_verticalScrollbar, VerticalScrollbar); | 3057 didAddScrollbar(*m_verticalScrollbar, VerticalScrollbar); |
| 3066 m_verticalScrollbar->styleChanged(); | 3058 m_verticalScrollbar->styleChanged(); |
| 3067 } else { | 3059 } else { |
| 3068 willRemoveScrollbar(*m_verticalScrollbar, VerticalScrollbar); | 3060 willRemoveScrollbar(*m_verticalScrollbar, VerticalScrollbar); |
| 3069 if (AXObjectCache* cache = axObjectCache()) | |
| 3070 cache->remove(m_verticalScrollbar.get()); | |
| 3071 // If the scrollbar has been marked as overlapping the window resizer, | 3061 // If the scrollbar has been marked as overlapping the window resizer, |
| 3072 // then its removal should reduce the count. | 3062 // then its removal should reduce the count. |
| 3073 if (m_verticalScrollbar->overlapsResizer()) | 3063 if (m_verticalScrollbar->overlapsResizer()) |
| 3074 adjustScrollbarsAvoidingResizerCount(-1); | 3064 adjustScrollbarsAvoidingResizerCount(-1); |
| 3075 removeChild(m_verticalScrollbar.get()); | 3065 removeChild(m_verticalScrollbar.get()); |
| 3076 m_verticalScrollbar->disconnectFromScrollableArea(); | 3066 m_verticalScrollbar->disconnectFromScrollableArea(); |
| 3077 m_verticalScrollbar = nullptr; | 3067 m_verticalScrollbar = nullptr; |
| 3078 if (AXObjectCache* cache = axObjectCache()) | |
| 3079 cache->handleScrollbarUpdate(this); | |
| 3080 } | 3068 } |
| 3081 | 3069 |
| 3082 setScrollCornerNeedsPaintInvalidation(); | 3070 setScrollCornerNeedsPaintInvalidation(); |
| 3083 } | 3071 } |
| 3084 | 3072 |
| 3085 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
rticalMode, | 3073 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
rticalMode, |
| 3086 bool horizontalLock, bool verticalLock) | 3074 bool horizontalLock, bool verticalLock) |
| 3087 { | 3075 { |
| 3088 bool needsUpdate = false; | 3076 bool needsUpdate = false; |
| 3089 | 3077 |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4032 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4020 return m_hiddenForThrottling && m_crossOriginForThrottling; |
| 4033 } | 4021 } |
| 4034 | 4022 |
| 4035 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4023 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4036 { | 4024 { |
| 4037 ASSERT(layoutView()); | 4025 ASSERT(layoutView()); |
| 4038 return *layoutView(); | 4026 return *layoutView(); |
| 4039 } | 4027 } |
| 4040 | 4028 |
| 4041 } // namespace blink | 4029 } // namespace blink |
| OLD | NEW |