commit | 1c97ea061c333d033178d0acb13cc0f42e9858ba | [log] [tgz] |
---|---|---|
author | Daniel Bratell <bratell@opera.com> | Fri Mar 08 13:46:20 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Mar 08 13:46:20 2019 |
tree | 877ae6f1b391a611ae2309df146e125e44af0403 | |
parent | 2e5011386336cc814b4edde1a34119fc5a589f85 [diff] |
Remove variable shadowing in blink/page In an effort to reduce or even ban variable shadowing, this renames a couple of variables. I'm interested in prohibiting shadowing because I think it might prevent potential jumbo problems. The exact warnings prevented: third_party/blink/renderer/core/page/drag_controller.cc:806:14: error: declaration shadows a local variable [-Werror,-Wshadow] for (Node& node : NodeTraversal::InclusiveAncestorsOf(node)) { ^ third_party/blink/renderer/core/page/drag_controller.cc:797:42: note: previous declaration is here bool SelectTextInsteadOfDrag(const Node& node) { ^ third_party/blink/renderer/core/page/drag_controller.cc:1270:17: error: declaration shadows a local variable [-Werror,-Wshadow] if (Node* node = EnclosingAnchorElement( ^ third_party/blink/renderer/core/page/drag_controller.cc:1217:9: note: previous declaration is here Node* node = state.drag_src_.Get(); ^ third_party/blink/renderer/core/page/focus_controller.cc:1050:27: error: declaration shadows a local variable [-Werror,-Wshadow] ScopedFocusNavigation scope = ScopedFocusNavigation::CreateForDocument( ^ third_party/blink/renderer/core/page/focus_controller.cc:1022:25: note: previous declaration is here ScopedFocusNavigation scope = ^ third_party/blink/renderer/core/page/scrolling/root_scroller_controller.cc:296:28: error: declaration shadows a local variable [-Werror,-Wshadow] const ComputedStyle* style = ancestor->Style(); ^ third_party/blink/renderer/core/page/scrolling/root_scroller_controller.cc:272:24: note: previous declaration is here const ComputedStyle* style = element.GetLayoutObject()->Style(); ^ Bug: 923510 Change-Id: I165f94d96f9d847082e09090e65682539279ff17 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1508260 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#638992}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .