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

Side by Side Diff: sky/engine/core/page/FocusController.cpp

Issue 834693007: Remove the remaining parts of ignorePendingStylesheets and placeholder styles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove comment. Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/page/EventHandler.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('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) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 314
315 bool FocusController::advanceFocusInDocumentOrder(FocusType type, bool initialFo cus) 315 bool FocusController::advanceFocusInDocumentOrder(FocusType type, bool initialFo cus)
316 { 316 {
317 LocalFrame* frame = focusedOrMainFrame(); 317 LocalFrame* frame = focusedOrMainFrame();
318 ASSERT(frame); 318 ASSERT(frame);
319 Document* document = frame->document(); 319 Document* document = frame->document();
320 320
321 Node* currentNode = document->focusedElement(); 321 Node* currentNode = document->focusedElement();
322 322
323 document->updateLayoutIgnorePendingStylesheets(); 323 document->updateLayout();
324 324
325 RefPtr<Node> node = findFocusableNodeAcrossFocusScope(type, FocusNavigationS cope::focusNavigationScopeOf(currentNode ? currentNode : document), currentNode) ; 325 RefPtr<Node> node = findFocusableNodeAcrossFocusScope(type, FocusNavigationS cope::focusNavigationScopeOf(currentNode ? currentNode : document), currentNode) ;
326 326
327 if (!node) { 327 if (!node) {
328 // We didn't find a node to focus, so we should try to pass focus to Chr ome. 328 // We didn't find a node to focus, so we should try to pass focus to Chr ome.
329 if (!initialFocus && m_page->chrome().canTakeFocus(type)) { 329 if (!initialFocus && m_page->chrome().canTakeFocus(type)) {
330 document->setFocusedElement(nullptr); 330 document->setFocusedElement(nullptr);
331 setFocusedFrame(nullptr); 331 setFocusedFrame(nullptr);
332 m_page->chrome().takeFocus(type); 332 m_page->chrome().takeFocus(type);
333 return true; 333 return true;
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 { 589 {
590 if (m_isActive == active) 590 if (m_isActive == active)
591 return; 591 return;
592 592
593 m_isActive = active; 593 m_isActive = active;
594 594
595 focusedOrMainFrame()->selection().pageActivationChanged(); 595 focusedOrMainFrame()->selection().pageActivationChanged();
596 } 596 }
597 597
598 } // namespace blink 598 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/page/EventHandler.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698