| 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 12 matching lines...) Expand all Loading... |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "core/frame/FrameHost.h" | 31 #include "core/frame/FrameHost.h" |
| 32 | 32 |
| 33 #include "core/dom/custom/CustomElementReactionStack.h" |
| 33 #include "core/frame/EventHandlerRegistry.h" | 34 #include "core/frame/EventHandlerRegistry.h" |
| 34 #include "core/frame/FrameView.h" | 35 #include "core/frame/FrameView.h" |
| 35 #include "core/frame/PageScaleConstraints.h" | 36 #include "core/frame/PageScaleConstraints.h" |
| 36 #include "core/frame/PageScaleConstraintsSet.h" | 37 #include "core/frame/PageScaleConstraintsSet.h" |
| 37 #include "core/frame/TopControls.h" | 38 #include "core/frame/TopControls.h" |
| 38 #include "core/frame/VisualViewport.h" | 39 #include "core/frame/VisualViewport.h" |
| 39 #include "core/inspector/ConsoleMessageStorage.h" | 40 #include "core/inspector/ConsoleMessageStorage.h" |
| 40 #include "core/page/Page.h" | 41 #include "core/page/Page.h" |
| 41 #include "core/page/scrolling/OverscrollController.h" | 42 #include "core/page/scrolling/OverscrollController.h" |
| 42 #include "core/page/scrolling/RootScroller.h" | 43 #include "core/page/scrolling/RootScroller.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 54 : m_page(&page) | 55 : m_page(&page) |
| 55 , m_rootScroller(RootScroller::create(*this)) | 56 , m_rootScroller(RootScroller::create(*this)) |
| 56 , m_topControls(TopControls::create(*this)) | 57 , m_topControls(TopControls::create(*this)) |
| 57 , m_pageScaleConstraintsSet(PageScaleConstraintsSet::create()) | 58 , m_pageScaleConstraintsSet(PageScaleConstraintsSet::create()) |
| 58 , m_visualViewport(VisualViewport::create(*this)) | 59 , m_visualViewport(VisualViewport::create(*this)) |
| 59 , m_overscrollController(OverscrollController::create( | 60 , m_overscrollController(OverscrollController::create( |
| 60 *m_visualViewport, | 61 *m_visualViewport, |
| 61 m_page->chromeClient())) | 62 m_page->chromeClient())) |
| 62 , m_eventHandlerRegistry(new EventHandlerRegistry(*this)) | 63 , m_eventHandlerRegistry(new EventHandlerRegistry(*this)) |
| 63 , m_consoleMessageStorage(ConsoleMessageStorage::create()) | 64 , m_consoleMessageStorage(ConsoleMessageStorage::create()) |
| 65 , m_customElementReactionStack(new CustomElementReactionStack()) |
| 64 , m_subframeCount(0) | 66 , m_subframeCount(0) |
| 65 { | 67 { |
| 66 } | 68 } |
| 67 | 69 |
| 68 // Explicitly in the .cpp to avoid default constructor in .h | 70 // Explicitly in the .cpp to avoid default constructor in .h |
| 69 FrameHost::~FrameHost() | 71 FrameHost::~FrameHost() |
| 70 { | 72 { |
| 71 } | 73 } |
| 72 | 74 |
| 73 Page& FrameHost::page() | 75 Page& FrameHost::page() |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 ConsoleMessageStorage& FrameHost::consoleMessageStorage() | 200 ConsoleMessageStorage& FrameHost::consoleMessageStorage() |
| 199 { | 201 { |
| 200 return *m_consoleMessageStorage; | 202 return *m_consoleMessageStorage; |
| 201 } | 203 } |
| 202 | 204 |
| 203 const ConsoleMessageStorage& FrameHost::consoleMessageStorage() const | 205 const ConsoleMessageStorage& FrameHost::consoleMessageStorage() const |
| 204 { | 206 { |
| 205 return *m_consoleMessageStorage; | 207 return *m_consoleMessageStorage; |
| 206 } | 208 } |
| 207 | 209 |
| 210 CustomElementReactionStack& FrameHost::customElementReactionStack() |
| 211 { |
| 212 return *m_customElementReactionStack; |
| 213 } |
| 214 |
| 215 const CustomElementReactionStack& FrameHost::customElementReactionStack() const |
| 216 { |
| 217 return *m_customElementReactionStack; |
| 218 } |
| 219 |
| 208 DEFINE_TRACE(FrameHost) | 220 DEFINE_TRACE(FrameHost) |
| 209 { | 221 { |
| 210 visitor->trace(m_page); | 222 visitor->trace(m_page); |
| 211 visitor->trace(m_rootScroller); | 223 visitor->trace(m_rootScroller); |
| 212 visitor->trace(m_topControls); | 224 visitor->trace(m_topControls); |
| 213 visitor->trace(m_visualViewport); | 225 visitor->trace(m_visualViewport); |
| 214 visitor->trace(m_overscrollController); | 226 visitor->trace(m_overscrollController); |
| 215 visitor->trace(m_eventHandlerRegistry); | 227 visitor->trace(m_eventHandlerRegistry); |
| 216 visitor->trace(m_consoleMessageStorage); | 228 visitor->trace(m_consoleMessageStorage); |
| 229 visitor->trace(m_customElementReactionStack); |
| 217 } | 230 } |
| 218 | 231 |
| 219 #if ENABLE(ASSERT) | 232 #if ENABLE(ASSERT) |
| 220 void checkFrameCountConsistency(int expectedFrameCount, Frame* frame) | 233 void checkFrameCountConsistency(int expectedFrameCount, Frame* frame) |
| 221 { | 234 { |
| 222 ASSERT(expectedFrameCount >= 0); | 235 ASSERT(expectedFrameCount >= 0); |
| 223 | 236 |
| 224 int actualFrameCount = 0; | 237 int actualFrameCount = 0; |
| 225 for (; frame; frame = frame->tree().traverseNext()) | 238 for (; frame; frame = frame->tree().traverseNext()) |
| 226 ++actualFrameCount; | 239 ++actualFrameCount; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 286 |
| 274 FrameView* rootView = page().deprecatedLocalMainFrame()->view(); | 287 FrameView* rootView = page().deprecatedLocalMainFrame()->view(); |
| 275 | 288 |
| 276 if (!rootView) | 289 if (!rootView) |
| 277 return; | 290 return; |
| 278 | 291 |
| 279 rootView->setNeedsLayout(); | 292 rootView->setNeedsLayout(); |
| 280 } | 293 } |
| 281 | 294 |
| 282 } // namespace blink | 295 } // namespace blink |
| OLD | NEW |