Skip to content

Commit

Permalink
Add a feature to deprecate <param> URL inside <object>
Browse files Browse the repository at this point in the history
This sets up a flag, default enabled, which will allow us to slowly
disable this feature via Finch and monitor for web compat issues.
With this CL, there should be no behavior change, since the flag
is enabled by default.

I2D:
https://groups.google.com/a/chromium.org/g/blink-dev/c/dDu4CgAwRwQ/m/--LdmX3vEwAJ

Bug: 1315717
Change-Id: I94b2ffcc21d61d0a59bcd2353235cf28d4b93fad
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3580635
Commit-Queue: Mason Freed <masonf@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#992186}
  • Loading branch information
Mason Freed authored and chromium-wpt-export-bot committed Apr 13, 2022
1 parent 0ae8e27 commit d9c02dd
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<meta charset="utf-8">
<title>object element containing param element specifying a URL</title>
<link rel="author" href="mailto:masonf@chromium.org">

<style>
div {
width:300px;
height:80px;
border:1px solid black;
margin: 5px;
overflow: hidden;
}
</style>
<body>
<script>
const smallPdf = 'JVBERi0xLjIgCjkgMCBvYmoKPDwKPj4Kc3RyZWFtCkJULyA5IFRmKFRlc3QpJyBFVAplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCA1IDAgUgovQ29udGVudHMgOSAwIFIKPj4KZW5kb2JqCjUgMCBvYmoKPDwKL0tpZHMgWzQgMCBSIF0KL0NvdW50IDEKL1R5cGUgL1BhZ2VzCi9NZWRpYUJveCBbIDAgMCA5OSA5IF0KPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1BhZ2VzIDUgMCBSCi9UeXBlIC9DYXRhbG9nCj4+CmVuZG9iagp0cmFpbGVyCjw8Ci9Sb290IDMgMCBSCj4+CiUlRU9G';
const dataUrl = `data:application/pdf;base64,${smallPdf}`;

function addOne(html) {
const wrapper = document.createElement('div');
wrapper.innerHTML = html;
const objectElement = wrapper.querySelector('object');
document.body.appendChild(wrapper);
}

// This should be one <object> that loads a PDF, and the rest that don't.
addOne(`<object data=${dataUrl}></object>`);
addOne(`<object></object>`);
addOne(`<object></object>`);
addOne(`<object></object>`);
addOne(`<object></object>`);
addOne(`<object></object>`);

// Not a great way to tell when any <object> that might load has loaded.
setTimeout(() => document.documentElement.classList.remove("reftest-wait"),2000);

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<meta charset="utf-8">
<title>object element containing param element specifying a URL</title>
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://github.com/whatwg/html/pull/7816">
<link rel=match href="object-param-url-ref.html">

<style>
div {
width:300px;
height:80px;
border:1px solid black;
margin: 5px;
overflow: hidden;
}
</style>
<body>
<script>
const smallPdf = 'JVBERi0xLjIgCjkgMCBvYmoKPDwKPj4Kc3RyZWFtCkJULyA5IFRmKFRlc3QpJyBFVAplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCA1IDAgUgovQ29udGVudHMgOSAwIFIKPj4KZW5kb2JqCjUgMCBvYmoKPDwKL0tpZHMgWzQgMCBSIF0KL0NvdW50IDEKL1R5cGUgL1BhZ2VzCi9NZWRpYUJveCBbIDAgMCA5OSA5IF0KPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1BhZ2VzIDUgMCBSCi9UeXBlIC9DYXRhbG9nCj4+CmVuZG9iagp0cmFpbGVyCjw8Ci9Sb290IDMgMCBSCj4+CiUlRU9G';
const dataUrl = `data:application/pdf;base64,${smallPdf}`;

function addOne(html) {
const wrapper = document.createElement('div');
wrapper.innerHTML = html;
const objectElement = wrapper.querySelector('object');
document.body.appendChild(wrapper);
}

// This should be one <object> that loads a PDF, and the rest that don't.
addOne(`<object data=${dataUrl}></object>`);
addOne(`<object><param name=src value=${dataUrl}></object>`);
addOne(`<object><param name=data value=${dataUrl}></object>`);
addOne(`<object><param name=code value=${dataUrl}></object>`);
addOne(`<object><param name=movie value=${dataUrl}></object>`);
addOne(`<object><param name=url value=${dataUrl}></object>`);

// Not a great way to tell when any <object> that might load has loaded.
setTimeout(() => document.documentElement.classList.remove("reftest-wait"),2000);

</script>
14 changes: 8 additions & 6 deletions lint.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ SET TIMEOUT: css/selectors/selector-required-type-change-002.html
SET TIMEOUT: encrypted-media/polyfill/chrome-polyfill.js
SET TIMEOUT: encrypted-media/polyfill/clearkey-polyfill.js
SET TIMEOUT: encrypted-media/scripts/playback-temporary-events.js
SET TIMEOUT: focus/support/iframe-focus-with-different-site-intermediate-frame-outer.sub.html
SET TIMEOUT: focus/support/iframe-focus-with-different-site-intermediate-frame-middle.sub.html
SET TIMEOUT: focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-outer.sub.html
SET TIMEOUT: focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-middle.sub.html
SET TIMEOUT: focus/support/iframe-focuses-parent-different-site-inner.html
SET TIMEOUT: focus/support/iframe-focuses-parent-same-site-inner.html
SET TIMEOUT: generic-sensor/resources/iframe_sensor_handler.html
SET TIMEOUT: html/browsers/browsing-the-web/back-forward-cache/resources/inflight-fetch-helper.js
SET TIMEOUT: html/browsers/browsing-the-web/history-traversal/*
Expand All @@ -168,6 +174,8 @@ SET TIMEOUT: html/cross-origin-opener-policy/resources/fully-loaded.js
SET TIMEOUT: html/editing/dnd/*
SET TIMEOUT: html/semantics/embedded-content/the-iframe-element/*
SET TIMEOUT: html/semantics/embedded-content/the-img-element/*
SET TIMEOUT: html/semantics/embedded-content/the-object-element/object-param-url.html
SET TIMEOUT: html/semantics/embedded-content/the-object-element/object-param-url-ref.html
SET TIMEOUT: html/semantics/scripting-1/the-script-element/*
SET TIMEOUT: html/webappapis/dynamic-markup-insertion/opening-the-input-stream/0*
SET TIMEOUT: html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/history-frame.html
Expand Down Expand Up @@ -228,12 +236,6 @@ SET TIMEOUT: webvtt/*
SET TIMEOUT: workers/*
SET TIMEOUT: xhr/resources/init.htm
SET TIMEOUT: xhr/resources/xmlhttprequest-timeout.js
SET TIMEOUT: focus/support/iframe-focus-with-different-site-intermediate-frame-outer.sub.html
SET TIMEOUT: focus/support/iframe-focus-with-different-site-intermediate-frame-middle.sub.html
SET TIMEOUT: focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-outer.sub.html
SET TIMEOUT: focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-middle.sub.html
SET TIMEOUT: focus/support/iframe-focuses-parent-different-site-inner.html
SET TIMEOUT: focus/support/iframe-focuses-parent-same-site-inner.html

# generate_tests implementation and sample usage
GENERATE_TESTS: resources/test/tests/functional/generate-callback.html
Expand Down

0 comments on commit d9c02dd

Please sign in to comment.