| 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 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2248 webView->suppressInvalidations(false); | 2248 webView->suppressInvalidations(false); |
| 2249 | 2249 |
| 2250 if (isMainFrame && webView->devToolsAgentPrivate()) | 2250 if (isMainFrame && webView->devToolsAgentPrivate()) |
| 2251 webView->devToolsAgentPrivate()->mainFrameViewCreated(this); | 2251 webView->devToolsAgentPrivate()->mainFrameViewCreated(this); |
| 2252 } | 2252 } |
| 2253 | 2253 |
| 2254 WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame) | 2254 WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame) |
| 2255 { | 2255 { |
| 2256 if (!frame) | 2256 if (!frame) |
| 2257 return 0; | 2257 return 0; |
| 2258 return static_cast<FrameLoaderClientImpl*>(frame->loader()->client())->webFr
ame(); | 2258 return toFrameLoaderClientImpl(frame->loader()->client())->webFrame(); |
| 2259 } | 2259 } |
| 2260 | 2260 |
| 2261 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) | 2261 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) |
| 2262 { | 2262 { |
| 2263 // FIXME: Why do we check specifically for <iframe> and <frame> here? Why ca
n't we get the WebFrameImpl from an <object> element, for example. | 2263 // FIXME: Why do we check specifically for <iframe> and <frame> here? Why ca
n't we get the WebFrameImpl from an <object> element, for example. |
| 2264 if (!element || !element->isFrameOwnerElement() || (!element->hasTagName(HTM
LNames::iframeTag) && !element->hasTagName(HTMLNames::frameTag))) | 2264 if (!element || !element->isFrameOwnerElement() || (!element->hasTagName(HTM
LNames::iframeTag) && !element->hasTagName(HTMLNames::frameTag))) |
| 2265 return 0; | 2265 return 0; |
| 2266 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); | 2266 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); |
| 2267 } | 2267 } |
| 2268 | 2268 |
| 2269 WebViewImpl* WebFrameImpl::viewImpl() const | 2269 WebViewImpl* WebFrameImpl::viewImpl() const |
| 2270 { | 2270 { |
| 2271 if (!frame()) | 2271 if (!frame()) |
| 2272 return 0; | 2272 return 0; |
| 2273 return WebViewImpl::fromPage(frame()->page()); | 2273 return WebViewImpl::fromPage(frame()->page()); |
| 2274 } | 2274 } |
| 2275 | 2275 |
| 2276 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const | 2276 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const |
| 2277 { | 2277 { |
| 2278 return static_cast<WebDataSourceImpl*>(dataSource()); | 2278 return toWebDataSourceImpl(dataSource()); |
| 2279 } | 2279 } |
| 2280 | 2280 |
| 2281 WebDataSourceImpl* WebFrameImpl::provisionalDataSourceImpl() const | 2281 WebDataSourceImpl* WebFrameImpl::provisionalDataSourceImpl() const |
| 2282 { | 2282 { |
| 2283 return static_cast<WebDataSourceImpl*>(provisionalDataSource()); | 2283 return toWebDataSourceImpl(provisionalDataSource()); |
| 2284 } | 2284 } |
| 2285 | 2285 |
| 2286 void WebFrameImpl::setFindEndstateFocusAndSelection() | 2286 void WebFrameImpl::setFindEndstateFocusAndSelection() |
| 2287 { | 2287 { |
| 2288 WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); | 2288 WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); |
| 2289 | 2289 |
| 2290 if (this == mainFrameImpl->activeMatchFrame() && m_activeMatch.get()) { | 2290 if (this == mainFrameImpl->activeMatchFrame() && m_activeMatch.get()) { |
| 2291 // If the user has set the selection since the match was found, we | 2291 // If the user has set the selection since the match was found, we |
| 2292 // don't focus anything. | 2292 // don't focus anything. |
| 2293 VisibleSelection selection(frame()->selection().selection()); | 2293 VisibleSelection selection(frame()->selection().selection()); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2514 | 2514 |
| 2515 // There is a possibility that the frame being detached was the only | 2515 // There is a possibility that the frame being detached was the only |
| 2516 // pending one. We need to make sure final replies can be sent. | 2516 // pending one. We need to make sure final replies can be sent. |
| 2517 flushCurrentScopingEffort(m_findRequestIdentifier); | 2517 flushCurrentScopingEffort(m_findRequestIdentifier); |
| 2518 | 2518 |
| 2519 cancelPendingScopingEffort(); | 2519 cancelPendingScopingEffort(); |
| 2520 } | 2520 } |
| 2521 } | 2521 } |
| 2522 | 2522 |
| 2523 } // namespace WebKit | 2523 } // namespace WebKit |
| OLD | NEW |