Revision 46c8d39a9fde254df3398c681fd724990d289892 authored by Manuel Rego Casasnovas on 22 June 2018, 14:40:57 UTC, committed by Blink WPT Bot on 22 June 2018, 15:00:17 UTC
The spec is very clear about this
(https://drafts.csswg.org/css-contain/#containment-size):
  "Replaced elements must be treated as having an intrinsic width
   and height of 0."

The patch modifies LayoutReplaced::ComputeIntrinsicSizingInfo()
so that it returns zero for elements with "contain: size".

BUG=853441
TEST=external/wpt/css/css-contain/contain-size-013.html

Change-Id: I91490b120a110be20a91d564da4fdc3d9a11b70a
Reviewed-on: https://chromium-review.googlesource.com/1110819
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#569610}
1 parent fb04aed
Raw File
idlharness.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset='utf-8'>
    <title>HTML Media Capture IDL tests</title>
    <link rel='author' title='Intel' href='http://www.intel.com/'>
    <link rel='help' href='https://w3c.github.io/html-media-capture'>
    <script src='/resources/testharness.js'></script>
    <script src='/resources/testharnessreport.js'></script>
    <script src='/resources/WebIDLParser.js'></script>
    <script src='/resources/idlharness.js'></script>
  </head>
  <body>
    <h1>HTML Media Capture IDL tests</h1>
    <div id='log'></div>

    <pre id='untested_idl' style='display:none'>
      interface HTMLInputElement {
      };
      interface HTMLElement {
      };
      interface Element{
      };
    </pre>

    <pre id='idl' style='display:none'>
      partial interface HTMLInputElement {
          [CEReactions]
          attribute DOMString capture;
      };
    </pre>

    <form style='display:none'>
      <input id='testElement' type='file' accept='image/*' capture="user">
    </form>

    <script>
      (function() {
        let idl_array = new IdlArray();

        idl_array.add_untested_idls(document.getElementById('untested_idl').textContent);
        idl_array.add_idls(document.getElementById('idl').textContent);

        let testElement = document.getElementById('testElement');
        idl_array.add_objects({HTMLInputElement: [testElement]});
        idl_array.test();
      })();
    </script>
  </body>
</html>
back to top