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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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/input/EventHandler.h" | 69 #include "core/input/EventHandler.h" |
70 #include "core/layout/LayoutPart.h" | 70 #include "core/layout/LayoutPart.h" |
71 #include "core/layout/LayoutView.h" | 71 #include "core/layout/LayoutView.h" |
72 #include "core/layout/TextAutosizer.h" | 72 #include "core/layout/TextAutosizer.h" |
73 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" | 73 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" |
74 #include "core/loader/DocumentLoader.h" | 74 #include "core/loader/DocumentLoader.h" |
| 75 #include "core/loader/FrameLoadRequest.h" |
75 #include "core/loader/FrameLoader.h" | 76 #include "core/loader/FrameLoader.h" |
76 #include "core/page/ContextMenuController.h" | 77 #include "core/page/ContextMenuController.h" |
77 #include "core/page/ContextMenuProvider.h" | 78 #include "core/page/ContextMenuProvider.h" |
78 #include "core/page/DragController.h" | 79 #include "core/page/DragController.h" |
79 #include "core/page/DragData.h" | 80 #include "core/page/DragData.h" |
80 #include "core/page/DragSession.h" | 81 #include "core/page/DragSession.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" |
84 #include "core/page/PagePopupClient.h" | 85 #include "core/page/PagePopupClient.h" |
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2752 if (!m_page) | 2753 if (!m_page) |
2753 return; | 2754 return; |
2754 | 2755 |
2755 // Only change override encoding, don't change default encoding. | 2756 // Only change override encoding, don't change default encoding. |
2756 // Note that the new encoding must be 0 if it isn't supposed to be set. | 2757 // Note that the new encoding must be 0 if it isn't supposed to be set. |
2757 AtomicString newEncodingName; | 2758 AtomicString newEncodingName; |
2758 if (!encodingName.isEmpty()) | 2759 if (!encodingName.isEmpty()) |
2759 newEncodingName = encodingName; | 2760 newEncodingName = encodingName; |
2760 m_page->frameHost().setOverrideEncoding(newEncodingName); | 2761 m_page->frameHost().setOverrideEncoding(newEncodingName); |
2761 | 2762 |
2762 if (m_page->mainFrame()->isLocalFrame()) | 2763 if (m_page->mainFrame()->isLocalFrame()) { |
2763 m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload); | 2764 if (!m_page->deprecatedLocalMainFrame()->loader().currentItem()) |
| 2765 return; |
| 2766 FrameLoadRequest request = FrameLoadRequest( |
| 2767 nullptr, |
| 2768 m_page->deprecatedLocalMainFrame()->loader().resourceRequestForReloa
d( |
| 2769 FrameLoadTypeReload, KURL(), ClientRedirect)); |
| 2770 request.setClientRedirect(ClientRedirect); |
| 2771 m_page->deprecatedLocalMainFrame()->loader().load(request, FrameLoadType
Reload); |
| 2772 } |
2764 } | 2773 } |
2765 | 2774 |
2766 WebFrame* WebViewImpl::mainFrame() | 2775 WebFrame* WebViewImpl::mainFrame() |
2767 { | 2776 { |
2768 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); | 2777 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); |
2769 } | 2778 } |
2770 | 2779 |
2771 WebFrame* WebViewImpl::findFrameByName( | 2780 WebFrame* WebViewImpl::findFrameByName( |
2772 const WebString& name, WebFrame* relativeToFrame) | 2781 const WebString& name, WebFrame* relativeToFrame) |
2773 { | 2782 { |
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4402 { | 4411 { |
4403 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4412 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4404 } | 4413 } |
4405 | 4414 |
4406 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4415 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
4407 { | 4416 { |
4408 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4417 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
4409 } | 4418 } |
4410 | 4419 |
4411 } // namespace blink | 4420 } // namespace blink |
OLD | NEW |