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

Side by Side Diff: third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp

Issue 2846273002: Replace ASSERT_NOT_REACHED with NOTREACHED in core/frame (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/EventHandlerRegistry.h" 5 #include "core/frame/EventHandlerRegistry.h"
6 6
7 #include "core/events/EventListenerOptions.h" 7 #include "core/events/EventListenerOptions.h"
8 #include "core/events/EventUtil.h" 8 #include "core/events/EventUtil.h"
9 #include "core/frame/LocalDOMWindow.h" 9 #include "core/frame/LocalDOMWindow.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 frame, WebEventListenerClass::kTouchEndOrCancel, 236 frame, WebEventListenerClass::kTouchEndOrCancel,
237 GetWebEventListenerProperties( 237 GetWebEventListenerProperties(
238 HasEventHandlers(kTouchEndOrCancelEventBlocking), 238 HasEventHandlers(kTouchEndOrCancelEventBlocking),
239 HasEventHandlers(kTouchEndOrCancelEventPassive))); 239 HasEventHandlers(kTouchEndOrCancelEventPassive)));
240 break; 240 break;
241 #if DCHECK_IS_ON() 241 #if DCHECK_IS_ON()
242 case kEventsForTesting: 242 case kEventsForTesting:
243 break; 243 break;
244 #endif 244 #endif
245 default: 245 default:
246 ASSERT_NOT_REACHED(); 246 NOTREACHED();
247 break; 247 break;
248 } 248 }
249 } 249 }
250 250
251 void EventHandlerRegistry::NotifyDidAddOrRemoveEventHandlerTarget( 251 void EventHandlerRegistry::NotifyDidAddOrRemoveEventHandlerTarget(
252 EventHandlerClass handler_class) { 252 EventHandlerClass handler_class) {
253 ScrollingCoordinator* scrolling_coordinator = 253 ScrollingCoordinator* scrolling_coordinator =
254 page_->GetScrollingCoordinator(); 254 page_->GetScrollingCoordinator();
255 if (scrolling_coordinator && handler_class == kTouchStartOrMoveEventBlocking) 255 if (scrolling_coordinator && handler_class == kTouchStartOrMoveEventBlocking)
256 scrolling_coordinator->TouchEventTargetRectsDidChange(); 256 scrolling_coordinator->TouchEventTargetRectsDidChange();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 doc = doc->LocalOwner() ? &doc->LocalOwner()->GetDocument() : 0) { 295 doc = doc->LocalOwner() ? &doc->LocalOwner()->GetDocument() : 0) {
296 if (doc == &document) { 296 if (doc == &document) {
297 targets_to_remove.push_back(event_target.key); 297 targets_to_remove.push_back(event_target.key);
298 break; 298 break;
299 } 299 }
300 } 300 }
301 } else if (event_target.key->ToLocalDOMWindow()) { 301 } else if (event_target.key->ToLocalDOMWindow()) {
302 // DOMWindows may outlive their documents, so we shouldn't remove their 302 // DOMWindows may outlive their documents, so we shouldn't remove their
303 // handlers here. 303 // handlers here.
304 } else { 304 } else {
305 ASSERT_NOT_REACHED(); 305 NOTREACHED();
306 } 306 }
307 } 307 }
308 for (size_t i = 0; i < targets_to_remove.size(); ++i) 308 for (size_t i = 0; i < targets_to_remove.size(); ++i)
309 UpdateEventHandlerInternal(kRemoveAll, handler_class, 309 UpdateEventHandlerInternal(kRemoveAll, handler_class,
310 targets_to_remove[i]); 310 targets_to_remove[i]);
311 } 311 }
312 } 312 }
313 313
314 void EventHandlerRegistry::CheckConsistency( 314 void EventHandlerRegistry::CheckConsistency(
315 EventHandlerClass handler_class) const { 315 EventHandlerClass handler_class) const {
(...skipping 10 matching lines...) Expand all
326 // its handlers properly. 326 // its handlers properly.
327 DCHECK(window->GetFrame()); 327 DCHECK(window->GetFrame());
328 DCHECK(window->GetFrame()->GetPage()); 328 DCHECK(window->GetFrame()->GetPage());
329 DCHECK(window->GetFrame()->GetPage() == page_); 329 DCHECK(window->GetFrame()->GetPage() == page_);
330 } 330 }
331 } 331 }
332 #endif // DCHECK_IS_ON() 332 #endif // DCHECK_IS_ON()
333 } 333 }
334 334
335 } // namespace blink 335 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Deprecation.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698