| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #include "core/html/HTMLPlugInElement.h" | 73 #include "core/html/HTMLPlugInElement.h" |
| 74 #include "core/html/HTMLTextAreaElement.h" | 74 #include "core/html/HTMLTextAreaElement.h" |
| 75 #include "core/input/ContextMenuAllowedScope.h" | 75 #include "core/input/ContextMenuAllowedScope.h" |
| 76 #include "core/input/EventHandler.h" | 76 #include "core/input/EventHandler.h" |
| 77 #include "core/input/TouchActionUtil.h" | 77 #include "core/input/TouchActionUtil.h" |
| 78 #include "core/inspector/DevToolsEmulator.h" | 78 #include "core/inspector/DevToolsEmulator.h" |
| 79 #include "core/layout/LayoutEmbeddedContent.h" | 79 #include "core/layout/LayoutEmbeddedContent.h" |
| 80 #include "core/layout/TextAutosizer.h" | 80 #include "core/layout/TextAutosizer.h" |
| 81 #include "core/layout/api/LayoutViewItem.h" | 81 #include "core/layout/api/LayoutViewItem.h" |
| 82 #include "core/layout/compositing/PaintLayerCompositor.h" | 82 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 83 #include "core/loader/DocumentLoader.h" |
| 83 #include "core/loader/FrameLoadRequest.h" | 84 #include "core/loader/FrameLoadRequest.h" |
| 84 #include "core/loader/FrameLoader.h" | 85 #include "core/loader/FrameLoader.h" |
| 85 #include "core/loader/FrameLoaderStateMachine.h" | 86 #include "core/loader/FrameLoaderStateMachine.h" |
| 86 #include "core/page/ContextMenuController.h" | 87 #include "core/page/ContextMenuController.h" |
| 87 #include "core/page/ContextMenuProvider.h" | 88 #include "core/page/ContextMenuProvider.h" |
| 88 #include "core/page/FocusController.h" | 89 #include "core/page/FocusController.h" |
| 89 #include "core/page/FrameTree.h" | 90 #include "core/page/FrameTree.h" |
| 90 #include "core/page/Page.h" | 91 #include "core/page/Page.h" |
| 91 #include "core/page/PagePopupClient.h" | 92 #include "core/page/PagePopupClient.h" |
| 92 #include "core/page/PointerLockController.h" | 93 #include "core/page/PointerLockController.h" |
| (...skipping 3185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3278 | 3279 |
| 3279 if (LocalFrameView* frame_view = | 3280 if (LocalFrameView* frame_view = |
| 3280 ToLocalFrame(GetPage()->MainFrame())->View()) { | 3281 ToLocalFrame(GetPage()->MainFrame())->View()) { |
| 3281 ScrollableArea* scrollable_area = | 3282 ScrollableArea* scrollable_area = |
| 3282 frame_view->LayoutViewportScrollableArea(); | 3283 frame_view->LayoutViewportScrollableArea(); |
| 3283 | 3284 |
| 3284 if (!scrollable_area->GetScrollOffset().IsZero()) | 3285 if (!scrollable_area->GetScrollOffset().IsZero()) |
| 3285 scrollable_area->SetScrollOffset(ScrollOffset(), kProgrammaticScroll); | 3286 scrollable_area->SetScrollOffset(ScrollOffset(), kProgrammaticScroll); |
| 3286 } | 3287 } |
| 3287 | 3288 |
| 3289 if (Document* document = |
| 3290 ToLocalFrame(GetPage()->MainFrame())->GetDocument()) { |
| 3291 if (DocumentLoader* loader = document->Loader()) { |
| 3292 if (HistoryItem* item = loader->GetHistoryItem()) |
| 3293 item->SetDidSaveScrollOrScaleState(false); |
| 3294 } |
| 3295 } |
| 3296 |
| 3288 GetPageScaleConstraintsSet().SetNeedsReset(true); | 3297 GetPageScaleConstraintsSet().SetNeedsReset(true); |
| 3289 } | 3298 } |
| 3290 | 3299 |
| 3291 void WebViewImpl::PerformMediaPlayerAction(const WebMediaPlayerAction& action, | 3300 void WebViewImpl::PerformMediaPlayerAction(const WebMediaPlayerAction& action, |
| 3292 const WebPoint& location) { | 3301 const WebPoint& location) { |
| 3293 HitTestResult result = HitTestResultForViewportPos(location); | 3302 HitTestResult result = HitTestResultForViewportPos(location); |
| 3294 Node* node = result.InnerNode(); | 3303 Node* node = result.InnerNode(); |
| 3295 if (!isHTMLVideoElement(*node) && !isHTMLAudioElement(*node)) | 3304 if (!isHTMLVideoElement(*node) && !isHTMLAudioElement(*node)) |
| 3296 return; | 3305 return; |
| 3297 | 3306 |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4110 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4119 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
| 4111 return nullptr; | 4120 return nullptr; |
| 4112 return focused_frame; | 4121 return focused_frame; |
| 4113 } | 4122 } |
| 4114 | 4123 |
| 4115 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4124 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
| 4116 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4125 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
| 4117 } | 4126 } |
| 4118 | 4127 |
| 4119 } // namespace blink | 4128 } // namespace blink |
| OLD | NEW |