| Index: Source/web/WebFrameImpl.cpp
|
| diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
|
| index 3676b6fc189921e3255116f5e2e68e73b7437e22..93c0a0e7c0f4708cc34a5e43f2a97d4e5ce57c16 100644
|
| --- a/Source/web/WebFrameImpl.cpp
|
| +++ b/Source/web/WebFrameImpl.cpp
|
| @@ -2226,7 +2226,7 @@ WebFrameImpl* WebFrameImpl::fromFrame(LocalFrame* frame)
|
| WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element)
|
| {
|
| // FIXME: Why do we check specifically for <iframe> and <frame> here? Why can't we get the WebFrameImpl from an <object> element, for example.
|
| - if (!element || !element->isFrameOwnerElement() || (!element->hasTagName(HTMLNames::iframeTag) && !element->hasTagName(HTMLNames::frameTag)))
|
| + if (!element || !element->isFrameOwnerElement() || (!isHTMLIFrameElement(*element) && !isHTMLFrameElement(*element)))
|
| return 0;
|
| return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame());
|
| }
|
| @@ -2263,9 +2263,10 @@ void WebFrameImpl::setFindEndstateFocusAndSelection()
|
| // example, focus links if we have found text within the link.
|
| Node* node = m_activeMatch->firstNode();
|
| if (node && node->isInShadowTree()) {
|
| - Node* host = node->deprecatedShadowAncestorNode();
|
| - if (host->hasTagName(HTMLNames::inputTag) || host->hasTagName(HTMLNames::textareaTag))
|
| - node = host;
|
| + if (Node* host = node->shadowHost()) {
|
| + if (isHTMLInputElement(*host) || isHTMLTextAreaElement(*host))
|
| + node = host;
|
| + }
|
| }
|
| for (; node; node = node->parentNode()) {
|
| if (!node->isElementNode())
|
|
|