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

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

Issue 86533002: Raise the loading priority of in-viewport images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add priority check. 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 2784 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 LayoutRectRecorder recorder(*this); 2833 LayoutRectRecorder recorder(*this);
2833 RenderObject* child = firstChild(); 2834 RenderObject* child = firstChild();
2834 while (child) { 2835 while (child) {
2835 child->layoutIfNeeded(); 2836 child->layoutIfNeeded();
2836 ASSERT(!child->needsLayout()); 2837 ASSERT(!child->needsLayout());
2837 child = child->nextSibling(); 2838 child = child->nextSibling();
2838 } 2839 }
2839 clearNeedsLayout(); 2840 clearNeedsLayout();
2840 } 2841 }
2841 2842
2843 void RenderObject::didLayout(ResourceLoadPriorityOptimizer& priorityModifier)
2844 {
2845 RenderObject* child = firstChild();
2846 while (child) {
eseidel 2013/11/27 20:58:35 for (RenderObject* child = firstChild(); child; ch
shatch 2013/12/02 22:32:46 Done.
2847 child->didLayout(priorityModifier);
2848 child = child->nextSibling();
2849 }
2850 }
2851
2852 void RenderObject::didScroll(ResourceLoadPriorityOptimizer& priorityModifier)
2853 {
2854 RenderObject* child = firstChild();
2855 while (child) {
2856 child->didScroll(priorityModifier);
2857 child = child->nextSibling();
2858 }
2859 }
2860
2842 void RenderObject::forceLayout() 2861 void RenderObject::forceLayout()
2843 { 2862 {
2844 setSelfNeedsLayout(true); 2863 setSelfNeedsLayout(true);
2845 layout(); 2864 layout();
2846 } 2865 }
2847 2866
2848 // FIXME: Does this do anything different than forceLayout given that we don't w alk 2867 // FIXME: Does this do anything different than forceLayout given that we don't w alk
2849 // the containing block chain. If not, we should change all callers to use force Layout. 2868 // the containing block chain. If not, we should change all callers to use force Layout.
2850 void RenderObject::forceChildLayout() 2869 void RenderObject::forceChildLayout()
2851 { 2870 {
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
3367 { 3386 {
3368 if (object1) { 3387 if (object1) {
3369 const WebCore::RenderObject* root = object1; 3388 const WebCore::RenderObject* root = object1;
3370 while (root->parent()) 3389 while (root->parent())
3371 root = root->parent(); 3390 root = root->parent();
3372 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3391 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3373 } 3392 }
3374 } 3393 }
3375 3394
3376 #endif 3395 #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