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

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

Issue 533963002: Don't fail the style assert in Element::rendererIsFocusable if the document is active. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile. Created 6 years, 3 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/core/dom/Element.cpp ('k') | no next file » | 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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 if (this != mainFrameImpl->activeMatchFrame()) 1685 if (this != mainFrameImpl->activeMatchFrame())
1686 return; 1686 return;
1687 1687
1688 if (Range* activeMatch = m_textFinder->activeMatch()) { 1688 if (Range* activeMatch = m_textFinder->activeMatch()) {
1689 // If the user has set the selection since the match was found, we 1689 // If the user has set the selection since the match was found, we
1690 // don't focus anything. 1690 // don't focus anything.
1691 VisibleSelection selection(frame()->selection().selection()); 1691 VisibleSelection selection(frame()->selection().selection());
1692 if (!selection.isNone()) 1692 if (!selection.isNone())
1693 return; 1693 return;
1694 1694
1695 // Need to clean out style and layout state before querying Element::isF ocusable().
1696 frame()->document()->updateLayoutIgnorePendingStylesheets();
1697
1695 // Try to find the first focusable node up the chain, which will, for 1698 // Try to find the first focusable node up the chain, which will, for
1696 // example, focus links if we have found text within the link. 1699 // example, focus links if we have found text within the link.
1697 Node* node = activeMatch->firstNode(); 1700 Node* node = activeMatch->firstNode();
1698 if (node && node->isInShadowTree()) { 1701 if (node && node->isInShadowTree()) {
1699 if (Node* host = node->shadowHost()) { 1702 if (Node* host = node->shadowHost()) {
1700 if (isHTMLInputElement(*host) || isHTMLTextAreaElement(*host)) 1703 if (isHTMLInputElement(*host) || isHTMLTextAreaElement(*host))
1701 node = host; 1704 node = host;
1702 } 1705 }
1703 } 1706 }
1704 for (; node; node = node->parentNode()) { 1707 for (; node; node = node->parentNode()) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 1864
1862 void WebLocalFrameImpl::invalidateAll() const 1865 void WebLocalFrameImpl::invalidateAll() const
1863 { 1866 {
1864 ASSERT(frame() && frame()->view()); 1867 ASSERT(frame() && frame()->view());
1865 FrameView* view = frame()->view(); 1868 FrameView* view = frame()->view();
1866 view->invalidateRect(view->frameRect()); 1869 view->invalidateRect(view->frameRect());
1867 invalidateScrollbar(); 1870 invalidateScrollbar();
1868 } 1871 }
1869 1872
1870 } // namespace blink 1873 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698