<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>92637</bug_id>
          
          <creation_ts>2012-07-30 05:21:35 -0700</creation_ts>
          <short_desc>webkitRegionOverflow giving random value</short_desc>
          <delta_ts>2012-08-20 04:08:41 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>93965</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Johannes Wilm">johanneswilm</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andreionea3000</cc>
    
    <cc>johanneswilm</cc>
    
    <cc>mibalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>681902</commentid>
    <comment_count>0</comment_count>
    <who name="Johannes Wilm">johanneswilm</who>
    <bug_when>2012-07-30 05:21:35 -0700</bug_when>
    <thetext>It seems that there is a bug in Chromium/Webkit that makes webkitRegionOverflow output random values. At times it says it fits, when it doesn&apos;t and at other times it says overflow, when it really does fit. The overset property of a NamedFlow gives the same random result.

The below code shows how I try to add new pages based on whether the previous is full. 

You can check out the full example by including the JS/CSS from this project:https://github.com/sourcefabric/BookJS


function setupDocument() {
    $(&apos;body&apos;).wrapInner(&apos;&lt;div id=&quot;contents&quot; /&gt;&apos;);
    $(&apos;body&apos;).append(&apos;&lt;div id=&quot;layout&quot; /&gt;&apos;);
    $(&apos;#layout&apos;).append(&apos;&lt;div class=&quot;page&quot;&gt;&lt;div class=&quot;contents&quot;&gt;&lt;/div&gt;&lt;div class=&quot;pagenumber&quot;&gt;&lt;/div&gt;&lt;/div&gt;&apos;);
}

$(document).ready(function () {
    setupDocument();
    var lastColumnState;
    var fillingPages = true;
    setTimeout(function () {
        while (fillingPages == true) {
            lastColumnState = $(&quot;.page:last .contents&quot;)[0].webkitRegionOverflow;
            if (lastColumnState == &apos;overflow&apos;) {
                $(&apos;#layout&apos;).append(&apos;&lt;div class=&quot;page&quot;&gt;&lt;div class=&quot;contents&quot;&gt;&lt;/div&gt;&lt;div class=&quot;pagenumber&quot;&gt;&lt;/div&gt;&lt;/div&gt;&apos;);
            } else if (lastColumnState == &apos;fit&apos; || lastColumnState == &apos;empty&apos;) {
                fillingPages = false;
            }
        }
    }, 1000);

});</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>694963</commentid>
    <comment_count>1</comment_count>
    <who name="Mihai Balan">mibalan</who>
    <bug_when>2012-08-14 07:43:08 -0700</bug_when>
    <thetext>This bug is a duplicate of #93965.
The cause for this odd behavior seems to be the use of «position: relative» on the content that gets flowed in the regions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>697171</commentid>
    <comment_count>2</comment_count>
    <who name="Mihai Balan">mibalan</who>
    <bug_when>2012-08-16 08:31:45 -0700</bug_when>
    <thetext>Regarding webkitRegionOverflow being &apos;overflow&apos; instead of &apos;fit&apos;, this most probably is caused by the part of the content *below* the text baseline that&apos;s (usually) invisible for the user, but still causes overflow. This last situation would be a lot trickier to fix, unfortunately :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>699388</commentid>
    <comment_count>3</comment_count>
    <who name="Johannes Wilm">johanneswilm</who>
    <bug_when>2012-08-20 04:08:41 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 93965 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>