RESOLVED FIXED 103925
Style sharing: Allow sharing between elements with classes not referenced by any selectors.
https://bugs.webkit.org/show_bug.cgi?id=103925
Summary Style sharing: Allow sharing between elements with classes not referenced by ...
Andreas Kling
Reported 2012-12-03 14:01:04 PST
<div class="foo"> and <div> should be allowed to share style if there are no style rules with a ".foo" selector.
Attachments
Patch (7.57 KB, patch)
2012-12-03 14:34 PST, Andreas Kling
buildbot: commit-queue-
Patch (7.90 KB, patch)
2012-12-04 19:03 PST, Andreas Kling
no flags
Patch (7.61 KB, patch)
2012-12-04 19:04 PST, Andreas Kling
koivisto: review+
koivisto: commit-queue-
Andreas Kling
Comment 1 2012-12-03 14:34:41 PST
Build Bot
Comment 2 2012-12-03 15:12:30 PST
Comment on attachment 177334 [details] Patch Attachment 177334 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15105660 New failing tests: compositing/iframes/invisible-nested-iframe-hide.html css1/basic/class_as_selector.html compositing/images/clip-on-directly-composited-image.html canvas/philip/tests/2d.drawImage.negativeSourceHeightAndWidth.html css1/color_and_background/color.html css1/box_properties/border_bottom.html css1/basic/grouping.html css1/box_properties/border_bottom_width.html css1/box_properties/border_bottom_width_inline.html css1/classification/white_space.html css1/basic/inheritance.html css1/box_properties/border.html css1/color_and_background/background_position.html canvas/philip/tests/2d.drawImage.negativeSourceHeight2.html canvas/philip/tests/2d.composite.operation.foobar.html css1/cascade/cascade_order.html css1/color_and_background/background.html css1/conformance/forward_compatible_parsing.html compositing/images/direct-image-background-color.html css1/color_and_background/background_color.html css1/basic/containment.html canvas/philip/tests/2d.clearRect+fillRect.alpha0.5.html css1/basic/comments.html css1/color_and_background/background_repeat.html css1/font_properties/font.html compositing/color-matching/image-color-matching.html canvas/philip/tests/2d.clearRect+fillRect.basic.html css1/classification/display.html canvas/philip/tests/2d.drawImage.negativeSourceHeight.html css1/classification/list_style_type.html
Andreas Kling
Comment 3 2012-12-04 19:03:28 PST
Andreas Kling
Comment 4 2012-12-04 19:04:23 PST
Antti Koivisto
Comment 5 2012-12-04 19:36:50 PST
Comment on attachment 177647 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177647&action=review > Source/WebCore/css/StyleResolver.cpp:967 > + m_elementAffectedByClassRules = m_element && m_element->hasClass() && classNamesAffectedByRules(m_element->classNames()); We should really factor the style sharing code differently so using StyleResolver member for passing things around wouldn't be needed. Better done separately though.
Antti Koivisto
Comment 6 2012-12-04 19:46:28 PST
Comment on attachment 177647 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177647&action=review >> Source/WebCore/css/StyleResolver.cpp:967 >> m_elementLinkState = m_checker.determineLinkState(m_element); >> + m_elementAffectedByClassRules = m_element && m_element->hasClass() && classNamesAffectedByRules(m_element->classNames()); > > We should really factor the style sharing code differently so using StyleResolver member for passing things around wouldn't be needed. Better done separately though. This should probably be set in locateSharedStyle instead of initElement. That's the only case where it is needed.
Andreas Kling
Comment 7 2012-12-04 20:10:22 PST
Note You need to log in before you can comment on or make changes to this bug.