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

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
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() ) {
eseidel 2013/12/10 17:15:30 nit: I wouldn't bother with the {} but that's more
shatch 2013/12/10 18:56:19 Done.
2829 child->didLayout(priorityModifier);
2830 }
2831 }
2832
2833 void RenderObject::didScroll(ResourceLoadPriorityOptimizer& priorityModifier)
2834 {
2835 for (RenderObject* child = firstChild(); child; child = child->nextSibling() ) {
2836 child->didScroll(priorityModifier);
2837 }
2838 }
2839
2825 void RenderObject::forceLayout() 2840 void RenderObject::forceLayout()
2826 { 2841 {
2827 setSelfNeedsLayout(true); 2842 setSelfNeedsLayout(true);
2828 layout(); 2843 layout();
2829 } 2844 }
2830 2845
2831 // FIXME: Does this do anything different than forceLayout given that we don't w alk 2846 // 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. 2847 // the containing block chain. If not, we should change all callers to use force Layout.
2833 void RenderObject::forceChildLayout() 2848 void RenderObject::forceChildLayout()
2834 { 2849 {
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 { 3371 {
3357 if (object1) { 3372 if (object1) {
3358 const WebCore::RenderObject* root = object1; 3373 const WebCore::RenderObject* root = object1;
3359 while (root->parent()) 3374 while (root->parent())
3360 root = root->parent(); 3375 root = root->parent();
3361 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3376 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3362 } 3377 }
3363 } 3378 }
3364 3379
3365 #endif 3380 #endif
OLDNEW
« Source/core/rendering/RenderImage.cpp ('K') | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698