Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(961)

Side by Side Diff: Source/core/page/FrameView.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/Frame.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 } 1070 }
1071 1071
1072 layer->updateLayerPositionsAfterLayout(renderView()->layer(), updateLayerPos itionFlags(layer, inSubtreeLayout, m_doFullRepaint)); 1072 layer->updateLayerPositionsAfterLayout(renderView()->layer(), updateLayerPos itionFlags(layer, inSubtreeLayout, m_doFullRepaint));
1073 1073
1074 endDeferredRepaints(); 1074 endDeferredRepaints();
1075 1075
1076 updateCompositingLayersAfterLayout(); 1076 updateCompositingLayersAfterLayout();
1077 1077
1078 m_layoutCount++; 1078 m_layoutCount++;
1079 1079
1080 if (AXObjectCache* cache = rootForThisLayout->document()->existingAXObjectCa che()) 1080 if (AXObjectCache* cache = rootForThisLayout->document().existingAXObjectCac he())
1081 cache->postNotification(rootForThisLayout, AXObjectCache::AXLayoutComple te, true); 1081 cache->postNotification(rootForThisLayout, AXObjectCache::AXLayoutComple te, true);
1082 updateAnnotatedRegions(); 1082 updateAnnotatedRegions();
1083 1083
1084 ASSERT(!rootForThisLayout->needsLayout()); 1084 ASSERT(!rootForThisLayout->needsLayout());
1085 1085
1086 updateCanBlitOnScrollRecursively(); 1086 updateCanBlitOnScrollRecursively();
1087 1087
1088 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER)) 1088 if (document->hasListenerType(Document::OVERFLOWCHANGED_LISTENER))
1089 updateOverflowStatus(layoutWidth() < contentsWidth(), layoutHeight() < c ontentsHeight()); 1089 updateOverflowStatus(layoutWidth() < contentsWidth(), layoutHeight() < c ontentsHeight());
1090 1090
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 if (paintsEntireContents()) 2418 if (paintsEntireContents())
2419 return IntRect(IntPoint(), contentsSize()); 2419 return IntRect(IntPoint(), contentsSize());
2420 2420
2421 // Set our clip rect to be our contents. 2421 // Set our clip rect to be our contents.
2422 IntRect clipRect = contentsToWindow(visibleContentRect(clipToContents ? Excl udeScrollbars : IncludeScrollbars)); 2422 IntRect clipRect = contentsToWindow(visibleContentRect(clipToContents ? Excl udeScrollbars : IncludeScrollbars));
2423 if (!m_frame || !m_frame->ownerElement()) 2423 if (!m_frame || !m_frame->ownerElement())
2424 return clipRect; 2424 return clipRect;
2425 2425
2426 // Take our owner element and get its clip rect. 2426 // Take our owner element and get its clip rect.
2427 HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement(); 2427 HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement();
2428 FrameView* parentView = ownerElement->document()->view(); 2428 FrameView* parentView = ownerElement->document().view();
2429 if (parentView) 2429 if (parentView)
2430 clipRect.intersect(parentView->windowClipRectForFrameOwner(ownerElement, true)); 2430 clipRect.intersect(parentView->windowClipRectForFrameOwner(ownerElement, true));
2431 return clipRect; 2431 return clipRect;
2432 } 2432 }
2433 2433
2434 IntRect FrameView::windowClipRectForFrameOwner(const HTMLFrameOwnerElement* owne rElement, bool clipToLayerContents) const 2434 IntRect FrameView::windowClipRectForFrameOwner(const HTMLFrameOwnerElement* owne rElement, bool clipToLayerContents) const
2435 { 2435 {
2436 // The renderer can sometimes be null when style="display:none" interacts 2436 // The renderer can sometimes be null when style="display:none" interacts
2437 // with external content and plugins. 2437 // with external content and plugins.
2438 if (!ownerElement->renderer()) 2438 if (!ownerElement->renderer())
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
3359 } 3359 }
3360 3360
3361 AXObjectCache* FrameView::axObjectCache() const 3361 AXObjectCache* FrameView::axObjectCache() const
3362 { 3362 {
3363 if (frame() && frame()->document()) 3363 if (frame() && frame()->document())
3364 return frame()->document()->existingAXObjectCache(); 3364 return frame()->document()->existingAXObjectCache();
3365 return 0; 3365 return 0;
3366 } 3366 }
3367 3367
3368 } // namespace WebCore 3368 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Frame.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698