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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 10 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) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 HTMLFrameOwnerElement::UpdateSuspendScope::~UpdateSuspendScope() { 109 HTMLFrameOwnerElement::UpdateSuspendScope::~UpdateSuspendScope() {
110 DCHECK_GT(s_updateSuspendCount, 0u); 110 DCHECK_GT(s_updateSuspendCount, 0u);
111 if (s_updateSuspendCount == 1) 111 if (s_updateSuspendCount == 1)
112 performDeferredWidgetTreeOperations(); 112 performDeferredWidgetTreeOperations();
113 --s_updateSuspendCount; 113 --s_updateSuspendCount;
114 } 114 }
115 115
116 // Unlike moveWidgetToParentSoon, this will not call dispose the Widget. 116 // Unlike moveWidgetToParentSoon, this will not call dispose the Widget.
117 void temporarilyRemoveWidgetFromParentSoon(Widget* widget) { 117 void temporarilyRemoveWidgetFromParentSoon(Widget* widget) {
118 if (s_updateSuspendCount) { 118 if (s_updateSuspendCount) {
119 widgetsPendingTemporaryRemovalFromParent().add(widget); 119 widgetsPendingTemporaryRemovalFromParent().insert(widget);
120 } else { 120 } else {
121 if (toFrameView(widget->parent())) 121 if (toFrameView(widget->parent()))
122 toFrameView(widget->parent())->removeChild(widget); 122 toFrameView(widget->parent())->removeChild(widget);
123 } 123 }
124 } 124 }
125 125
126 void moveWidgetToParentSoon(Widget* child, FrameView* parent) { 126 void moveWidgetToParentSoon(Widget* child, FrameView* parent) {
127 if (!s_updateSuspendCount) { 127 if (!s_updateSuspendCount) {
128 if (parent) { 128 if (parent) {
129 parent->addChild(child); 129 parent->addChild(child);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 document().frame()->loader().client()->didChangeSandboxFlags(contentFrame(), 208 document().frame()->loader().client()->didChangeSandboxFlags(contentFrame(),
209 flags); 209 flags);
210 } 210 }
211 211
212 bool HTMLFrameOwnerElement::isKeyboardFocusable() const { 212 bool HTMLFrameOwnerElement::isKeyboardFocusable() const {
213 return m_contentFrame && HTMLElement::isKeyboardFocusable(); 213 return m_contentFrame && HTMLElement::isKeyboardFocusable();
214 } 214 }
215 215
216 void HTMLFrameOwnerElement::disposeWidgetSoon(Widget* widget) { 216 void HTMLFrameOwnerElement::disposeWidgetSoon(Widget* widget) {
217 if (s_updateSuspendCount) { 217 if (s_updateSuspendCount) {
218 widgetsPendingDispose().add(widget); 218 widgetsPendingDispose().insert(widget);
219 return; 219 return;
220 } 220 }
221 widget->dispose(); 221 widget->dispose();
222 } 222 }
223 223
224 void HTMLFrameOwnerElement::dispatchLoad() { 224 void HTMLFrameOwnerElement::dispatchLoad() {
225 dispatchScopedEvent(Event::create(EventTypeNames::load)); 225 dispatchScopedEvent(Event::create(EventTypeNames::load));
226 } 226 }
227 227
228 const WebVector<WebPermissionType>& 228 const WebVector<WebPermissionType>&
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 322 }
323 323
324 DEFINE_TRACE(HTMLFrameOwnerElement) { 324 DEFINE_TRACE(HTMLFrameOwnerElement) {
325 visitor->trace(m_contentFrame); 325 visitor->trace(m_contentFrame);
326 visitor->trace(m_widget); 326 visitor->trace(m_widget);
327 HTMLElement::trace(visitor); 327 HTMLElement::trace(visitor);
328 FrameOwner::trace(visitor); 328 FrameOwner::trace(visitor);
329 } 329 }
330 330
331 } // namespace blink 331 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698