Bug 130660

Summary: When the mouse is upped after dragged out of shadowDOM, it should lose :active.
Product: WebKit Reporter: Sanghyup Lee <sh53.lee>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, kangil.han
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Sanghyup Lee 2014-03-23 23:18:50 PDT
This caused a regression after r165037.
When we have to clear :active style of shadow DOM, we should clear host's style.
Comment 1 Sanghyup Lee 2014-03-24 00:07:31 PDT
Created attachment 227625 [details]
Patch
Comment 2 Darin Adler 2014-03-24 01:07:00 PDT
Comment on attachment 227625 [details]
Patch

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

> Source/WebCore/dom/Document.cpp:5844
> +        for (Element* curr = oldActiveElement; curr; curr = curr->parentOrShadowHostElement()) {

To set these flags we use the render tree. To clear them we are using the DOM tree. I suspect this inconsistency could cause more problems than just this one.
Comment 3 Sanghyup Lee 2014-03-25 18:49:23 PDT
Darin, Thanks for your review. I'll check it and upload another patch.
Comment 4 Jinwoo Song 2014-03-25 19:00:37 PDT
Comment on attachment 227625 [details]
Patch

As Darin pointed out, the inconsistent tree traversing between set and clear phase needs to be investigated, but it may be followed in other bug. So I set cq+ for this patch.
Comment 5 WebKit Commit Bot 2014-03-25 19:30:54 PDT
Comment on attachment 227625 [details]
Patch

Clearing flags on attachment: 227625

Committed r166277: <http://trac.webkit.org/changeset/166277>
Comment 6 WebKit Commit Bot 2014-03-25 19:30:57 PDT
All reviewed patches have been landed.  Closing bug.