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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 109153003: Raise the loading priority of in-viewport images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes from review. Created 7 years 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
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 17 matching lines...) Expand all
28 #include "core/rendering/RenderObject.h" 28 #include "core/rendering/RenderObject.h"
29 29
30 #include "HTMLNames.h" 30 #include "HTMLNames.h"
31 #include "RuntimeEnabledFeatures.h" 31 #include "RuntimeEnabledFeatures.h"
32 #include "core/accessibility/AXObjectCache.h" 32 #include "core/accessibility/AXObjectCache.h"
33 #include "core/animation/ActiveAnimations.h" 33 #include "core/animation/ActiveAnimations.h"
34 #include "core/css/resolver/StyleResolver.h" 34 #include "core/css/resolver/StyleResolver.h"
35 #include "core/editing/EditingBoundary.h" 35 #include "core/editing/EditingBoundary.h"
36 #include "core/editing/FrameSelection.h" 36 #include "core/editing/FrameSelection.h"
37 #include "core/editing/htmlediting.h" 37 #include "core/editing/htmlediting.h"
38 #include "core/fetch/ResourceLoader.h"
38 #include "core/html/HTMLAnchorElement.h" 39 #include "core/html/HTMLAnchorElement.h"
39 #include "core/html/HTMLElement.h" 40 #include "core/html/HTMLElement.h"
40 #include "core/html/HTMLHtmlElement.h" 41 #include "core/html/HTMLHtmlElement.h"
41 #include "core/html/HTMLTableElement.h" 42 #include "core/html/HTMLTableElement.h"
42 #include "core/page/AutoscrollController.h" 43 #include "core/page/AutoscrollController.h"
43 #include "core/page/EventHandler.h" 44 #include "core/page/EventHandler.h"
44 #include "core/frame/Frame.h" 45 #include "core/frame/Frame.h"
45 #include "core/frame/FrameView.h" 46 #include "core/frame/FrameView.h"
46 #include "core/page/Page.h" 47 #include "core/page/Page.h"
47 #include "core/page/Settings.h" 48 #include "core/page/Settings.h"
(...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2815 LayoutRectRecorder recorder(*this); 2816 LayoutRectRecorder recorder(*this);
2816 RenderObject* child = firstChild(); 2817 RenderObject* child = firstChild();
2817 while (child) { 2818 while (child) {
2818 child->layoutIfNeeded(); 2819 child->layoutIfNeeded();
2819 ASSERT(!child->needsLayout()); 2820 ASSERT(!child->needsLayout());
2820 child = child->nextSibling(); 2821 child = child->nextSibling();
2821 } 2822 }
2822 clearNeedsLayout(); 2823 clearNeedsLayout();
2823 } 2824 }
2824 2825
2826 void RenderObject::didLayout(ResourceLoadPriorityOptimizer& priorityModifier)
2827 {
2828 for (RenderObject* child = firstChild(); child; child = child->nextSibling() )
2829 child->didLayout(priorityModifier);
2830 }
2831
2832 void RenderObject::didScroll(ResourceLoadPriorityOptimizer& priorityModifier)
2833 {
2834 for (RenderObject* child = firstChild(); child; child = child->nextSibling() )
2835 child->didScroll(priorityModifier);
2836 }
2837
2825 void RenderObject::forceLayout() 2838 void RenderObject::forceLayout()
2826 { 2839 {
2827 setSelfNeedsLayout(true); 2840 setSelfNeedsLayout(true);
2828 layout(); 2841 layout();
2829 } 2842 }
2830 2843
2831 // FIXME: Does this do anything different than forceLayout given that we don't w alk 2844 // FIXME: Does this do anything different than forceLayout given that we don't w alk
2832 // the containing block chain. If not, we should change all callers to use force Layout. 2845 // the containing block chain. If not, we should change all callers to use force Layout.
2833 void RenderObject::forceChildLayout() 2846 void RenderObject::forceChildLayout()
2834 { 2847 {
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 { 3369 {
3357 if (object1) { 3370 if (object1) {
3358 const WebCore::RenderObject* root = object1; 3371 const WebCore::RenderObject* root = object1;
3359 while (root->parent()) 3372 while (root->parent())
3360 root = root->parent(); 3373 root = root->parent();
3361 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3374 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3362 } 3375 }
3363 } 3376 }
3364 3377
3365 #endif 3378 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698