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

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

Issue 2834813002: Remove unneeded variable in Document::SetFocusedElement() (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4014 matching lines...) Expand 10 before | Expand all | Expand 10 after
4025 const Vector<AnnotatedRegionValue>& Document::AnnotatedRegions() const { 4025 const Vector<AnnotatedRegionValue>& Document::AnnotatedRegions() const {
4026 return annotated_regions_; 4026 return annotated_regions_;
4027 } 4027 }
4028 4028
4029 void Document::SetAnnotatedRegions( 4029 void Document::SetAnnotatedRegions(
4030 const Vector<AnnotatedRegionValue>& regions) { 4030 const Vector<AnnotatedRegionValue>& regions) {
4031 annotated_regions_ = regions; 4031 annotated_regions_ = regions;
4032 SetAnnotatedRegionsDirty(false); 4032 SetAnnotatedRegionsDirty(false);
4033 } 4033 }
4034 4034
4035 bool Document::SetFocusedElement(Element* prp_new_focused_element, 4035 bool Document::SetFocusedElement(Element* new_focused_element,
4036 const FocusParams& params) { 4036 const FocusParams& params) {
4037 DCHECK(!lifecycle_.InDetach()); 4037 DCHECK(!lifecycle_.InDetach());
4038 4038
4039 clear_focused_element_timer_.Stop(); 4039 clear_focused_element_timer_.Stop();
4040 4040
4041 Element* new_focused_element = prp_new_focused_element;
4042
4043 // Make sure newFocusedNode is actually in this document 4041 // Make sure newFocusedNode is actually in this document
4044 if (new_focused_element && (new_focused_element->GetDocument() != this)) 4042 if (new_focused_element && (new_focused_element->GetDocument() != this))
4045 return true; 4043 return true;
4046 4044
4047 if (NodeChildRemovalTracker::IsBeingRemoved(new_focused_element)) 4045 if (NodeChildRemovalTracker::IsBeingRemoved(new_focused_element))
4048 return true; 4046 return true;
4049 4047
4050 if (focused_element_ == new_focused_element) 4048 if (focused_element_ == new_focused_element)
4051 return true; 4049 return true;
4052 4050
(...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after
6652 } 6650 }
6653 6651
6654 void showLiveDocumentInstances() { 6652 void showLiveDocumentInstances() {
6655 WeakDocumentSet& set = liveDocumentSet(); 6653 WeakDocumentSet& set = liveDocumentSet();
6656 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6654 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6657 for (blink::Document* document : set) 6655 for (blink::Document* document : set)
6658 fprintf(stderr, "- Document %p URL: %s\n", document, 6656 fprintf(stderr, "- Document %p URL: %s\n", document,
6659 document->Url().GetString().Utf8().Data()); 6657 document->Url().GetString().Utf8().Data());
6660 } 6658 }
6661 #endif 6659 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698