Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1827 // Finally clear the active match, for two reasons: | 1827 // Finally clear the active match, for two reasons: |
| 1828 // We just finished the find 'session' and we don't want future (potenti ally | 1828 // We just finished the find 'session' and we don't want future (potenti ally |
| 1829 // unrelated) find 'sessions' operations to start at the same place. | 1829 // unrelated) find 'sessions' operations to start at the same place. |
| 1830 // The WebLocalFrameImpl could get reused and the activeMatch could end up pointing | 1830 // The WebLocalFrameImpl could get reused and the activeMatch could end up pointing |
| 1831 // to a document that is no longer valid. Keeping an invalid reference a round | 1831 // to a document that is no longer valid. Keeping an invalid reference a round |
| 1832 // is just asking for trouble. | 1832 // is just asking for trouble. |
| 1833 m_textFinder->resetActiveMatch(); | 1833 m_textFinder->resetActiveMatch(); |
| 1834 } | 1834 } |
| 1835 } | 1835 } |
| 1836 | 1836 |
| 1837 bool WebLocalFrameImpl::setCaretSelectionFromRangeSelection() | |
| 1838 { | |
| 1839 if (!hasSelection()) | |
|
yosin_UTC9
2014/06/17 01:16:59
Q: Why do we need to call |hasSelection|?
It seems
AKVT
2014/06/17 06:35:46
Done.
| |
| 1840 return false; | |
| 1841 | |
| 1842 // Collapse the selection to end of Range Selection. | |
| 1843 FrameSelection& selection = frame()->selection(); | |
| 1844 return selection.collapseToEnd(); | |
| 1845 } | |
| 1846 | |
| 1837 void WebLocalFrameImpl::didFail(const ResourceError& error, bool wasProvisional) | 1847 void WebLocalFrameImpl::didFail(const ResourceError& error, bool wasProvisional) |
| 1838 { | 1848 { |
| 1839 if (!client()) | 1849 if (!client()) |
| 1840 return; | 1850 return; |
| 1841 WebURLError webError = error; | 1851 WebURLError webError = error; |
| 1842 if (wasProvisional) | 1852 if (wasProvisional) |
| 1843 client()->didFailProvisionalLoad(this, webError); | 1853 client()->didFailProvisionalLoad(this, webError); |
| 1844 else | 1854 else |
| 1845 client()->didFailLoad(this, webError); | 1855 client()->didFailLoad(this, webError); |
| 1846 } | 1856 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1946 | 1956 |
| 1947 void WebLocalFrameImpl::initializeAsChildFrame(FrameHost* host, FrameOwner* owne r, const AtomicString& name, const AtomicString& fallbackName) | 1957 void WebLocalFrameImpl::initializeAsChildFrame(FrameHost* host, FrameOwner* owne r, const AtomicString& name, const AtomicString& fallbackName) |
| 1948 { | 1958 { |
| 1949 setWebCoreFrame(LocalFrame::create(&m_frameLoaderClientImpl, host, owner)); | 1959 setWebCoreFrame(LocalFrame::create(&m_frameLoaderClientImpl, host, owner)); |
| 1950 frame()->tree().setName(name, fallbackName); | 1960 frame()->tree().setName(name, fallbackName); |
| 1951 // May dispatch JS events; frame() may be null after this. | 1961 // May dispatch JS events; frame() may be null after this. |
| 1952 frame()->init(); | 1962 frame()->init(); |
| 1953 } | 1963 } |
| 1954 | 1964 |
| 1955 } // namespace blink | 1965 } // namespace blink |
| OLD | NEW |