| 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 2474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2485 // Only change override encoding, don't change default encoding. | 2485 // Only change override encoding, don't change default encoding. |
| 2486 // Note that the new encoding must be 0 if it isn't supposed to be set. | 2486 // Note that the new encoding must be 0 if it isn't supposed to be set. |
| 2487 AtomicString newEncodingName; | 2487 AtomicString newEncodingName; |
| 2488 if (!encodingName.isEmpty()) | 2488 if (!encodingName.isEmpty()) |
| 2489 newEncodingName = encodingName; | 2489 newEncodingName = encodingName; |
| 2490 m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload, KURL(), ne
wEncodingName); | 2490 m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload, KURL(), ne
wEncodingName); |
| 2491 } | 2491 } |
| 2492 | 2492 |
| 2493 WebFrame* WebViewImpl::mainFrame() | 2493 WebFrame* WebViewImpl::mainFrame() |
| 2494 { | 2494 { |
| 2495 // FIXME: This should be updated so it can return both WebLocalFrames and | 2495 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); |
| 2496 // WebRemoteFrames. Right now, it only returns WebLocalFrames. | |
| 2497 return mainFrameImpl(); | |
| 2498 } | 2496 } |
| 2499 | 2497 |
| 2500 WebFrame* WebViewImpl::findFrameByName( | 2498 WebFrame* WebViewImpl::findFrameByName( |
| 2501 const WebString& name, WebFrame* relativeToFrame) | 2499 const WebString& name, WebFrame* relativeToFrame) |
| 2502 { | 2500 { |
| 2503 // FIXME: Either this should only deal with WebLocalFrames or it should move
to WebFrame. | 2501 // FIXME: Either this should only deal with WebLocalFrames or it should move
to WebFrame. |
| 2504 if (!relativeToFrame) | 2502 if (!relativeToFrame) |
| 2505 relativeToFrame = mainFrame(); | 2503 relativeToFrame = mainFrame(); |
| 2506 Frame* frame = toWebLocalFrameImpl(relativeToFrame)->frame(); | 2504 Frame* frame = toWebLocalFrameImpl(relativeToFrame)->frame(); |
| 2507 frame = frame->tree().find(name); | 2505 frame = frame->tree().find(name); |
| (...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4137 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4135 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4138 | 4136 |
| 4139 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4137 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4140 return false; | 4138 return false; |
| 4141 | 4139 |
| 4142 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4140 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4143 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4141 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4144 } | 4142 } |
| 4145 | 4143 |
| 4146 } // namespace blink | 4144 } // namespace blink |
| OLD | NEW |