| 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/HTMLPlugInElement.h" | 64 #include "core/html/HTMLPlugInElement.h" |
| 65 #include "core/html/HTMLTextAreaElement.h" | 65 #include "core/html/HTMLTextAreaElement.h" |
| 66 #include "core/html/canvas/WebGLRenderingContext.h" | 66 #include "core/html/canvas/WebGLRenderingContext.h" |
| 67 #include "core/html/forms/PopupMenuClient.h" | 67 #include "core/html/forms/PopupMenuClient.h" |
| 68 #include "core/html/ime/InputMethodContext.h" | 68 #include "core/html/ime/InputMethodContext.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/Chrome.h" | 76 #include "core/page/Chrome.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/EventHandler.h" | 82 #include "core/page/EventHandler.h" |
| 82 #include "core/page/FocusController.h" | 83 #include "core/page/FocusController.h" |
| 83 #include "core/page/FrameTree.h" | 84 #include "core/page/FrameTree.h" |
| (...skipping 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2848 if (!m_page) | 2849 if (!m_page) |
| 2849 return; | 2850 return; |
| 2850 | 2851 |
| 2851 // Only change override encoding, don't change default encoding. | 2852 // Only change override encoding, don't change default encoding. |
| 2852 // Note that the new encoding must be 0 if it isn't supposed to be set. | 2853 // Note that the new encoding must be 0 if it isn't supposed to be set. |
| 2853 AtomicString newEncodingName; | 2854 AtomicString newEncodingName; |
| 2854 if (!encodingName.isEmpty()) | 2855 if (!encodingName.isEmpty()) |
| 2855 newEncodingName = encodingName; | 2856 newEncodingName = encodingName; |
| 2856 m_page->frameHost().setOverrideEncoding(newEncodingName); | 2857 m_page->frameHost().setOverrideEncoding(newEncodingName); |
| 2857 | 2858 |
| 2858 if (m_page->mainFrame()->isLocalFrame()) | 2859 if (m_page->mainFrame()->isLocalFrame()) { |
| 2859 m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload); | 2860 if (!m_page->deprecatedLocalMainFrame()->loader().currentItem()) |
| 2861 return; |
| 2862 FrameLoadRequest request = FrameLoader::frameRequestForReload( |
| 2863 m_page->deprecatedLocalMainFrame()->loader().resourceRequestForReloa
d( |
| 2864 *m_page->deprecatedLocalMainFrame(), FrameLoadTypeReload, KURL()
, ClientRedirect), |
| 2865 ClientRedirect); |
| 2866 m_page->deprecatedLocalMainFrame()->loader().load(request, FrameLoadType
Reload); |
| 2867 } |
| 2860 } | 2868 } |
| 2861 | 2869 |
| 2862 WebFrame* WebViewImpl::mainFrame() | 2870 WebFrame* WebViewImpl::mainFrame() |
| 2863 { | 2871 { |
| 2864 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); | 2872 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); |
| 2865 } | 2873 } |
| 2866 | 2874 |
| 2867 WebFrame* WebViewImpl::findFrameByName( | 2875 WebFrame* WebViewImpl::findFrameByName( |
| 2868 const WebString& name, WebFrame* relativeToFrame) | 2876 const WebString& name, WebFrame* relativeToFrame) |
| 2869 { | 2877 { |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4535 { | 4543 { |
| 4536 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4544 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4537 } | 4545 } |
| 4538 | 4546 |
| 4539 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4547 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
| 4540 { | 4548 { |
| 4541 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4549 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
| 4542 } | 4550 } |
| 4543 | 4551 |
| 4544 } // namespace blink | 4552 } // namespace blink |
| OLD | NEW |