Chromium Code Reviews| 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 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3167 if (oldFocusedElement->isRootEditableElement()) | 3167 if (oldFocusedElement->isRootEditableElement()) |
| 3168 frame()->editor()->didEndEditing(); | 3168 frame()->editor()->didEndEditing(); |
| 3169 | 3169 |
| 3170 if (view()) { | 3170 if (view()) { |
| 3171 Widget* oldWidget = widgetForElement(oldFocusedElement.get()); | 3171 Widget* oldWidget = widgetForElement(oldFocusedElement.get()); |
| 3172 if (oldWidget) | 3172 if (oldWidget) |
| 3173 oldWidget->setFocus(false); | 3173 oldWidget->setFocus(false); |
| 3174 else | 3174 else |
| 3175 view()->setFocus(false); | 3175 view()->setFocus(false); |
| 3176 } | 3176 } |
| 3177 | |
| 3178 // Autofill client may have modified the value of newFocusNode, thus req uire | |
|
falken
2013/07/31 18:27:01
nit: newFocusNode -> newFocusedNode
| |
| 3179 // a layout update here, otherwise it will assert at newFocusedNode->isF ocusable(). | |
| 3180 // See crbug.com/251163. | |
| 3181 RenderObject* renderer = newFocusedNode ? newFocusedNode->renderer() : 0 ; | |
|
tkent
2013/07/31 21:52:05
It looks this code is not compilable. There is no
| |
| 3182 if (renderer && renderer->needsLayout()) | |
| 3183 updateLayout(); | |
|
esprehn
2013/07/31 22:20:25
You shouldn't reach into the render tree and inspe
| |
| 3177 } | 3184 } |
| 3178 | 3185 |
| 3179 if (newFocusedElement && newFocusedElement->isFocusable()) { | 3186 if (newFocusedElement && newFocusedElement->isFocusable()) { |
| 3180 if (newFocusedElement->isRootEditableElement() && !acceptsEditingFocus(n ewFocusedElement.get())) { | 3187 if (newFocusedElement->isRootEditableElement() && !acceptsEditingFocus(n ewFocusedElement.get())) { |
| 3181 // delegate blocks focus change | 3188 // delegate blocks focus change |
| 3182 focusChangeBlocked = true; | 3189 focusChangeBlocked = true; |
| 3183 goto SetFocusedElementDone; | 3190 goto SetFocusedElementDone; |
| 3184 } | 3191 } |
| 3185 // Set focus on the new node | 3192 // Set focus on the new node |
| 3186 m_focusedElement = newFocusedElement; | 3193 m_focusedElement = newFocusedElement; |
| (...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5079 { | 5086 { |
| 5080 return DocumentLifecycleNotifier::create(this); | 5087 return DocumentLifecycleNotifier::create(this); |
| 5081 } | 5088 } |
| 5082 | 5089 |
| 5083 DocumentLifecycleNotifier* Document::lifecycleNotifier() | 5090 DocumentLifecycleNotifier* Document::lifecycleNotifier() |
| 5084 { | 5091 { |
| 5085 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); | 5092 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); |
| 5086 } | 5093 } |
| 5087 | 5094 |
| 5088 } // namespace WebCore | 5095 } // namespace WebCore |
| OLD | NEW |