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

Side by Side Diff: Source/core/dom/NamedFlow.cpp

Issue 26878003: Reduce repetitive EventTarget subclassing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/NamedFlow.h ('k') | Source/core/dom/Node.h » ('j') | 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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 void NamedFlow::setRenderer(RenderNamedFlowThread* parentFlowThread) 198 void NamedFlow::setRenderer(RenderNamedFlowThread* parentFlowThread)
199 { 199 {
200 // The named flow can either go from a no_renderer->renderer or renderer->no _renderer state; anything else could indicate a bug. 200 // The named flow can either go from a no_renderer->renderer or renderer->no _renderer state; anything else could indicate a bug.
201 ASSERT((!m_parentFlowThread && parentFlowThread) || (m_parentFlowThread && ! parentFlowThread)); 201 ASSERT((!m_parentFlowThread && parentFlowThread) || (m_parentFlowThread && ! parentFlowThread));
202 202
203 // If parentFlowThread is 0, the flow thread will move in the "NULL" state. 203 // If parentFlowThread is 0, the flow thread will move in the "NULL" state.
204 m_parentFlowThread = parentFlowThread; 204 m_parentFlowThread = parentFlowThread;
205 } 205 }
206 206
207 EventTargetData* NamedFlow::eventTargetData()
208 {
209 return &m_eventTargetData;
210 }
211
212 EventTargetData* NamedFlow::ensureEventTargetData()
213 {
214 return &m_eventTargetData;
215 }
216
217 void NamedFlow::dispatchRegionLayoutUpdateEvent() 207 void NamedFlow::dispatchRegionLayoutUpdateEvent()
218 { 208 {
219 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 209 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
220 210
221 // If the flow is in the "NULL" state the event should not be dispatched any more. 211 // If the flow is in the "NULL" state the event should not be dispatched any more.
222 if (flowState() == FlowStateNull) 212 if (flowState() == FlowStateNull)
223 return; 213 return;
224 214
225 RefPtr<Event> event = UIEvent::create(EventTypeNames::webkitregionlayoutupda te, false, false, m_flowManager->document()->defaultView(), 0); 215 RefPtr<Event> event = UIEvent::create(EventTypeNames::webkitregionlayoutupda te, false, false, m_flowManager->document()->defaultView(), 0);
226 216
(...skipping 23 matching lines...) Expand all
250 return m_flowManager->document(); 240 return m_flowManager->document();
251 } 241 }
252 242
253 Node* NamedFlow::ownerNode() const 243 Node* NamedFlow::ownerNode() const
254 { 244 {
255 return m_flowManager->document(); 245 return m_flowManager->document();
256 } 246 }
257 247
258 } // namespace WebCore 248 } // namespace WebCore
259 249
OLDNEW
« no previous file with comments | « Source/core/dom/NamedFlow.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698