OLD | NEW |
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 241 } |
242 | 242 |
243 WebElement WebDocument::fullScreenElement() const | 243 WebElement WebDocument::fullScreenElement() const |
244 { | 244 { |
245 Element* fullScreenElement = 0; | 245 Element* fullScreenElement = 0; |
246 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*const_cast<WebDocumen
t*>(this)->unwrap<Document>())) | 246 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*const_cast<WebDocumen
t*>(this)->unwrap<Document>())) |
247 fullScreenElement = fullscreen->webkitCurrentFullScreenElement(); | 247 fullScreenElement = fullscreen->webkitCurrentFullScreenElement(); |
248 return WebElement(fullScreenElement); | 248 return WebElement(fullScreenElement); |
249 } | 249 } |
250 | 250 |
251 WebDOMEvent WebDocument::createEvent(const WebString& eventType) | |
252 { | |
253 TrackExceptionState exceptionState; | |
254 WebDOMEvent event(unwrap<Document>()->createEvent(eventType, exceptionState)
); | |
255 if (exceptionState.hadException()) | |
256 return WebDOMEvent(); | |
257 return event; | |
258 } | |
259 | |
260 WebReferrerPolicy WebDocument::referrerPolicy() const | 251 WebReferrerPolicy WebDocument::referrerPolicy() const |
261 { | 252 { |
262 return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolic
y()); | 253 return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolic
y()); |
263 } | 254 } |
264 | 255 |
265 WebString WebDocument::outgoingReferrer() | 256 WebString WebDocument::outgoingReferrer() |
266 { | 257 { |
267 return WebString(unwrap<Document>()->outgoingReferrer()); | 258 return WebString(unwrap<Document>()->outgoingReferrer()); |
268 } | 259 } |
269 | 260 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 m_private = elem; | 332 m_private = elem; |
342 return *this; | 333 return *this; |
343 } | 334 } |
344 | 335 |
345 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const | 336 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const |
346 { | 337 { |
347 return toDocument(m_private.get()); | 338 return toDocument(m_private.get()); |
348 } | 339 } |
349 | 340 |
350 } // namespace blink | 341 } // namespace blink |
OLD | NEW |