Title: [226309] trunk
- Revision
- 226309
- Author
- [email protected]
- Date
- 2017-12-28 22:18:48 -0800 (Thu, 28 Dec 2017)
Log Message
RenderTreeUpdater::GeneratedContent should hold a weak reference to RenderQuote.
https://bugs.webkit.org/show_bug.cgi?id=181185
<rdar://problem/36235307>
Reviewed by David Kilzer.
Source/WebCore:
Test: fast/css/content/content-quotes-crash-with-details.html
* rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updateQuotesUpTo):
* rendering/updating/RenderTreeUpdaterGeneratedContent.h:
(): Deleted.
LayoutTests:
* fast/css/content/content-quotes-crash-with-details-expected.txt: Added.
* fast/css/content/content-quotes-crash-with-details.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (226308 => 226309)
--- trunk/LayoutTests/ChangeLog 2017-12-29 05:56:29 UTC (rev 226308)
+++ trunk/LayoutTests/ChangeLog 2017-12-29 06:18:48 UTC (rev 226309)
@@ -1,3 +1,14 @@
+2017-12-28 Zalan Bujtas <[email protected]>
+
+ RenderTreeUpdater::GeneratedContent should hold a weak reference to RenderQuote.
+ https://bugs.webkit.org/show_bug.cgi?id=181185
+ <rdar://problem/36235307>
+
+ Reviewed by David Kilzer.
+
+ * fast/css/content/content-quotes-crash-with-details-expected.txt: Added.
+ * fast/css/content/content-quotes-crash-with-details.html: Added.
+
2017-12-26 Matt Lewis <[email protected]>
Marked imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/update.https.html as failing on macOS and iOS WK2.
Added: trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details-expected.txt (0 => 226309)
--- trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details-expected.txt 2017-12-29 06:18:48 UTC (rev 226309)
@@ -0,0 +1,2 @@
+PASS if no crash.
+
Added: trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details.html (0 => 226309)
--- trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details.html (rev 0)
+++ trunk/LayoutTests/fast/css/content/content-quotes-crash-with-details.html 2017-12-29 06:18:48 UTC (rev 226309)
@@ -0,0 +1,12 @@
+PASS if no crash.
+<details id=details>
+<summary id=summary>
+ <q><span id=span></span></q>
+</summary>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+document.body.offsetHeight;
+summary.appendChild(span);
+details.style.setProperty("-webkit-appearance", "relevancy-level-indicator");
+</script>
Modified: trunk/Source/WebCore/ChangeLog (226308 => 226309)
--- trunk/Source/WebCore/ChangeLog 2017-12-29 05:56:29 UTC (rev 226308)
+++ trunk/Source/WebCore/ChangeLog 2017-12-29 06:18:48 UTC (rev 226309)
@@ -1,3 +1,18 @@
+2017-12-28 Zalan Bujtas <[email protected]>
+
+ RenderTreeUpdater::GeneratedContent should hold a weak reference to RenderQuote.
+ https://bugs.webkit.org/show_bug.cgi?id=181185
+ <rdar://problem/36235307>
+
+ Reviewed by David Kilzer.
+
+ Test: fast/css/content/content-quotes-crash-with-details.html
+
+ * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
+ (WebCore::RenderTreeUpdater::GeneratedContent::updateQuotesUpTo):
+ * rendering/updating/RenderTreeUpdaterGeneratedContent.h:
+ (): Deleted.
+
2017-12-28 Brady Eidson <[email protected]>
Add a ProcessIdentifier, vended from the UI process, to each child process
Modified: trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp (226308 => 226309)
--- trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp 2017-12-29 05:56:29 UTC (rev 226308)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp 2017-12-29 06:18:48 UTC (rev 226309)
@@ -60,8 +60,8 @@
for (; it != end; ++it) {
auto& quote = *it;
// Quote character depends on quote depth so we chain the updates.
- quote.updateRenderer(m_updater.m_builder, m_previousUpdatedQuote);
- m_previousUpdatedQuote = "e;
+ quote.updateRenderer(m_updater.m_builder, m_previousUpdatedQuote.get());
+ m_previousUpdatedQuote = makeWeakPtr(quote);
if ("e == lastQuote)
return;
}
Modified: trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.h (226308 => 226309)
--- trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.h 2017-12-29 05:56:29 UTC (rev 226308)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.h 2017-12-29 06:18:48 UTC (rev 226309)
@@ -49,7 +49,7 @@
bool needsPseudoElement(const std::optional<Style::ElementUpdate>&);
RenderTreeUpdater& m_updater;
- RenderQuote* m_previousUpdatedQuote { nullptr };
+ WeakPtr<RenderQuote> m_previousUpdatedQuote;
};
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes