| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 return; | 467 return; |
| 468 | 468 |
| 469 removeAllEventListeners(); | 469 removeAllEventListeners(); |
| 470 } | 470 } |
| 471 | 471 |
| 472 ExecutionContext* LocalDOMWindow::executionContext() const | 472 ExecutionContext* LocalDOMWindow::executionContext() const |
| 473 { | 473 { |
| 474 return m_document.get(); | 474 return m_document.get(); |
| 475 } | 475 } |
| 476 | 476 |
| 477 const LocalDOMWindow* LocalDOMWindow::toDOMWindow() const |
| 478 { |
| 479 return this; |
| 480 } |
| 481 |
| 477 LocalDOMWindow* LocalDOMWindow::toDOMWindow() | 482 LocalDOMWindow* LocalDOMWindow::toDOMWindow() |
| 478 { | 483 { |
| 479 return this; | 484 return this; |
| 480 } | 485 } |
| 481 | 486 |
| 482 PassRefPtrWillBeRawPtr<MediaQueryList> LocalDOMWindow::matchMedia(const String&
media) | 487 PassRefPtrWillBeRawPtr<MediaQueryList> LocalDOMWindow::matchMedia(const String&
media) |
| 483 { | 488 { |
| 484 return document() ? document()->mediaQueryMatcher().matchMedia(media) : null
ptr; | 489 return document() ? document()->mediaQueryMatcher().matchMedia(media) : null
ptr; |
| 485 } | 490 } |
| 486 | 491 |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1427 } | 1432 } |
| 1428 | 1433 |
| 1429 void LocalDOMWindow::finishedLoading() | 1434 void LocalDOMWindow::finishedLoading() |
| 1430 { | 1435 { |
| 1431 if (m_shouldPrintWhenFinishedLoading) { | 1436 if (m_shouldPrintWhenFinishedLoading) { |
| 1432 m_shouldPrintWhenFinishedLoading = false; | 1437 m_shouldPrintWhenFinishedLoading = false; |
| 1433 print(); | 1438 print(); |
| 1434 } | 1439 } |
| 1435 } | 1440 } |
| 1436 | 1441 |
| 1437 void LocalDOMWindow::printErrorMessage(const String& message) | 1442 void LocalDOMWindow::printErrorMessage(const String& message) const |
| 1438 { | 1443 { |
| 1439 if (!isCurrentlyDisplayedInFrame()) | 1444 if (!isCurrentlyDisplayedInFrame()) |
| 1440 return; | 1445 return; |
| 1441 | 1446 |
| 1442 if (message.isEmpty()) | 1447 if (message.isEmpty()) |
| 1443 return; | 1448 return; |
| 1444 | 1449 |
| 1445 frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, ErrorMess
ageLevel, message)); | 1450 frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, ErrorMess
ageLevel, message)); |
| 1446 } | 1451 } |
| 1447 | 1452 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1531 { | 1536 { |
| 1532 // If the LocalDOMWindow still has a frame reference, that frame must point | 1537 // If the LocalDOMWindow still has a frame reference, that frame must point |
| 1533 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1538 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
| 1534 // where script execution leaks between different LocalDOMWindows. | 1539 // where script execution leaks between different LocalDOMWindows. |
| 1535 if (m_frameObserver->frame()) | 1540 if (m_frameObserver->frame()) |
| 1536 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1541 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
| 1537 return m_frameObserver->frame(); | 1542 return m_frameObserver->frame(); |
| 1538 } | 1543 } |
| 1539 | 1544 |
| 1540 } // namespace blink | 1545 } // namespace blink |
| OLD | NEW |