OLD | NEW |
---|---|
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 Loading... | |
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/ResourceLoadPriorityOptimizer.h" | |
38 #include "core/fetch/ResourceLoader.h" | 39 #include "core/fetch/ResourceLoader.h" |
39 #include "core/html/HTMLAnchorElement.h" | 40 #include "core/html/HTMLAnchorElement.h" |
40 #include "core/html/HTMLElement.h" | 41 #include "core/html/HTMLElement.h" |
41 #include "core/html/HTMLHtmlElement.h" | 42 #include "core/html/HTMLHtmlElement.h" |
42 #include "core/html/HTMLTableElement.h" | 43 #include "core/html/HTMLTableElement.h" |
43 #include "core/page/AutoscrollController.h" | 44 #include "core/page/AutoscrollController.h" |
44 #include "core/page/EventHandler.h" | 45 #include "core/page/EventHandler.h" |
45 #include "core/frame/Frame.h" | 46 #include "core/frame/Frame.h" |
46 #include "core/frame/FrameView.h" | 47 #include "core/frame/FrameView.h" |
47 #include "core/page/Page.h" | 48 #include "core/page/Page.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 #endif | 229 #endif |
229 , m_bitfields(node) | 230 , m_bitfields(node) |
230 { | 231 { |
231 #ifndef NDEBUG | 232 #ifndef NDEBUG |
232 renderObjectCounter.increment(); | 233 renderObjectCounter.increment(); |
233 #endif | 234 #endif |
234 } | 235 } |
235 | 236 |
236 RenderObject::~RenderObject() | 237 RenderObject::~RenderObject() |
237 { | 238 { |
239 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeRender Object(this); | |
ojan
2014/01/23 06:32:59
Since we only ever add RenderImages, could we just
| |
238 #ifndef NDEBUG | 240 #ifndef NDEBUG |
239 ASSERT(!m_hasAXObject); | 241 ASSERT(!m_hasAXObject); |
240 renderObjectCounter.decrement(); | 242 renderObjectCounter.decrement(); |
241 #endif | 243 #endif |
242 } | 244 } |
243 | 245 |
244 String RenderObject::debugName() const | 246 String RenderObject::debugName() const |
245 { | 247 { |
246 StringBuilder name; | 248 StringBuilder name; |
247 name.append(renderName()); | 249 name.append(renderName()); |
(...skipping 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2853 } else { | 2855 } else { |
2854 if (isRooted()) { | 2856 if (isRooted()) { |
2855 if (RenderView* renderView = view()) { | 2857 if (RenderView* renderView = view()) { |
2856 if (FrameView* frameView = renderView->frameView()) | 2858 if (FrameView* frameView = renderView->frameView()) |
2857 frameView->scheduleRelayoutOfSubtree(this); | 2859 frameView->scheduleRelayoutOfSubtree(this); |
2858 } | 2860 } |
2859 } | 2861 } |
2860 } | 2862 } |
2861 } | 2863 } |
2862 | 2864 |
2863 void RenderObject::didLayout(ResourceLoadPriorityOptimizer& priorityModifier) | |
2864 { | |
2865 for (RenderObject* child = firstChild(); child; child = child->nextSibling() ) | |
2866 child->didLayout(priorityModifier); | |
2867 } | |
2868 | |
2869 void RenderObject::didScroll(ResourceLoadPriorityOptimizer& priorityModifier) | |
2870 { | |
2871 for (RenderObject* child = firstChild(); child; child = child->nextSibling() ) | |
2872 child->didScroll(priorityModifier); | |
2873 } | |
2874 | |
2875 void RenderObject::forceLayout() | 2865 void RenderObject::forceLayout() |
2876 { | 2866 { |
2877 setSelfNeedsLayout(true); | 2867 setSelfNeedsLayout(true); |
2878 setShouldDoFullRepaintAfterLayout(true); | 2868 setShouldDoFullRepaintAfterLayout(true); |
2879 layout(); | 2869 layout(); |
2880 } | 2870 } |
2881 | 2871 |
2882 // FIXME: Does this do anything different than forceLayout given that we don't w alk | 2872 // FIXME: Does this do anything different than forceLayout given that we don't w alk |
2883 // the containing block chain. If not, we should change all callers to use force Layout. | 2873 // the containing block chain. If not, we should change all callers to use force Layout. |
2884 void RenderObject::forceChildLayout() | 2874 void RenderObject::forceChildLayout() |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3407 { | 3397 { |
3408 if (object1) { | 3398 if (object1) { |
3409 const WebCore::RenderObject* root = object1; | 3399 const WebCore::RenderObject* root = object1; |
3410 while (root->parent()) | 3400 while (root->parent()) |
3411 root = root->parent(); | 3401 root = root->parent(); |
3412 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3402 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3413 } | 3403 } |
3414 } | 3404 } |
3415 | 3405 |
3416 #endif | 3406 #endif |
OLD | NEW |