Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 212783002: make sure fields are initialized in OverflowEventDispatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 static bool gColumnFlowSplitEnabled = true; 111 static bool gColumnFlowSplitEnabled = true;
112 112
113 // This class helps dispatching the 'overflow' event on layout change. overflow can be set on RenderBoxes, yet the existing code 113 // This class helps dispatching the 'overflow' event on layout change. overflow can be set on RenderBoxes, yet the existing code
114 // only works on RenderBlocks. If this changes, this class should be shared with other RenderBoxes. 114 // only works on RenderBlocks. If this changes, this class should be shared with other RenderBoxes.
115 class OverflowEventDispatcher { 115 class OverflowEventDispatcher {
116 WTF_MAKE_NONCOPYABLE(OverflowEventDispatcher); 116 WTF_MAKE_NONCOPYABLE(OverflowEventDispatcher);
117 public: 117 public:
118 OverflowEventDispatcher(const RenderBlock* block) 118 OverflowEventDispatcher(const RenderBlock* block)
119 : m_block(block) 119 : m_block(block)
120 , m_hadHorizontalLayoutOverflow(false)
121 , m_hadVerticalLayoutOverflow(false)
120 { 122 {
121 m_shouldDispatchEvent = !m_block->isAnonymous() && m_block->hasOverflowC lip() && m_block->document().hasListenerType(Document::OVERFLOWCHANGED_LISTENER) ; 123 m_shouldDispatchEvent = !m_block->isAnonymous() && m_block->hasOverflowC lip() && m_block->document().hasListenerType(Document::OVERFLOWCHANGED_LISTENER) ;
122 if (m_shouldDispatchEvent) { 124 if (m_shouldDispatchEvent) {
123 m_hadHorizontalLayoutOverflow = m_block->hasHorizontalLayoutOverflow (); 125 m_hadHorizontalLayoutOverflow = m_block->hasHorizontalLayoutOverflow ();
124 m_hadVerticalLayoutOverflow = m_block->hasVerticalLayoutOverflow(); 126 m_hadVerticalLayoutOverflow = m_block->hasVerticalLayoutOverflow();
125 } 127 }
126 } 128 }
127 129
128 ~OverflowEventDispatcher() 130 ~OverflowEventDispatcher()
129 { 131 {
(...skipping 4895 matching lines...) Expand 10 before | Expand all | Expand 10 after
5025 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5027 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5026 { 5028 {
5027 showRenderObject(); 5029 showRenderObject();
5028 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5030 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5029 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5031 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5030 } 5032 }
5031 5033
5032 #endif 5034 #endif
5033 5035
5034 } // namespace WebCore 5036 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698