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

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

Issue 2586143004: Blur immediately if an attribute change made an element unfocasable. (Closed)
Patch Set: Update comments and a function name Created 3 years, 12 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
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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 // a paint for many seconds. 2184 // a paint for many seconds.
2185 if (isRenderingReady() && body() && 2185 if (isRenderingReady() && body() &&
2186 !styleEngine().hasPendingScriptBlockingSheets()) { 2186 !styleEngine().hasPendingScriptBlockingSheets()) {
2187 if (!m_documentTiming.firstLayout()) 2187 if (!m_documentTiming.firstLayout())
2188 m_documentTiming.markFirstLayout(); 2188 m_documentTiming.markFirstLayout();
2189 } 2189 }
2190 2190
2191 m_rootScrollerController->didUpdateLayout(); 2191 m_rootScrollerController->didUpdateLayout();
2192 } 2192 }
2193 2193
2194 void Document::setNeedsFocusedElementCheck() {
2195 setNeedsStyleRecalc(
2196 LocalStyleChange,
2197 StyleChangeReasonForTracing::createWithExtraData(
2198 StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus));
2199 }
2200
2201 void Document::clearFocusedElementSoon() { 2194 void Document::clearFocusedElementSoon() {
2202 if (!m_clearFocusedElementTimer.isActive()) 2195 if (!m_clearFocusedElementTimer.isActive())
2203 m_clearFocusedElementTimer.startOneShot(0, BLINK_FROM_HERE); 2196 m_clearFocusedElementTimer.startOneShot(0, BLINK_FROM_HERE);
2204 } 2197 }
2205 2198
2206 void Document::clearFocusedElementTimerFired(TimerBase*) { 2199 void Document::clearFocusedElementTimerFired(TimerBase*) {
2207 updateStyleAndLayoutTree(); 2200 updateStyleAndLayoutTree();
2208 2201
2209 if (m_focusedElement && !m_focusedElement->isFocusable()) 2202 if (m_focusedElement && !m_focusedElement->isFocusable())
2210 m_focusedElement->blur(); 2203 m_focusedElement->blur();
(...skipping 4375 matching lines...) Expand 10 before | Expand all | Expand 10 after
6586 } 6579 }
6587 6580
6588 void showLiveDocumentInstances() { 6581 void showLiveDocumentInstances() {
6589 WeakDocumentSet& set = liveDocumentSet(); 6582 WeakDocumentSet& set = liveDocumentSet();
6590 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6583 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6591 for (Document* document : set) 6584 for (Document* document : set)
6592 fprintf(stderr, "- Document %p URL: %s\n", document, 6585 fprintf(stderr, "- Document %p URL: %s\n", document,
6593 document->url().getString().utf8().data()); 6586 document->url().getString().utf8().data());
6594 } 6587 }
6595 #endif 6588 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698