Chromium Code Reviews| Index: Source/core/dom/ContainerNode.cpp |
| diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp |
| index 5a44e55d67cbe96d456b2c3e4279929563e6b35a..066e5875a29671607113dc1bbf9dcaac9607d4c1 100644 |
| --- a/Source/core/dom/ContainerNode.cpp |
| +++ b/Source/core/dom/ContainerNode.cpp |
| @@ -51,6 +51,7 @@ |
| #include "core/layout/LayoutTheme.h" |
| #include "core/layout/LayoutView.h" |
| #include "core/layout/line/InlineTextBox.h" |
| +#include "core/page/scrolling/SnapCoordinator.h" |
| #include "platform/EventDispatchForbiddenScope.h" |
| #include "platform/ScriptForbiddenScope.h" |
| @@ -872,12 +873,18 @@ void ContainerNode::attach(const AttachContext& context) |
| attachChildren(context); |
| clearChildNeedsStyleRecalc(); |
| Node::attach(context); |
| + |
| + if (document().frame() && document().frame()->snapCoordinator()) |
|
esprehn
2015/09/24 17:37:41
ditto checking for frame() doesn't make sense, thi
majidvp
2015/10/15 21:47:02
Done.
|
| + document().frame()->snapCoordinator()->attach(*this); |
| } |
| void ContainerNode::detach(const AttachContext& context) |
| { |
| detachChildren(context); |
| setChildNeedsStyleRecalc(); |
| + if (document().frame() && document().frame()->snapCoordinator()) |
| + document().frame()->snapCoordinator()->detach(*this); |
|
esprehn
2015/09/24 17:37:41
frame() checks here don't make sense, we must have
majidvp
2015/10/15 21:47:02
Done.
|
| + |
| Node::detach(context); |
| } |