Summary: | Setting scrollTop / scrollLeft should not cause a layout | ||
---|---|---|---|
Product: | WebKit | Reporter: | Julien Chaffraix <jchaffraix> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW --- | ||
Severity: | Normal | CC: | dglazkov, lucas |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Description
Julien Chaffraix
2011-12-21 10:35:21 PST
There is one big issue with coalescing layouts: we cannot scroll until we actually do the layout as we need to clamp and scrolling dispatches the 'scroll' event. If the page listens to those events, I haven't found a good way to defer scrolling until we layout without breaking event dispatching. I've posted this Stack Overflow question regarding the performance of scrollTop/Left in Safari: http://stackoverflow.com/questions/30218002/element-scrolltop-left-is-really-slow-in-safari-why/30218327#30218327 I assume this is due to the layout being forced for each call to the methods. Is it possible to look how Blink handles this? As shown in the Stack Overflow question, Blink executes the test function in ~50 ms while Safari executes it in ~1500 ms. Kind regards |