Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Issue 11412176: Merge 135082 - REGRESSION(r129644): User StyleSheet not applying (Closed)

Created:
8 years ago by tony
Modified:
8 years ago
Reviewers:
tc
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Visibility:
Public.

Description

Merge 135082 - REGRESSION(r129644): User StyleSheet not applying https://bugs.webkit.org/show_bug.cgi?id=102110 Reviewed by Andreas Kling. Source/WebCore: Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that such things don't exists but on Chromium addUserStyleSheet() confusingly uses them. The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets(). It also generally cleans up the code around injected and user stylesheets. Tests: userscripts/user-script-and-stylesheet.html userscripts/user-stylesheet-invalidate.html * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::collectRulesFromUserStyleSheets): (WebCore::collectCSSOMWrappers): * css/StyleResolver.h: (StyleResolver): * dom/Document.cpp: (WebCore::Document::setCompatibilityMode): * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets): (WebCore): (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets): (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache): (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache): (WebCore::DocumentStyleSheetCollection::addUserSheet): (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): * dom/DocumentStyleSheetCollection.h: (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets): (DocumentStyleSheetCollection): * page/PageGroup.cpp: (WebCore::PageGroup::addUserStyleSheetToWorld): (WebCore::PageGroup::removeUserStyleSheetFromWorld): (WebCore::PageGroup::removeUserStyleSheetsFromWorld): (WebCore::PageGroup::removeAllUserContent): (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames): * page/PageGroup.h: (PageGroup): LayoutTests: * inspector/timeline/timeline-script-tag-1-expected.txt: Update the test result. The style invalidation log is slightly different. * userscripts/user-stylesheet-invalidate-expected.txt: Added. * userscripts/user-stylesheet-invalidate.html: Added. TBR=antti@apple.com Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=135773

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -88 lines) Patch
M LayoutTests/ChangeLog View 1 chunk +14 lines, -0 lines 0 comments Download
M LayoutTests/inspector/timeline/timeline-script-tag-1-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
A + LayoutTests/userscripts/user-stylesheet-invalidate.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/userscripts/user-stylesheet-invalidate-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/ChangeLog View 1 chunk +47 lines, -0 lines 0 comments Download
M Source/WebCore/css/StyleResolver.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/css/StyleResolver.cpp View 3 chunks +15 lines, -32 lines 0 comments Download
M Source/WebCore/dom/Document.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M Source/WebCore/dom/DocumentStyleSheetCollection.h View 2 chunks +11 lines, -7 lines 0 comments Download
M Source/WebCore/dom/DocumentStyleSheetCollection.cpp View 6 chunks +42 lines, -41 lines 0 comments Download
M Source/WebCore/page/PageGroup.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/page/PageGroup.cpp View 4 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
tony
8 years ago (2012-11-26 22:59:09 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698