OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "core/rendering/SubtreeLayoutScope.h" | 32 #include "core/rendering/SubtreeLayoutScope.h" |
33 | 33 |
34 #include "core/page/FrameView.h" | 34 #include "core/page/FrameView.h" |
35 #include "core/rendering/RenderObject.h" | 35 #include "core/rendering/RenderObject.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 SubtreeLayoutScope::SubtreeLayoutScope(RenderObject* root) | 39 SubtreeLayoutScope::SubtreeLayoutScope(RenderObject* root) |
40 : m_root(root) | 40 : m_root(root) |
41 { | 41 { |
42 RELEASE_ASSERT(m_root->document()->view()->isInLayout()); | 42 RELEASE_ASSERT(m_root->document().view()->isInLayout()); |
43 } | 43 } |
44 | 44 |
45 SubtreeLayoutScope::~SubtreeLayoutScope() | 45 SubtreeLayoutScope::~SubtreeLayoutScope() |
46 { | 46 { |
47 RELEASE_ASSERT(!m_root->needsLayout()); | 47 RELEASE_ASSERT(!m_root->needsLayout()); |
48 | 48 |
49 #ifndef NDEBUG | 49 #ifndef NDEBUG |
50 for (HashSet<RenderObject*>::iterator it = m_renderersToLayout.begin(); it !
= m_renderersToLayout.end(); ++it) { | 50 for (HashSet<RenderObject*>::iterator it = m_renderersToLayout.begin(); it !
= m_renderersToLayout.end(); ++it) { |
51 RenderObject* renderer = *it; | 51 RenderObject* renderer = *it; |
52 // FIXME: Thie patter is really common. Move it into an assertRendererLa
idOut function. | 52 // FIXME: Thie patter is really common. Move it into an assertRendererLa
idOut function. |
(...skipping 17 matching lines...) Expand all Loading... |
70 } | 70 } |
71 | 71 |
72 void SubtreeLayoutScope::addRendererToLayout(RenderObject* renderer) | 72 void SubtreeLayoutScope::addRendererToLayout(RenderObject* renderer) |
73 { | 73 { |
74 #ifndef NDEBUG | 74 #ifndef NDEBUG |
75 m_renderersToLayout.add(renderer); | 75 m_renderersToLayout.add(renderer); |
76 #endif | 76 #endif |
77 } | 77 } |
78 | 78 |
79 } | 79 } |
OLD | NEW |