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 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2216 WebFrameImpl* WebFrameImpl::fromFrame(LocalFrame* frame) | 2216 WebFrameImpl* WebFrameImpl::fromFrame(LocalFrame* frame) |
2217 { | 2217 { |
2218 if (!frame) | 2218 if (!frame) |
2219 return 0; | 2219 return 0; |
2220 return toFrameLoaderClientImpl(frame->loader().client())->webFrame(); | 2220 return toFrameLoaderClientImpl(frame->loader().client())->webFrame(); |
2221 } | 2221 } |
2222 | 2222 |
2223 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) | 2223 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) |
2224 { | 2224 { |
2225 // 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. | 2225 // 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. |
2226 if (!element || !element->isFrameOwnerElement() || (!isHTMLIFrameElement(*el
ement) && !isHTMLFrameElement(*element))) | 2226 if (!isHTMLFrameElementBase(element)) |
2227 return 0; | 2227 return 0; |
2228 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); | 2228 return fromFrame(toHTMLFrameElementBase(element)->contentFrame()); |
2229 } | 2229 } |
2230 | 2230 |
2231 WebViewImpl* WebFrameImpl::viewImpl() const | 2231 WebViewImpl* WebFrameImpl::viewImpl() const |
2232 { | 2232 { |
2233 if (!frame()) | 2233 if (!frame()) |
2234 return 0; | 2234 return 0; |
2235 return WebViewImpl::fromPage(frame()->page()); | 2235 return WebViewImpl::fromPage(frame()->page()); |
2236 } | 2236 } |
2237 | 2237 |
2238 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const | 2238 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2482 | 2482 |
2483 // There is a possibility that the frame being detached was the only | 2483 // There is a possibility that the frame being detached was the only |
2484 // pending one. We need to make sure final replies can be sent. | 2484 // pending one. We need to make sure final replies can be sent. |
2485 flushCurrentScopingEffort(m_findRequestIdentifier); | 2485 flushCurrentScopingEffort(m_findRequestIdentifier); |
2486 | 2486 |
2487 cancelPendingScopingEffort(); | 2487 cancelPendingScopingEffort(); |
2488 } | 2488 } |
2489 } | 2489 } |
2490 | 2490 |
2491 } // namespace blink | 2491 } // namespace blink |
OLD | NEW |