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

Side by Side Diff: third_party/WebKit/Source/web/ExternalPopupMenu.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 void ExternalPopupMenu::updateFromElement(UpdateReason reason) 143 void ExternalPopupMenu::updateFromElement(UpdateReason reason)
144 { 144 {
145 switch (reason) { 145 switch (reason) {
146 case BySelectionChange: 146 case BySelectionChange:
147 case ByDOMChange: 147 case ByDOMChange:
148 if (m_needsUpdate) 148 if (m_needsUpdate)
149 return; 149 return;
150 m_needsUpdate = true; 150 m_needsUpdate = true;
151 m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTas k(&ExternalPopupMenu::update, this)); 151 m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTas k(&ExternalPopupMenu::update, wrapPersistent(this)));
152 break; 152 break;
153 153
154 case ByStyleChange: 154 case ByStyleChange:
155 // TOOD(tkent): We should update the popup location/content in some 155 // TOOD(tkent): We should update the popup location/content in some
156 // cases. e.g. Updating ComputedStyle of the SELECT element affects 156 // cases. e.g. Updating ComputedStyle of the SELECT element affects
157 // popup position and OPTION style. 157 // popup position and OPTION style.
158 break; 158 break;
159 } 159 }
160 } 160 }
161 161
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 if (ownerElement.itemIsDisplayNone(*items[i])) 294 if (ownerElement.itemIsDisplayNone(*items[i]))
295 continue; 295 continue;
296 if (popupMenuItemIndex == i) 296 if (popupMenuItemIndex == i)
297 return indexTracker; 297 return indexTracker;
298 ++indexTracker; 298 ++indexTracker;
299 } 299 }
300 return -1; 300 return -1;
301 } 301 }
302 302
303 } // namespace blink 303 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/web/PopupMenuImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698