Commit 79828039 authored by Nate Chapin's avatar Nate Chapin Committed by Commit Bot

Add a use counter for navigations targeted at _current

It's not in the spec, FF doesn't support it. Hopefully we can remove it.

Change-Id: Iaa9b78245d3513a2574570359f02922da09b5ed6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1536010
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644132}
parent e6d792f1
......@@ -2245,6 +2245,7 @@ enum WebFeature {
kRefreshHeader = 2832,
kSearchEventFired = 2833,
kIdleDetectionStart = 2834,
kTargetCurrent = 2835,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
......
......@@ -181,6 +181,12 @@ Frame* FrameTree::Find(const AtomicString& name) const {
// Named frame lookup should always be relative to a local frame.
DCHECK(IsA<LocalFrame>(this_frame_.Get()));
if (EqualIgnoringASCIICase(name, "_current")) {
UseCounter::Count(
blink::DynamicTo<blink::LocalFrame>(this_frame_.Get())->GetDocument(),
WebFeature::kTargetCurrent);
}
if (EqualIgnoringASCIICase(name, "_self") ||
EqualIgnoringASCIICase(name, "_current") || name.IsEmpty())
return this_frame_;
......
......@@ -22611,6 +22611,7 @@ Called by update_net_error_codes.py.-->
<int value="2832" label="RefreshHeader"/>
<int value="2833" label="SearchEventFired"/>
<int value="2834" label="IdleDetectionStart"/>
<int value="2835" label="TargetCurrent"/>
</enum>
<enum name="FeaturePolicyFeature">
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