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

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

Issue 2634453003: Remove SelectionBehaviorOnFocus argument of Document::updateFocusAppearanceSoon(). (Closed)
Patch Set: Created 3 years, 11 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 m_mutationObserverTypes(0), 428 m_mutationObserverTypes(0),
429 m_styleEngine(this, nullptr), 429 m_styleEngine(this, nullptr),
430 m_styleSheetList(this, nullptr), 430 m_styleSheetList(this, nullptr),
431 m_visitedLinkState(VisitedLinkState::create(*this)), 431 m_visitedLinkState(VisitedLinkState::create(*this)),
432 m_visuallyOrdered(false), 432 m_visuallyOrdered(false),
433 m_readyState(Complete), 433 m_readyState(Complete),
434 m_parsingState(FinishedParsing), 434 m_parsingState(FinishedParsing),
435 m_gotoAnchorNeededAfterStylesheetsLoad(false), 435 m_gotoAnchorNeededAfterStylesheetsLoad(false),
436 m_containsValidityStyleRules(false), 436 m_containsValidityStyleRules(false),
437 m_containsPlugins(false), 437 m_containsPlugins(false),
438 m_updateFocusAppearanceSelectionBahavior(SelectionBehaviorOnFocus::Reset),
439 m_ignoreDestructiveWriteCount(0), 438 m_ignoreDestructiveWriteCount(0),
440 m_throwOnDynamicMarkupInsertionCount(0), 439 m_throwOnDynamicMarkupInsertionCount(0),
441 m_markers(new DocumentMarkerController(*this)), 440 m_markers(new DocumentMarkerController(*this)),
442 m_updateFocusAppearanceTimer( 441 m_updateFocusAppearanceTimer(
443 TaskRunnerHelper::get(TaskType::UnspecedTimer, this), 442 TaskRunnerHelper::get(TaskType::UnspecedTimer, this),
444 this, 443 this,
445 &Document::updateFocusAppearanceTimerFired), 444 &Document::updateFocusAppearanceTimerFired),
446 m_cssTarget(nullptr), 445 m_cssTarget(nullptr),
447 m_loadEventProgress(LoadEventNotRun), 446 m_loadEventProgress(LoadEventNotRun),
448 m_startTime(currentTime()), 447 m_startTime(currentTime()),
(...skipping 5121 matching lines...) Expand 10 before | Expand all | Expand 10 after
5570 void Document::didUpdateSecurityOrigin() { 5569 void Document::didUpdateSecurityOrigin() {
5571 if (!m_frame) 5570 if (!m_frame)
5572 return; 5571 return;
5573 m_frame->script().updateSecurityOrigin(getSecurityOrigin()); 5572 m_frame->script().updateSecurityOrigin(getSecurityOrigin());
5574 } 5573 }
5575 5574
5576 bool Document::isContextThread() const { 5575 bool Document::isContextThread() const {
5577 return isMainThread(); 5576 return isMainThread();
5578 } 5577 }
5579 5578
5580 void Document::updateFocusAppearanceSoon( 5579 void Document::updateFocusAppearanceLater() {
5581 SelectionBehaviorOnFocus selectionbehavioronfocus) {
5582 m_updateFocusAppearanceSelectionBahavior = selectionbehavioronfocus;
5583 if (!m_updateFocusAppearanceTimer.isActive()) 5580 if (!m_updateFocusAppearanceTimer.isActive())
5584 m_updateFocusAppearanceTimer.startOneShot(0, BLINK_FROM_HERE); 5581 m_updateFocusAppearanceTimer.startOneShot(0, BLINK_FROM_HERE);
5585 } 5582 }
5586 5583
5587 void Document::cancelFocusAppearanceUpdate() { 5584 void Document::cancelFocusAppearanceUpdate() {
5588 m_updateFocusAppearanceTimer.stop(); 5585 m_updateFocusAppearanceTimer.stop();
5589 } 5586 }
5590 5587
5591 void Document::updateFocusAppearanceTimerFired(TimerBase*) { 5588 void Document::updateFocusAppearanceTimerFired(TimerBase*) {
5592 Element* element = focusedElement(); 5589 Element* element = focusedElement();
5593 if (!element) 5590 if (!element)
5594 return; 5591 return;
5595 updateStyleAndLayout(); 5592 updateStyleAndLayout();
5596 if (element->isFocusable()) 5593 if (element->isFocusable())
5597 element->updateFocusAppearance(m_updateFocusAppearanceSelectionBahavior); 5594 element->updateFocusAppearance(SelectionBehaviorOnFocus::Restore);
5598 } 5595 }
5599 5596
5600 void Document::attachRange(Range* range) { 5597 void Document::attachRange(Range* range) {
5601 DCHECK(!m_ranges.contains(range)); 5598 DCHECK(!m_ranges.contains(range));
5602 m_ranges.add(range); 5599 m_ranges.add(range);
5603 } 5600 }
5604 5601
5605 void Document::detachRange(Range* range) { 5602 void Document::detachRange(Range* range) {
5606 // We don't ASSERT m_ranges.contains(range) to allow us to call this 5603 // We don't ASSERT m_ranges.contains(range) to allow us to call this
5607 // unconditionally to fix: https://bugs.webkit.org/show_bug.cgi?id=26044 5604 // unconditionally to fix: https://bugs.webkit.org/show_bug.cgi?id=26044
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
6504 } 6501 }
6505 6502
6506 void showLiveDocumentInstances() { 6503 void showLiveDocumentInstances() {
6507 WeakDocumentSet& set = liveDocumentSet(); 6504 WeakDocumentSet& set = liveDocumentSet();
6508 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6505 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6509 for (Document* document : set) 6506 for (Document* document : set)
6510 fprintf(stderr, "- Document %p URL: %s\n", document, 6507 fprintf(stderr, "- Document %p URL: %s\n", document,
6511 document->url().getString().utf8().data()); 6508 document->url().getString().utf8().data());
6512 } 6509 }
6513 #endif 6510 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698