Bug 70751 - [chromium] Use the full set of rects when determining if union covers another rect.
Summary: [chromium] Use the full set of rects when determining if union covers another...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: W. James MacLean
URL:
Keywords:
Depends on: 70533
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-24 12:47 PDT by Dana Jansens
Modified: 2012-01-09 11:39 PST (History)
2 users (show)

See Also:


Attachments
Patch (22.84 KB, patch)
2011-10-28 08:43 PDT, W. James MacLean
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dana Jansens 2011-10-24 12:47:06 PDT
There are places where we want to know if a union of rects together cover a (rectangular) space.  Currently we just look for a single child that fills the space.  This gives no false-positives, but potentially many false negatives.

Add logic to determine if the union of rects fill a rect, and use it in these cases.
Comment 1 Dana Jansens 2011-10-24 12:47:44 PDT
Bugs this depend on represent places where the improved logic should be used.
Comment 2 W. James MacLean 2011-10-28 08:43:58 PDT
Created attachment 112868 [details]
Patch
Comment 3 Dana Jansens 2011-11-24 11:15:58 PST
Can make use of platform/graphics/Region class to do all of this. It is what I am using it in the webkit side.

If you need Region::contains() you can replace "A.contains(B)" with

A.intersect(B);
if (!A.isEmpty())
  B.subtract(A);
return B.isEmpty();

and use .contains() when bug #72298 lands.


Removing dep on #70634 since this is useful for UI layers already regardless of opaque flag being set in WebCore land.
Comment 4 W. James MacLean 2012-01-09 11:39:59 PST
I think this is covered in 70533. Marking resolved.