| 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 Document* document = frame()->document(); | 753 Document* document = frame()->document(); |
| 754 ASSERT(document); | 754 ASSERT(document); |
| 755 | 755 |
| 756 RefPtrWillBeRawPtr<XPathResult> xpathResult = DocumentXPathEvaluator::evalua
te(*document, xpath, document, nullptr, XPathResult::ORDERED_NODE_ITERATOR_TYPE,
0, IGNORE_EXCEPTION); | 756 RefPtrWillBeRawPtr<XPathResult> xpathResult = DocumentXPathEvaluator::evalua
te(*document, xpath, document, nullptr, XPathResult::ORDERED_NODE_ITERATOR_TYPE,
0, IGNORE_EXCEPTION); |
| 757 if (!xpathResult) | 757 if (!xpathResult) |
| 758 return 0; | 758 return 0; |
| 759 | 759 |
| 760 Node* node = xpathResult->iterateNext(IGNORE_EXCEPTION); | 760 Node* node = xpathResult->iterateNext(IGNORE_EXCEPTION); |
| 761 if (!node || !node->isFrameOwnerElement()) | 761 if (!node || !node->isFrameOwnerElement()) |
| 762 return 0; | 762 return 0; |
| 763 return fromFrame(toHTMLFrameOwnerElement(node)->contentFrame()); | 763 return fromFrame(toLocalFrame(toHTMLFrameOwnerElement(node)->contentFrame())
); |
| 764 } | 764 } |
| 765 | 765 |
| 766 WebDocument WebFrameImpl::document() const | 766 WebDocument WebFrameImpl::document() const |
| 767 { | 767 { |
| 768 if (!frame() || !frame()->document()) | 768 if (!frame() || !frame()->document()) |
| 769 return WebDocument(); | 769 return WebDocument(); |
| 770 return WebDocument(frame()->document()); | 770 return WebDocument(frame()->document()); |
| 771 } | 771 } |
| 772 | 772 |
| 773 WebPerformance WebFrameImpl::performance() const | 773 WebPerformance WebFrameImpl::performance() const |
| (...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 if (!client || !client->isFrameLoaderClientImpl()) | 2271 if (!client || !client->isFrameLoaderClientImpl()) |
| 2272 return 0; | 2272 return 0; |
| 2273 return toFrameLoaderClientImpl(client)->webFrame(); | 2273 return toFrameLoaderClientImpl(client)->webFrame(); |
| 2274 } | 2274 } |
| 2275 | 2275 |
| 2276 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) | 2276 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) |
| 2277 { | 2277 { |
| 2278 // 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. | 2278 // 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. |
| 2279 if (!isHTMLFrameElementBase(element)) | 2279 if (!isHTMLFrameElementBase(element)) |
| 2280 return 0; | 2280 return 0; |
| 2281 return fromFrame(toHTMLFrameElementBase(element)->contentFrame()); | 2281 return fromFrame(toLocalFrame(toHTMLFrameElementBase(element)->contentFrame(
))); |
| 2282 } | 2282 } |
| 2283 | 2283 |
| 2284 WebViewImpl* WebFrameImpl::viewImpl() const | 2284 WebViewImpl* WebFrameImpl::viewImpl() const |
| 2285 { | 2285 { |
| 2286 if (!frame()) | 2286 if (!frame()) |
| 2287 return 0; | 2287 return 0; |
| 2288 return WebViewImpl::fromPage(frame()->page()); | 2288 return WebViewImpl::fromPage(frame()->page()); |
| 2289 } | 2289 } |
| 2290 | 2290 |
| 2291 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const | 2291 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2535 | 2535 |
| 2536 // There is a possibility that the frame being detached was the only | 2536 // There is a possibility that the frame being detached was the only |
| 2537 // pending one. We need to make sure final replies can be sent. | 2537 // pending one. We need to make sure final replies can be sent. |
| 2538 flushCurrentScopingEffort(m_findRequestIdentifier); | 2538 flushCurrentScopingEffort(m_findRequestIdentifier); |
| 2539 | 2539 |
| 2540 cancelPendingScopingEffort(); | 2540 cancelPendingScopingEffort(); |
| 2541 } | 2541 } |
| 2542 } | 2542 } |
| 2543 | 2543 |
| 2544 } // namespace blink | 2544 } // namespace blink |
| OLD | NEW |