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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "RenderInline.h" | 49 #include "RenderInline.h" |
50 #include "RenderLayer.h" | 50 #include "RenderLayer.h" |
51 #include "RenderLayerCompositor.h" | 51 #include "RenderLayerCompositor.h" |
52 #include "RenderPart.h" | 52 #include "RenderPart.h" |
53 #include "RenderRegion.h" | 53 #include "RenderRegion.h" |
54 #include "RenderTableCell.h" | 54 #include "RenderTableCell.h" |
55 #include "RenderTheme.h" | 55 #include "RenderTheme.h" |
56 #include "RenderView.h" | 56 #include "RenderView.h" |
57 #include "ScrollbarTheme.h" | 57 #include "ScrollbarTheme.h" |
58 #include "TransformState.h" | 58 #include "TransformState.h" |
59 #include "WebCoreMemoryInstrumentation.h" | |
60 #include <algorithm> | 59 #include <algorithm> |
61 #include <math.h> | 60 #include <math.h> |
62 #include <wtf/MemoryInstrumentationHashMap.h> | |
63 | 61 |
64 using namespace std; | 62 using namespace std; |
65 | 63 |
66 namespace WTF { | |
67 template<> struct SequenceMemoryInstrumentationTraits<WebCore::LayoutUnit> { | |
68 template <typename I> static void reportMemoryUsage(I, I, MemoryClassInfo&)
{ } | |
69 }; | |
70 } | |
71 | |
72 namespace WebCore { | 64 namespace WebCore { |
73 | 65 |
74 using namespace HTMLNames; | 66 using namespace HTMLNames; |
75 | 67 |
76 // Used by flexible boxes when flexing this element and by table cells. | 68 // Used by flexible boxes when flexing this element and by table cells. |
77 typedef WTF::HashMap<const RenderBox*, LayoutUnit> OverrideSizeMap; | 69 typedef WTF::HashMap<const RenderBox*, LayoutUnit> OverrideSizeMap; |
78 static OverrideSizeMap* gOverrideHeightMap = 0; | 70 static OverrideSizeMap* gOverrideHeightMap = 0; |
79 static OverrideSizeMap* gOverrideWidthMap = 0; | 71 static OverrideSizeMap* gOverrideWidthMap = 0; |
80 | 72 |
81 // Used by grid elements to properly size their grid items. | 73 // Used by grid elements to properly size their grid items. |
(...skipping 4488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4570 beforeChild = boxToSplit; | 4562 beforeChild = boxToSplit; |
4571 } | 4563 } |
4572 | 4564 |
4573 if (didSplitParentAnonymousBoxes) | 4565 if (didSplitParentAnonymousBoxes) |
4574 markBoxForRelayoutAfterSplit(this); | 4566 markBoxForRelayoutAfterSplit(this); |
4575 | 4567 |
4576 ASSERT(beforeChild->parent() == this); | 4568 ASSERT(beforeChild->parent() == this); |
4577 return beforeChild; | 4569 return beforeChild; |
4578 } | 4570 } |
4579 | 4571 |
4580 void RenderBox::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | |
4581 { | |
4582 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; | |
4583 RenderBoxModelObject::reportMemoryUsage(memoryObjectInfo); | |
4584 info.addWeakPointer(m_inlineBoxWrapper); | |
4585 info.addMember(m_overflow, "overflow"); | |
4586 } | |
4587 | |
4588 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst
rumentation) | |
4589 { | |
4590 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes:
:RenderingStructures); | |
4591 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes::
RenderingStructures); | |
4592 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa
p, WebCoreMemoryTypes::RenderingStructures); | |
4593 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap
, WebCoreMemoryTypes::RenderingStructures); | |
4594 } | |
4595 | |
4596 } // namespace WebCore | 4572 } // namespace WebCore |
OLD | NEW |