Bug 115534 - [CSSRegions] Improve hit testing for empty regions
Summary: [CSSRegions] Improve hit testing for empty regions
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mihnea Ovidenie
Depends on:
Reported: 2013-05-02 16:27 PDT by Mihnea Ovidenie
Modified: 2013-05-14 10:55 PDT (History)
6 users (show)

See Also:

Patch (3.17 KB, patch)
2013-05-02 16:37 PDT, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff
Patch 2 (4.49 KB, patch)
2013-05-10 23:18 PDT, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff
Patch for landing (4.69 KB, patch)
2013-05-14 09:24 PDT, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihnea Ovidenie 2013-05-02 16:27:57 PDT
WebKit bug https://bugs.webkit.org/show_bug.cgi?id=107752 provided a way to fix incorrect selection of content in HTML document when clicking inside an empty region. I want to address the follow up comment from David Hyatt and improve the hit testing code.
Comment 1 Mihnea Ovidenie 2013-05-02 16:37:33 PDT
Created attachment 200369 [details]
Comment 2 Dave Hyatt 2013-05-10 13:26:38 PDT
Comment on attachment 200369 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=200369&action=review

> Source/WebCore/rendering/RenderObject.cpp:2624
> -    if (hitTestFilter != HitTestDescendants && !inside)
> +    if (hitTestFilter != HitTestDescendants && !inside && !isRenderFlowThread())

I wonder if it would be cleaner to subclass nodeAtPoint for RenderFlowThread and have it return false always if HitTestBlockBackground is the flag?
Comment 3 Mihnea Ovidenie 2013-05-10 23:18:32 PDT
Created attachment 201449 [details]
Patch 2

Use David's suggestion as the hittesting code is better contained in RFT class.
Comment 4 Dave Hyatt 2013-05-14 08:10:29 PDT
Comment on attachment 201449 [details]
Patch 2

Comment 5 Mihnea Ovidenie 2013-05-14 09:24:22 PDT
Created attachment 201725 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2013-05-14 10:55:03 PDT
Comment on attachment 201725 [details]
Patch for landing

Clearing flags on attachment: 201725

Committed r150078: <http://trac.webkit.org/changeset/150078>
Comment 7 WebKit Commit Bot 2013-05-14 10:55:06 PDT
All reviewed patches have been landed.  Closing bug.