OLD | NEW |
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 Loading... |
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 |
OLD | NEW |