OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |