<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[206311] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206311">206311</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2016-09-23 09:35:04 -0700 (Fri, 23 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move stylesheet change logic from Document to AuthorStyleSheets
https://bugs.webkit.org/show_bug.cgi?id=162488
Reviewed by Andreas Kling.
That's where it belongs.
* WebCore.xcodeproj/project.pbxproj:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::didMutate):
(WebCore::CSSStyleSheet::clearOwnerNode):
* dom/AuthorStyleSheets.cpp:
(WebCore::AuthorStyleSheets::AuthorStyleSheets):
(WebCore::AuthorStyleSheets::flushPendingUpdates):
(WebCore::AuthorStyleSheets::scheduleOptimizedUpdate):
(WebCore::AuthorStyleSheets::didChange):
(WebCore::AuthorStyleSheets::optimizedUpdateTimerFired):
* dom/AuthorStyleSheets.h:
(WebCore::AuthorStyleSheets::hasPendingUpdate):
(WebCore::AuthorStyleSheets::pendingUpdateType): Deleted.
(WebCore::AuthorStyleSheets::setPendingUpdateType): Deleted.
(WebCore::AuthorStyleSheets::flushPendingUpdates): Deleted.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setContentLanguage):
(WebCore::Document::needsStyleRecalc):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::didRemoveAllPendingStylesheet):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::setSelectedStylesheetSet):
(WebCore::Document::updateHoverActiveState):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired): Deleted.
(WebCore::Document::scheduleOptimizedStyleSheetUpdate): Deleted.
(WebCore::Document::styleResolverChanged): Deleted.
* dom/Document.h:
(WebCore::Document::needsStyleRecalc): Deleted.
* dom/ExtensionStyleSheets.cpp:
(WebCore::ExtensionStyleSheets::clearPageUserSheet):
(WebCore::ExtensionStyleSheets::updatePageUserSheet):
(WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
(WebCore::ExtensionStyleSheets::addUserStyleSheet):
(WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
(WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::removedFromDocument):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::removedFrom):
Also fix a bug that prevented document from rendering if a loading processing instruction was removed from the tree.
This is tested by fast/dom/StyleSheet/detached-style-pi-2.xhtml (after other changes in this patch).
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::updateStyle):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::removedFrom):
(WebCore::HTMLLinkElement::removePendingSheet):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::forcePseudoState):
(WebCore::InspectorCSSAgent::resetPseudoStates):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::setEmulatedMedia):
* page/Frame.cpp:
(WebCore::Frame::setPrinting):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::setPagination):
(WebCore::FrameView::setViewportSizeForCSSViewportUnits):
* page/Page.cpp:
(WebCore::Page::setViewMode):
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
(WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
(WebCore::SVGFontFaceElement::removedFrom):
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::transformDocumentToTreeView):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::end):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::doEnd):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleSheetcpp">trunk/Source/WebCore/css/CSSStyleSheet.cpp</a></li>
<li><a href="#trunkSourceWebCoredomAuthorStyleSheetscpp">trunk/Source/WebCore/dom/AuthorStyleSheets.cpp</a></li>
<li><a href="#trunkSourceWebCoredomAuthorStyleSheetsh">trunk/Source/WebCore/dom/AuthorStyleSheets.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomExtensionStyleSheetscpp">trunk/Source/WebCore/dom/ExtensionStyleSheets.cpp</a></li>
<li><a href="#trunkSourceWebCoredomInlineStyleSheetOwnercpp">trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp</a></li>
<li><a href="#trunkSourceWebCoredomProcessingInstructioncpp">trunk/Source/WebCore/dom/ProcessingInstruction.cpp</a></li>
<li><a href="#trunkSourceWebCoredomShadowRootcpp">trunk/Source/WebCore/dom/ShadowRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementcpp">trunk/Source/WebCore/html/HTMLLinkElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLStyleElementcpp">trunk/Source/WebCore/html/HTMLStyleElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorCSSAgentcpp">trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorPageAgentcpp">trunk/Source/WebCore/inspector/InspectorPageAgent.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceElementcpp">trunk/Source/WebCore/svg/SVGFontFaceElement.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXMLTreeViewercpp">trunk/Source/WebCore/xml/XMLTreeViewer.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlparserXMLDocumentParsercpp">trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlparserXMLDocumentParserLibxml2cpp">trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLViewmm">trunk/Source/WebKit/mac/WebView/WebHTMLView.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/ChangeLog        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -1,3 +1,93 @@
</span><ins>+2016-09-23 Antti Koivisto <antti@apple.com>
+
+ Move stylesheet change logic from Document to AuthorStyleSheets
+ https://bugs.webkit.org/show_bug.cgi?id=162488
+
+ Reviewed by Andreas Kling.
+
+ That's where it belongs.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::didMutateRules):
+ (WebCore::CSSStyleSheet::didMutate):
+ (WebCore::CSSStyleSheet::clearOwnerNode):
+ * dom/AuthorStyleSheets.cpp:
+ (WebCore::AuthorStyleSheets::AuthorStyleSheets):
+ (WebCore::AuthorStyleSheets::flushPendingUpdates):
+ (WebCore::AuthorStyleSheets::scheduleOptimizedUpdate):
+ (WebCore::AuthorStyleSheets::didChange):
+ (WebCore::AuthorStyleSheets::optimizedUpdateTimerFired):
+ * dom/AuthorStyleSheets.h:
+ (WebCore::AuthorStyleSheets::hasPendingUpdate):
+ (WebCore::AuthorStyleSheets::pendingUpdateType): Deleted.
+ (WebCore::AuthorStyleSheets::setPendingUpdateType): Deleted.
+ (WebCore::AuthorStyleSheets::flushPendingUpdates): Deleted.
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::setContentLanguage):
+ (WebCore::Document::needsStyleRecalc):
+ (WebCore::Document::updateStyleIfNeeded):
+ (WebCore::Document::updateLayoutIgnorePendingStylesheets):
+ (WebCore::Document::didRemoveAllPendingStylesheet):
+ (WebCore::Document::processHttpEquiv):
+ (WebCore::Document::setSelectedStylesheetSet):
+ (WebCore::Document::updateHoverActiveState):
+ (WebCore::Document::optimizedStyleSheetUpdateTimerFired): Deleted.
+ (WebCore::Document::scheduleOptimizedStyleSheetUpdate): Deleted.
+ (WebCore::Document::styleResolverChanged): Deleted.
+ * dom/Document.h:
+ (WebCore::Document::needsStyleRecalc): Deleted.
+ * dom/ExtensionStyleSheets.cpp:
+ (WebCore::ExtensionStyleSheets::clearPageUserSheet):
+ (WebCore::ExtensionStyleSheets::updatePageUserSheet):
+ (WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
+ (WebCore::ExtensionStyleSheets::addUserStyleSheet):
+ (WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
+ (WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired):
+ * dom/InlineStyleSheetOwner.cpp:
+ (WebCore::InlineStyleSheetOwner::removedFromDocument):
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::removedFrom):
+
+ Also fix a bug that prevented document from rendering if a loading processing instruction was removed from the tree.
+ This is tested by fast/dom/StyleSheet/detached-style-pi-2.xhtml (after other changes in this patch).
+
+ * dom/ShadowRoot.cpp:
+ (WebCore::ShadowRoot::updateStyle):
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setDisabledState):
+ (WebCore::HTMLLinkElement::parseAttribute):
+ (WebCore::HTMLLinkElement::process):
+ (WebCore::HTMLLinkElement::removedFrom):
+ (WebCore::HTMLLinkElement::removePendingSheet):
+ * html/HTMLStyleElement.cpp:
+ (WebCore::HTMLStyleElement::parseAttribute):
+ * inspector/InspectorCSSAgent.cpp:
+ (WebCore::InspectorCSSAgent::forcePseudoState):
+ (WebCore::InspectorCSSAgent::resetPseudoStates):
+ * inspector/InspectorPageAgent.cpp:
+ (WebCore::InspectorPageAgent::setEmulatedMedia):
+ * page/Frame.cpp:
+ (WebCore::Frame::setPrinting):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::setPagination):
+ (WebCore::FrameView::setViewportSizeForCSSViewportUnits):
+ * page/Page.cpp:
+ (WebCore::Page::setViewMode):
+ (WebCore::Page::setNeedsRecalcStyleInAllFrames):
+ (WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::rebuildFontFace):
+ (WebCore::SVGFontFaceElement::removedFrom):
+ * xml/XMLTreeViewer.cpp:
+ (WebCore::XMLTreeViewer::transformDocumentToTreeView):
+ * xml/parser/XMLDocumentParser.cpp:
+ (WebCore::XMLDocumentParser::end):
+ * xml/parser/XMLDocumentParserLibxml2.cpp:
+ (WebCore::XMLDocumentParser::doEnd):
+
</ins><span class="cx"> 2016-09-22 Sergio Villar Senin <svillar@igalia.com>
</span><span class="cx">
</span><span class="cx"> [css-grid] ASSERT when sizing tracks with percentages inside calc
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -6197,7 +6197,7 @@
</span><span class="cx">                 E461802D1C8DD2900026C02C /* StyleRelations.h in Headers */ = {isa = PBXBuildFile; fileRef = E461802C1C8DD2900026C02C /* StyleRelations.h */; };
</span><span class="cx">                 E461802F1C8DD4D20026C02C /* StyleRelations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E461802E1C8DD4D20026C02C /* StyleRelations.cpp */; };
</span><span class="cx">                 E461D65D1BB0C7F000CB5645 /* AuthorStyleSheets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E461D65C1BB0C7F000CB5645 /* AuthorStyleSheets.cpp */; };
</span><del>-                E461D65F1BB0C80D00CB5645 /* AuthorStyleSheets.h in Headers */ = {isa = PBXBuildFile; fileRef = E461D65E1BB0C80D00CB5645 /* AuthorStyleSheets.h */; };
</del><ins>+                E461D65F1BB0C80D00CB5645 /* AuthorStyleSheets.h in Headers */ = {isa = PBXBuildFile; fileRef = E461D65E1BB0C80D00CB5645 /* AuthorStyleSheets.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 E462A4A1113E71BE004A4220 /* IntPointHash.h in Headers */ = {isa = PBXBuildFile; fileRef = E462A4A0113E71BE004A4220 /* IntPointHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 E46A2B1C17CA65B9000DBCD8 /* TypedElementDescendantIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = E46A2B1B17CA65B9000DBCD8 /* TypedElementDescendantIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 E46A2B1E17CA76B1000DBCD8 /* ElementChildIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = E46A2B1D17CA76B1000DBCD8 /* ElementChildIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleSheet.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleSheet.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/css/CSSStyleSheet.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -179,11 +179,11 @@
</span><span class="cx"> resolver->addKeyframeStyle(*insertedKeyframesRule);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- owner->scheduleOptimizedStyleSheetUpdate();
</del><ins>+ owner->authorStyleSheets().scheduleOptimizedUpdate();
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- owner->styleResolverChanged(DeferRecalcStyle);
</del><ins>+ owner->authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx">
</span><span class="cx"> m_mutatedRules = true;
</span><span class="cx"> }
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx"> Document* owner = ownerDocument();
</span><span class="cx"> if (!owner)
</span><span class="cx"> return;
</span><del>- owner->styleResolverChanged(DeferRecalcStyle);
</del><ins>+ owner->authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSStyleSheet::clearOwnerNode()
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx"> m_ownerNode = 0;
</span><span class="cx"> if (!owner)
</span><span class="cx"> return;
</span><del>- owner->styleResolverChanged(DeferRecalcStyleIfNeeded);
</del><ins>+ owner->authorStyleSheets().didChange(DeferRecalcStyleIfNeeded);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSStyleSheet::reattachChildRuleCSSOMWrappers()
</span></span></pre></div>
<a id="trunkSourceWebCoredomAuthorStyleSheetscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/AuthorStyleSheets.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/AuthorStyleSheets.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/dom/AuthorStyleSheets.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx">
</span><span class="cx"> AuthorStyleSheets::AuthorStyleSheets(Document& document)
</span><span class="cx"> : m_document(document)
</span><ins>+ , m_optimizedUpdateTimer(*this, &AuthorStyleSheets::optimizedUpdateTimerFired)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -63,6 +64,7 @@
</span><span class="cx"> AuthorStyleSheets::AuthorStyleSheets(ShadowRoot& shadowRoot)
</span><span class="cx"> : m_document(shadowRoot.documentScope())
</span><span class="cx"> , m_shadowRoot(&shadowRoot)
</span><ins>+ , m_optimizedUpdateTimer(*this, &AuthorStyleSheets::optimizedUpdateTimerFired)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -384,4 +386,64 @@
</span><span class="cx"> return m_weakCopyOfActiveStyleSheetListForFastLookup->contains(sheet);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void AuthorStyleSheets::flushPendingUpdates()
+{
+ if (m_pendingUpdateType == NoUpdate)
+ return;
+ updateActiveStyleSheets(m_pendingUpdateType);
</ins><span class="cx"> }
</span><ins>+
+void AuthorStyleSheets::scheduleOptimizedUpdate()
+{
+ if (m_optimizedUpdateTimer.isActive())
+ return;
+ if (m_pendingUpdateType == NoUpdate)
+ m_pendingUpdateType = OptimizedUpdate;
+ m_optimizedUpdateTimer.startOneShot(0);
+}
+
+void AuthorStyleSheets::didChange(StyleResolverUpdateFlag updateFlag)
+{
+ m_optimizedUpdateTimer.stop();
+
+ // Don't bother updating, since we haven't loaded all our style info yet
+ // and haven't calculated the style resolver for the first time.
+ if (!m_document.hasLivingRenderTree() || (!m_shadowRoot && !m_didCalculateStyleResolver && m_pendingStyleSheetCount)) {
+ m_document.clearStyleResolver();
+ return;
+ }
+ m_didCalculateStyleResolver = true;
+
+ auto styleSheetUpdate = (updateFlag == RecalcStyleIfNeeded || updateFlag == DeferRecalcStyleIfNeeded)
+ ? AuthorStyleSheets::OptimizedUpdate
+ : AuthorStyleSheets::FullUpdate;
+ bool stylesheetChangeRequiresStyleRecalc = updateActiveStyleSheets(styleSheetUpdate);
+
+ auto scheduleStyleRecalc = [&] {
+ if (m_shadowRoot)
+ m_shadowRoot->setNeedsStyleRecalc();
+ else
+ m_document.scheduleForcedStyleRecalc();
+ };
+
+ if (updateFlag == DeferRecalcStyle) {
+ scheduleStyleRecalc();
+ return;
+ }
+
+ if (updateFlag == DeferRecalcStyleIfNeeded) {
+ if (stylesheetChangeRequiresStyleRecalc)
+ scheduleStyleRecalc();
+ return;
+ }
+
+ if (stylesheetChangeRequiresStyleRecalc)
+ m_document.recalcStyle(Style::Force);
+}
+
+void AuthorStyleSheets::optimizedUpdateTimerFired()
+{
+ didChange(RecalcStyleIfNeeded);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoredomAuthorStyleSheetsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/AuthorStyleSheets.h (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/AuthorStyleSheets.h        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/dom/AuthorStyleSheets.h        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -48,6 +48,13 @@
</span><span class="cx"> class ShadowRoot;
</span><span class="cx"> class TreeScope;
</span><span class="cx">
</span><ins>+enum StyleResolverUpdateFlag {
+ RecalcStyleImmediately,
+ DeferRecalcStyle,
+ RecalcStyleIfNeeded,
+ DeferRecalcStyleIfNeeded
+};
+
</ins><span class="cx"> class AuthorStyleSheets {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="lines">@@ -62,23 +69,8 @@
</span><span class="cx"> void addStyleSheetCandidateNode(Node&, bool createdByParser);
</span><span class="cx"> void removeStyleSheetCandidateNode(Node&);
</span><span class="cx">
</span><del>- enum UpdateFlag { NoUpdate = 0, OptimizedUpdate, FullUpdate };
</del><ins>+ WEBCORE_EXPORT void didChange(StyleResolverUpdateFlag);
</ins><span class="cx">
</span><del>- UpdateFlag pendingUpdateType() const { return m_pendingUpdateType; }
- void setPendingUpdateType(UpdateFlag updateType)
- {
- if (updateType > m_pendingUpdateType)
- m_pendingUpdateType = updateType;
- }
-
- void flushPendingUpdates()
- {
- if (m_pendingUpdateType != NoUpdate)
- updateActiveStyleSheets(m_pendingUpdateType);
- }
-
- bool updateActiveStyleSheets(UpdateFlag);
-
</del><span class="cx"> String preferredStylesheetSetName() const { return m_preferredStylesheetSetName; }
</span><span class="cx"> String selectedStylesheetSetName() const { return m_selectedStylesheetSetName; }
</span><span class="cx"> void setPreferredStylesheetSetName(const String& name) { m_preferredStylesheetSetName = name; }
</span><span class="lines">@@ -99,8 +91,16 @@
</span><span class="cx">
</span><span class="cx"> bool activeStyleSheetsContains(const CSSStyleSheet*) const;
</span><span class="cx">
</span><ins>+ void scheduleOptimizedUpdate();
+ bool hasPendingUpdate() const { return m_optimizedUpdateTimer.isActive(); }
+ void flushPendingUpdates();
+
</ins><span class="cx"> private:
</span><ins>+ enum UpdateFlag { NoUpdate = 0, OptimizedUpdate, FullUpdate };
+ bool updateActiveStyleSheets(UpdateFlag);
+
</ins><span class="cx"> void collectActiveStyleSheets(Vector<RefPtr<StyleSheet>>&);
</span><ins>+
</ins><span class="cx"> enum StyleResolverUpdateType {
</span><span class="cx"> Reconstruct,
</span><span class="cx"> Reset,
</span><span class="lines">@@ -109,6 +109,8 @@
</span><span class="cx"> StyleResolverUpdateType analyzeStyleSheetChange(UpdateFlag, const Vector<RefPtr<CSSStyleSheet>>& newStylesheets, bool& requiresFullStyleRecalc);
</span><span class="cx"> void updateStyleResolver(Vector<RefPtr<CSSStyleSheet>>&, StyleResolverUpdateType);
</span><span class="cx">
</span><ins>+ void optimizedUpdateTimerFired();
+
</ins><span class="cx"> Document& m_document;
</span><span class="cx"> ShadowRoot* m_shadowRoot { nullptr };
</span><span class="cx">
</span><span class="lines">@@ -115,6 +117,8 @@
</span><span class="cx"> Vector<RefPtr<StyleSheet>> m_styleSheetsForStyleSheetList;
</span><span class="cx"> Vector<RefPtr<CSSStyleSheet>> m_activeStyleSheets;
</span><span class="cx">
</span><ins>+ Timer m_optimizedUpdateTimer;
+
</ins><span class="cx"> // This is a mirror of m_activeAuthorStyleSheets that gets populated on demand for activeStyleSheetsContains().
</span><span class="cx"> mutable std::unique_ptr<HashSet<const CSSStyleSheet*>> m_weakCopyOfActiveStyleSheetListForFastLookup;
</span><span class="cx">
</span><span class="lines">@@ -123,6 +127,7 @@
</span><span class="cx"> // We use this count of pending sheets to detect when we can begin attaching
</span><span class="cx"> // elements and when it is safe to execute scripts.
</span><span class="cx"> int m_pendingStyleSheetCount { 0 };
</span><ins>+ bool m_didCalculateStyleResolver { false };
</ins><span class="cx">
</span><span class="cx"> UpdateFlag m_pendingUpdateType { NoUpdate };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -435,7 +435,6 @@
</span><span class="cx"> , m_touchEventsChangedTimer(*this, &Document::touchEventsChangedTimerFired)
</span><span class="cx"> #endif
</span><span class="cx"> , m_referencingNodeCount(0)
</span><del>- , m_didCalculateStyleResolver(false)
</del><span class="cx"> , m_hasNodesWithPlaceholderStyle(false)
</span><span class="cx"> , m_needsNotifyRemoveAllPendingStylesheet(false)
</span><span class="cx"> , m_ignorePendingStylesheets(false)
</span><span class="lines">@@ -458,7 +457,6 @@
</span><span class="cx"> , m_visuallyOrdered(false)
</span><span class="cx"> , m_readyState(Complete)
</span><span class="cx"> , m_bParsing(false)
</span><del>- , m_optimizedStyleSheetUpdateTimer(*this, &Document::optimizedStyleSheetUpdateTimerFired)
</del><span class="cx"> , m_styleRecalcTimer(*this, &Document::updateStyleIfNeeded)
</span><span class="cx"> , m_pendingStyleRecalcShouldForce(false)
</span><span class="cx"> , m_inStyleRecalc(false)
</span><span class="lines">@@ -1357,7 +1355,7 @@
</span><span class="cx"> m_contentLanguage = language;
</span><span class="cx">
</span><span class="cx"> // Recalculate style so language is used when selecting the initial font.
</span><del>- styleResolverChanged(DeferRecalcStyle);
</del><ins>+ m_authorStyleSheets->didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Document::setXMLVersion(const String& version, ExceptionCode& ec)
</span><span class="lines">@@ -1945,6 +1943,14 @@
</span><span class="cx"> frameView.frame().mainFrame().eventHandler().dispatchFakeMouseMoveEventSoon();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool Document::needsStyleRecalc() const
+{
+ if (pageCacheState() != NotInPageCache)
+ return false;
+
+ return m_pendingStyleRecalcShouldForce || childNeedsStyleRecalc() || authorStyleSheets().hasPendingUpdate();
+}
+
</ins><span class="cx"> void Document::updateStyleIfNeeded()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="lines">@@ -1953,8 +1959,8 @@
</span><span class="cx"> if (!view() || view()->isInRenderTreeLayout())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_optimizedStyleSheetUpdateTimer.isActive())
- styleResolverChanged(RecalcStyleIfNeeded);
</del><ins>+ if (authorStyleSheets().hasPendingUpdate())
+ authorStyleSheets().didChange(RecalcStyleIfNeeded);
</ins><span class="cx">
</span><span class="cx"> if (!needsStyleRecalc())
</span><span class="cx"> return;
</span><span class="lines">@@ -2008,7 +2014,7 @@
</span><span class="cx"> HTMLElement* bodyElement = bodyOrFrameset();
</span><span class="cx"> if (bodyElement && !bodyElement->renderer() && m_pendingSheetLayout == NoLayoutWithPendingSheets) {
</span><span class="cx"> m_pendingSheetLayout = DidLayoutWithPendingSheets;
</span><del>- styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> } else if (m_hasNodesWithPlaceholderStyle)
</span><span class="cx"> // If new nodes have been added or style recalc has been done with style sheets still pending, some nodes
</span><span class="cx"> // may not have had their real style calculated yet. Normally this gets cleaned when style sheets arrive
</span><span class="lines">@@ -3145,7 +3151,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_needsNotifyRemoveAllPendingStylesheet = false;
</span><span class="cx">
</span><del>- styleResolverChanged(DeferRecalcStyleIfNeeded);
</del><ins>+ authorStyleSheets().didChange(DeferRecalcStyleIfNeeded);
</ins><span class="cx">
</span><span class="cx"> if (m_pendingSheetLayout == DidLayoutWithPendingSheets) {
</span><span class="cx"> m_pendingSheetLayout = IgnoreLayoutWithPendingSheets;
</span><span class="lines">@@ -3220,7 +3226,7 @@
</span><span class="cx"> // -dwh
</span><span class="cx"> authorStyleSheets().setSelectedStylesheetSetName(content);
</span><span class="cx"> authorStyleSheets().setPreferredStylesheetSetName(content);
</span><del>- styleResolverChanged(DeferRecalcStyle);
</del><ins>+ authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case HTTPHeaderName::Refresh: {
</span><span class="lines">@@ -3524,7 +3530,7 @@
</span><span class="cx"> void Document::setSelectedStylesheetSet(const String& aString)
</span><span class="cx"> {
</span><span class="cx"> authorStyleSheets().setSelectedStylesheetSetName(aString);
</span><del>- styleResolverChanged(DeferRecalcStyle);
</del><ins>+ authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Document::evaluateMediaQueryList()
</span><span class="lines">@@ -3547,19 +3553,6 @@
</span><span class="cx"> picture->sourcesChanged();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Document::optimizedStyleSheetUpdateTimerFired()
-{
- styleResolverChanged(RecalcStyleIfNeeded);
-}
-
-void Document::scheduleOptimizedStyleSheetUpdate()
-{
- if (m_optimizedStyleSheetUpdateTimer.isActive())
- return;
- authorStyleSheets().setPendingUpdateType(AuthorStyleSheets::OptimizedUpdate);
- m_optimizedStyleSheetUpdateTimer.startOneShot(0);
-}
-
</del><span class="cx"> void Document::updateViewportUnitsOnResize()
</span><span class="cx"> {
</span><span class="cx"> if (!hasStyleWithViewportUnits())
</span><span class="lines">@@ -3624,39 +3617,6 @@
</span><span class="cx"> audioProducer->pageMutedStateDidChange();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Document::styleResolverChanged(StyleResolverUpdateFlag updateFlag)
-{
- if (m_optimizedStyleSheetUpdateTimer.isActive())
- m_optimizedStyleSheetUpdateTimer.stop();
-
- // Don't bother updating, since we haven't loaded all our style info yet
- // and haven't calculated the style selector for the first time.
- if (!hasLivingRenderTree() || (!m_didCalculateStyleResolver && !haveStylesheetsLoaded())) {
- m_styleResolver = nullptr;
- return;
- }
- m_didCalculateStyleResolver = true;
-
- auto styleSheetUpdate = (updateFlag == RecalcStyleIfNeeded || updateFlag == DeferRecalcStyleIfNeeded)
- ? AuthorStyleSheets::OptimizedUpdate
- : AuthorStyleSheets::FullUpdate;
- bool stylesheetChangeRequiresStyleRecalc = authorStyleSheets().updateActiveStyleSheets(styleSheetUpdate);
-
- if (updateFlag == DeferRecalcStyle) {
- scheduleForcedStyleRecalc();
- return;
- }
-
- if (updateFlag == DeferRecalcStyleIfNeeded) {
- if (stylesheetChangeRequiresStyleRecalc)
- scheduleForcedStyleRecalc();
- return;
- }
-
- if (stylesheetChangeRequiresStyleRecalc)
- recalcStyle(Style::Force);
-}
-
</del><span class="cx"> static bool isNodeInSubtree(Node* node, Node* container, bool amongChildrenOnly)
</span><span class="cx"> {
</span><span class="cx"> bool nodeInSubtree = false;
</span><span class="lines">@@ -6645,7 +6605,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Document::updateHoverActiveState(const HitTestRequest& request, Element* innerElement, StyleResolverUpdateFlag updateFlag)
</del><ins>+void Document::updateHoverActiveState(const HitTestRequest& request, Element* innerElement)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!request.readOnly());
</span><span class="cx">
</span><span class="lines">@@ -6762,9 +6722,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ASSERT(updateFlag == RecalcStyleIfNeeded || updateFlag == DeferRecalcStyleIfNeeded);
- if (updateFlag == RecalcStyleIfNeeded)
- updateStyleIfNeeded();
</del><ins>+ updateStyleIfNeeded();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool Document::haveStylesheetsLoaded() const
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/dom/Document.h        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -231,8 +231,6 @@
</span><span class="cx"> PageshowEventPersisted = 1
</span><span class="cx"> };
</span><span class="cx">
</span><del>-enum StyleResolverUpdateFlag { RecalcStyleImmediately, DeferRecalcStyle, RecalcStyleIfNeeded, DeferRecalcStyleIfNeeded };
-
</del><span class="cx"> enum NodeListInvalidationType {
</span><span class="cx"> DoNotInvalidateOnAttributeChanges = 0,
</span><span class="cx"> InvalidateOnClassAttrChange,
</span><span class="lines">@@ -517,19 +515,6 @@
</span><span class="cx"> bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfterStylesheetsLoad; }
</span><span class="cx"> void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAfterStylesheetsLoad = b; }
</span><span class="cx">
</span><del>- /**
- * Called when one or more stylesheets in the document may have been added, removed or changed.
- *
- * Creates a new style resolver and assign it to this document. This is done by iterating through all nodes in
- * document (or those before <BODY> in a HTML document), searching for stylesheets. Stylesheets can be contained in
- * <LINK>, <STYLE> or <BODY> elements, as well as processing instructions (XML documents only). A list is
- * constructed from these which is used to create the a new style selector which collates all of the stylesheets
- * found and is used to calculate the derived styles for all rendering objects.
- */
- WEBCORE_EXPORT void styleResolverChanged(StyleResolverUpdateFlag);
-
- void scheduleOptimizedStyleSheetUpdate();
-
</del><span class="cx"> void evaluateMediaQueryList();
</span><span class="cx">
</span><span class="cx"> FormController& formController();
</span><span class="lines">@@ -557,7 +542,7 @@
</span><span class="cx">
</span><span class="cx"> void recalcStyle(Style::Change = Style::NoChange);
</span><span class="cx"> WEBCORE_EXPORT void updateStyleIfNeeded();
</span><del>- bool needsStyleRecalc() const { return pageCacheState() == NotInPageCache && (m_pendingStyleRecalcShouldForce || childNeedsStyleRecalc() || m_optimizedStyleSheetUpdateTimer.isActive()); }
</del><ins>+ bool needsStyleRecalc() const;
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT void updateLayout();
</span><span class="cx">
</span><span class="lines">@@ -736,7 +721,7 @@
</span><span class="cx"> void hoveredElementDidDetach(Element*);
</span><span class="cx"> void elementInActiveChainDidDetach(Element*);
</span><span class="cx">
</span><del>- void updateHoverActiveState(const HitTestRequest&, Element*, StyleResolverUpdateFlag = RecalcStyleIfNeeded);
</del><ins>+ void updateHoverActiveState(const HitTestRequest&, Element*);
</ins><span class="cx">
</span><span class="cx"> // Updates for :target (CSS3 selector).
</span><span class="cx"> void setCSSTarget(Element*);
</span><span class="lines">@@ -748,7 +733,6 @@
</span><span class="cx"> void unscheduleStyleRecalc();
</span><span class="cx"> bool hasPendingStyleRecalc() const;
</span><span class="cx"> bool hasPendingForcedStyleRecalc() const;
</span><del>- void optimizedStyleSheetUpdateTimerFired();
</del><span class="cx">
</span><span class="cx"> void registerNodeListForInvalidation(LiveNodeList&);
</span><span class="cx"> void unregisterNodeListForInvalidation(LiveNodeList&);
</span><span class="lines">@@ -1414,7 +1398,6 @@
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<StyleResolver> m_styleResolver;
</span><span class="cx"> std::unique_ptr<StyleResolver> m_userAgentShadowTreeStyleResolver;
</span><del>- bool m_didCalculateStyleResolver;
</del><span class="cx"> bool m_hasNodesWithPlaceholderStyle;
</span><span class="cx"> bool m_needsNotifyRemoveAllPendingStylesheet;
</span><span class="cx"> // But sometimes you need to ignore pending stylesheet count to
</span><span class="lines">@@ -1502,7 +1485,6 @@
</span><span class="cx"> ReadyState m_readyState;
</span><span class="cx"> bool m_bParsing;
</span><span class="cx">
</span><del>- Timer m_optimizedStyleSheetUpdateTimer;
</del><span class="cx"> Timer m_styleRecalcTimer;
</span><span class="cx"> bool m_pendingStyleRecalcShouldForce;
</span><span class="cx"> bool m_inStyleRecalc;
</span></span></pre></div>
<a id="trunkSourceWebCoredomExtensionStyleSheetscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ExtensionStyleSheets.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ExtensionStyleSheets.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/dom/ExtensionStyleSheets.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "ExtensionStyleSheets.h"
</span><span class="cx">
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "CSSStyleSheet.h"
</span><span class="cx"> #include "Element.h"
</span><span class="cx"> #include "HTMLIFrameElement.h"
</span><span class="lines">@@ -82,7 +83,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_pageUserSheet) {
</span><span class="cx"> m_pageUserSheet = nullptr;
</span><del>- m_document.styleResolverChanged(DeferRecalcStyle);
</del><ins>+ m_document.authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -90,7 +91,7 @@
</span><span class="cx"> {
</span><span class="cx"> clearPageUserSheet();
</span><span class="cx"> if (pageUserSheet())
</span><del>- m_document.styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ m_document.authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const Vector<RefPtr<CSSStyleSheet>>& ExtensionStyleSheets::injectedUserStyleSheets() const
</span><span class="lines">@@ -154,7 +155,7 @@
</span><span class="cx"> m_injectedStyleSheetCacheValid = false;
</span><span class="cx"> if (m_injectedUserStyleSheets.isEmpty() && m_injectedAuthorStyleSheets.isEmpty())
</span><span class="cx"> return;
</span><del>- m_document.styleResolverChanged(DeferRecalcStyle);
</del><ins>+ m_document.authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ExtensionStyleSheets::addUserStyleSheet(Ref<StyleSheetContents>&& userSheet)
</span><span class="lines">@@ -161,7 +162,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(userSheet.get().isUserStyleSheet());
</span><span class="cx"> m_userStyleSheets.append(CSSStyleSheet::create(WTFMove(userSheet), m_document));
</span><del>- m_document.styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ m_document.authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ExtensionStyleSheets::addAuthorStyleSheetForTesting(Ref<StyleSheetContents>&& authorSheet)
</span><span class="lines">@@ -168,7 +169,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!authorSheet.get().isUserStyleSheet());
</span><span class="cx"> m_authorStyleSheetsForTesting.append(CSSStyleSheet::create(WTFMove(authorSheet), m_document));
</span><del>- m_document.styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ m_document.authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="lines">@@ -200,7 +201,7 @@
</span><span class="cx">
</span><span class="cx"> void ExtensionStyleSheets::styleResolverChangedTimerFired()
</span><span class="cx"> {
</span><del>- m_document.styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ m_document.authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ExtensionStyleSheets::detachFromDocument()
</span></span></pre></div>
<a id="trunkSourceWebCoredomInlineStyleSheetOwnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">
</span><span class="cx"> // If we're in document teardown, then we don't need to do any notification of our sheet's removal.
</span><span class="cx"> if (document.hasLivingRenderTree())
</span><del>- document.styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document.authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InlineStyleSheetOwner::clearDocumentData(Document&, Element& element)
</span></span></pre></div>
<a id="trunkSourceWebCoredomProcessingInstructioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ProcessingInstruction.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ProcessingInstruction.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/dom/ProcessingInstruction.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -268,11 +268,17 @@
</span><span class="cx"> ASSERT(m_sheet->ownerNode() == this);
</span><span class="cx"> m_sheet->clearOwnerNode();
</span><span class="cx"> m_sheet = nullptr;
</span><ins>+
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (m_loading) {
+ m_loading = false;
+ document().authorStyleSheets().removePendingSheet();
+ }
+
</ins><span class="cx"> // If we're in document teardown, then we don't need to do any notification of our sheet's removal.
</span><span class="cx"> if (document().hasLivingRenderTree())
</span><del>- document().styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document().authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ProcessingInstruction::finishParsingChildren()
</span></span></pre></div>
<a id="trunkSourceWebCoredomShadowRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ShadowRoot.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ShadowRoot.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/dom/ShadowRoot.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -108,15 +108,10 @@
</span><span class="cx">
</span><span class="cx"> void ShadowRoot::updateStyle()
</span><span class="cx"> {
</span><del>- bool shouldRecalcStyle = false;
-
- if (m_authorStyleSheets) {
- // FIXME: Make optimized updated work.
- shouldRecalcStyle = m_authorStyleSheets->updateActiveStyleSheets(AuthorStyleSheets::FullUpdate);
- }
-
- if (shouldRecalcStyle)
- setNeedsStyleRecalc();
</del><ins>+ if (!m_authorStyleSheets)
+ return;
+ // FIXME: Make optimized updated work.
+ m_authorStyleSheets->didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String ShadowRoot::innerHTML() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx"> if (!m_sheet && m_disabledState == EnabledViaScript)
</span><span class="cx"> process();
</span><span class="cx"> else
</span><del>- document().styleResolverChanged(DeferRecalcStyle); // Update the style selector.
</del><ins>+ document().authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx"> m_media = value.string().convertToASCIILowercase();
</span><span class="cx"> process();
</span><span class="cx"> if (m_sheet && !isDisabled())
</span><del>- document().styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document().authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (name == disabledAttr) {
</span><span class="lines">@@ -283,7 +283,7 @@
</span><span class="cx"> } else if (m_sheet) {
</span><span class="cx"> // we no longer contain a stylesheet, e.g. perhaps rel or type was changed
</span><span class="cx"> clearSheet();
</span><del>- document().styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document().authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx"> removePendingSheet(RemovePendingSheetNotifyLater);
</span><span class="cx">
</span><span class="cx"> if (document().hasLivingRenderTree())
</span><del>- document().styleResolverChanged(DeferRecalcStyleIfNeeded);
</del><ins>+ document().authorStyleSheets().didChange(DeferRecalcStyleIfNeeded);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLLinkElement::finishParsingChildren()
</span><span class="lines">@@ -555,7 +555,7 @@
</span><span class="cx">
</span><span class="cx"> if (type == InactiveSheet) {
</span><span class="cx"> // Document just needs to know about the sheet for exposure through document.styleSheets
</span><del>- document().authorStyleSheets().updateActiveStyleSheets(AuthorStyleSheets::OptimizedUpdate);
</del><ins>+ document().authorStyleSheets().didChange(DeferRecalcStyleIfNeeded);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLStyleElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLStyleElement.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLStyleElement.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/html/HTMLStyleElement.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "HTMLStyleElement.h"
</span><span class="cx">
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "Event.h"
</span><span class="cx"> #include "EventNames.h"
</span><span class="lines">@@ -77,7 +78,7 @@
</span><span class="cx"> if (sheet()) {
</span><span class="cx"> sheet()->setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(value));
</span><span class="cx"> if (inDocument() && document().hasLivingRenderTree())
</span><del>- document().styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ document().authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx"> } else if (name == typeAttr)
</span><span class="cx"> m_styleSheetOwner.setContentType(value);
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorCSSAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -889,7 +889,7 @@
</span><span class="cx"> m_nodeIdToForcedPseudoState.set(nodeId, forcedPseudoState);
</span><span class="cx"> else
</span><span class="cx"> m_nodeIdToForcedPseudoState.remove(nodeId);
</span><del>- element->document().styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ element->document().authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorCSSAgent::getNamedFlowCollection(ErrorString& errorString, int documentNodeId, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::CSS::NamedFlow>>& result)
</span><span class="lines">@@ -1189,7 +1189,7 @@
</span><span class="cx">
</span><span class="cx"> m_nodeIdToForcedPseudoState.clear();
</span><span class="cx"> for (auto& document : documentsToChange)
</span><del>- document->styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ document->authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorPageAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "InspectorPageAgent.h"
</span><span class="cx">
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "CachedCSSStyleSheet.h"
</span><span class="cx"> #include "CachedFont.h"
</span><span class="cx"> #include "CachedImage.h"
</span><span class="lines">@@ -1001,7 +1002,7 @@
</span><span class="cx"> m_emulatedMedia = media;
</span><span class="cx"> Document* document = m_page.mainFrame().document();
</span><span class="cx"> if (document) {
</span><del>- document->styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ document->authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> document->updateLayout();
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/page/Frame.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx">
</span><span class="cx"> #include "AnimationController.h"
</span><span class="cx"> #include "ApplyStyleCommand.h"
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "BackForwardController.h"
</span><span class="cx"> #include "CSSComputedStyleDeclaration.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="lines">@@ -643,7 +644,7 @@
</span><span class="cx"> m_doc->setPrinting(printing);
</span><span class="cx"> view()->adjustMediaTypeForPrinting(printing);
</span><span class="cx">
</span><del>- m_doc->styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ m_doc->authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> if (shouldUsePrintingLayout()) {
</span><span class="cx"> view()->forceLayoutForPagination(pageSize, originalPageSize, maximumShrinkRatio, shouldAdjustViewSize);
</span><span class="cx"> } else {
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/page/FrameView.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">
</span><span class="cx"> #include "AXObjectCache.h"
</span><span class="cx"> #include "AnimationController.h"
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "BackForwardController.h"
</span><span class="cx"> #include "CachedImage.h"
</span><span class="cx"> #include "CachedResourceLoader.h"
</span><span class="lines">@@ -1300,7 +1301,7 @@
</span><span class="cx"> StyleResolver* styleResolver = document.styleResolverIfExists();
</span><span class="cx"> if (!styleResolver || styleResolver->hasMediaQueriesAffectedByViewportChange()) {
</span><span class="cx"> LOG(Layout, " hasMediaQueriesAffectedByViewportChange, enqueueing style recalc");
</span><del>- document.styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document.authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> // FIXME: This instrumentation event is not strictly accurate since cached media query results do not persist across StyleResolver rebuilds.
</span><span class="cx"> InspectorInstrumentation::mediaQueryResultChanged(document);
</span><span class="cx"> } else
</span><span class="lines">@@ -3495,7 +3496,7 @@
</span><span class="cx">
</span><span class="cx"> m_pagination = pagination;
</span><span class="cx">
</span><del>- frame().document()->styleResolverChanged(DeferRecalcStyle);
</del><ins>+ frame().document()->authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntRect FrameView::windowClipRect() const
</span><span class="lines">@@ -4964,7 +4965,7 @@
</span><span class="cx"> if (Document* document = frame().document()) {
</span><span class="cx"> // FIXME: this should probably be updateViewportUnitsOnResize(), but synchronously
</span><span class="cx"> // dirtying style here causes assertions on iOS (rdar://problem/19998166).
</span><del>- document->styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document->authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/page/Page.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> #include "AlternativeTextClient.h"
</span><span class="cx"> #include "AnimationController.h"
</span><span class="cx"> #include "ApplicationCacheStorage.h"
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "BackForwardClient.h"
</span><span class="cx"> #include "BackForwardController.h"
</span><span class="cx"> #include "Chrome.h"
</span><span class="lines">@@ -422,7 +423,7 @@
</span><span class="cx"> m_mainFrame->view()->forceLayout();
</span><span class="cx">
</span><span class="cx"> if (m_mainFrame->document())
</span><del>- m_mainFrame->document()->styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ m_mainFrame->document()->authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(VIEW_MODE_CSS_MEDIA)
</span><span class="cx">
</span><span class="lines">@@ -500,7 +501,7 @@
</span><span class="cx"> {
</span><span class="cx"> for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
</span><span class="cx"> if (Document* document = frame->document())
</span><del>- document->styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document->authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1161,7 +1162,7 @@
</span><span class="cx"> if (!document)
</span><span class="cx"> continue;
</span><span class="cx"> document->extensionStyleSheets().invalidateInjectedStyleSheetCache();
</span><del>- document->styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document->authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceElement.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx"> #include "SVGFontFaceElement.h"
</span><span class="cx">
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "CSSFontFaceSrcValue.h"
</span><span class="cx"> #include "CSSParser.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="lines">@@ -266,7 +267,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- document().styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document().authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(ContainerNode& rootParent)
</span><span class="lines">@@ -291,7 +292,7 @@
</span><span class="cx"> document().accessSVGExtensions().unregisterSVGFontFaceElement(this);
</span><span class="cx"> m_fontFaceRule->mutableProperties().clear();
</span><span class="cx">
</span><del>- document().styleResolverChanged(DeferRecalcStyle);
</del><ins>+ document().authorStyleSheets().didChange(DeferRecalcStyle);
</ins><span class="cx"> } else
</span><span class="cx"> ASSERT(!m_fontElement);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXMLTreeViewercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XMLTreeViewer.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XMLTreeViewer.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/xml/XMLTreeViewer.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(XSLT)
</span><span class="cx">
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "Element.h"
</span><span class="cx"> #include "ExceptionCodePlaceholder.h"
</span><span class="lines">@@ -63,7 +64,7 @@
</span><span class="cx"> String cssString = StringImpl::createWithoutCopying(XMLViewer_css, sizeof(XMLViewer_css));
</span><span class="cx"> auto text = m_document.createTextNode(cssString);
</span><span class="cx"> m_document.getElementById(String(ASCIILiteral("xml-viewer-style")))->appendChild(text, IGNORE_EXCEPTION);
</span><del>- m_document.styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ m_document.authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorexmlparserXMLDocumentParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "XMLDocumentParser.h"
</span><span class="cx">
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "CDATASection.h"
</span><span class="cx"> #include "CachedScript.h"
</span><span class="cx"> #include "Comment.h"
</span><span class="lines">@@ -199,7 +200,7 @@
</span><span class="cx"> insertErrorMessageBlock();
</span><span class="cx"> else {
</span><span class="cx"> updateLeafTextNode();
</span><del>- document()->styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ document()->authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (isParsing())
</span></span></pre></div>
<a id="trunkSourceWebCorexmlparserXMLDocumentParserLibxml2cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "XMLDocumentParser.h"
</span><span class="cx">
</span><ins>+#include "AuthorStyleSheets.h"
</ins><span class="cx"> #include "CDATASection.h"
</span><span class="cx"> #include "CachedScript.h"
</span><span class="cx"> #include "Comment.h"
</span><span class="lines">@@ -1386,7 +1387,7 @@
</span><span class="cx"> document()->setTransformSource(std::make_unique<TransformSource>(doc));
</span><span class="cx">
</span><span class="cx"> document()->setParsing(false); // Make the document think it's done, so it will apply XSL stylesheets.
</span><del>- document()->styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ document()->authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx">
</span><span class="cx"> // styleResolverChanged() call can detach the parser and null out its document.
</span><span class="cx"> // In that case, we just bail out.
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (206310 => 206311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2016-09-23 16:29:43 UTC (rev 206310)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2016-09-23 16:35:04 UTC (rev 206311)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx"> #import "WebTypesInternal.h"
</span><span class="cx"> #import "WebUIDelegatePrivate.h"
</span><span class="cx"> #import "WebViewInternal.h"
</span><ins>+#import <WebCore/AuthorStyleSheets.h>
</ins><span class="cx"> #import <WebCore/CSSStyleDeclaration.h>
</span><span class="cx"> #import <WebCore/CachedImage.h>
</span><span class="cx"> #import <WebCore/CachedResourceClient.h>
</span><span class="lines">@@ -3611,7 +3612,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> if (Frame* coreFrame = core([self _frame]))
</span><del>- coreFrame->document()->styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ coreFrame->document()->authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx">
</span><span class="cx"> #ifdef LOG_TIMES
</span><span class="cx"> double thisTime = CFAbsoluteTimeGetCurrent() - start;
</span><span class="lines">@@ -5004,7 +5005,7 @@
</span><span class="cx">
</span><span class="cx"> document->setPaginatedForScreen(_private->paginateScreenContent);
</span><span class="cx"> document->setPrinting(_private->printing);
</span><del>- document->styleResolverChanged(RecalcStyleImmediately);
</del><ins>+ document->authorStyleSheets().didChange(RecalcStyleImmediately);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>