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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 2905233002: Remove the lifetime hack in ImageLoader where it keeps its assoc element alive (Closed)
Patch Set: Rebase Created 3 years, 6 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
9 * Copyright (C) 2010 Google Inc. All rights reserved. 9 * Copyright (C) 2010 Google Inc. All rights reserved.
10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 131
132 DEFINE_TRACE(HTMLInputElement) { 132 DEFINE_TRACE(HTMLInputElement) {
133 visitor->Trace(input_type_); 133 visitor->Trace(input_type_);
134 visitor->Trace(input_type_view_); 134 visitor->Trace(input_type_view_);
135 visitor->Trace(list_attribute_target_observer_); 135 visitor->Trace(list_attribute_target_observer_);
136 visitor->Trace(image_loader_); 136 visitor->Trace(image_loader_);
137 TextControlElement::Trace(visitor); 137 TextControlElement::Trace(visitor);
138 } 138 }
139 139
140 bool HTMLInputElement::HasPendingActivity() const {
141 return ImageLoader() && ImageLoader()->HasPendingActivity();
142 }
143
140 HTMLImageLoader& HTMLInputElement::EnsureImageLoader() { 144 HTMLImageLoader& HTMLInputElement::EnsureImageLoader() {
141 if (!image_loader_) 145 if (!image_loader_)
142 image_loader_ = HTMLImageLoader::Create(this); 146 image_loader_ = HTMLImageLoader::Create(this);
143 return *image_loader_; 147 return *image_loader_;
144 } 148 }
145 149
146 void HTMLInputElement::DidAddUserAgentShadowRoot(ShadowRoot&) { 150 void HTMLInputElement::DidAddUserAgentShadowRoot(ShadowRoot&) {
147 input_type_view_->CreateShadowSubtree(); 151 input_type_view_->CreateShadowSubtree();
148 } 152 }
149 153
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 1902
1899 bool HTMLInputElement::HasFallbackContent() const { 1903 bool HTMLInputElement::HasFallbackContent() const {
1900 return input_type_view_->HasFallbackContent(); 1904 return input_type_view_->HasFallbackContent();
1901 } 1905 }
1902 1906
1903 void HTMLInputElement::SetFilesFromPaths(const Vector<String>& paths) { 1907 void HTMLInputElement::SetFilesFromPaths(const Vector<String>& paths) {
1904 return input_type_->SetFilesFromPaths(paths); 1908 return input_type_->SetFilesFromPaths(paths);
1905 } 1909 }
1906 1910
1907 } // namespace blink 1911 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.h ('k') | third_party/WebKit/Source/core/html/HTMLInputElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698