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

Side by Side Diff: Source/core/page/Page.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/FrameView.cpp ('k') | Source/core/page/PointerLockController.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) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 623
624 return relevantViewRect; 624 return relevantViewRect;
625 } 625 }
626 626
627 void Page::addRelevantRepaintedObject(RenderObject* object, const LayoutRect& ob jectPaintRect) 627 void Page::addRelevantRepaintedObject(RenderObject* object, const LayoutRect& ob jectPaintRect)
628 { 628 {
629 if (!isCountingRelevantRepaintedObjects()) 629 if (!isCountingRelevantRepaintedObjects())
630 return; 630 return;
631 631
632 // Objects inside sub-frames are not considered to be relevant. 632 // Objects inside sub-frames are not considered to be relevant.
633 if (object->document()->frame() != mainFrame()) 633 if (object->document().frame() != mainFrame())
634 return; 634 return;
635 635
636 RenderView* view = object->view(); 636 RenderView* view = object->view();
637 if (!view) 637 if (!view)
638 return; 638 return;
639 639
640 LayoutRect relevantRect = relevantViewRect(view); 640 LayoutRect relevantRect = relevantViewRect(view);
641 641
642 // The objects are only relevant if they are being painted within the viewRe ct(). 642 // The objects are only relevant if they are being painted within the viewRe ct().
643 if (!objectPaintRect.intersects(pixelSnappedIntRect(relevantRect))) 643 if (!objectPaintRect.intersects(pixelSnappedIntRect(relevantRect)))
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 , dragClient(0) 748 , dragClient(0)
749 , inspectorClient(0) 749 , inspectorClient(0)
750 { 750 {
751 } 751 }
752 752
753 Page::PageClients::~PageClients() 753 Page::PageClients::~PageClients()
754 { 754 {
755 } 755 }
756 756
757 } // namespace WebCore 757 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/FrameView.cpp ('k') | Source/core/page/PointerLockController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698