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

Side by Side Diff: third_party/WebKit/Source/core/page/TouchDisambiguation.cpp

Issue 2614033002: Migrate WTF::Vector::append() to ::push_back() [part 11 of N] (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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 } 150 }
151 151
152 for (const auto& touchTarget : touchTargets) { 152 for (const auto& touchTarget : touchTargets) {
153 // Currently the scoring function uses the overlap area with the fat point 153 // Currently the scoring function uses the overlap area with the fat point
154 // as the score. We ignore the candidates that has less than 1/2 overlap 154 // as the score. We ignore the candidates that has less than 1/2 overlap
155 // (we consider not really ambiguous enough) than the best candidate to 155 // (we consider not really ambiguous enough) than the best candidate to
156 // avoid excessive popups. 156 // avoid excessive popups.
157 if (touchTarget.value.score < bestScore * 0.5) 157 if (touchTarget.value.score < bestScore * 0.5)
158 continue; 158 continue;
159 goodTargets.append(touchTarget.value.windowBoundingBox); 159 goodTargets.push_back(touchTarget.value.windowBoundingBox);
160 highlightNodes.append(touchTarget.key); 160 highlightNodes.push_back(touchTarget.key);
161 } 161 }
162 } 162 }
163 163
164 } // namespace blink 164 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/TouchAdjustment.cpp ('k') | third_party/WebKit/Source/core/page/WindowFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698