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

Side by Side Diff: Source/web/WebDocument.cpp

Issue 305723002: Use method registration approach for creating events on core and modules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaseline Created 6 years, 6 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 | « Source/modules/InitModules.cpp ('k') | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "core/dom/StyleEngine.h" 47 #include "core/dom/StyleEngine.h"
48 #include "core/html/HTMLAllCollection.h" 48 #include "core/html/HTMLAllCollection.h"
49 #include "core/html/HTMLBodyElement.h" 49 #include "core/html/HTMLBodyElement.h"
50 #include "core/html/HTMLCollection.h" 50 #include "core/html/HTMLCollection.h"
51 #include "core/html/HTMLElement.h" 51 #include "core/html/HTMLElement.h"
52 #include "core/html/HTMLFormElement.h" 52 #include "core/html/HTMLFormElement.h"
53 #include "core/html/HTMLHeadElement.h" 53 #include "core/html/HTMLHeadElement.h"
54 #include "core/loader/DocumentLoader.h" 54 #include "core/loader/DocumentLoader.h"
55 #include "core/rendering/RenderObject.h" 55 #include "core/rendering/RenderObject.h"
56 #include "core/rendering/RenderView.h" 56 #include "core/rendering/RenderView.h"
57 #include "modules/InitModules.h"
58 #include "platform/weborigin/SecurityOrigin.h" 57 #include "platform/weborigin/SecurityOrigin.h"
59 #include "public/platform/WebURL.h" 58 #include "public/platform/WebURL.h"
60 #include "public/web/WebAXObject.h" 59 #include "public/web/WebAXObject.h"
61 #include "public/web/WebDOMEvent.h" 60 #include "public/web/WebDOMEvent.h"
62 #include "public/web/WebDocumentType.h" 61 #include "public/web/WebDocumentType.h"
63 #include "public/web/WebElement.h" 62 #include "public/web/WebElement.h"
64 #include "public/web/WebElementCollection.h" 63 #include "public/web/WebElementCollection.h"
65 #include "public/web/WebFormElement.h" 64 #include "public/web/WebFormElement.h"
66 #include "public/web/WebNodeList.h" 65 #include "public/web/WebNodeList.h"
67 #include "web/WebLocalFrameImpl.h" 66 #include "web/WebLocalFrameImpl.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 { 234 {
236 Element* fullScreenElement = 0; 235 Element* fullScreenElement = 0;
237 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(*const_cast<WebDocument*>(this)->unwrap<Document>())) 236 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(*const_cast<WebDocument*>(this)->unwrap<Document>()))
238 fullScreenElement = fullscreen->webkitCurrentFullScreenElement(); 237 fullScreenElement = fullscreen->webkitCurrentFullScreenElement();
239 return WebElement(fullScreenElement); 238 return WebElement(fullScreenElement);
240 } 239 }
241 240
242 WebDOMEvent WebDocument::createEvent(const WebString& eventType) 241 WebDOMEvent WebDocument::createEvent(const WebString& eventType)
243 { 242 {
244 TrackExceptionState exceptionState; 243 TrackExceptionState exceptionState;
245 WebDOMEvent event(createEventModules(eventType, exceptionState)); 244 WebDOMEvent event(unwrap<Document>()->createEvent(eventType, exceptionState) );
246 if (exceptionState.hadException()) 245 if (exceptionState.hadException())
247 return WebDOMEvent(); 246 return WebDOMEvent();
248 return event; 247 return event;
249 } 248 }
250 249
251 WebReferrerPolicy WebDocument::referrerPolicy() const 250 WebReferrerPolicy WebDocument::referrerPolicy() const
252 { 251 {
253 return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolic y()); 252 return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolic y());
254 } 253 }
255 254
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 m_private = elem; 312 m_private = elem;
314 return *this; 313 return *this;
315 } 314 }
316 315
317 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 316 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
318 { 317 {
319 return toDocument(m_private.get()); 318 return toDocument(m_private.get());
320 } 319 }
321 320
322 } // namespace blink 321 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/InitModules.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698