Skip to content
Permalink
Browse files
REGRESSION(r136615): Incorrect style sharing in view-source documents.
<http://webkit.org/b/104089>

Reviewed by Antti Koivisto.

Source/WebCore:

Make sure we collect feature data about the default view-source style sheet before evaluating
style sharing candidates, otherwise it won't know which class selectors to care about.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectFeatures):

LayoutTests:

Unskip: fast/frames/viewsource-attribute.html
        fast/frames/viewsource-on-image-file.html

* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

Canonical link: https://commits.webkit.org/122304@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Andreas Kling committed Dec 5, 2012
1 parent d3cfc93 commit 5fe1f45be0d9231736f91d52c6ef10b31ee0fd6a
@@ -1,3 +1,19 @@
2012-12-05 Andreas Kling <akling@apple.com>

REGRESSION(r136615): Incorrect style sharing in view-source documents.
<http://webkit.org/b/104089>

Reviewed by Antti Koivisto.

Unskip: fast/frames/viewsource-attribute.html
fast/frames/viewsource-on-image-file.html

* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

2012-12-05 Zan Dobersek <zandobersek@gmail.com>

Unreviewed gardening.
@@ -4256,10 +4256,6 @@ webkit.org/b/104023 [ Mac Debug ] fast/dom/HTMLTemplateElement/inertContents.htm
# Needs platform-specific results
webkit.org/b/104035 fast/text/orientation-sideways.html [ Missing ]

# Fail since r136615.
webkit.org/b/104089 fast/frames/viewsource-attribute.html [ Failure ]
webkit.org/b/104089 fast/frames/viewsource-on-image-file.html [ Failure ]

# Crash since r136588.
webkit.org/b/104090 [ Mac Debug ] fast/css-grid-layout/grid-columns-rows-get-set-multiple.html [ Crash ]
webkit.org/b/104090 [ Mac Debug ] fast/css-grid-layout/grid-columns-rows-get-set.html [ Crash ]
@@ -1703,6 +1703,3 @@ webkit.org/b/56496 [ Debug ] fast/js/array-sort-modifying-tostring.html [ Crash

# volume is reset when mediaelement.src is modified
webkit.org/b/103893 media/video-volume.html [ Failure ]

webkit.org/b/104089 fast/frames/viewsource-attribute.html [ Failure ]
webkit.org/b/104089 fast/frames/viewsource-on-image-file.html [ Failure ]
@@ -1415,9 +1415,6 @@ webkit.org/b/103740 editing/selection/caret-alignment-for-vertical-text.html [ F
# volume is reset when mediaelement.src is modified
webkit.org/b/103893 media/video-volume.html [ Failure ]

webkit.org/b/104089 fast/frames/viewsource-attribute.html [ Failure ]
webkit.org/b/104089 fast/frames/viewsource-on-image-file.html [ Failure ]

webkit.org/b/104054 svg/custom/use-href-update-crash.svg [ Failure ]

#////////////////////////////////////////////////////////////////////////////////////////
@@ -1249,6 +1249,3 @@ webkit.org/b/67434 [ Debug ] fast/block/float/overhanging-tall-block.html [ Skip
Bug(jernoble) [ MountainLion Lion SnowLeopard ] media/video-src-blob.html

webkit.org/b/104104 fast/overflow/scrollbar-click-retains-focus.html [ Failure ]

webkit.org/b/104089 fast/frames/viewsource-attribute.html [ Failure ]
webkit.org/b/104089 fast/frames/viewsource-on-image-file.html [ Failure ]
@@ -2439,6 +2439,3 @@ webkit.org/b/61138 http/tests/w3c/webperf/submission/resource-timing [ Skip ]

# [Qt] A new compositing bug uncovered by r135859
webkit.org/b/103424 fast/backgrounds/background-opaque-images-over-color.html

webkit.org/b/104089 fast/frames/viewsource-attribute.html [ Failure ]
webkit.org/b/104089 fast/frames/viewsource-on-image-file.html [ Failure ]
@@ -1,3 +1,16 @@
2012-12-05 Andreas Kling <akling@apple.com>

REGRESSION(r136615): Incorrect style sharing in view-source documents.
<http://webkit.org/b/104089>

Reviewed by Antti Koivisto.

Make sure we collect feature data about the default view-source style sheet before evaluating
style sharing candidates, otherwise it won't know which class selectors to care about.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectFeatures):

2012-12-05 Mike West <mkwst@chromium.org>

Stop generating call stacks inside ContentSecurityPolicy
@@ -358,23 +358,6 @@ static PassOwnPtr<RuleSet> makeRuleSet(const Vector<RuleFeature>& rules)
return ruleSet.release();
}

void StyleResolver::collectFeatures()
{
m_features.clear();
// Collect all ids and rules using sibling selectors (:first-child and similar)
// in the current set of stylesheets. Style sharing code uses this information to reject
// sharing candidates.
m_features.add(defaultStyle->features());
m_features.add(m_authorStyle->features());
if (m_scopeResolver)
m_scopeResolver->collectFeaturesTo(m_features);
if (m_userStyle)
m_features.add(m_userStyle->features());

m_siblingRuleSet = makeRuleSet(m_features.siblingRules);
m_uncommonAttributeRuleSet = makeRuleSet(m_features.uncommonAttributeRules);
}

void StyleResolver::resetAuthorStyle()
{
m_authorStyle = RuleSet::create();
@@ -5248,6 +5231,29 @@ void StyleResolver::loadPendingResources()
#endif
}

void StyleResolver::collectFeatures()
{
m_features.clear();
// Collect all ids and rules using sibling selectors (:first-child and similar)
// in the current set of stylesheets. Style sharing code uses this information to reject
// sharing candidates.
m_features.add(defaultStyle->features());
m_features.add(m_authorStyle->features());
if (document()->isViewSource()) {
if (!defaultViewSourceStyle)
loadViewSourceStyle();
m_features.add(defaultViewSourceStyle->features());
}

if (m_scopeResolver)
m_scopeResolver->collectFeaturesTo(m_features);
if (m_userStyle)
m_features.add(m_userStyle->features());

m_siblingRuleSet = makeRuleSet(m_features.siblingRules);
m_uncommonAttributeRuleSet = makeRuleSet(m_features.uncommonAttributeRules);
}

void StyleResolver::MatchedProperties::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);

0 comments on commit 5fe1f45

Please sign in to comment.