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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #include "core/html/HTMLMediaElement.h" | 64 #include "core/html/HTMLMediaElement.h" |
65 #include "core/html/HTMLPlugInElement.h" | 65 #include "core/html/HTMLPlugInElement.h" |
66 #include "core/html/HTMLTextAreaElement.h" | 66 #include "core/html/HTMLTextAreaElement.h" |
67 #include "core/html/canvas/WebGLRenderingContext.h" | 67 #include "core/html/canvas/WebGLRenderingContext.h" |
68 #include "core/html/forms/PopupMenuClient.h" | 68 #include "core/html/forms/PopupMenuClient.h" |
69 #include "core/layout/LayoutPart.h" | 69 #include "core/layout/LayoutPart.h" |
70 #include "core/layout/LayoutView.h" | 70 #include "core/layout/LayoutView.h" |
71 #include "core/layout/TextAutosizer.h" | 71 #include "core/layout/TextAutosizer.h" |
72 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" | 72 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" |
73 #include "core/loader/DocumentLoader.h" | 73 #include "core/loader/DocumentLoader.h" |
| 74 #include "core/loader/FrameLoadRequest.h" |
74 #include "core/loader/FrameLoader.h" | 75 #include "core/loader/FrameLoader.h" |
75 #include "core/page/ContextMenuController.h" | 76 #include "core/page/ContextMenuController.h" |
76 #include "core/page/ContextMenuProvider.h" | 77 #include "core/page/ContextMenuProvider.h" |
77 #include "core/page/DragController.h" | 78 #include "core/page/DragController.h" |
78 #include "core/page/DragData.h" | 79 #include "core/page/DragData.h" |
79 #include "core/page/DragSession.h" | 80 #include "core/page/DragSession.h" |
80 #include "core/page/EventHandler.h" | 81 #include "core/page/EventHandler.h" |
81 #include "core/page/FocusController.h" | 82 #include "core/page/FocusController.h" |
82 #include "core/page/FrameTree.h" | 83 #include "core/page/FrameTree.h" |
83 #include "core/page/Page.h" | 84 #include "core/page/Page.h" |
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2803 if (!m_page) | 2804 if (!m_page) |
2804 return; | 2805 return; |
2805 | 2806 |
2806 // Only change override encoding, don't change default encoding. | 2807 // Only change override encoding, don't change default encoding. |
2807 // Note that the new encoding must be 0 if it isn't supposed to be set. | 2808 // Note that the new encoding must be 0 if it isn't supposed to be set. |
2808 AtomicString newEncodingName; | 2809 AtomicString newEncodingName; |
2809 if (!encodingName.isEmpty()) | 2810 if (!encodingName.isEmpty()) |
2810 newEncodingName = encodingName; | 2811 newEncodingName = encodingName; |
2811 m_page->frameHost().setOverrideEncoding(newEncodingName); | 2812 m_page->frameHost().setOverrideEncoding(newEncodingName); |
2812 | 2813 |
2813 if (m_page->mainFrame()->isLocalFrame()) | 2814 if (m_page->mainFrame()->isLocalFrame()) { |
2814 m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload); | 2815 if (!m_page->deprecatedLocalMainFrame()->loader().currentItem()) |
| 2816 return; |
| 2817 FrameLoadRequest request = FrameLoader::frameRequestForReload( |
| 2818 m_page->deprecatedLocalMainFrame()->loader().resourceRequestForReloa
d( |
| 2819 FrameLoadTypeReload, KURL(), ClientRedirect), |
| 2820 ClientRedirect); |
| 2821 m_page->deprecatedLocalMainFrame()->loader().load(request, FrameLoadType
Reload); |
| 2822 } |
2815 } | 2823 } |
2816 | 2824 |
2817 WebFrame* WebViewImpl::mainFrame() | 2825 WebFrame* WebViewImpl::mainFrame() |
2818 { | 2826 { |
2819 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); | 2827 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); |
2820 } | 2828 } |
2821 | 2829 |
2822 WebFrame* WebViewImpl::findFrameByName( | 2830 WebFrame* WebViewImpl::findFrameByName( |
2823 const WebString& name, WebFrame* relativeToFrame) | 2831 const WebString& name, WebFrame* relativeToFrame) |
2824 { | 2832 { |
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4468 { | 4476 { |
4469 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4477 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4470 } | 4478 } |
4471 | 4479 |
4472 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4480 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
4473 { | 4481 { |
4474 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4482 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
4475 } | 4483 } |
4476 | 4484 |
4477 } // namespace blink | 4485 } // namespace blink |
OLD | NEW |