Bug 116098

Summary: Snapshotted plug-ins shadow tree should reset style inheritance
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Plug-insAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, esprehn+autocc, graouts, jonlee, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Antoine Quint 2013-05-14 04:06:22 PDT
In order for styles coming from the page to not affect the content displayed in a snapshotted plug-in's shadow root, we need to reset style inheritance. This way only styles defined by the injected user-agent stylesheets will affect the rendering of the shadow content.
Comment 1 Antoine Quint 2013-05-14 04:06:33 PDT
<rdar://problem/13885342>
Comment 2 Antoine Quint 2013-05-14 04:08:10 PDT
Created attachment 201696 [details]
Patch
Comment 3 Darin Adler 2013-05-14 09:22:30 PDT
Comment on attachment 201696 [details]
Patch

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

> Source/WebCore/html/HTMLPlugInImageElement.cpp:370
> +    root->setResetStyleInheritance(true);

This needs a why comment. It’s not at all clear why this is here or what would break if we removed this, and there’s no regression test to help make it clear.
Comment 4 Antoine Quint 2013-05-14 09:43:22 PDT
(In reply to comment #3)
> (From update of attachment 201696 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=201696&action=review
> 
> > Source/WebCore/html/HTMLPlugInImageElement.cpp:370
> > +    root->setResetStyleInheritance(true);
> 
> This needs a why comment. It’s not at all clear why this is here or what would break if we removed this, and there’s no regression test to help make it clear.

Adding a comment in the commit.
Comment 5 Antoine Quint 2013-05-14 09:43:38 PDT
Created attachment 201727 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2013-05-14 11:02:38 PDT
Comment on attachment 201727 [details]
Patch for landing

Clearing flags on attachment: 201727

Committed r150081: <http://trac.webkit.org/changeset/150081>
Comment 7 WebKit Commit Bot 2013-05-14 11:02:42 PDT
All reviewed patches have been landed.  Closing bug.