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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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/web/StorageAreaProxy.cpp ('k') | Source/web/WebElement.cpp » ('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) 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 WebElement WebDocument::fullScreenElement() const 237 WebElement WebDocument::fullScreenElement() const
238 { 238 {
239 Element* fullScreenElement = 0; 239 Element* fullScreenElement = 0;
240 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(const_cast<WebDocument*>(this)->unwrap<Document>())) 240 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(const_cast<WebDocument*>(this)->unwrap<Document>()))
241 fullScreenElement = fullscreen->webkitCurrentFullScreenElement(); 241 fullScreenElement = fullscreen->webkitCurrentFullScreenElement();
242 return WebElement(fullScreenElement); 242 return WebElement(fullScreenElement);
243 } 243 }
244 244
245 WebDOMEvent WebDocument::createEvent(const WebString& eventType) 245 WebDOMEvent WebDocument::createEvent(const WebString& eventType)
246 { 246 {
247 TrackExceptionState es; 247 TrackExceptionState exceptionState;
248 WebDOMEvent event(unwrap<Document>()->createEvent(eventType, es)); 248 WebDOMEvent event(unwrap<Document>()->createEvent(eventType, exceptionState) );
249 if (es.hadException()) 249 if (exceptionState.hadException())
250 return WebDOMEvent(); 250 return WebDOMEvent();
251 return event; 251 return event;
252 } 252 }
253 253
254 WebReferrerPolicy WebDocument::referrerPolicy() const 254 WebReferrerPolicy WebDocument::referrerPolicy() const
255 { 255 {
256 return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolic y()); 256 return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolic y());
257 } 257 }
258 258
259 WebElement WebDocument::createElement(const WebString& tagName) 259 WebElement WebDocument::createElement(const WebString& tagName)
260 { 260 {
261 TrackExceptionState es; 261 TrackExceptionState exceptionState;
262 WebElement element(unwrap<Document>()->createElement(tagName, es)); 262 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState ));
263 if (es.hadException()) 263 if (exceptionState.hadException())
264 return WebElement(); 264 return WebElement();
265 return element; 265 return element;
266 } 266 }
267 267
268 WebAXObject WebDocument::accessibilityObject() const 268 WebAXObject WebDocument::accessibilityObject() const
269 { 269 {
270 const Document* document = constUnwrap<Document>(); 270 const Document* document = constUnwrap<Document>();
271 return WebAXObject(document->axObjectCache()->getOrCreate(document->renderer ())); 271 return WebAXObject(document->axObjectCache()->getOrCreate(document->renderer ()));
272 } 272 }
273 273
(...skipping 16 matching lines...) Expand all
290 draggableRegions[i].bounds = WebCore::IntRect(value.bounds); 290 draggableRegions[i].bounds = WebCore::IntRect(value.bounds);
291 } 291 }
292 } 292 }
293 return draggableRegions; 293 return draggableRegions;
294 } 294 }
295 295
296 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString & name, v8::Handle<v8::Value> options, WebExceptionCode& ec) 296 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString & name, v8::Handle<v8::Value> options, WebExceptionCode& ec)
297 { 297 {
298 Document* document = unwrap<Document>(); 298 Document* document = unwrap<Document>();
299 Dictionary dictionary(options, v8::Isolate::GetCurrent()); 299 Dictionary dictionary(options, v8::Isolate::GetCurrent());
300 TrackExceptionState es; 300 TrackExceptionState exceptionState;
301 ScriptValue constructor = document->registerElement(ScriptState::current(), name, dictionary, es, CustomElement::EmbedderNames); 301 ScriptValue constructor = document->registerElement(ScriptState::current(), name, dictionary, exceptionState, CustomElement::EmbedderNames);
302 ec = es.code(); 302 ec = exceptionState.code();
303 if (es.hadException()) 303 if (exceptionState.hadException())
304 return v8::Handle<v8::Value>(); 304 return v8::Handle<v8::Value>();
305 return constructor.v8Value(); 305 return constructor.v8Value();
306 } 306 }
307 307
308 WebDocument::WebDocument(const PassRefPtr<Document>& elem) 308 WebDocument::WebDocument(const PassRefPtr<Document>& elem)
309 : WebNode(elem) 309 : WebNode(elem)
310 { 310 {
311 } 311 }
312 312
313 WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem) 313 WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem)
314 { 314 {
315 m_private = elem; 315 m_private = elem;
316 return *this; 316 return *this;
317 } 317 }
318 318
319 WebDocument::operator PassRefPtr<Document>() const 319 WebDocument::operator PassRefPtr<Document>() const
320 { 320 {
321 return toDocument(m_private.get()); 321 return toDocument(m_private.get());
322 } 322 }
323 323
324 } // namespace blink 324 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/StorageAreaProxy.cpp ('k') | Source/web/WebElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698