[Webkit-unassigned] [Bug 130613] New: webkitGetRegionFlowRanges for last CSS Regions in chain doesn't return fragment

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 21 12:08:36 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=130613

           Summary: webkitGetRegionFlowRanges for last CSS Regions in
                    chain doesn't return fragment
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: hyatt at apple.com


When calling webkitGetRegionFlowRanges on the last CSS Region in a chain, it returns all the content left from the flow and not just the fragment displayed, even when the last CSS Region has .style.overflow = 'hidden' AND/OR .style.webkitRegionFragment = 'break'. This makes it impossible to figure out what content is actually displayed for this last region, without creating another region. It makes sense to have the function return the displayed fragment, because you can always figure out the remaining content with some range manipulation, but you can't figure out the displayed without this function.

Steps to Reproduce:
1. Safari 7.0
2. Run this HTML

<!DOCTYPE html>
<html>
<head>
<script>

    function init(){
        var ranges = document.getElementById('sink').webkitGetRegionFlowRanges();
        var source = document.getElementById('source');


        if(ranges[0].toString() === source.textContent){
            alert('wrong');
        }

    }

    document.addEventListener("DOMContentLoaded", init, false);

</script>
<title></title>
<body>

<div id="sink" style="width:200px; height:200px; -webkit-flow-from: flow; overflow:hidden; -webkit-region-fragment: break;"></div>

<div id="source" style="-webkit-flow-into: flow">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. <span style="display:none">Inline</span> Nam vitae felis dui. Integer ac mi ac quam tempus porttitor sed id quam. Etiam lectus nisl, tristique eget sodales at, ullamcorper at ligula. Nulla molestie malesuada velit, eget fermentum orci egestas id. Praesent semper, ipsum eu volutpat porta, justo lacus congue massa, eu egestas lectus quam vel lectus. Donec non massa vitae leo tempor pellentesque. Suspendisse vehicula diam commodo turpis pulvinar fringilla. Morbi tincidunt tortor quis massa ultricies nec lacinia tortor malesuada. Fusce eget sem arcu. Duis viverra ipsum at lacus mollis tristique.
</p>
<p>
Duis hendrerit diam ut leo bibendum porta. Nam tempus libero ac arcu consectetur a aliquam nulla laoreet. Donec in nunc ante. Ut quis odio velit, adipiscing facilisis elit. Sed lobortis consectetur volutpat. Praesent eget ligula mi, vel lobortis dui. Cras molestie dapibus ante, eget mollis lectus venenatis et. Fusce metus urna, porttitor a pharetra ut, hendrerit non augue. Vivamus non neque eget magna elementum mattis.
</p>
</div>
</body>
</html>



Expected Results:
The above HTML to not alert('wrong')

Actual Results:
The above HTML alerts wrong, which means the webkitGetRegionFlowRanges returns all remaining content

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list