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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 m_visuallyNonEmptyCharacterCount = 0; | 295 m_visuallyNonEmptyCharacterCount = 0; |
296 m_visuallyNonEmptyPixelCount = 0; | 296 m_visuallyNonEmptyPixelCount = 0; |
297 m_isVisuallyNonEmpty = false; | 297 m_isVisuallyNonEmpty = false; |
298 m_firstVisuallyNonEmptyLayoutCallbackPending = true; | 298 m_firstVisuallyNonEmptyLayoutCallbackPending = true; |
299 m_maintainScrollPositionAnchor = 0; | 299 m_maintainScrollPositionAnchor = 0; |
300 m_disableRepaints = 0; | 300 m_disableRepaints = 0; |
301 } | 301 } |
302 | 302 |
303 void FrameView::removeFromAXObjectCache() | 303 void FrameView::removeFromAXObjectCache() |
304 { | 304 { |
305 if (AXObjectCache* cache = axObjectCache()) | 305 if (AXObjectCache::accessibilityEnabled() && axObjectCache()) |
306 cache->remove(this); | 306 axObjectCache()->remove(this); |
307 } | 307 } |
308 | 308 |
309 void FrameView::clearFrame() | 309 void FrameView::clearFrame() |
310 { | 310 { |
311 m_frame = 0; | 311 m_frame = 0; |
312 } | 312 } |
313 | 313 |
314 void FrameView::resetScrollbars() | 314 void FrameView::resetScrollbars() |
315 { | 315 { |
316 // Reset the document's scrollbars back to our defaults before we yield the
floor. | 316 // Reset the document's scrollbars back to our defaults before we yield the
floor. |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 | 1298 |
1299 endDeferredRepaints(); | 1299 endDeferredRepaints(); |
1300 | 1300 |
1301 #if USE(ACCELERATED_COMPOSITING) | 1301 #if USE(ACCELERATED_COMPOSITING) |
1302 updateCompositingLayersAfterLayout(); | 1302 updateCompositingLayersAfterLayout(); |
1303 #endif | 1303 #endif |
1304 | 1304 |
1305 m_layoutCount++; | 1305 m_layoutCount++; |
1306 | 1306 |
1307 #if PLATFORM(MAC) || PLATFORM(CHROMIUM) | 1307 #if PLATFORM(MAC) || PLATFORM(CHROMIUM) |
1308 if (AXObjectCache* cache = root->document()->existingAXObjectCache()) | 1308 if (AXObjectCache::accessibilityEnabled()) |
1309 cache->postNotification(root, AXObjectCache::AXLayoutComplete, true); | 1309 root->document()->axObjectCache()->postNotification(root, AXObjectCache:
:AXLayoutComplete, true); |
1310 #endif | 1310 #endif |
1311 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION) | 1311 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION) |
1312 updateAnnotatedRegions(); | 1312 updateAnnotatedRegions(); |
1313 #endif | 1313 #endif |
1314 | 1314 |
1315 ASSERT(!root->needsLayout()); | 1315 ASSERT(!root->needsLayout()); |
1316 | 1316 |
1317 updateCanBlitOnScrollRecursively(); | 1317 updateCanBlitOnScrollRecursively(); |
1318 | 1318 |
1319 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) | 1319 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2497 return; | 2497 return; |
2498 | 2498 |
2499 LayoutRect rect; | 2499 LayoutRect rect; |
2500 if (anchorNode != m_frame->document()) | 2500 if (anchorNode != m_frame->document()) |
2501 rect = anchorNode->boundingBox(); | 2501 rect = anchorNode->boundingBox(); |
2502 | 2502 |
2503 // Scroll nested layers and frames to reveal the anchor. | 2503 // Scroll nested layers and frames to reveal the anchor. |
2504 // Align to the top and to the closest side (this matches other browsers). | 2504 // Align to the top and to the closest side (this matches other browsers). |
2505 anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEd
geIfNeeded, ScrollAlignment::alignTopAlways); | 2505 anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEd
geIfNeeded, ScrollAlignment::alignTopAlways); |
2506 | 2506 |
2507 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) | 2507 if (AXObjectCache::accessibilityEnabled()) |
2508 cache->handleScrolledToAnchor(anchorNode.get()); | 2508 m_frame->document()->axObjectCache()->handleScrolledToAnchor(anchorNode.
get()); |
2509 | 2509 |
2510 // scrollRectToVisible can call into setScrollPosition(), which resets m_mai
ntainScrollPositionAnchor. | 2510 // scrollRectToVisible can call into setScrollPosition(), which resets m_mai
ntainScrollPositionAnchor. |
2511 m_maintainScrollPositionAnchor = anchorNode; | 2511 m_maintainScrollPositionAnchor = anchorNode; |
2512 } | 2512 } |
2513 | 2513 |
2514 void FrameView::updateWidget(RenderObject* object) | 2514 void FrameView::updateWidget(RenderObject* object) |
2515 { | 2515 { |
2516 ASSERT(!object->node() || object->node()->isElementNode()); | 2516 ASSERT(!object->node() || object->node()->isElementNode()); |
2517 Element* ownerElement = toElement(object->node()); | 2517 Element* ownerElement = toElement(object->node()); |
2518 // The object may have already been destroyed (thus node cleared), | 2518 // The object may have already been destroyed (thus node cleared), |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3965 void FrameView::notifyWidgetsInAllFrames(WidgetNotification notification) | 3965 void FrameView::notifyWidgetsInAllFrames(WidgetNotification notification) |
3966 { | 3966 { |
3967 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex
t(m_frame.get())) { | 3967 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex
t(m_frame.get())) { |
3968 if (RenderView* root = frame->contentRenderer()) | 3968 if (RenderView* root = frame->contentRenderer()) |
3969 root->notifyWidgets(notification); | 3969 root->notifyWidgets(notification); |
3970 } | 3970 } |
3971 } | 3971 } |
3972 | 3972 |
3973 AXObjectCache* FrameView::axObjectCache() const | 3973 AXObjectCache* FrameView::axObjectCache() const |
3974 { | 3974 { |
3975 if (frame() && frame()->document()) | 3975 if (frame() && frame()->document() && frame()->document()->axObjectCacheExis
ts()) |
3976 return frame()->document()->existingAXObjectCache(); | 3976 return frame()->document()->axObjectCache(); |
3977 return 0; | 3977 return 0; |
3978 } | 3978 } |
3979 | 3979 |
3980 void FrameView::setScrollingPerformanceLoggingEnabled(bool flag) | 3980 void FrameView::setScrollingPerformanceLoggingEnabled(bool flag) |
3981 { | 3981 { |
3982 #if USE(ACCELERATED_COMPOSITING) | 3982 #if USE(ACCELERATED_COMPOSITING) |
3983 if (TiledBacking* tiledBacking = this->tiledBacking()) | 3983 if (TiledBacking* tiledBacking = this->tiledBacking()) |
3984 tiledBacking->setScrollingPerformanceLoggingEnabled(flag); | 3984 tiledBacking->setScrollingPerformanceLoggingEnabled(flag); |
3985 #else | 3985 #else |
3986 UNUSED_PARAM(flag); | 3986 UNUSED_PARAM(flag); |
3987 #endif | 3987 #endif |
3988 } | 3988 } |
3989 | 3989 |
3990 } // namespace WebCore | 3990 } // namespace WebCore |
OLD | NEW |