Revert "Revert "Fix retargeting of result in elementFromPoint and elementsFromPoint""
crrev.com/c/808446 is reverted because of failure in ASAN Buildbot Revert CL Link: crrev.com/c/880264 Failure link: https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Linux%20Trusty%20ASAN/builds/8618 The failure is accessing *target_ancestor_iterator when it is out of bounds. Link: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/TreeScope.cpp?q=Treescope.cpp&sq=package:chromium&rcl=dd944882a245a5117b50cb417138d92f32d931d6&l=393 as there were no bound checks for target_ancestor_iterator. It wasn't caught by layout tests because it's still returning the correct results, because it doesn't crash when getting *target_ancestor_iterator when it's out of bound. It just stops the while-loop and returned at https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/TreeScope.cpp?q=Treescope.cpp&sq=package:chromium&rcl=dd944882a245a5117b50cb417138d92f32d931d6&l=398 Also, since the ASAN buildbot is not done before the CL is merged, this wasn't caught by trybots prior to committing. The fix is just adding a bound check for target_ancestor_riterator here: https://chromium-review.googlesource.com/c/chromium/src/+/880741/2..3/third_party/WebKit/Source/core/dom/TreeScope.cpp I have confirmed by using ASAN locally that it is fixed now. Before the fix, running the failing tests with ASAN build fails. Bug: 759947,805039 Change-Id: I9934af8131f285045e0eb80923f190b6d88cef7d Reviewed-on: https://chromium-review.googlesource.com/880741 Commit-Queue: Rakina Zata Amni <rakina@chromium.org> Reviewed-by:Hayato Ito <hayato@chromium.org> Reviewed-by:
Takayoshi Kochi <kochi@chromium.org> Reviewed-by:
Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#531839}
Showing
This diff is collapsed.
Please register or sign in to comment