| 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 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2219 if (!frame) | 2219 if (!frame) |
| 2220 return 0; | 2220 return 0; |
| 2221 return toFrameLoaderClientImpl(frame->loader().client())->webFrame(); | 2221 return toFrameLoaderClientImpl(frame->loader().client())->webFrame(); |
| 2222 } | 2222 } |
| 2223 | 2223 |
| 2224 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) | 2224 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) |
| 2225 { | 2225 { |
| 2226 // 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 // 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. |
| 2227 if (!element || !element->isFrameOwnerElement() || (!element->hasTagName(HTM
LNames::iframeTag) && !element->hasTagName(HTMLNames::frameTag))) | 2227 if (!element || !element->isFrameOwnerElement() || (!element->hasTagName(HTM
LNames::iframeTag) && !element->hasTagName(HTMLNames::frameTag))) |
| 2228 return 0; | 2228 return 0; |
| 2229 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); | 2229 return fromFrame(toLocalFrame(toHTMLFrameOwnerElement(element)->contentFrame
())); |
| 2230 } | 2230 } |
| 2231 | 2231 |
| 2232 WebViewImpl* WebFrameImpl::viewImpl() const | 2232 WebViewImpl* WebFrameImpl::viewImpl() const |
| 2233 { | 2233 { |
| 2234 if (!frame()) | 2234 if (!frame()) |
| 2235 return 0; | 2235 return 0; |
| 2236 return WebViewImpl::fromPage(frame()->page()); | 2236 return WebViewImpl::fromPage(frame()->page()); |
| 2237 } | 2237 } |
| 2238 | 2238 |
| 2239 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const | 2239 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const |
| (...skipping 242 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 |