Bug 39380

Summary: Slow vertical scrolling when text is selected in nested divs
Product: WebKit Reporter: Nate Whetsell <nathan.whetsell>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, mitz, simon.fraser, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
Attachments:
Description Flags
100 div pairs in a div floated left
none
100 divs in a plain div (not floated) none

Description Nate Whetsell 2010-05-19 14:26:35 PDT
Created attachment 56520 [details]
100 div pairs in a div floated left

On OS X 10.6, selecting all the text in a webpage consisting of several (100 in the attached test documents) of these:

<div>
  <div class="float-left">
      [some text]
  </div>
</div>

produces sluggish vertical scrolling. (The "float-left" class is used to define a style for floating a div left: div.float-left{float:left;}).

If these snippets are enclosed in a div that is itself floated left (or right), both upward and downward scrolling are sluggish. If the snippets are enclosed in a div without a float style (or no div at all), only upward scrolling is sluggish. If no text is selected, scrolling is fast and smooth.

The sluggishness only occurs when text is inside a pair of divs; removing the outer div results in fast scrolling. Also, the inner div must be the one that's floated. If the outer div is floated, vertical scrolling while text is selected is fast.

Sluggish scrolling also occurs in Google Chrome. Firefox scrolls smoothly.
Comment 1 Nate Whetsell 2010-05-19 14:27:28 PDT
Created attachment 56521 [details]
100 divs in a plain div (not floated)
Comment 2 Alexey Proskuryakov 2011-07-06 08:52:36 PDT
Still happens with nightly r89812. Busy in RenderBlock::selectionGaps().
Comment 3 Nate Whetsell 2012-11-16 18:30:23 PST
This was fixed in <http://trac.webkit.org/r132545>.

*** This bug has been marked as a duplicate of bug 100413 ***