Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: sky/engine/core/rendering/PaintInvalidationState.cpp

Issue 686633002: First pass at removing position:fixed. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/rendering/LayoutState.cpp ('k') | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/PaintInvalidationState.cpp
diff --git a/sky/engine/core/rendering/PaintInvalidationState.cpp b/sky/engine/core/rendering/PaintInvalidationState.cpp
index 2b285c1564d78e6814e6700de514a63c5c1c1ab7..7df681dce26e1c0153c4ca512f0b08d07ee80e84 100644
--- a/sky/engine/core/rendering/PaintInvalidationState.cpp
+++ b/sky/engine/core/rendering/PaintInvalidationState.cpp
@@ -42,7 +42,6 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
{
// FIXME: SVG could probably benefit from a stack-based optimization like html does. crbug.com/391054
bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer;
- bool fixed = m_renderer.style()->position() == FixedPosition;
if (establishesPaintInvalidationContainer) {
// When we hit a new paint invalidation container, we don't need to
@@ -53,15 +52,10 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
if (!renderer.supportsPaintInvalidationStateCachedOffsets() || !next.m_cachedOffsetsEnabled) {
m_cachedOffsetsEnabled = false;
} else {
- if (fixed) {
- FloatPoint fixedOffset = m_renderer.localToContainerPoint(FloatPoint(), &m_paintInvalidationContainer, TraverseDocumentBoundaries);
- m_paintOffset = LayoutSize(fixedOffset.x(), fixedOffset.y());
- } else {
- LayoutSize offset = m_renderer.isBox() ? toRenderBox(renderer).locationOffset() : LayoutSize();
- m_paintOffset = next.m_paintOffset + offset;
- }
+ LayoutSize offset = m_renderer.isBox() ? toRenderBox(renderer).locationOffset() : LayoutSize();
+ m_paintOffset = next.m_paintOffset + offset;
- if (m_renderer.isOutOfFlowPositioned() && !fixed) {
+ if (m_renderer.isOutOfFlowPositioned()) {
if (RenderObject* container = m_renderer.container()) {
if (container->style()->hasInFlowPosition() && container->isRenderInline())
m_paintOffset += toRenderInline(container)->offsetForInFlowPositionedInline(toRenderBox(renderer));
@@ -72,7 +66,7 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
m_paintOffset += renderer.layer()->offsetForInFlowPosition();
}
- m_clipped = !fixed && next.m_clipped;
+ m_clipped = next.m_clipped;
if (m_clipped)
m_clipRect = next.m_clipRect;
}
« no previous file with comments | « sky/engine/core/rendering/LayoutState.cpp ('k') | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698