Title: [222857] trunk/Source/WebCore
- Revision
- 222857
- Author
- [email protected]
- Date
- 2017-10-04 10:48:39 -0700 (Wed, 04 Oct 2017)
Log Message
Remove RenderTreeInternalMutationScope
https://bugs.webkit.org/show_bug.cgi?id=177875
<rdar://problem/34813088>
Reviewed by Antti Koivisto.
RenderTree mutation is in the past now. -and we've got assertions in place.
Not testable.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::populate):
(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::updateTextRenderer):
(WebCore::RenderQuote::updateRenderer):
* rendering/RenderView.h:
(WebCore::RenderTreeInternalMutationScope::RenderTreeInternalMutationScope): Deleted.
(WebCore::RenderTreeInternalMutationScope::~RenderTreeInternalMutationScope): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222856 => 222857)
--- trunk/Source/WebCore/ChangeLog 2017-10-04 17:34:45 UTC (rev 222856)
+++ trunk/Source/WebCore/ChangeLog 2017-10-04 17:48:39 UTC (rev 222857)
@@ -1,3 +1,27 @@
+2017-10-04 Zalan Bujtas <[email protected]>
+
+ Remove RenderTreeInternalMutationScope
+ https://bugs.webkit.org/show_bug.cgi?id=177875
+ <rdar://problem/34813088>
+
+ Reviewed by Antti Koivisto.
+
+ RenderTree mutation is in the past now. -and we've got assertions in place.
+
+ Not testable.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ * rendering/RenderMultiColumnFlow.cpp:
+ (WebCore::RenderMultiColumnFlow::populate):
+ (WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
+ * rendering/RenderQuote.cpp:
+ (WebCore::RenderQuote::updateTextRenderer):
+ (WebCore::RenderQuote::updateRenderer):
+ * rendering/RenderView.h:
+ (WebCore::RenderTreeInternalMutationScope::RenderTreeInternalMutationScope): Deleted.
+ (WebCore::RenderTreeInternalMutationScope::~RenderTreeInternalMutationScope): Deleted.
+
2017-10-04 Miguel Gomez <[email protected]>
Unreviewed: fix GTK debug build after r222841.
Modified: trunk/Source/WebCore/page/FrameView.cpp (222856 => 222857)
--- trunk/Source/WebCore/page/FrameView.cpp 2017-10-04 17:34:45 UTC (rev 222856)
+++ trunk/Source/WebCore/page/FrameView.cpp 2017-10-04 17:48:39 UTC (rev 222857)
@@ -1492,7 +1492,6 @@
RenderTreeNeedsLayoutChecker checker(*root);
#endif
root->layout();
- ASSERT(!root->view().renderTreeIsBeingMutatedInternally());
#if ENABLE(TEXT_AUTOSIZING)
if (frame().settings().textAutosizingEnabled() && !root->view().printing()) {
Modified: trunk/Source/WebCore/rendering/RenderMultiColumnFlow.cpp (222856 => 222857)
--- trunk/Source/WebCore/rendering/RenderMultiColumnFlow.cpp 2017-10-04 17:34:45 UTC (rev 222856)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnFlow.cpp 2017-10-04 17:48:39 UTC (rev 222857)
@@ -151,7 +151,6 @@
// now. At this point there's obviously nothing after the flow thread, but renderers (column
// sets and spanners) will be inserted there as we insert elements into the flow thread.
LayoutStateDisabler layoutStateDisabler(view());
- RenderTreeInternalMutationScope reparentingIsOn(view());
multicolContainer->moveChildrenTo(this, multicolContainer->firstChild(), this, true);
if (multicolContainer->isFieldset()) {
@@ -177,7 +176,6 @@
// container, we need to unregister the flow thread, so that they aren't just re-added again to
// the flow thread that we're trying to empty.
multicolContainer->setMultiColumnFlow(nullptr);
- RenderTreeInternalMutationScope reparentingIsOn(view());
moveAllChildrenTo(multicolContainer, true);
// Move spanners back to their original DOM position in the tree, and destroy the placeholders.
Modified: trunk/Source/WebCore/rendering/RenderQuote.cpp (222856 => 222857)
--- trunk/Source/WebCore/rendering/RenderQuote.cpp 2017-10-04 17:34:45 UTC (rev 222856)
+++ trunk/Source/WebCore/rendering/RenderQuote.cpp 2017-10-04 17:48:39 UTC (rev 222857)
@@ -350,8 +350,6 @@
void RenderQuote::updateTextRenderer()
{
ASSERT_WITH_SECURITY_IMPLICATION(document().inRenderTreeUpdate());
- ASSERT_WITH_SECURITY_IMPLICATION(!view().renderTreeIsBeingMutatedInternally());
-
String text = computeText();
if (m_text == text)
return;
@@ -405,9 +403,6 @@
void RenderQuote::updateRenderer(RenderQuote* previousQuote)
{
ASSERT_WITH_SECURITY_IMPLICATION(document().inRenderTreeUpdate());
- ASSERT_WITH_SECURITY_IMPLICATION(!view().renderTreeIsBeingMutatedInternally());
- ASSERT_WITH_SECURITY_IMPLICATION(!view().layoutState());
-
int depth = -1;
if (previousQuote) {
depth = previousQuote->m_depth;
Modified: trunk/Source/WebCore/rendering/RenderView.h (222856 => 222857)
--- trunk/Source/WebCore/rendering/RenderView.h 2017-10-04 17:34:45 UTC (rev 222856)
+++ trunk/Source/WebCore/rendering/RenderView.h 2017-10-04 17:48:39 UTC (rev 222857)
@@ -183,9 +183,6 @@
bool hasQuotesNeedingUpdate() const { return m_hasQuotesNeedingUpdate; }
void setHasQuotesNeedingUpdate(bool b) { m_hasQuotesNeedingUpdate = b; }
- // FIXME: see class RenderTreeInternalMutation below.
- bool renderTreeIsBeingMutatedInternally() const { return !!m_renderTreeInternalMutationCounter; }
-
// FIXME: This is a work around because the current implementation of counters
// requires walking the entire tree repeatedly and most pages don't actually use either
// feature so we shouldn't take the performance hit when not needed. Long term we should
@@ -269,17 +266,6 @@
m_layoutState = WTFMove(m_layoutState->m_next);
}
- enum class RenderTreeInternalMutation { On, Off };
- void setRenderTreeInternalMutation(RenderTreeInternalMutation state)
- {
- if (state == RenderTreeInternalMutation::On)
- ++m_renderTreeInternalMutationCounter;
- else {
- ASSERT(m_renderTreeInternalMutationCounter);
- --m_renderTreeInternalMutationCounter;
- }
- }
-
// Suspends the LayoutState optimization. Used under transforms that cannot be represented by
// LayoutState (common in SVG) and when manipulating the render tree during layout in ways
// that can trigger repaint of a non-child (e.g. when a list item moves its list marker around).
@@ -337,7 +323,6 @@
bool m_hasQuotesNeedingUpdate { false };
unsigned m_renderCounterCount { 0 };
- unsigned m_renderTreeInternalMutationCounter { 0 };
bool m_hasSoftwareFilters { false };
bool m_usesFirstLineRules { false };
@@ -431,25 +416,6 @@
RenderView& m_view;
};
-// FIXME: This is a temporary workaround to mute unintended activities triggered by render tree mutations.
-class RenderTreeInternalMutationScope {
- WTF_MAKE_NONCOPYABLE(RenderTreeInternalMutationScope);
-public:
- RenderTreeInternalMutationScope(RenderView& view)
- : m_view(view)
- {
- m_view.setRenderTreeInternalMutation(RenderView::RenderTreeInternalMutation::On);
- }
-
- ~RenderTreeInternalMutationScope()
- {
- m_view.setRenderTreeInternalMutation(RenderView::RenderTreeInternalMutation::Off);
- }
-
-private:
- RenderView& m_view;
-};
-
} // namespace WebCore
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderView, isRenderView())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes