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

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

Issue 101193002: Send AX focus changed events for modal dialog open/close (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: refactoring Created 7 years 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
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 3392 matching lines...) Expand 10 before | Expand all | Expand 10 after
3403 // Re-get the widget in case updating the layout changed things. 3403 // Re-get the widget in case updating the layout changed things.
3404 focusWidget = widgetForElement(*m_focusedElement); 3404 focusWidget = widgetForElement(*m_focusedElement);
3405 } 3405 }
3406 if (focusWidget) 3406 if (focusWidget)
3407 focusWidget->setFocus(true); 3407 focusWidget->setFocus(true);
3408 else 3408 else
3409 view()->setFocus(true); 3409 view()->setFocus(true);
3410 } 3410 }
3411 } 3411 }
3412 3412
3413 if (!focusChangeBlocked && m_focusedElement) { 3413 if (m_focusedElement != oldFocusedElement) {
dmazzoni 2013/12/10 08:07:53 Did you mean to get rid of the test for !focusChan
falken 2013/12/10 12:19:57 Hum, I remember needing to get rid of it (and thin
3414 // Create the AXObject cache in a focus change because Chromium relies o n it. 3414 // Create the AXObject cache in a focus change because Chromium relies o n it.
3415 if (AXObjectCache* cache = axObjectCache()) 3415 if (AXObjectCache* cache = axObjectCache())
3416 cache->handleFocusedUIElementChanged(oldFocusedElement.get(), newFoc usedElement.get()); 3416 cache->handleFocusedUIElementChanged(*this);
3417 } 3417 }
3418 3418
3419 if (!focusChangeBlocked && page()) 3419 if (!focusChangeBlocked && page())
3420 page()->chrome().focusedNodeChanged(m_focusedElement.get()); 3420 page()->chrome().focusedNodeChanged(m_focusedElement.get());
3421 3421
3422 SetFocusedElementDone: 3422 SetFocusedElementDone:
3423 updateStyleIfNeeded(); 3423 updateStyleIfNeeded();
3424 if (Frame* frame = this->frame()) 3424 if (Frame* frame = this->frame())
3425 frame->selection().didChangeFocus(); 3425 frame->selection().didChangeFocus();
3426 return !focusChangeBlocked; 3426 return !focusChangeBlocked;
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
5232 } 5232 }
5233 5233
5234 FastTextAutosizer* Document::fastTextAutosizer() 5234 FastTextAutosizer* Document::fastTextAutosizer()
5235 { 5235 {
5236 if (!m_fastTextAutosizer && RuntimeEnabledFeatures::fastTextAutosizingEnable d()) 5236 if (!m_fastTextAutosizer && RuntimeEnabledFeatures::fastTextAutosizingEnable d())
5237 m_fastTextAutosizer = FastTextAutosizer::create(this); 5237 m_fastTextAutosizer = FastTextAutosizer::create(this);
5238 return m_fastTextAutosizer.get(); 5238 return m_fastTextAutosizer.get();
5239 } 5239 }
5240 5240
5241 } // namespace WebCore 5241 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698