layout/reftests/details-summary/float-right-and-float-details.html
author Ting-Yu Lin <tlin@mozilla.com>
Wed, 07 Sep 2016 14:45:42 +0800
changeset 313295 31f1b0aa5308eebc39635a76db6016e0598e33ad
permissions -rw-r--r--
Bug 1299753 Part 2 - Create block formatting context for DetailsFrame if needed. r=bz nsCSSFrameConstructor::ConstructNonScrollableBlock() has logic to determine whether to create a block formatting context for a block frame. I refactor the function to make it reusable by nsCSSFrameConstructor::ConstructDetailsFrame(). Also, make NS_NewBlockFrame() accept two arguments as other frame factory functions so that it could be pointed by BlockFrameCreationFunc. NS_NewBlockFormattingContext is changed accordingly. The construction for a scrollable DetailsFrame will be further revised in Part 3. MozReview-Commit-ID: 8TwG9YMyGva

<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
   - http://creativecommons.org/publicdomain/zero/1.0/ -->

<html>
  <style>
  body {
    width: 400px;
  }
  div#float {
    float: right;
    width: 200px;
    height: 200px;
    background-color: lightgreen;
  }
  details {
    float: right;
    background-color: orange;
  }
  summary {
    background-color: green;
    /* Hide the triangle for comparing with div in reftest. */
    list-style-type: none;
  }
  </style>
  <body>
    <!-- This tall float block is necessary to reproduce the incorrect height of the details. -->
    <div id="float"></div>
    <details>
      <summary>Summary</summary>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
      tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
      veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
      commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
      velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
      cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
      est laborum.
    </details>
  </body>
</html>