Bug 31656 - -webkit-user-drag: element Drag images include overflow decorations from incorrect nodes
Summary: -webkit-user-drag: element Drag images include overflow decorations from inco...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-18 18:22 PST by Oliver Hunt
Modified: 2009-11-19 14:05 PST (History)
1 user (show)

See Also:


Attachments
Patch (1.75 KB, patch)
2009-11-18 21:32 PST, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch (2.35 KB, patch)
2009-11-19 12:00 PST, Oliver Hunt
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2009-11-18 18:22:06 PST
Drag images should not include overflow decorations from nodes that are not children
Comment 1 Oliver Hunt 2009-11-18 21:32:36 PST
Created attachment 43484 [details]
Patch
Comment 2 mitz 2009-11-18 22:46:54 PST
Comment on attachment 43484 [details]
Patch

> +    if (hasOverflowClip() && style()->visibility() == VISIBLE && (phase == PaintPhaseBlockBackground || phase == PaintPhaseChildBlockBackground)) {
> +        if (!paintInfo.paintingRoot || isDescendantOf(paintInfo.paintingRoot))
> +            layer()->paintOverflowControls(paintInfo.context, tx, ty, paintInfo.rect);
> +    }

Can’t use use shouldPaintWithinRoot? You are never supposed to be a proper descendant of the painting root.

You should just add the test to the first if’s condition instead of nesting like that.

It would be good to have a manual test case for this. I don’t think it necessarily has to be checked in, but at least attach it to the bug, if possible, for future reference.

r- because I think you don’t need to call isDescendantOf().
Comment 3 Oliver Hunt 2009-11-19 12:00:20 PST
Created attachment 43516 [details]
Patch
Comment 4 Dave Hyatt 2009-11-19 12:43:39 PST
Comment on attachment 43516 [details]
Patch

r=me
Comment 5 Oliver Hunt 2009-11-19 14:05:24 PST
Committed r51205