Diff
Modified: trunk/Source/WebCore/ChangeLog (224510 => 224511)
--- trunk/Source/WebCore/ChangeLog 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/ChangeLog 2017-11-06 21:44:34 UTC (rev 224511)
@@ -1,3 +1,16 @@
+2017-11-06 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r224494.
+
+ Introduced LayoutTest flakiness on WK1.
+
+ Reverted changeset:
+
+ "[LayoutState cleanup] Move m_layoutState from RenderView to
+ LayoutContext"
+ https://bugs.webkit.org/show_bug.cgi?id=179282
+ https://trac.webkit.org/changeset/224494
+
2017-11-03 Simon Fraser <[email protected]>
UIWebView is not rendering content that comes on screen during overflow scroll
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (224510 => 224511)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -910,7 +910,7 @@
// Notifications should only be sent after the renderer has finished
if (is<AccessibilityRenderObject>(*obj)) {
if (auto* renderer = downcast<AccessibilityRenderObject>(*obj).renderer())
- ASSERT(!renderer->view().frameView().layoutContext().layoutState());
+ ASSERT(!renderer->view().layoutState());
}
#endif
Modified: trunk/Source/WebCore/page/LayoutContext.cpp (224510 => 224511)
--- trunk/Source/WebCore/page/LayoutContext.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/page/LayoutContext.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -31,7 +31,6 @@
#include "Document.h"
#include "FrameView.h"
#include "InspectorInstrumentation.h"
-#include "LayoutState.h"
#include "Logging.h"
#include "NoEventDispatchAssertion.h"
#include "RenderElement.h"
@@ -533,82 +532,6 @@
parentView->layoutContext().layout();
}
-LayoutSize LayoutContext::layoutDelta() const
-{
- if (!m_layoutState)
- return { };
- return m_layoutState->m_layoutDelta;
-}
-
-void LayoutContext::addLayoutDelta(const LayoutSize& delta)
-{
- if (!m_layoutState)
- return;
-
- m_layoutState->m_layoutDelta += delta;
-#if !ASSERT_DISABLED
- m_layoutState->m_layoutDeltaXSaturated |= m_layoutState->m_layoutDelta.width() == LayoutUnit::max() || m_layoutState->m_layoutDelta.width() == LayoutUnit::min();
- m_layoutState->m_layoutDeltaYSaturated |= m_layoutState->m_layoutDelta.height() == LayoutUnit::max() || m_layoutState->m_layoutDelta.height() == LayoutUnit::min();
-#endif
-}
-
-#if !ASSERT_DISABLED
-bool LayoutContext::layoutDeltaMatches(const LayoutSize& delta)
-{
- if (!m_layoutState)
- return false;
- return (delta.width() == m_layoutState->m_layoutDelta.width() || m_layoutState->m_layoutDeltaXSaturated) && (delta.height() == m_layoutState->m_layoutDelta.height() || m_layoutState->m_layoutDeltaYSaturated);
-}
-#endif
-
-void LayoutContext::pushLayoutState(RenderElement& root)
-{
- ASSERT(!m_layoutStateDisableCount);
- ASSERT(!m_layoutState);
-
- m_layoutState = std::make_unique<LayoutState>(root);
-}
-
-bool LayoutContext::pushLayoutStateForPaginationIfNeeded(RenderBlockFlow& layoutRoot)
-{
- if (m_layoutState)
- return false;
- m_layoutState = std::make_unique<LayoutState>(layoutRoot);
- m_layoutState->m_isPaginated = true;
- // This is just a flag for known page height (see RenderBlockFlow::checkForPaginationLogicalHeightChange).
- m_layoutState->m_pageLogicalHeight = 1;
- return true;
-}
-
-void LayoutContext::popLayoutState(RenderObject&)
-{
- return popLayoutState();
-}
-
-bool LayoutContext::pushLayoutState(RenderBox& renderer, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged)
-{
- // We push LayoutState even if layoutState is disabled because it stores layoutDelta too.
- if (!m_layoutState || !needsFullRepaint() || m_layoutState->isPaginated() || renderer.enclosingFragmentedFlow()
- || m_layoutState->lineGrid() || (renderer.style().lineGrid() != RenderStyle::initialLineGrid() && renderer.isRenderBlockFlow())) {
- m_layoutState = std::make_unique<LayoutState>(WTFMove(m_layoutState), renderer, offset, pageHeight, pageHeightChanged);
- return true;
- }
- return false;
-}
-
-void LayoutContext::popLayoutState()
-{
- m_layoutState = WTFMove(m_layoutState->m_ancestor);
-}
-
-#ifndef NDEBUG
-void LayoutContext::checkLayoutState()
-{
- ASSERT(layoutDeltaMatches(LayoutSize()));
- ASSERT(!m_layoutStateDisableCount);
-}
-#endif
-
Frame& LayoutContext::frame() const
{
return view().frame();
Modified: trunk/Source/WebCore/page/LayoutContext.h (224510 => 224511)
--- trunk/Source/WebCore/page/LayoutContext.h 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/page/LayoutContext.h 2017-11-06 21:44:34 UTC (rev 224511)
@@ -35,8 +35,6 @@
class Frame;
class FrameView;
class LayoutScope;
-class LayoutState;
-class RenderBlockFlow;
class RenderElement;
class RenderView;
@@ -88,30 +86,8 @@
void flushAsynchronousTasks();
- // Subtree push/pop
- void pushLayoutState(RenderElement&);
- bool pushLayoutStateForPaginationIfNeeded(RenderBlockFlow&);
- void popLayoutState(RenderObject&);
- LayoutState* layoutState() const { return m_layoutState.get(); }
- // Returns true if layoutState should be used for its cached offset and clip.
- bool layoutStateEnabled() const { return !m_layoutStateDisableCount && m_layoutState; }
-#ifndef NDEBUG
- void checkLayoutState();
-#endif
- // layoutDelta is used transiently during layout to store how far an object has moved from its
- // last layout location, in order to repaint correctly.
- // If we're doing a full repaint m_layoutState will be 0, but in that case layoutDelta doesn't matter.
- LayoutSize layoutDelta() const;
- void addLayoutDelta(const LayoutSize& delta);
-#if !ASSERT_DISABLED
- bool layoutDeltaMatches(const LayoutSize& delta);
-#endif
-
private:
friend class LayoutScope;
- friend class LayoutStateMaintainer;
- friend class LayoutStateDisabler;
- friend class SubtreeLayoutStateMaintainer;
bool canPerformLayout() const;
bool layoutDisallowed() const { return m_layoutDisallowedCount; }
@@ -132,18 +108,6 @@
bool handleLayoutWithFrameFlatteningIfNeeded();
void startLayoutAtMainFrameViewIfNeeded();
- // These functions may only be accessed by LayoutStateMaintainer.
- bool pushLayoutState(RenderBox& renderer, const LayoutSize& offset, LayoutUnit pageHeight = 0, bool pageHeightChanged = false);
- void popLayoutState();
-
- // 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).
- // Note that even when disabled, LayoutState is still used to store layoutDelta.
- // These functions may only be accessed by LayoutStateMaintainer or LayoutStateDisabler.
- void disableLayoutState() { m_layoutStateDisableCount++; }
- void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutStateDisableCount--; }
-
Frame& frame() const;
FrameView& view() const;
RenderView* renderView() const;
@@ -166,8 +130,6 @@
unsigned m_disableSetNeedsLayoutCount { 0 };
int m_layoutDisallowedCount { 0 };
WeakPtr<RenderElement> m_subtreeLayoutRoot;
- std::unique_ptr<LayoutState> m_layoutState;
- unsigned m_layoutStateDisableCount { 0 };
};
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/LayoutState.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/LayoutState.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/LayoutState.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -26,7 +26,6 @@
#include "config.h"
#include "LayoutState.h"
-#include "LayoutContext.h"
#include "RenderFragmentedFlow.h"
#include "RenderInline.h"
#include "RenderLayer.h"
@@ -66,10 +65,8 @@
, m_renderer(&renderer)
#endif
{
- if (m_ancestor) {
- computeOffsets(renderer, offset);
- computeClipRect(renderer);
- }
+ computeOffsets(renderer, offset);
+ computeClipRect(renderer);
computePaginationInformation(renderer, pageLogicalHeight, pageLogicalHeightChanged);
}
@@ -116,7 +113,7 @@
if (!renderer.hasOverflowClip())
return;
- LayoutRect clipRect(toLayoutPoint(m_paintOffset) + renderer.view().frameView().layoutContext().layoutDelta(), renderer.cachedSizeForOverflowClip());
+ LayoutRect clipRect(toLayoutPoint(m_paintOffset) + renderer.view().layoutDelta(), renderer.cachedSizeForOverflowClip());
if (m_clipped)
m_clipRect.intersect(clipRect);
else
@@ -212,14 +209,14 @@
}
LayoutStateMaintainer::LayoutStateMaintainer(RenderBox& root, LayoutSize offset, bool disableState, LayoutUnit pageHeight, bool pageHeightChanged)
- : m_layoutContext(root.view().frameView().layoutContext())
+ : m_view(root.view())
, m_disabled(disableState)
{
push(root, offset, pageHeight, pageHeightChanged);
}
-LayoutStateMaintainer::LayoutStateMaintainer(LayoutContext& layoutContext)
- : m_layoutContext(layoutContext)
+LayoutStateMaintainer::LayoutStateMaintainer(RenderView& view)
+ : m_view(view)
{
}
@@ -233,11 +230,11 @@
ASSERT(!m_didCallPush);
m_didCallPush = true;
// We push state even if disabled, because we still need to store layoutDelta
- m_didPushLayoutState = m_layoutContext.pushLayoutState(root, offset, pageHeight, pageHeightChanged);
+ m_didPushLayoutState = m_view.pushLayoutState(root, offset, pageHeight, pageHeightChanged);
if (!m_didPushLayoutState)
return;
if (m_disabled)
- m_layoutContext.disableLayoutState();
+ m_view.disableLayoutState();
}
void LayoutStateMaintainer::pop()
@@ -248,20 +245,20 @@
return;
if (!m_didPushLayoutState)
return;
- m_layoutContext.popLayoutState();
+ m_view.popLayoutState();
if (m_disabled)
- m_layoutContext.enableLayoutState();
+ m_view.enableLayoutState();
}
-LayoutStateDisabler::LayoutStateDisabler(LayoutContext& layoutContext)
- : m_layoutContext(layoutContext)
+LayoutStateDisabler::LayoutStateDisabler(RenderView& view)
+ : m_view(view)
{
- m_layoutContext.disableLayoutState();
+ m_view.disableLayoutState();
}
LayoutStateDisabler::~LayoutStateDisabler()
{
- m_layoutContext.enableLayoutState();
+ m_view.enableLayoutState();
}
static bool shouldDisableLayoutStateForSubtree(RenderElement& subtreeLayoutRoot)
@@ -277,10 +274,10 @@
: m_subtreeLayoutRoot(subtreeLayoutRoot)
{
if (m_subtreeLayoutRoot) {
- auto& layoutContext = m_subtreeLayoutRoot->view().frameView().layoutContext();
- layoutContext.pushLayoutState(*m_subtreeLayoutRoot);
+ RenderView& view = m_subtreeLayoutRoot->view();
+ view.pushLayoutState(*m_subtreeLayoutRoot);
if (shouldDisableLayoutStateForSubtree(*m_subtreeLayoutRoot)) {
- layoutContext.disableLayoutState();
+ view.disableLayoutState();
m_didDisableLayoutState = true;
}
}
@@ -289,16 +286,16 @@
SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer()
{
if (m_subtreeLayoutRoot) {
- auto& layoutContext = m_subtreeLayoutRoot->view().frameView().layoutContext();
- layoutContext.popLayoutState(*m_subtreeLayoutRoot);
+ RenderView& view = m_subtreeLayoutRoot->view();
+ view.popLayoutState(*m_subtreeLayoutRoot);
if (m_didDisableLayoutState)
- layoutContext.enableLayoutState();
+ view.enableLayoutState();
}
}
PaginatedLayoutStateMaintainer::PaginatedLayoutStateMaintainer(RenderBlockFlow& flow)
: m_flow(flow)
- , m_pushed(flow.view().frameView().layoutContext().pushLayoutStateForPaginationIfNeeded(flow))
+ , m_pushed(flow.view().pushLayoutStateForPaginationIfNeeded(flow))
{
}
@@ -305,7 +302,7 @@
PaginatedLayoutStateMaintainer::~PaginatedLayoutStateMaintainer()
{
if (m_pushed)
- m_flow.view().frameView().layoutContext().popLayoutState(m_flow);
+ m_flow.view().popLayoutState(m_flow);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/LayoutState.h (224510 => 224511)
--- trunk/Source/WebCore/rendering/LayoutState.h 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/LayoutState.h 2017-11-06 21:44:34 UTC (rev 224511)
@@ -30,12 +30,12 @@
namespace WebCore {
-class LayoutContext;
class RenderBlockFlow;
class RenderBox;
class RenderElement;
class RenderFragmentedFlow;
class RenderObject;
+class RenderView;
class LayoutState {
WTF_MAKE_NONCOPYABLE(LayoutState); WTF_MAKE_FAST_ALLOCATED;
@@ -134,7 +134,7 @@
// Constructor to push now.
explicit LayoutStateMaintainer(RenderBox&, LayoutSize offset, bool disableState = false, LayoutUnit pageHeight = 0, bool pageHeightChanged = false);
// Constructor to maybe push later.
- explicit LayoutStateMaintainer(LayoutContext&);
+ explicit LayoutStateMaintainer(RenderView&);
~LayoutStateMaintainer();
void push(RenderBox& root, LayoutSize offset, LayoutUnit pageHeight = 0, bool pageHeightChanged = false);
@@ -142,7 +142,7 @@
bool didPush() const { return m_didCallPush; }
private:
- LayoutContext& m_layoutContext;
+ RenderView& m_view;
bool m_disabled { false };
bool m_didCallPush { false };
bool m_didCallPop { false };
@@ -162,11 +162,11 @@
class LayoutStateDisabler {
WTF_MAKE_NONCOPYABLE(LayoutStateDisabler);
public:
- LayoutStateDisabler(LayoutContext&);
+ LayoutStateDisabler(RenderView&);
~LayoutStateDisabler();
private:
- LayoutContext& m_layoutContext;
+ RenderView& m_view;
};
class PaginatedLayoutStateMaintainer {
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -1210,11 +1210,11 @@
{
if (isHorizontalWritingMode()) {
if (applyDelta == ApplyLayoutDelta)
- view().frameView().layoutContext().addLayoutDelta(LayoutSize(child.x() - logicalLeft, 0));
+ view().addLayoutDelta(LayoutSize(child.x() - logicalLeft, 0));
child.setX(logicalLeft);
} else {
if (applyDelta == ApplyLayoutDelta)
- view().frameView().layoutContext().addLayoutDelta(LayoutSize(0, child.y() - logicalLeft));
+ view().addLayoutDelta(LayoutSize(0, child.y() - logicalLeft));
child.setY(logicalLeft);
}
}
@@ -1223,11 +1223,11 @@
{
if (isHorizontalWritingMode()) {
if (applyDelta == ApplyLayoutDelta)
- view().frameView().layoutContext().addLayoutDelta(LayoutSize(0, child.y() - logicalTop));
+ view().addLayoutDelta(LayoutSize(0, child.y() - logicalTop));
child.setY(logicalTop);
} else {
if (applyDelta == ApplyLayoutDelta)
- view().frameView().layoutContext().addLayoutDelta(LayoutSize(child.x() - logicalTop, 0));
+ view().addLayoutDelta(LayoutSize(child.x() - logicalTop, 0));
child.setX(logicalTop);
}
}
@@ -1440,7 +1440,7 @@
// If we are paginated or in a line grid, compute a vertical position for our object now.
// If it's wrong we'll lay out again.
LayoutUnit oldLogicalTop = 0;
- bool needsBlockDirectionLocationSetBeforeLayout = r.needsLayout() && view().frameView().layoutContext().layoutState()->needsBlockDirectionLocationSetBeforeLayout();
+ bool needsBlockDirectionLocationSetBeforeLayout = r.needsLayout() && view().layoutState()->needsBlockDirectionLocationSetBeforeLayout();
if (needsBlockDirectionLocationSetBeforeLayout) {
if (isHorizontalWritingMode() == r.isHorizontalWritingMode())
r.updateLogicalHeight();
@@ -1499,11 +1499,10 @@
void RenderBlock::markForPaginationRelayoutIfNeeded()
{
- auto* layoutState = view().frameView().layoutContext().layoutState();
- if (needsLayout() || !layoutState->isPaginated())
+ if (needsLayout() || !view().layoutState()->isPaginated())
return;
- if (layoutState->pageLogicalHeightChanged() || (layoutState->pageLogicalHeight() && layoutState->pageLogicalOffset(this, logicalTop()) != pageLogicalOffset()))
+ if (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(this, logicalTop()) != pageLogicalOffset()))
setChildNeedsLayout(MarkOnlyThis);
}
@@ -2315,7 +2314,7 @@
return left;
// Push in our left offset so that it is aligned with the character grid.
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ LayoutState* layoutState = view().layoutState();
if (!layoutState)
return left;
@@ -2355,7 +2354,7 @@
return right;
// Push in our right offset so that it is aligned with the character grid.
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ LayoutState* layoutState = view().layoutState();
if (!layoutState)
return right;
@@ -3329,7 +3328,7 @@
LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const
{
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ LayoutState* layoutState = view().layoutState();
if (layoutState && !layoutState->isPaginated())
return 0;
@@ -3375,7 +3374,7 @@
{
RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow();
bool checkColumnBreaks = fragmentedFlow && fragmentedFlow->shouldCheckColumnBreaks();
- bool checkPageBreaks = !checkColumnBreaks && view().frameView().layoutContext().layoutState()->m_pageLogicalHeight;
+ bool checkPageBreaks = !checkColumnBreaks && view().layoutState()->m_pageLogicalHeight;
return child.isUnsplittableForPagination() || child.style().breakInside() == AvoidBreakInside
|| (checkColumnBreaks && child.style().breakInside() == AvoidColumnBreakInside)
|| (checkPageBreaks && child.style().breakInside() == AvoidPageBreakInside);
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -552,8 +552,8 @@
fitBorderToLinesIfNeeded();
- if (view().frameView().layoutContext().layoutState()->m_pageLogicalHeight)
- setPageLogicalOffset(view().frameView().layoutContext().layoutState()->pageLogicalOffset(this, logicalTop()));
+ if (view().layoutState()->m_pageLogicalHeight)
+ setPageLogicalOffset(view().layoutState()->pageLogicalOffset(this, logicalTop()));
updateLayerTransform();
@@ -612,7 +612,7 @@
setLogicalHeight(beforeEdge);
// Lay out our hypothetical grid line as though it occurs at the top of the block.
- if (view().frameView().layoutContext().layoutState()->lineGrid() == this)
+ if (view().layoutState()->lineGrid() == this)
layoutLineGridBox();
// The margin struct caches all our current margin collapsing state.
@@ -690,7 +690,7 @@
LayoutUnit oldLogicalTop = logicalTopForChild(child);
#if !ASSERT_DISABLED
- LayoutSize oldLayoutDelta = view().frameView().layoutContext().layoutDelta();
+ LayoutSize oldLayoutDelta = view().layoutDelta();
#endif
// Position the child as though it didn't collapse with the top.
setLogicalTopForChild(child, logicalTopEstimate, ApplyLayoutDelta);
@@ -738,7 +738,7 @@
// Now check for clear.
LayoutUnit logicalTopAfterClear = clearFloatsIfNeeded(child, marginInfo, oldPosMarginBefore, oldNegMarginBefore, logicalTopBeforeClear);
- bool paginated = view().frameView().layoutContext().layoutState()->isPaginated();
+ bool paginated = view().layoutState()->isPaginated();
if (paginated)
logicalTopAfterClear = adjustBlockChildForPagination(logicalTopAfterClear, estimateWithoutPagination, child, atBeforeSideOfBlock && logicalTopBeforeClear == logicalTopAfterClear);
@@ -788,7 +788,7 @@
LayoutSize childOffset = child.location() - oldRect.location();
if (childOffset.width() || childOffset.height()) {
- view().frameView().layoutContext().addLayoutDelta(childOffset);
+ view().addLayoutDelta(childOffset);
// If the child moved, we have to repaint it as well as any floating/positioned
// descendants. An exception is if we need a layout. In this case, we know we're going to
@@ -811,7 +811,7 @@
setLogicalHeight(newHeight);
}
- ASSERT(view().frameView().layoutContext().layoutDeltaMatches(oldLayoutDelta));
+ ASSERT(view().layoutDeltaMatches(oldLayoutDelta));
}
void RenderBlockFlow::adjustPositionedBlock(RenderBox& child, const MarginInfo& marginInfo)
@@ -1109,7 +1109,7 @@
// If margins would pull us past the top of the next page, then we need to pull back and pretend like the margins
// collapsed into the page edge.
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ LayoutState* layoutState = view().layoutState();
if (layoutState->isPaginated() && layoutState->pageLogicalHeight() && logicalTop > beforeCollapseLogicalTop
&& hasNextPage(beforeCollapseLogicalTop)) {
LayoutUnit oldLogicalTop = logicalTop;
@@ -1284,7 +1284,7 @@
// Adjust logicalTopEstimate down to the next page if the margins are so large that we don't fit on the current
// page.
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ LayoutState* layoutState = view().layoutState();
if (layoutState->isPaginated() && layoutState->pageLogicalHeight() && logicalTopEstimate > logicalHeight()
&& hasNextPage(logicalHeight()))
logicalTopEstimate = std::min(logicalTopEstimate, nextPageLogicalTop(logicalHeight()));
@@ -1495,7 +1495,7 @@
RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow();
bool isInsideMulticolFlow = fragmentedFlow;
bool checkColumnBreaks = fragmentedFlow && fragmentedFlow->shouldCheckColumnBreaks();
- bool checkPageBreaks = !checkColumnBreaks && view().frameView().layoutContext().layoutState()->m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
+ bool checkPageBreaks = !checkColumnBreaks && view().layoutState()->m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
bool checkFragmentBreaks = false;
bool checkBeforeAlways = (checkColumnBreaks && child.style().breakBefore() == ColumnBreakBetween)
|| (checkPageBreaks && alwaysPageBreak(child.style().breakBefore()));
@@ -1520,7 +1520,7 @@
RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow();
bool isInsideMulticolFlow = fragmentedFlow;
bool checkColumnBreaks = fragmentedFlow && fragmentedFlow->shouldCheckColumnBreaks();
- bool checkPageBreaks = !checkColumnBreaks && view().frameView().layoutContext().layoutState()->m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
+ bool checkPageBreaks = !checkColumnBreaks && view().layoutState()->m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
bool checkFragmentBreaks = false;
bool checkAfterAlways = (checkColumnBreaks && child.style().breakAfter() == ColumnBreakBetween)
|| (checkPageBreaks && alwaysPageBreak(child.style().breakAfter()));
@@ -1807,7 +1807,7 @@
bool RenderBlockFlow::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pageBoundaryRule) const
{
- ASSERT(view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->isPaginated());
+ ASSERT(view().layoutState() && view().layoutState()->isPaginated());
RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow();
if (!fragmentedFlow)
@@ -1906,13 +1906,12 @@
{
// Unsplittable objects clear out the pageLogicalHeight in the layout state as a way of signaling that no
// pagination should occur. Therefore we have to check this first and bail if the value has been set to 0.
- auto* layoutState = view().frameView().layoutContext().layoutState();
- LayoutUnit pageLogicalHeight = layoutState->m_pageLogicalHeight;
+ LayoutUnit pageLogicalHeight = view().layoutState()->m_pageLogicalHeight;
if (!pageLogicalHeight)
return 0;
- LayoutUnit firstPageLogicalTop = isHorizontalWritingMode() ? layoutState->m_pageOffset.height() : layoutState->m_pageOffset.width();
- LayoutUnit blockLogicalTop = isHorizontalWritingMode() ? layoutState->m_layoutOffset.height() : layoutState->m_layoutOffset.width();
+ LayoutUnit firstPageLogicalTop = isHorizontalWritingMode() ? view().layoutState()->m_pageOffset.height() : view().layoutState()->m_pageOffset.width();
+ LayoutUnit blockLogicalTop = isHorizontalWritingMode() ? view().layoutState()->m_layoutOffset.height() : view().layoutState()->m_layoutOffset.width();
LayoutUnit cumulativeOffset = offset + blockLogicalTop;
RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow();
@@ -1925,7 +1924,7 @@
{
// Unsplittable objects clear out the pageLogicalHeight in the layout state as a way of signaling that no
// pagination should occur. Therefore we have to check this first and bail if the value has been set to 0.
- LayoutUnit pageLogicalHeight = view().frameView().layoutContext().layoutState()->m_pageLogicalHeight;
+ LayoutUnit pageLogicalHeight = view().layoutState()->m_pageLogicalHeight;
if (!pageLogicalHeight)
return 0;
@@ -1942,7 +1941,7 @@
RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow();
if (!fragmentedFlow) {
- LayoutUnit pageLogicalHeight = view().frameView().layoutContext().layoutState()->m_pageLogicalHeight;
+ LayoutUnit pageLogicalHeight = view().layoutState()->m_pageLogicalHeight;
LayoutUnit remainingHeight = pageLogicalHeight - intMod(offset, pageLogicalHeight);
if (pageBoundaryRule == IncludePageBoundary) {
// If includeBoundaryPoint is true the line exactly on the top edge of a
@@ -2141,7 +2140,7 @@
// FIXME: Avoid disabling LayoutState. At the very least, don't disable it for floats originating
// in this block. Better yet would be to push extra state for the containers of other floats.
- LayoutStateDisabler layoutStateDisabler(view().frameView().layoutContext());
+ LayoutStateDisabler layoutStateDisabler(view());
const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
auto end = floatingObjectSet.end();
for (auto it = floatingObjectSet.begin(); it != end; ++it) {
@@ -2255,10 +2254,10 @@
// Our location is irrelevant if we're unsplittable or no pagination is in effect. Just lay out the float.
bool isChildRenderBlock = floatBox.isRenderBlock();
- if (isChildRenderBlock && !floatBox.needsLayout() && view().frameView().layoutContext().layoutState()->pageLogicalHeightChanged())
+ if (isChildRenderBlock && !floatBox.needsLayout() && view().layoutState()->pageLogicalHeightChanged())
floatBox.setChildNeedsLayout(MarkOnlyThis);
-
- bool needsBlockDirectionLocationSetBeforeLayout = isChildRenderBlock && view().frameView().layoutContext().layoutState()->needsBlockDirectionLocationSetBeforeLayout();
+
+ bool needsBlockDirectionLocationSetBeforeLayout = isChildRenderBlock && view().layoutState()->needsBlockDirectionLocationSetBeforeLayout();
if (!needsBlockDirectionLocationSetBeforeLayout || isWritingModeRoot()) {
// We are unsplittable if we're a block flow root.
floatBox.layoutIfNeeded();
@@ -2501,7 +2500,7 @@
childBox.markForPaginationRelayoutIfNeeded();
childBox.layoutIfNeeded();
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ LayoutState* layoutState = view().layoutState();
bool isPaginated = layoutState->isPaginated();
if (isPaginated) {
// If we are unsplittable and don't fit, then we need to move down.
@@ -3584,7 +3583,7 @@
deleteLineBoxesBeforeSimpleLineLayout();
m_simpleLineLayout = SimpleLineLayout::create(*this);
}
- if (view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->isPaginated()) {
+ if (view().layoutState() && view().layoutState()->isPaginated()) {
m_simpleLineLayout->setIsPaginated();
SimpleLineLayout::adjustLinePositionsForPagination(*m_simpleLineLayout, *this);
}
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -1274,7 +1274,7 @@
// determineStartPosition first will break fast/repaint/line-flow-with-floats-9.html.
if (layoutState.isFullLayout() && hasInlineChild && !selfNeedsLayout()) {
setNeedsLayout(MarkOnlyThis); // Mark as needing a full layout to force us to repaint.
- if (!view().frameView().layoutContext().needsFullRepaint() && hasSelfPaintingLayer() && hasRepaintLayoutRects()) {
+ if (!view().doingFullRepaint() && hasSelfPaintingLayer() && hasRepaintLayoutRects()) {
// Because we waited until we were already inside layout to discover
// that the block really needed a full layout, we missed our chance to repaint the layer
// before layout started. Luckily the layer has cached the repaint rect for its original
@@ -1332,7 +1332,7 @@
void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, InlineBidiResolver& resolver, const InlineIterator& cleanLineStart, const BidiStatus& cleanLineBidiStatus, unsigned consecutiveHyphenatedLines)
{
const RenderStyle& styleToUse = style();
- bool paginated = view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->isPaginated();
+ bool paginated = view().layoutState() && view().layoutState()->isPaginated();
LineWhitespaceCollapsingState& lineWhitespaceCollapsingState = resolver.whitespaceCollapsingState();
InlineIterator end = resolver.position();
bool checkForEndLineMatch = layoutState.endLine();
@@ -1571,7 +1571,7 @@
auto* firstCleanLine = layoutState.endLine();
if (firstCleanLine) {
if (layoutState.endLineMatched()) {
- bool paginated = view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->isPaginated();
+ bool paginated = view().layoutState() && view().layoutState()->isPaginated();
// Attach all the remaining lines, and then adjust their y-positions as needed.
LayoutUnit delta = logicalHeight() - layoutState.endLineLogicalTop();
for (auto* line = firstCleanLine; line; line = line->nextRootBox()) {
@@ -1642,7 +1642,7 @@
setLogicalHeight(borderAndPaddingBefore());
// Lay out our hypothetical grid line as though it occurs at the top of the block.
- if (view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->lineGrid() == this)
+ if (view().layoutState() && view().layoutState()->lineGrid() == this)
layoutLineGridBox();
RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow();
@@ -1792,7 +1792,7 @@
bool dirtiedByFloat = false;
if (!layoutState.isFullLayout()) {
// Paginate all of the clean lines.
- bool paginated = view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->isPaginated();
+ bool paginated = view().layoutState() && view().layoutState()->isPaginated();
LayoutUnit paginationDelta = 0;
auto floatsIterator = floats.begin();
auto end = floats.end();
@@ -1964,7 +1964,7 @@
{
LayoutUnit lineDelta = logicalHeight() - layoutState.endLineLogicalTop();
- bool paginated = view().frameView().layoutContext().layoutState() && view().frameView().layoutContext().layoutState()->isPaginated();
+ bool paginated = view().layoutState() && view().layoutState()->isPaginated();
if (paginated && layoutState.fragmentedFlow()) {
// Check all lines from here to the end, and see if the hypothetical new position for the lines will result
// in a different available line width.
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -47,7 +47,6 @@
#include "HTMLTextAreaElement.h"
#include "HitTestResult.h"
#include "InlineElementBox.h"
-#include "LayoutState.h"
#include "MainFrame.h"
#include "Page.h"
#include "PaintInfo.h"
@@ -697,7 +696,7 @@
// FIXME: layoutDelta needs to be applied in parts before/after transforms and
// repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
- box.move(view().frameView().layoutContext().layoutDelta());
+ box.move(view().layoutDelta());
return LayoutRect(snapRectToDevicePixels(box, document().deviceScaleFactor()));
}
@@ -1922,8 +1921,8 @@
if (repaintContainer == this)
return;
- if (view().frameView().layoutContext().layoutStateEnabled() && !repaintContainer) {
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ if (view().layoutStateEnabled() && !repaintContainer) {
+ LayoutState* layoutState = view().layoutState();
LayoutSize offset = layoutState->m_paintOffset + locationOffset();
if (style().hasInFlowPosition() && layer())
offset += layer()->offsetForInFlowPosition();
@@ -2108,7 +2107,7 @@
LayoutRect r = visualOverflowRect();
// FIXME: layoutDelta needs to be applied in parts before/after transforms and
// repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
- r.move(view().frameView().layoutContext().layoutDelta());
+ r.move(view().layoutDelta());
return computeRectForRepaint(r, repaintContainer);
}
@@ -2138,8 +2137,8 @@
LayoutRect adjustedRect = rect;
const RenderStyle& styleToUse = style();
// LayoutState is only valid for root-relative, non-fixed position repainting
- if (view().frameView().layoutContext().layoutStateEnabled() && !repaintContainer && styleToUse.position() != FixedPosition) {
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ if (view().layoutStateEnabled() && !repaintContainer && styleToUse.position() != FixedPosition) {
+ LayoutState* layoutState = view().layoutState();
if (layer() && layer()->transform())
adjustedRect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(adjustedRect), document().deviceScaleFactor()));
@@ -4955,7 +4954,7 @@
LayoutUnit RenderBox::offsetFromLogicalTopOfFirstPage() const
{
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ LayoutState* layoutState = view().layoutState();
if ((layoutState && !layoutState->isPaginated()) || (!layoutState && !enclosingFragmentedFlow()))
return 0;
Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -297,7 +297,7 @@
m_stretchingChildren = false;
#if !ASSERT_DISABLED
- LayoutSize oldLayoutDelta = view().frameView().layoutContext().layoutDelta();
+ LayoutSize oldLayoutDelta = view().layoutDelta();
#endif
// Fieldsets need to find their legend and position it inside the border of the object.
@@ -314,7 +314,7 @@
layoutVerticalBox(relayoutChildren);
repaintChildrenDuringLayoutIfMoved(this, oldChildRects);
- ASSERT(view().frameView().layoutContext().layoutDeltaMatches(oldLayoutDelta));
+ ASSERT(view().layoutDeltaMatches(oldLayoutDelta));
LayoutUnit oldClientAfterEdge = clientLogicalBottom();
updateLogicalHeight();
@@ -330,8 +330,8 @@
updateLayerTransform();
- if (view().frameView().layoutContext().layoutState()->pageLogicalHeight())
- setPageLogicalOffset(view().frameView().layoutContext().layoutState()->pageLogicalOffset(this, logicalTop()));
+ if (view().layoutState()->pageLogicalHeight())
+ setPageLogicalOffset(view().layoutState()->pageLogicalOffset(this, logicalTop()));
// Update our scrollbars if we're overflow:auto/scroll/hidden now that we know if
// we overflow or not.
@@ -371,9 +371,9 @@
if (!child->needsLayout())
return;
- child->view().frameView().layoutContext().addLayoutDelta(layoutDelta);
+ child->view().addLayoutDelta(layoutDelta);
child->layoutIfNeeded();
- child->view().frameView().layoutContext().addLayoutDelta(-layoutDelta);
+ child->view().addLayoutDelta(-layoutDelta);
}
void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderElement.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -528,7 +528,7 @@
void RenderElement::insertChildInternal(RenderPtr<RenderObject> newChildPtr, RenderObject* beforeChild, NotifyChildrenType notifyChildren)
{
- RELEASE_ASSERT_WITH_MESSAGE(!view().frameView().layoutContext().layoutState(), "Layout must not mutate render tree");
+ RELEASE_ASSERT_WITH_MESSAGE(!view().layoutState(), "Layout must not mutate render tree");
ASSERT(canHaveChildren() || canHaveGeneratedChildren());
ASSERT(!newChildPtr->parent());
@@ -585,7 +585,7 @@
RenderPtr<RenderObject> RenderElement::takeChildInternal(RenderObject& oldChild, NotifyChildrenType notifyChildren)
{
- RELEASE_ASSERT_WITH_MESSAGE(!view().frameView().layoutContext().layoutState(), "Layout must not mutate render tree");
+ RELEASE_ASSERT_WITH_MESSAGE(!view().layoutState(), "Layout must not mutate render tree");
ASSERT(canHaveChildren() || canHaveGeneratedChildren());
ASSERT(oldChild.parent() == this);
Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -42,7 +42,6 @@
#include "HTMLParamElement.h"
#include "HTMLPlugInElement.h"
#include "HitTestResult.h"
-#include "LayoutState.h"
#include "LocalizedStrings.h"
#include "MouseEvent.h"
#include "Page.h"
Modified: trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -33,7 +33,6 @@
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "InlineElementBox.h"
-#include "LayoutState.h"
#include "Node.h"
#include "PODIntervalTree.h"
#include "RenderBoxFragmentInfo.h"
@@ -225,7 +224,7 @@
if (!shouldRepaint(repaintRect) || !hasValidFragmentInfo())
return;
- LayoutStateDisabler layoutStateDisabler(view().frameView().layoutContext()); // We can't use layout state to repaint, since the fragments are somewhere else.
+ LayoutStateDisabler layoutStateDisabler(view()); // We can't use layout state to repaint, since the fragments are somewhere else.
for (auto& fragment : m_fragmentList)
fragment->repaintFragmentedFlowContent(repaintRect);
Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderGrid.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -31,7 +31,6 @@
#include "GridPositionsResolver.h"
#include "GridTrackSizingAlgorithm.h"
#include "LayoutRepainter.h"
-#include "LayoutState.h"
#include "RenderChildIterator.h"
#include "RenderLayer.h"
#include "RenderView.h"
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -30,7 +30,6 @@
#include "HitTestResult.h"
#include "InlineElementBox.h"
#include "InlineTextBox.h"
-#include "LayoutState.h"
#include "RenderBlock.h"
#include "RenderChildIterator.h"
#include "RenderFragmentedFlow.h"
@@ -1162,7 +1161,7 @@
LayoutRect RenderInline::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const
{
// Only first-letter renderers are allowed in here during layout. They mutate the tree triggering repaints.
- ASSERT(!view().frameView().layoutContext().layoutStateEnabled() || style().styleType() == FIRST_LETTER || hasSelfPaintingLayer());
+ ASSERT(!view().layoutStateEnabled() || style().styleType() == FIRST_LETTER || hasSelfPaintingLayer());
if (!firstLineBoxIncludingCulling() && !continuation())
return LayoutRect();
@@ -1219,8 +1218,8 @@
{
// LayoutState is only valid for root-relative repainting
LayoutRect adjustedRect = rect;
- if (view().frameView().layoutContext().layoutStateEnabled() && !repaintContainer) {
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ if (view().layoutStateEnabled() && !repaintContainer) {
+ LayoutState* layoutState = view().layoutState();
if (style().hasInFlowPosition() && layer())
adjustedRect.move(layer()->offsetForInFlowPosition());
adjustedRect.move(layoutState->m_paintOffset);
@@ -1287,8 +1286,8 @@
if (repaintContainer == this)
return;
- if (view().frameView().layoutContext().layoutStateEnabled() && !repaintContainer) {
- auto* layoutState = view().frameView().layoutContext().layoutState();
+ if (view().layoutStateEnabled() && !repaintContainer) {
+ LayoutState* layoutState = view().layoutState();
LayoutSize offset = layoutState->m_paintOffset;
if (style().hasInFlowPosition() && layer())
offset += layer()->offsetForInFlowPosition();
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -517,7 +517,7 @@
// FIXME: LayoutState does not work with RenderLayers as there is not a 1-to-1
// mapping between them and the RenderObjects. It would be neat to enable
// LayoutState outside the layout() phase and use it here.
- ASSERT(!renderer().view().frameView().layoutContext().layoutStateEnabled());
+ ASSERT(!renderer().view().layoutStateEnabled());
RenderLayerModelObject* repaintContainer = renderer().containerForRepaint();
Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderListBox.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -46,7 +46,6 @@
#include "HTMLOptGroupElement.h"
#include "HTMLSelectElement.h"
#include "HitTestResult.h"
-#include "LayoutState.h"
#include "NodeRenderStyle.h"
#include "Page.h"
#include "PaintInfo.h"
@@ -184,7 +183,7 @@
}
if (m_scrollToRevealSelectionAfterLayout) {
- LayoutStateDisabler layoutStateDisabler(view().frameView().layoutContext());
+ LayoutStateDisabler layoutStateDisabler(view());
scrollToRevealSelection();
}
}
Modified: trunk/Source/WebCore/rendering/RenderMediaControlElements.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderMediaControlElements.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderMediaControlElements.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -30,7 +30,6 @@
#if ENABLE(VIDEO)
#include "RenderMediaControlElements.h"
-#include "LayoutState.h"
#include "MediaControlElements.h"
#include "RenderTheme.h"
#include "RenderView.h"
@@ -52,7 +51,7 @@
RenderBox& buttonBox = downcast<RenderBox>(*nextSibling());
int absoluteOffsetTop = buttonBox.localToAbsolute(FloatPoint(0, -size().height())).y();
- LayoutStateDisabler layoutStateDisabler(view().frameView().layoutContext());
+ LayoutStateDisabler layoutStateDisabler(view());
// If the slider would be rendered outside the page, it should be moved below the controls.
if (UNLIKELY(absoluteOffsetTop < 0))
@@ -74,7 +73,7 @@
{
RenderFlexibleBox::layout();
- LayoutStateDisabler layoutStateDisabler(view().frameView().layoutContext());
+ LayoutStateDisabler layoutStateDisabler(view());
MediaControlTimelineContainerElement* container = static_cast<MediaControlTimelineContainerElement*>(element());
container->setTimeDisplaysHidden(width().toInt() < minWidthToDisplayTimeDisplays);
}
@@ -96,7 +95,7 @@
ASSERT(mediaControlElementType(element()) == MediaTextTrackDisplayContainer);
- LayoutStateDisabler layoutStateDisabler(view().frameView().layoutContext());
+ LayoutStateDisabler layoutStateDisabler(view());
static_cast<MediaControlTextTrackContainerElement*>(element())->updateSizes();
}
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -909,7 +909,7 @@
LayoutRect dirtyRect(r);
// FIXME: layoutDelta needs to be applied in parts before/after transforms and
// repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
- dirtyRect.move(view.frameView().layoutContext().layoutDelta());
+ dirtyRect.move(view.layoutDelta());
RenderLayerModelObject* repaintContainer = containerForRepaint();
repaintUsingContainer(repaintContainer, computeRectForRepaint(dirtyRect, repaintContainer), shouldClipToLayer);
Modified: trunk/Source/WebCore/rendering/RenderReplaced.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderReplaced.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderReplaced.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -672,7 +672,7 @@
LayoutRect r = unionRect(localSelectionRect(false), visualOverflowRect());
// FIXME: layoutDelta needs to be applied in parts before/after transforms and
// repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
- r.move(view().frameView().layoutContext().layoutDelta());
+ r.move(view().layoutDelta());
return computeRectForRepaint(r, repaintContainer);
}
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderTable.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -35,7 +35,6 @@
#include "HTMLNames.h"
#include "HTMLTableElement.h"
#include "LayoutRepainter.h"
-#include "LayoutState.h"
#include "RenderBlockFlow.h"
#include "RenderChildIterator.h"
#include "RenderDescendantIterator.h"
@@ -581,9 +580,8 @@
statePusher.pop();
- auto* layoutState = view().frameView().layoutContext().layoutState();
- if (layoutState->pageLogicalHeight())
- setPageLogicalOffset(layoutState->pageLogicalOffset(this, logicalTop()));
+ if (view().layoutState()->pageLogicalHeight())
+ setPageLogicalOffset(view().layoutState()->pageLogicalOffset(this, logicalTop()));
bool didFullRepaint = repainter.repaintAfterLayout();
// Repaint with our new bounds if they are different from our old bounds.
@@ -594,7 +592,7 @@
repaintRectangle(LayoutRect(movedSectionLogicalTop, visualOverflowRect().y(), visualOverflowRect().maxX() - movedSectionLogicalTop, visualOverflowRect().height()));
}
- bool paginated = layoutState && layoutState->isPaginated();
+ bool paginated = view().layoutState() && view().layoutState()->isPaginated();
if (sectionMoved && paginated) {
// FIXME: Table layout should always stabilize even when section moves (see webkit.org/b/174412).
if (!m_inRecursiveSectionMovedWithPagination) {
@@ -1602,8 +1600,7 @@
void RenderTable::markForPaginationRelayoutIfNeeded()
{
- auto* layoutState = view().frameView().layoutContext().layoutState();
- if (!layoutState->isPaginated() || (!layoutState->pageLogicalHeightChanged() && (!layoutState->pageLogicalHeight() || layoutState->pageLogicalOffset(this, logicalTop()) == pageLogicalOffset())))
+ if (!view().layoutState()->isPaginated() || (!view().layoutState()->pageLogicalHeightChanged() && (!view().layoutState()->pageLogicalHeight() || view().layoutState()->pageLogicalOffset(this, logicalTop()) == pageLogicalOffset())))
return;
// When a table moves, we have to dirty all of the sections too.
Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderTableCell.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -386,7 +386,7 @@
// FIXME: layoutDelta needs to be applied in parts before/after transforms and
// repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
- r.move(view().frameView().layoutContext().layoutDelta());
+ r.move(view().layoutDelta());
return computeRectForRepaint(r, repaintContainer);
}
@@ -395,7 +395,7 @@
if (repaintContainer == this)
return rect;
LayoutRect adjustedRect = rect;
- if ((!view().frameView().layoutContext().layoutStateEnabled() || repaintContainer) && parent())
+ if ((!view().layoutStateEnabled() || repaintContainer) && parent())
adjustedRect.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in.
return RenderBlockFlow::computeRectForRepaint(adjustedRect, repaintContainer, context);
}
Modified: trunk/Source/WebCore/rendering/RenderTableRow.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderTableRow.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderTableRow.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -28,7 +28,6 @@
#include "Document.h"
#include "HTMLNames.h"
#include "HitTestResult.h"
-#include "LayoutState.h"
#include "PaintInfo.h"
#include "RenderTableCell.h"
#include "RenderView.h"
@@ -179,11 +178,10 @@
// Table rows do not add translation.
LayoutStateMaintainer statePusher(*this, LayoutSize(), hasTransform() || hasReflection() || style().isFlippedBlocksWritingMode());
- auto* layoutState = view().frameView().layoutContext().layoutState();
- bool paginated = layoutState->isPaginated();
+ bool paginated = view().layoutState()->isPaginated();
for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) {
- if (!cell->needsLayout() && paginated && (layoutState->pageLogicalHeightChanged() || (layoutState->pageLogicalHeight() && layoutState->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())))
+ if (!cell->needsLayout() && paginated && (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())))
cell->setChildNeedsLayout(MarkOnlyThis);
if (cell->needsLayout()) {
Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderTableSection.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -28,7 +28,6 @@
#include "Document.h"
#include "HitTestResult.h"
#include "HTMLNames.h"
-#include "LayoutState.h"
#include "PaintInfo.h"
#include "RenderChildIterator.h"
#include "RenderTableCell.h"
@@ -275,7 +274,7 @@
if (this == table()->topSection())
spacing = table()->vBorderSpacing();
- LayoutStateMaintainer statePusher(view().frameView().layoutContext());
+ LayoutStateMaintainer statePusher(view());
m_rowPos.resize(m_grid.size() + 1);
m_rowPos[0] = spacing;
@@ -387,7 +386,7 @@
m_grid.shrinkToFit();
LayoutStateMaintainer statePusher(*this, locationOffset(), hasTransform() || hasReflection() || style().isFlippedBlocksWritingMode());
- bool paginated = view().frameView().layoutContext().layoutState()->isPaginated();
+ bool paginated = view().layoutState()->isPaginated();
const Vector<LayoutUnit>& columnPos = table()->columnPositions();
@@ -414,7 +413,7 @@
}
if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) {
- if (!rowRenderer->needsLayout() && paginated && view().frameView().layoutContext().layoutState()->pageLogicalHeightChanged())
+ if (!rowRenderer->needsLayout() && paginated && view().layoutState()->pageLogicalHeightChanged())
rowRenderer->setChildNeedsLayout(MarkOnlyThis);
rowRenderer->layoutIfNeeded();
@@ -637,14 +636,13 @@
setLogicalPositionForCell(cell, c);
- auto* layoutState = view().frameView().layoutContext().layoutState();
- if (!cell->needsLayout() && layoutState->pageLogicalHeight() && layoutState->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
+ if (!cell->needsLayout() && view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
cell->setChildNeedsLayout(MarkOnlyThis);
cell->layoutIfNeeded();
// FIXME: Make pagination work with vertical tables.
- if (layoutState->pageLogicalHeight() && cell->logicalHeight() != rHeight) {
+ if (view().layoutState()->pageLogicalHeight() && cell->logicalHeight() != rHeight) {
// FIXME: Pagination might have made us change size. For now just shrink or grow the cell to fit without doing a relayout.
// We'll also do a basic increase of the row height to accommodate the cell if it's bigger, but this isn't quite right
// either. It's at least stable though and won't result in an infinite # of relayouts that may never stabilize.
@@ -655,7 +653,7 @@
LayoutSize childOffset(cell->location() - oldCellRect.location());
if (childOffset.width() || childOffset.height()) {
- view().frameView().layoutContext().addLayoutDelta(childOffset);
+ view().addLayoutDelta(childOffset);
// If the child moved, we have to repaint it as well as any floating/positioned
// descendants. An exception is if we need a layout. In this case, we know we're going to
@@ -1616,7 +1614,7 @@
cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizontalBorderSpacing);
cell->setLogicalLocation(cellLocation);
- view().frameView().layoutContext().addLayoutDelta(oldCellLocation - cell->location());
+ view().addLayoutDelta(oldCellLocation - cell->location());
}
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/RenderVTTCue.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderVTTCue.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderVTTCue.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -29,7 +29,6 @@
#if ENABLE(VIDEO_TRACK)
#include "RenderVTTCue.h"
-#include "LayoutState.h"
#include "RenderInline.h"
#include "RenderView.h"
#include "TextTrackCueGeneric.h"
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -34,7 +34,6 @@
#include "HTMLIFrameElement.h"
#include "HitTestResult.h"
#include "ImageQualityController.h"
-#include "LayoutState.h"
#include "NodeTraversal.h"
#include "Page.h"
#include "RenderDescendantIterator.h"
@@ -194,6 +193,37 @@
return child.isBox();
}
+void RenderView::layoutContent(const LayoutState& state)
+{
+ UNUSED_PARAM(state);
+ ASSERT(needsLayout());
+
+ RenderBlockFlow::layout();
+#ifndef NDEBUG
+ checkLayoutState(state);
+#endif
+}
+
+#ifndef NDEBUG
+void RenderView::checkLayoutState(const LayoutState& state)
+{
+ ASSERT(layoutDeltaMatches(LayoutSize()));
+ ASSERT(!m_layoutStateDisableCount);
+ ASSERT(m_layoutState.get() == &state);
+}
+#endif
+
+void RenderView::initializeLayoutState(LayoutState& state)
+{
+ // FIXME: May be better to push a clip and avoid issuing offscreen repaints.
+ state.m_clipped = false;
+
+ state.m_pageLogicalHeight = m_pageLogicalSize ? m_pageLogicalSize->height() : LayoutUnit(0);
+ state.m_pageLogicalHeightChanged = m_pageLogicalHeightChanged;
+ ASSERT(state.m_pageLogicalHeight >= 0);
+ state.m_isPaginated = state.m_pageLogicalHeight > 0;
+}
+
void RenderView::layout()
{
StackStats::LayoutCheckPoint layoutCheckPoint;
@@ -223,20 +253,21 @@
}
}
- ASSERT(!frameView().layoutContext().layoutState());
+ ASSERT(!m_layoutState);
if (!needsLayout())
return;
- LayoutStateMaintainer statePusher(*this, { }, false, m_pageLogicalSize.value_or(LayoutSize()).height(), m_pageLogicalHeightChanged);
+ m_layoutState = std::make_unique<LayoutState>();
+ initializeLayoutState(*m_layoutState);
m_pageLogicalHeightChanged = false;
- RenderBlockFlow::layout();
+ layoutContent(*m_layoutState);
#ifndef NDEBUG
- frameView().layoutContext().checkLayoutState();
+ checkLayoutState(*m_layoutState);
#endif
- statePusher.pop();
+ m_layoutState = nullptr;
clearNeedsLayout();
}
@@ -722,6 +753,25 @@
return frameView().frame().pageZoomFactor();
}
+void RenderView::pushLayoutState(RenderElement& root)
+{
+ ASSERT(m_layoutStateDisableCount == 0);
+ ASSERT(m_layoutState == 0);
+
+ m_layoutState = std::make_unique<LayoutState>(root);
+}
+
+bool RenderView::pushLayoutStateForPaginationIfNeeded(RenderBlockFlow& layoutRoot)
+{
+ if (m_layoutState)
+ return false;
+ m_layoutState = std::make_unique<LayoutState>(layoutRoot);
+ m_layoutState->m_isPaginated = true;
+ // This is just a flag for known page height (see RenderBlockFlow::checkForPaginationLogicalHeightChange).
+ m_layoutState->m_pageLogicalHeight = 1;
+ return true;
+}
+
IntSize RenderView::viewportSizeForCSSViewportUnits() const
{
return frameView().viewportSizeForCSSViewportUnits();
Modified: trunk/Source/WebCore/rendering/RenderView.h (224510 => 224511)
--- trunk/Source/WebCore/rendering/RenderView.h 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RenderView.h 2017-11-06 21:44:34 UTC (rev 224511)
@@ -22,6 +22,7 @@
#pragma once
#include "FrameView.h"
+#include "LayoutState.h"
#include "Region.h"
#include "RenderBlockFlow.h"
#include "RenderWidget.h"
@@ -33,7 +34,6 @@
namespace WebCore {
class ImageQualityController;
-class LayoutState;
class RenderLayerCompositor;
class RenderQuote;
@@ -90,6 +90,44 @@
LayoutRect viewRect() const;
+ // layoutDelta is used transiently during layout to store how far an object has moved from its
+ // last layout location, in order to repaint correctly.
+ // If we're doing a full repaint m_layoutState will be 0, but in that case layoutDelta doesn't matter.
+ LayoutSize layoutDelta() const
+ {
+ return m_layoutState ? m_layoutState->m_layoutDelta : LayoutSize();
+ }
+ void addLayoutDelta(const LayoutSize& delta)
+ {
+ if (m_layoutState) {
+ m_layoutState->m_layoutDelta += delta;
+#if !ASSERT_DISABLED
+ m_layoutState->m_layoutDeltaXSaturated |= m_layoutState->m_layoutDelta.width() == LayoutUnit::max() || m_layoutState->m_layoutDelta.width() == LayoutUnit::min();
+ m_layoutState->m_layoutDeltaYSaturated |= m_layoutState->m_layoutDelta.height() == LayoutUnit::max() || m_layoutState->m_layoutDelta.height() == LayoutUnit::min();
+#endif
+ }
+ }
+
+#if !ASSERT_DISABLED
+ bool layoutDeltaMatches(const LayoutSize& delta)
+ {
+ if (!m_layoutState)
+ return false;
+ return (delta.width() == m_layoutState->m_layoutDelta.width() || m_layoutState->m_layoutDeltaXSaturated) && (delta.height() == m_layoutState->m_layoutDelta.height() || m_layoutState->m_layoutDeltaYSaturated);
+ }
+#endif
+
+ bool doingFullRepaint() const { return frameView().layoutContext().needsFullRepaint(); }
+
+ // Subtree push/pop
+ void pushLayoutState(RenderElement&);
+ bool pushLayoutStateForPaginationIfNeeded(RenderBlockFlow&);
+ void popLayoutState(RenderObject&) { return popLayoutState(); } // Just doing this to keep popLayoutState() private and to make the subtree calls symmetrical.
+
+ // Returns true if layoutState should be used for its cached offset and clip.
+ bool layoutStateEnabled() const { return m_layoutStateDisableCount == 0 && m_layoutState; }
+ LayoutState* layoutState() const { return m_layoutState.get(); }
+
void updateHitTestResult(HitTestResult&, const LayoutPoint&) override;
void setPageLogicalSize(LayoutSize);
@@ -204,13 +242,47 @@
bool requiresColumns(int desiredColumnCount) const override;
private:
+ void initializeLayoutState(LayoutState&);
+
void computeColumnCountAndWidth() override;
bool shouldRepaint(const LayoutRect&) const;
void flushAccumulatedRepaintRegion() const;
+ // These functions may only be accessed by LayoutStateMaintainer.
+ bool pushLayoutState(RenderBox& renderer, const LayoutSize& offset, LayoutUnit pageHeight = 0, bool pageHeightChanged = false)
+ {
+ // We push LayoutState even if layoutState is disabled because it stores layoutDelta too.
+ if (!doingFullRepaint() || m_layoutState->isPaginated() || renderer.enclosingFragmentedFlow()
+ || m_layoutState->lineGrid() || (renderer.style().lineGrid() != RenderStyle::initialLineGrid() && renderer.isRenderBlockFlow())) {
+ m_layoutState = std::make_unique<LayoutState>(WTFMove(m_layoutState), renderer, offset, pageHeight, pageHeightChanged);
+ return true;
+ }
+ return false;
+ }
+
+ void popLayoutState()
+ {
+ m_layoutState = WTFMove(m_layoutState->m_ancestor);
+ }
+
+ // 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).
+ // Note that even when disabled, LayoutState is still used to store layoutDelta.
+ // These functions may only be accessed by LayoutStateMaintainer or LayoutStateDisabler.
+ void disableLayoutState() { m_layoutStateDisableCount++; }
+ void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutStateDisableCount--; }
+
void layoutContent(const LayoutState&);
+#ifndef NDEBUG
+ void checkLayoutState(const LayoutState&);
+#endif
+ friend class LayoutStateMaintainer;
+ friend class LayoutStateDisabler;
+ friend class SubtreeLayoutStateMaintainer;
+
bool isScrollableOrRubberbandableBox() const override;
void willBeDestroyed() override;
@@ -245,6 +317,8 @@
std::unique_ptr<ImageQualityController> m_imageQualityController;
std::optional<LayoutSize> m_pageLogicalSize;
bool m_pageLogicalHeightChanged { false };
+ std::unique_ptr<LayoutState> m_layoutState;
+ unsigned m_layoutStateDisableCount { 0 };
std::unique_ptr<RenderLayerCompositor> m_compositor;
bool m_hasQuotesNeedingUpdate { false };
Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/RootInlineBox.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -335,7 +335,7 @@
return 0;
// Get the current line grid and offset.
- auto* layoutState = blockFlow().view().frameView().layoutContext().layoutState();
+ LayoutState* layoutState = blockFlow().view().layoutState();
RenderBlockFlow* lineGrid = layoutState->lineGrid();
LayoutSize lineGridOffset = layoutState->lineGridOffset();
if (!lineGrid || lineGrid->style().writingMode() != blockFlow().style().writingMode())
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -53,7 +53,7 @@
ASSERT(needsLayout());
// RenderSVGRoot disables layoutState for the SVG rendering tree.
- ASSERT(!view().frameView().layoutContext().layoutStateEnabled());
+ ASSERT(!view().layoutStateEnabled());
LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(*this) || selfWillPaint());
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -131,7 +131,7 @@
{
StackStats::LayoutCheckPoint layoutCheckPoint;
ASSERT(needsLayout());
- ASSERT(!view().frameView().layoutContext().layoutStateEnabled()); // RenderSVGRoot disables layoutState for the SVG rendering tree.
+ ASSERT(!view().layoutStateEnabled()); // RenderSVGRoot disables layoutState for the SVG rendering tree.
LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(*this));
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (224510 => 224511)
--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -28,7 +28,6 @@
#include "GraphicsContext.h"
#include "HitTestResult.h"
#include "LayoutRepainter.h"
-#include "LayoutState.h"
#include "Page.h"
#include "RenderIterator.h"
#include "RenderLayer.h"
@@ -143,7 +142,7 @@
m_resourcesNeedingToInvalidateClients.clear();
// Arbitrary affine transforms are incompatible with LayoutState.
- LayoutStateDisabler layoutStateDisabler(view().frameView().layoutContext());
+ LayoutStateDisabler layoutStateDisabler(view());
bool needsLayout = selfNeedsLayout();
LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout);
Modified: trunk/Source/WebCore/style/RenderTreeUpdaterFirstLetter.cpp (224510 => 224511)
--- trunk/Source/WebCore/style/RenderTreeUpdaterFirstLetter.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/style/RenderTreeUpdaterFirstLetter.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -220,7 +220,7 @@
void RenderTreeUpdater::FirstLetter::update(RenderBlock& block)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!block.view().frameView().layoutContext().layoutState());
+ ASSERT_WITH_SECURITY_IMPLICATION(!block.view().layoutState());
if (!supportsFirstLetter(block))
return;
Modified: trunk/Source/WebCore/style/RenderTreeUpdaterListItem.cpp (224510 => 224511)
--- trunk/Source/WebCore/style/RenderTreeUpdaterListItem.cpp 2017-11-06 21:41:12 UTC (rev 224510)
+++ trunk/Source/WebCore/style/RenderTreeUpdaterListItem.cpp 2017-11-06 21:44:34 UTC (rev 224511)
@@ -71,7 +71,7 @@
void RenderTreeUpdater::ListItem::updateMarker(RenderListItem& listItemRenderer)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!listItemRenderer.view().frameView().layoutContext().layoutState());
+ ASSERT_WITH_SECURITY_IMPLICATION(!listItemRenderer.view().layoutState());
auto& style = listItemRenderer.style();