Title: [289310] branches/safari-613-branch/Source/WebCore
- Revision
- 289310
- Author
- [email protected]
- Date
- 2022-02-07 18:55:41 -0800 (Mon, 07 Feb 2022)
Log Message
Cherry-pick r288617. rdar://problem/88046988
ASSERTION FAILED: !hasPendingSheets() under WebCore::Style::Scope::~Scope()
https://bugs.webkit.org/show_bug.cgi?id=235612
<rdar://problem/88046988>
Reviewed by Alan Bujtas.
* dom/Document.cpp:
(WebCore::Document::didRemoveAllPendingStylesheet):
Don't try to scroll to anchor if we don't have a view. This avoids hitting ASSERT(!m_inRemovedLastRefFunction)
trying to ref the document during teardown (with refererencing node count still non-zero).
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::removedFromDocument):
Ensure we always remove the Element from the pending sheet list when it is removed from the document.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (289309 => 289310)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-02-08 02:55:38 UTC (rev 289309)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-02-08 02:55:41 UTC (rev 289310)
@@ -1,5 +1,48 @@
2022-02-07 Russell Epstein <[email protected]>
+ Cherry-pick r288617. rdar://problem/88046988
+
+ ASSERTION FAILED: !hasPendingSheets() under WebCore::Style::Scope::~Scope()
+ https://bugs.webkit.org/show_bug.cgi?id=235612
+ <rdar://problem/88046988>
+
+ Reviewed by Alan Bujtas.
+
+ * dom/Document.cpp:
+ (WebCore::Document::didRemoveAllPendingStylesheet):
+
+ Don't try to scroll to anchor if we don't have a view. This avoids hitting ASSERT(!m_inRemovedLastRefFunction)
+ trying to ref the document during teardown (with refererencing node count still non-zero).
+
+ * dom/InlineStyleSheetOwner.cpp:
+ (WebCore::InlineStyleSheetOwner::removedFromDocument):
+
+ Ensure we always remove the Element from the pending sheet list when it is removed from the document.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-01-26 Antti Koivisto <[email protected]>
+
+ ASSERTION FAILED: !hasPendingSheets() under WebCore::Style::Scope::~Scope()
+ https://bugs.webkit.org/show_bug.cgi?id=235612
+ <rdar://problem/88046988>
+
+ Reviewed by Alan Bujtas.
+
+ * dom/Document.cpp:
+ (WebCore::Document::didRemoveAllPendingStylesheet):
+
+ Don't try to scroll to anchor if we don't have a view. This avoids hitting ASSERT(!m_inRemovedLastRefFunction)
+ trying to ref the document during teardown (with refererencing node count still non-zero).
+
+ * dom/InlineStyleSheetOwner.cpp:
+ (WebCore::InlineStyleSheetOwner::removedFromDocument):
+
+ Ensure we always remove the Element from the pending sheet list when it is removed from the document.
+
+2022-02-07 Russell Epstein <[email protected]>
+
Cherry-pick r288605. rdar://problem/87948317
REGRESSION (iOS 15.2): Loading gets stuck after back-navigation involving COOP header
Modified: branches/safari-613-branch/Source/WebCore/dom/Document.cpp (289309 => 289310)
--- branches/safari-613-branch/Source/WebCore/dom/Document.cpp 2022-02-08 02:55:38 UTC (rev 289309)
+++ branches/safari-613-branch/Source/WebCore/dom/Document.cpp 2022-02-08 02:55:41 UTC (rev 289310)
@@ -3693,7 +3693,7 @@
if (RefPtr parser = scriptableDocumentParser())
parser->executeScriptsWaitingForStylesheetsSoon();
- if (m_gotoAnchorNeededAfterStylesheetsLoad) {
+ if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) {
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#try-to-scroll-to-the-fragment
eventLoop().queueTask(TaskSource::Networking, [protectedThis = Ref { *this }, this] {
RefPtr frameView = view();
Modified: branches/safari-613-branch/Source/WebCore/dom/InlineStyleSheetOwner.cpp (289309 => 289310)
--- branches/safari-613-branch/Source/WebCore/dom/InlineStyleSheetOwner.cpp 2022-02-08 02:55:38 UTC (rev 289309)
+++ branches/safari-613-branch/Source/WebCore/dom/InlineStyleSheetOwner.cpp 2022-02-08 02:55:41 UTC (rev 289310)
@@ -96,7 +96,7 @@
void InlineStyleSheetOwner::removedFromDocument(Element& element)
{
if (m_styleScope) {
- if (m_sheet && m_sheet->isLoading())
+ if (m_styleScope->hasPendingSheet(element))
m_styleScope->removePendingSheet(element);
m_styleScope->removeStyleSheetCandidateNode(element);
m_styleScope = nullptr;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes