Bug 125873

Summary: Don't allow style sharing of customized styles
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: kling, koivisto, simon.fraser
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Ryosuke Niwa 2013-12-17 14:19:08 PST
Consider merging https://chromium.googlesource.com/chromium/blink/+/fc732005cac953cf3cc5229844d6755a1d39a052

There were many users of customStyleForRenderer() that were creating a
custom style and then not marking it as unique. This normally wasn't
an issue since the elements don't tend to be siblings of each other or
at the same level of the tree, but could manifest in future form control
types or the PasswordGeneratorButtonElement if we moved the calls to
addToStyleSharingList (like future patches might).

This patch adds all the missing setUnique() calls, but we should probably
consider some more general solution in the future or get rid of the
customStyleForRenderer() hook which is being used in bad ways all over
the UA shadow elements.