| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "core/events/HashChangeEvent.h" | 55 #include "core/events/HashChangeEvent.h" |
| 56 #include "core/events/MessageEvent.h" | 56 #include "core/events/MessageEvent.h" |
| 57 #include "core/events/PageTransitionEvent.h" | 57 #include "core/events/PageTransitionEvent.h" |
| 58 #include "core/events/PopStateEvent.h" | 58 #include "core/events/PopStateEvent.h" |
| 59 #include "core/frame/BarProp.h" | 59 #include "core/frame/BarProp.h" |
| 60 #include "core/frame/Console.h" | 60 #include "core/frame/Console.h" |
| 61 #include "core/frame/DOMWindowLifecycleNotifier.h" | 61 #include "core/frame/DOMWindowLifecycleNotifier.h" |
| 62 #include "core/frame/EventHandlerRegistry.h" | 62 #include "core/frame/EventHandlerRegistry.h" |
| 63 #include "core/frame/FrameConsole.h" | 63 #include "core/frame/FrameConsole.h" |
| 64 #include "core/frame/FrameHost.h" | 64 #include "core/frame/FrameHost.h" |
| 65 #include "core/frame/FrameProtector.h" |
| 65 #include "core/frame/FrameView.h" | 66 #include "core/frame/FrameView.h" |
| 66 #include "core/frame/History.h" | 67 #include "core/frame/History.h" |
| 67 #include "core/frame/LocalFrame.h" | 68 #include "core/frame/LocalFrame.h" |
| 68 #include "core/frame/Location.h" | 69 #include "core/frame/Location.h" |
| 69 #include "core/frame/Navigator.h" | 70 #include "core/frame/Navigator.h" |
| 70 #include "core/frame/Screen.h" | 71 #include "core/frame/Screen.h" |
| 71 #include "core/frame/Settings.h" | 72 #include "core/frame/Settings.h" |
| 72 #include "core/html/HTMLFrameOwnerElement.h" | 73 #include "core/html/HTMLFrameOwnerElement.h" |
| 73 #include "core/inspector/ConsoleMessage.h" | 74 #include "core/inspector/ConsoleMessage.h" |
| 74 #include "core/inspector/ConsoleMessageStorage.h" | 75 #include "core/inspector/ConsoleMessageStorage.h" |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 return String(); | 1067 return String(); |
| 1067 } | 1068 } |
| 1068 | 1069 |
| 1069 bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar
ds, bool wrap, bool /*wholeWord*/, bool /*searchInFrames*/, bool /*showDialog*/)
const | 1070 bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar
ds, bool wrap, bool /*wholeWord*/, bool /*searchInFrames*/, bool /*showDialog*/)
const |
| 1070 { | 1071 { |
| 1071 if (!isCurrentlyDisplayedInFrame()) | 1072 if (!isCurrentlyDisplayedInFrame()) |
| 1072 return false; | 1073 return false; |
| 1073 | 1074 |
| 1074 // |m_frame| can be destructed during |Editor::findString()| via | 1075 // |m_frame| can be destructed during |Editor::findString()| via |
| 1075 // |Document::updateLayou()|, e.g. event handler removes a frame. | 1076 // |Document::updateLayou()|, e.g. event handler removes a frame. |
| 1076 RefPtr<LocalFrame> protectFrame(m_frame); | 1077 FrameProtector protectFrame(m_frame); |
| 1077 | 1078 |
| 1078 // FIXME (13016): Support wholeWord, searchInFrames and showDialog | 1079 // FIXME (13016): Support wholeWord, searchInFrames and showDialog |
| 1079 return m_frame->editor().findString(string, !backwards, caseSensitive, wrap,
false); | 1080 return m_frame->editor().findString(string, !backwards, caseSensitive, wrap,
false); |
| 1080 } | 1081 } |
| 1081 | 1082 |
| 1082 bool LocalDOMWindow::offscreenBuffering() const | 1083 bool LocalDOMWindow::offscreenBuffering() const |
| 1083 { | 1084 { |
| 1084 return true; | 1085 return true; |
| 1085 } | 1086 } |
| 1086 | 1087 |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1389 scrollBy(x, y, scrollBehavior); | 1390 scrollBy(x, y, scrollBehavior); |
| 1390 } | 1391 } |
| 1391 | 1392 |
| 1392 void LocalDOMWindow::scrollTo(int x, int y, ScrollBehavior scrollBehavior) const | 1393 void LocalDOMWindow::scrollTo(int x, int y, ScrollBehavior scrollBehavior) const |
| 1393 { | 1394 { |
| 1394 if (!isCurrentlyDisplayedInFrame()) | 1395 if (!isCurrentlyDisplayedInFrame()) |
| 1395 return; | 1396 return; |
| 1396 | 1397 |
| 1397 document()->updateLayoutIgnorePendingStylesheets(); | 1398 document()->updateLayoutIgnorePendingStylesheets(); |
| 1398 | 1399 |
| 1399 RefPtr<FrameView> view = m_frame->view(); | 1400 FrameView* view = m_frame->view(); |
| 1401 FrameViewProtector protect(view); |
| 1400 if (!view) | 1402 if (!view) |
| 1401 return; | 1403 return; |
| 1402 | 1404 |
| 1403 IntPoint layoutPos(x * m_frame->pageZoomFactor(), y * m_frame->pageZoomFacto
r()); | 1405 IntPoint layoutPos(x * m_frame->pageZoomFactor(), y * m_frame->pageZoomFacto
r()); |
| 1404 view->setScrollPosition(layoutPos, scrollBehavior); | 1406 view->setScrollPosition(layoutPos, scrollBehavior); |
| 1405 } | 1407 } |
| 1406 | 1408 |
| 1407 void LocalDOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, Exc
eptionState& exceptionState) const | 1409 void LocalDOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, Exc
eptionState& exceptionState) const |
| 1408 { | 1410 { |
| 1409 ScrollBehavior scrollBehavior = ScrollBehaviorAuto; | 1411 ScrollBehavior scrollBehavior = ScrollBehaviorAuto; |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 visitor->trace(m_applicationCache); | 1918 visitor->trace(m_applicationCache); |
| 1917 visitor->trace(m_performance); | 1919 visitor->trace(m_performance); |
| 1918 visitor->trace(m_css); | 1920 visitor->trace(m_css); |
| 1919 visitor->trace(m_eventQueue); | 1921 visitor->trace(m_eventQueue); |
| 1920 WillBeHeapSupplementable<LocalDOMWindow>::trace(visitor); | 1922 WillBeHeapSupplementable<LocalDOMWindow>::trace(visitor); |
| 1921 EventTargetWithInlineData::trace(visitor); | 1923 EventTargetWithInlineData::trace(visitor); |
| 1922 LifecycleContext<LocalDOMWindow>::trace(visitor); | 1924 LifecycleContext<LocalDOMWindow>::trace(visitor); |
| 1923 } | 1925 } |
| 1924 | 1926 |
| 1925 } // namespace blink | 1927 } // namespace blink |
| OLD | NEW |