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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 21346002: Fix renderer assert after autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 2 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 | « no previous file | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3451 matching lines...) Expand 10 before | Expand all | Expand 10 after
3462 if (oldFocusedElement->isRootEditableElement()) 3462 if (oldFocusedElement->isRootEditableElement())
3463 frame()->editor().didEndEditing(); 3463 frame()->editor().didEndEditing();
3464 3464
3465 if (view()) { 3465 if (view()) {
3466 Widget* oldWidget = widgetForElement(oldFocusedElement.get()); 3466 Widget* oldWidget = widgetForElement(oldFocusedElement.get());
3467 if (oldWidget) 3467 if (oldWidget)
3468 oldWidget->setFocus(false); 3468 oldWidget->setFocus(false);
3469 else 3469 else
3470 view()->setFocus(false); 3470 view()->setFocus(false);
3471 } 3471 }
3472
3473 // Autofill client may have modified the value of newFocusedElement, thu s require
3474 // a layout update here, otherwise it will assert at newFocusedElement-> isFocusable().
3475 // See crbug.com/251163.
3476 updateLayoutIgnorePendingStylesheets();
3472 } 3477 }
3473 3478
3474 if (newFocusedElement && newFocusedElement->isFocusable()) { 3479 if (newFocusedElement && newFocusedElement->isFocusable()) {
3475 if (newFocusedElement->isRootEditableElement() && !acceptsEditingFocus(n ewFocusedElement.get())) { 3480 if (newFocusedElement->isRootEditableElement() && !acceptsEditingFocus(n ewFocusedElement.get())) {
3476 // delegate blocks focus change 3481 // delegate blocks focus change
3477 focusChangeBlocked = true; 3482 focusChangeBlocked = true;
3478 goto SetFocusedElementDone; 3483 goto SetFocusedElementDone;
3479 } 3484 }
3480 // Set focus on the new node 3485 // Set focus on the new node
3481 m_focusedElement = newFocusedElement; 3486 m_focusedElement = newFocusedElement;
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after
5444 { 5449 {
5445 return DocumentLifecycleNotifier::create(this); 5450 return DocumentLifecycleNotifier::create(this);
5446 } 5451 }
5447 5452
5448 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5453 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5449 { 5454 {
5450 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5455 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5451 } 5456 }
5452 5457
5453 } // namespace WebCore 5458 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698