Diff
Modified: trunk/Source/WebCore/ChangeLog (239056 => 239057)
--- trunk/Source/WebCore/ChangeLog 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebCore/ChangeLog 2018-12-10 23:56:31 UTC (rev 239057)
@@ -1,3 +1,37 @@
+2018-12-10 Antti Koivisto <[email protected]>
+
+ Rename "forced style recalc" to "full style rebuild"
+ https://bugs.webkit.org/show_bug.cgi?id=192572
+
+ Reviewed by Zalan Bujtas.
+
+ The old name is confusing.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::hasValidStyleForProperty):
+ * dom/Document.cpp:
+ (WebCore::Document::scheduleStyleRebuild):
+ (WebCore::Document::scheduleStyleRecalc):
+ (WebCore::Document::unscheduleStyleRecalc):
+ (WebCore::Document::hasPendingStyleRebuild const):
+ (WebCore::Document::resolveStyle):
+ (WebCore::Document::needsStyleRecalc const):
+ (WebCore::Document::updateLayoutIgnorePendingStylesheets):
+ (WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
+ (WebCore::Document::setDesignMode):
+ (WebCore::Document::webkitDidExitFullScreenForElement):
+ (WebCore::Document::setAnimatingFullScreen):
+ (WebCore::Document::setFullscreenControlsHidden):
+ (WebCore::Document::scheduleForcedStyleRecalc): Deleted.
+ (WebCore::Document::hasPendingForcedStyleRecalc const): Deleted.
+ * dom/Document.h:
+ * dom/Element.cpp:
+ (WebCore::Element::needsStyleInvalidation const):
+ * page/Page.cpp:
+ (WebCore::Page::updateStyleAfterChangeInEnvironment):
+ * style/StyleScope.cpp:
+ (WebCore::Style::Scope::updateActiveStyleSheets):
+
2018-12-10 Alexey Proskuryakov <[email protected]>
Include CoreGraphics.h from WebCorePrefix.h
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (239056 => 239057)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2018-12-10 23:56:31 UTC (rev 239057)
@@ -2434,7 +2434,7 @@
{
if (element.styleValidity() != Style::Validity::Valid)
return false;
- if (element.document().hasPendingForcedStyleRecalc())
+ if (element.document().hasPendingFullStyleRebuild())
return false;
if (!element.document().childNeedsStyleRecalc())
return true;
Modified: trunk/Source/WebCore/dom/Document.cpp (239056 => 239057)
--- trunk/Source/WebCore/dom/Document.cpp 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebCore/dom/Document.cpp 2018-12-10 23:56:31 UTC (rev 239057)
@@ -1780,9 +1780,9 @@
return TreeWalker::create(root, whatToShow, WTFMove(filter));
}
-void Document::scheduleForcedStyleRecalc()
+void Document::scheduleFullStyleRebuild()
{
- m_pendingStyleRecalcShouldForce = true;
+ m_needsFullStyleRebuild = true;
scheduleStyleRecalc();
}
@@ -1793,7 +1793,7 @@
if (m_styleRecalcTimer.isActive() || pageCacheState() != NotInPageCache)
return;
- ASSERT(childNeedsStyleRecalc() || m_pendingStyleRecalcShouldForce);
+ ASSERT(childNeedsStyleRecalc() || m_needsFullStyleRebuild);
#if PLATFORM(IOS_FAMILY)
if (WKIsObservingStyleRecalcScheduling()) {
@@ -1826,7 +1826,7 @@
ASSERT(!childNeedsStyleRecalc());
m_styleRecalcTimer.stop();
- m_pendingStyleRecalcShouldForce = false;
+ m_needsFullStyleRebuild = false;
}
bool Document::hasPendingStyleRecalc() const
@@ -1834,9 +1834,9 @@
return needsStyleRecalc() && !m_inStyleRecalc;
}
-bool Document::hasPendingForcedStyleRecalc() const
+bool Document::hasPendingFullStyleRebuild() const
{
- return hasPendingStyleRecalc() && m_pendingStyleRecalcShouldForce;
+ return hasPendingStyleRecalc() && m_needsFullStyleRebuild;
}
void Document::resolveStyle(ResolveStyleType type)
@@ -1892,7 +1892,7 @@
m_inStyleRecalc = true;
- if (m_pendingStyleRecalcShouldForce)
+ if (m_needsFullStyleRebuild)
type = ResolveStyleType::Rebuild;
if (type == ResolveStyleType::Rebuild) {
@@ -1992,7 +1992,7 @@
if (pageCacheState() != NotInPageCache)
return false;
- if (m_pendingStyleRecalcShouldForce)
+ if (m_needsFullStyleRebuild)
return true;
if (childNeedsStyleRecalc())
@@ -2099,7 +2099,7 @@
m_ignorePendingStylesheets = true;
// FIXME: This should just invalidate elements with missing styles.
if (m_hasNodesWithMissingStyle)
- scheduleForcedStyleRecalc();
+ scheduleFullStyleRebuild();
}
updateLayout();
@@ -2300,7 +2300,7 @@
resolver->invalidateMatchedPropertiesCache();
if (pageCacheState() != NotInPageCache || !renderView())
return;
- scheduleForcedStyleRecalc();
+ scheduleFullStyleRebuild();
}
void Document::didClearStyleResolver()
@@ -5464,7 +5464,7 @@
{
m_designMode = value;
for (Frame* frame = m_frame; frame && frame->document(); frame = frame->tree().traverseNext(m_frame))
- frame->document()->scheduleForcedStyleRecalc();
+ frame->document()->scheduleFullStyleRebuild();
}
String Document::designMode() const
@@ -6587,7 +6587,7 @@
unwrapFullScreenRenderer(m_fullScreenRenderer.get(), m_fullScreenElement.get());
m_fullScreenElement = nullptr;
- scheduleForcedStyleRecalc();
+ scheduleFullStyleRebuild();
// When webkitCancelFullScreen is called, we call webkitExitFullScreen on the topDocument(). That
// means that the events will be queued there. So if we have no events here, start the timer on
@@ -6690,7 +6690,7 @@
if (m_fullScreenElement && m_fullScreenElement->isDescendantOf(*this)) {
m_fullScreenElement->invalidateStyleForSubtree();
- scheduleForcedStyleRecalc();
+ scheduleFullStyleRebuild();
}
}
@@ -6707,7 +6707,7 @@
if (m_fullScreenElement && m_fullScreenElement->isDescendantOf(*this)) {
m_fullScreenElement->invalidateStyleForSubtree();
- scheduleForcedStyleRecalc();
+ scheduleFullStyleRebuild();
}
}
Modified: trunk/Source/WebCore/dom/Document.h (239056 => 239057)
--- trunk/Source/WebCore/dom/Document.h 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebCore/dom/Document.h 2018-12-10 23:56:31 UTC (rev 239057)
@@ -782,11 +782,11 @@
Element* cssTarget() const { return m_cssTarget; }
static ptrdiff_t cssTargetMemoryOffset() { return OBJECT_OFFSETOF(Document, m_cssTarget); }
- WEBCORE_EXPORT void scheduleForcedStyleRecalc();
+ WEBCORE_EXPORT void scheduleFullStyleRebuild();
void scheduleStyleRecalc();
void unscheduleStyleRecalc();
bool hasPendingStyleRecalc() const;
- bool hasPendingForcedStyleRecalc() const;
+ bool hasPendingFullStyleRebuild() const;
void registerNodeListForInvalidation(LiveNodeList&);
void unregisterNodeListForInvalidation(LiveNodeList&);
@@ -1993,7 +1993,7 @@
bool m_visuallyOrdered { false };
bool m_bParsing { false }; // FIXME: rename
- bool m_pendingStyleRecalcShouldForce { false };
+ bool m_needsFullStyleRebuild { false };
bool m_inStyleRecalc { false };
bool m_closeAfterStyleRecalc { false };
bool m_inRenderTreeUpdate { false };
Modified: trunk/Source/WebCore/dom/Element.cpp (239056 => 239057)
--- trunk/Source/WebCore/dom/Element.cpp 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebCore/dom/Element.cpp 2018-12-10 23:56:31 UTC (rev 239057)
@@ -2999,7 +2999,7 @@
return false;
if (styleValidity() >= Style::Validity::SubtreeInvalid)
return false;
- if (document().hasPendingForcedStyleRecalc())
+ if (document().hasPendingFullStyleRebuild())
return false;
return true;
Modified: trunk/Source/WebCore/page/Page.cpp (239056 => 239057)
--- trunk/Source/WebCore/page/Page.cpp 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebCore/page/Page.cpp 2018-12-10 23:56:31 UTC (rev 239057)
@@ -548,7 +548,7 @@
if (StyleResolver* styleResolver = document->styleScope().resolverIfExists())
styleResolver->invalidateMatchedPropertiesCache();
- document->scheduleForcedStyleRecalc();
+ document->scheduleFullStyleRebuild();
document->styleScope().didChangeStyleSheetEnvironment();
}
}
Modified: trunk/Source/WebCore/style/StyleScope.cpp (239056 => 239057)
--- trunk/Source/WebCore/style/StyleScope.cpp 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebCore/style/StyleScope.cpp 2018-12-10 23:56:31 UTC (rev 239057)
@@ -478,7 +478,7 @@
// Crash stacks indicate we can get here when a resource load fails synchronously (for example due to content blocking).
// FIXME: These kind of cases should be eliminated and this path replaced by an assert.
m_pendingUpdate = UpdateType::ContentsOrInterpretation;
- m_document.scheduleForcedStyleRecalc();
+ m_document.scheduleFullStyleRebuild();
return;
}
@@ -515,7 +515,7 @@
shadowChild.invalidateStyleForSubtree();
invalidateHostAndSlottedStyleIfNeeded(*m_shadowRoot, resolver());
} else
- m_document.scheduleForcedStyleRecalc();
+ m_document.scheduleFullStyleRebuild();
}
}
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (239056 => 239057)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2018-12-10 23:56:31 UTC (rev 239057)
@@ -1,3 +1,13 @@
+2018-12-10 Antti Koivisto <[email protected]>
+
+ Rename "forced style recalc" to "full style rebuild"
+ https://bugs.webkit.org/show_bug.cgi?id=192572
+
+ Reviewed by Zalan Bujtas.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView setNeedsToApplyStyles:]):
+
2018-12-10 Darin Adler <[email protected]>
[macOS] MSHCreateMIGServerSource invocation does not handle send/receive rights correctly
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (239056 => 239057)
--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2018-12-10 23:36:36 UTC (rev 239056)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2018-12-10 23:56:31 UTC (rev 239057)
@@ -3881,7 +3881,7 @@
if (Frame* frame = core([self _frame])) {
if (frame->document() && frame->document()->pageCacheState() != Document::NotInPageCache)
return;
- frame->document()->scheduleForcedStyleRecalc();
+ frame->document()->scheduleFullStyleRebuild();
}
}