Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1210)

Side by Side Diff: Source/web/WebFrameImpl.cpp

Issue 219903002: Revert 170347 "Convert HTMLFrameOwnerElement and FocusController..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1917/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/SpellCheckerClientImpl.cpp ('k') | Source/web/WebPageSerializer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 Document* document = frame()->document(); 721 Document* document = frame()->document();
722 ASSERT(document); 722 ASSERT(document);
723 723
724 RefPtrWillBeRawPtr<XPathResult> xpathResult = DocumentXPathEvaluator::evalua te(*document, xpath, document, nullptr, XPathResult::ORDERED_NODE_ITERATOR_TYPE, 0, IGNORE_EXCEPTION); 724 RefPtrWillBeRawPtr<XPathResult> xpathResult = DocumentXPathEvaluator::evalua te(*document, xpath, document, nullptr, XPathResult::ORDERED_NODE_ITERATOR_TYPE, 0, IGNORE_EXCEPTION);
725 if (!xpathResult) 725 if (!xpathResult)
726 return 0; 726 return 0;
727 727
728 Node* node = xpathResult->iterateNext(IGNORE_EXCEPTION); 728 Node* node = xpathResult->iterateNext(IGNORE_EXCEPTION);
729 if (!node || !node->isFrameOwnerElement()) 729 if (!node || !node->isFrameOwnerElement())
730 return 0; 730 return 0;
731 return fromFrame(toLocalFrame(toHTMLFrameOwnerElement(node)->contentFrame()) ); 731 return fromFrame(toHTMLFrameOwnerElement(node)->contentFrame());
732 } 732 }
733 733
734 WebDocument WebFrameImpl::document() const 734 WebDocument WebFrameImpl::document() const
735 { 735 {
736 if (!frame() || !frame()->document()) 736 if (!frame() || !frame()->document())
737 return WebDocument(); 737 return WebDocument();
738 return WebDocument(frame()->document()); 738 return WebDocument(frame()->document());
739 } 739 }
740 740
741 WebPerformance WebFrameImpl::performance() const 741 WebPerformance WebFrameImpl::performance() const
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 if (!client || !client->isFrameLoaderClientImpl()) 1777 if (!client || !client->isFrameLoaderClientImpl())
1778 return 0; 1778 return 0;
1779 return toFrameLoaderClientImpl(client)->webFrame(); 1779 return toFrameLoaderClientImpl(client)->webFrame();
1780 } 1780 }
1781 1781
1782 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) 1782 WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element)
1783 { 1783 {
1784 // 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. 1784 // 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.
1785 if (!isHTMLFrameElementBase(element)) 1785 if (!isHTMLFrameElementBase(element))
1786 return 0; 1786 return 0;
1787 return fromFrame(toLocalFrame(toHTMLFrameElementBase(element)->contentFrame( ))); 1787 return fromFrame(toHTMLFrameElementBase(element)->contentFrame());
1788 } 1788 }
1789 1789
1790 WebViewImpl* WebFrameImpl::viewImpl() const 1790 WebViewImpl* WebFrameImpl::viewImpl() const
1791 { 1791 {
1792 if (!frame()) 1792 if (!frame())
1793 return 0; 1793 return 0;
1794 return WebViewImpl::fromPage(frame()->page()); 1794 return WebViewImpl::fromPage(frame()->page());
1795 } 1795 }
1796 1796
1797 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const 1797 WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 1977
1978 void WebFrameImpl::invalidateAll() const 1978 void WebFrameImpl::invalidateAll() const
1979 { 1979 {
1980 ASSERT(frame() && frame()->view()); 1980 ASSERT(frame() && frame()->view());
1981 FrameView* view = frame()->view(); 1981 FrameView* view = frame()->view();
1982 view->invalidateRect(view->frameRect()); 1982 view->invalidateRect(view->frameRect());
1983 invalidateScrollbar(); 1983 invalidateScrollbar();
1984 } 1984 }
1985 1985
1986 } // namespace blink 1986 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/SpellCheckerClientImpl.cpp ('k') | Source/web/WebPageSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698