| Index: Source/core/layout/LayoutBlock.cpp
|
| diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp
|
| index 431f7599831f5c52c161c32cf917fb835a981be1..1c42b8f5f32f447357b160846bd0be3be5e05680 100644
|
| --- a/Source/core/layout/LayoutBlock.cpp
|
| +++ b/Source/core/layout/LayoutBlock.cpp
|
| @@ -33,7 +33,6 @@
|
| #include "core/editing/Editor.h"
|
| #include "core/editing/FrameSelection.h"
|
| #include "core/editing/htmlediting.h"
|
| -#include "core/events/OverflowEvent.h"
|
| #include "core/fetch/ResourceLoadPriorityOptimizer.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/LocalFrame.h"
|
| @@ -98,49 +97,6 @@ typedef WTF::HashSet<LayoutBlock*> DelayedUpdateScrollInfoSet;
|
| static int gDelayUpdateScrollInfo = 0;
|
| static DelayedUpdateScrollInfoSet* gDelayedUpdateScrollInfoSet = nullptr;
|
|
|
| -// This class helps dispatching the 'overflow' event on layout change. overflow can be set on LayoutBoxes, yet the existing code
|
| -// only works on LayoutBlocks. If this changes, this class should be shared with other LayoutBoxes.
|
| -class OverflowEventDispatcher {
|
| - WTF_MAKE_NONCOPYABLE(OverflowEventDispatcher);
|
| -public:
|
| - OverflowEventDispatcher(const LayoutBlock* block)
|
| - : m_block(block)
|
| - , m_hadHorizontalLayoutOverflow(false)
|
| - , m_hadVerticalLayoutOverflow(false)
|
| - {
|
| - m_shouldDispatchEvent = !m_block->isAnonymous() && m_block->hasOverflowClip() && m_block->document().hasListenerType(Document::OVERFLOWCHANGED_LISTENER);
|
| - if (m_shouldDispatchEvent) {
|
| - m_hadHorizontalLayoutOverflow = m_block->hasHorizontalLayoutOverflow();
|
| - m_hadVerticalLayoutOverflow = m_block->hasVerticalLayoutOverflow();
|
| - }
|
| - }
|
| -
|
| - ~OverflowEventDispatcher()
|
| - {
|
| - if (!m_shouldDispatchEvent)
|
| - return;
|
| -
|
| - bool hasHorizontalLayoutOverflow = m_block->hasHorizontalLayoutOverflow();
|
| - bool hasVerticalLayoutOverflow = m_block->hasVerticalLayoutOverflow();
|
| -
|
| - bool horizontalLayoutOverflowChanged = hasHorizontalLayoutOverflow != m_hadHorizontalLayoutOverflow;
|
| - bool verticalLayoutOverflowChanged = hasVerticalLayoutOverflow != m_hadVerticalLayoutOverflow;
|
| -
|
| - if (!horizontalLayoutOverflowChanged && !verticalLayoutOverflowChanged)
|
| - return;
|
| -
|
| - RefPtrWillBeRawPtr<OverflowEvent> event = OverflowEvent::create(horizontalLayoutOverflowChanged, hasHorizontalLayoutOverflow, verticalLayoutOverflowChanged, hasVerticalLayoutOverflow);
|
| - event->setTarget(m_block->node());
|
| - m_block->document().enqueueAnimationFrameEvent(event.release());
|
| - }
|
| -
|
| -private:
|
| - const LayoutBlock* m_block;
|
| - bool m_shouldDispatchEvent;
|
| - bool m_hadHorizontalLayoutOverflow;
|
| - bool m_hadVerticalLayoutOverflow;
|
| -};
|
| -
|
| LayoutBlock::LayoutBlock(ContainerNode* node)
|
| : LayoutBox(node)
|
| , m_hasMarginBeforeQuirk(false)
|
| @@ -896,7 +852,6 @@ void LayoutBlock::updateScrollInfoAfterLayout()
|
| void LayoutBlock::layout()
|
| {
|
| LayoutAnalyzer::Scope analyzer(*this);
|
| - OverflowEventDispatcher dispatcher(this);
|
|
|
| // Table cells call layoutBlock directly, so don't add any logic here. Put code into
|
| // layoutBlock().
|
|
|