Commit 2fd257cc authored by Morten Stenshorne's avatar Morten Stenshorne Committed by Commit Bot

Compile core/dom/ with -Wshadow.

Bug: 294205
Change-Id: I63ccd3a15d31ab2633b874193fe26c24628bff81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2460891Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815671}
parent 7fc7da37
......@@ -27,6 +27,8 @@ import("//third_party/blink/renderer/core/core.gni")
# -O2 optimiziation. If there is common inlined implementations, put this in
# foo-inl.h and include that in both foo.cc and foo-hot.cc.
blink_core_sources("dom_hotpath") {
configs += [ "//build/config/compiler:noshadowing" ]
sources = [
"element-hot.cc",
"element-inl.h",
......@@ -41,6 +43,8 @@ blink_core_sources("dom_hotpath") {
}
blink_core_sources("dom") {
configs += [ "//build/config/compiler:noshadowing" ]
sources = [
"abort_controller.cc",
"abort_controller.h",
......
......@@ -3877,8 +3877,8 @@ static bool AllDescendantsAreComplete(Document* document) {
return false;
}
for (PortalContents* portal : DocumentPortals::From(*document).GetPortals()) {
auto* frame = portal->GetFrame();
if (frame && frame->IsLoading())
auto* portal_frame = portal->GetFrame();
if (portal_frame && portal_frame->IsLoading())
return false;
}
return true;
......@@ -5337,13 +5337,13 @@ Element* Document::SequentialFocusNavigationStartingPoint(
if (type == mojom::blink::FocusType::kForward) {
Node* previous = FlatTreeTraversal::Previous(*next_node);
for (; previous; previous = FlatTreeTraversal::Previous(*previous)) {
if (auto* element = DynamicTo<Element>(previous))
return element;
if (auto* previous_element = DynamicTo<Element>(previous))
return previous_element;
}
}
for (Node* next = next_node; next; next = FlatTreeTraversal::Next(*next)) {
if (auto* element = DynamicTo<Element>(next))
return element;
if (auto* next_element = DynamicTo<Element>(next))
return next_element;
}
}
return nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment