| 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 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 // Only change override encoding, don't change default encoding. | 2496 // Only change override encoding, don't change default encoding. |
| 2497 // Note that the new encoding must be 0 if it isn't supposed to be set. | 2497 // Note that the new encoding must be 0 if it isn't supposed to be set. |
| 2498 AtomicString newEncodingName; | 2498 AtomicString newEncodingName; |
| 2499 if (!encodingName.isEmpty()) | 2499 if (!encodingName.isEmpty()) |
| 2500 newEncodingName = encodingName; | 2500 newEncodingName = encodingName; |
| 2501 m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload, KURL(), ne
wEncodingName); | 2501 m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload, KURL(), ne
wEncodingName); |
| 2502 } | 2502 } |
| 2503 | 2503 |
| 2504 WebFrame* WebViewImpl::mainFrame() | 2504 WebFrame* WebViewImpl::mainFrame() |
| 2505 { | 2505 { |
| 2506 // FIXME: This should be updated so it can return both WebLocalFrames and | 2506 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); |
| 2507 // WebRemoteFrames. Right now, it only returns WebLocalFrames. | |
| 2508 return mainFrameImpl(); | |
| 2509 } | 2507 } |
| 2510 | 2508 |
| 2511 WebFrame* WebViewImpl::findFrameByName( | 2509 WebFrame* WebViewImpl::findFrameByName( |
| 2512 const WebString& name, WebFrame* relativeToFrame) | 2510 const WebString& name, WebFrame* relativeToFrame) |
| 2513 { | 2511 { |
| 2514 // FIXME: Either this should only deal with WebLocalFrames or it should move
to WebFrame. | 2512 // FIXME: Either this should only deal with WebLocalFrames or it should move
to WebFrame. |
| 2515 if (!relativeToFrame) | 2513 if (!relativeToFrame) |
| 2516 relativeToFrame = mainFrame(); | 2514 relativeToFrame = mainFrame(); |
| 2517 Frame* frame = toWebLocalFrameImpl(relativeToFrame)->frame(); | 2515 Frame* frame = toWebLocalFrameImpl(relativeToFrame)->frame(); |
| 2518 frame = frame->tree().find(name); | 2516 frame = frame->tree().find(name); |
| (...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4153 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4151 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4154 | 4152 |
| 4155 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4153 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4156 return false; | 4154 return false; |
| 4157 | 4155 |
| 4158 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4156 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4159 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4157 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4160 } | 4158 } |
| 4161 | 4159 |
| 4162 } // namespace blink | 4160 } // namespace blink |
| OLD | NEW |