Bug 116098 - Snapshotted plug-ins shadow tree should reset style inheritance
Summary: Snapshotted plug-ins shadow tree should reset style inheritance
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-05-14 04:06 PDT by Antoine Quint
Modified: 2013-05-14 11:02 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.39 KB, patch)
2013-05-14 04:08 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch for landing (1.59 KB, patch)
2013-05-14 09:43 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.