WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
Bug 130613
webkitGetRegionFlowRanges for last CSS Regions in chain doesn't return fragment
https://bugs.webkit.org/show_bug.cgi?id=130613
Summary
webkitGetRegionFlowRanges for last CSS Regions in chain doesn't return fragment
Dave Hyatt
Reported
2014-03-21 12:08:57 PDT
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
Attachments
Add attachment
proposed patch, testcase, etc.
Jon Lee
Comment 1
2014-03-21 13:54:56 PDT
<
rdar://problem/15798258
>
Ahmad Saleem
Comment 2
2023-05-08 03:02:23 PDT
Do we support? 'webkitGetRegionFlowRanges' anymore? Changing testcase from
Comment 0
give error -
https://jsfiddle.net/uLwx2md0/
zalan
Comment 3
2023-05-08 07:04:55 PDT
https://lists.webkit.org/pipermail/webkit-dev/2017-July/029315.html
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug