| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 2 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 visitedNodes.push_back(visitedNode); | 288 visitedNodes.push_back(visitedNode); |
| 289 // Check if the node filter applies, which would mean we have found a | 289 // Check if the node filter applies, which would mean we have found a |
| 290 // responding node. | 290 // responding node. |
| 291 if (nodeFilter(visitedNode)) { | 291 if (nodeFilter(visitedNode)) { |
| 292 respondingNode = visitedNode; | 292 respondingNode = visitedNode; |
| 293 // Continue the iteration to collect the ancestors of the responder, | 293 // Continue the iteration to collect the ancestors of the responder, |
| 294 // which we will need later. | 294 // which we will need later. |
| 295 for (visitedNode = parentShadowHostOrOwner(visitedNode); visitedNode; | 295 for (visitedNode = parentShadowHostOrOwner(visitedNode); visitedNode; |
| 296 visitedNode = parentShadowHostOrOwner(visitedNode)) { | 296 visitedNode = parentShadowHostOrOwner(visitedNode)) { |
| 297 HeapHashSet<Member<Node>>::AddResult addResult = | 297 HeapHashSet<Member<Node>>::AddResult addResult = |
| 298 ancestorsToRespondersSet.add(visitedNode); | 298 ancestorsToRespondersSet.insert(visitedNode); |
| 299 if (!addResult.isNewEntry) | 299 if (!addResult.isNewEntry) |
| 300 break; | 300 break; |
| 301 } | 301 } |
| 302 break; | 302 break; |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 // Insert the detected responder for all the visited nodes. | 305 // Insert the detected responder for all the visited nodes. |
| 306 for (unsigned j = 0; j < visitedNodes.size(); j++) | 306 for (unsigned j = 0; j < visitedNodes.size(); j++) |
| 307 responderMap.add(visitedNodes[j], respondingNode); | 307 responderMap.add(visitedNodes[j], respondingNode); |
| 308 | 308 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 329 candidate->document().updateStyleAndLayoutTree(); | 329 candidate->document().updateStyleAndLayoutTree(); |
| 330 if (hasEditableStyle(*candidate)) { | 330 if (hasEditableStyle(*candidate)) { |
| 331 Node* replacement = candidate; | 331 Node* replacement = candidate; |
| 332 Node* parent = candidate->parentOrShadowHostNode(); | 332 Node* parent = candidate->parentOrShadowHostNode(); |
| 333 while (parent && hasEditableStyle(*parent)) { | 333 while (parent && hasEditableStyle(*parent)) { |
| 334 replacement = parent; | 334 replacement = parent; |
| 335 if (editableAncestors.contains(replacement)) { | 335 if (editableAncestors.contains(replacement)) { |
| 336 replacement = nullptr; | 336 replacement = nullptr; |
| 337 break; | 337 break; |
| 338 } | 338 } |
| 339 editableAncestors.add(replacement); | 339 editableAncestors.insert(replacement); |
| 340 parent = parent->parentOrShadowHostNode(); | 340 parent = parent->parentOrShadowHostNode(); |
| 341 } | 341 } |
| 342 candidate = replacement; | 342 candidate = replacement; |
| 343 } | 343 } |
| 344 if (candidate) | 344 if (candidate) |
| 345 appendSubtargetsForNode(candidate, subtargets); | 345 appendSubtargetsForNode(candidate, subtargets); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 | 348 |
| 349 // Compiles a list of zoomable subtargets. | 349 // Compiles a list of zoomable subtargets. |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 const HeapVector<Member<Node>>& nodes) { | 562 const HeapVector<Member<Node>>& nodes) { |
| 563 IntPoint targetPoint; | 563 IntPoint targetPoint; |
| 564 TouchAdjustment::SubtargetGeometryList subtargets; | 564 TouchAdjustment::SubtargetGeometryList subtargets; |
| 565 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets); | 565 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets); |
| 566 return TouchAdjustment::findNodeWithLowestDistanceMetric( | 566 return TouchAdjustment::findNodeWithLowestDistanceMetric( |
| 567 targetNode, targetPoint, targetArea, touchHotspot, touchArea, subtargets, | 567 targetNode, targetPoint, targetArea, touchHotspot, touchArea, subtargets, |
| 568 TouchAdjustment::zoomableIntersectionQuotient); | 568 TouchAdjustment::zoomableIntersectionQuotient); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } // namespace blink | 571 } // namespace blink |
| OLD | NEW |