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

Unified Diff: sky/engine/core/rendering/LayoutState.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/ClipRects.h ('k') | sky/engine/core/rendering/PaintInvalidationState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/LayoutState.cpp
diff --git a/sky/engine/core/rendering/LayoutState.cpp b/sky/engine/core/rendering/LayoutState.cpp
index 8601f38d3b393fa5a3b6b88c2554e71b3ef51553..13f6b5e09a627ebc237a0f32c9c6ee916ea28294 100644
--- a/sky/engine/core/rendering/LayoutState.cpp
+++ b/sky/engine/core/rendering/LayoutState.cpp
@@ -48,16 +48,9 @@ LayoutState::LayoutState(RenderBox& renderer, const LayoutSize& offset, bool con
, m_renderer(renderer)
{
renderer.view()->pushLayoutState(*this);
- bool fixed = renderer.isOutOfFlowPositioned() && renderer.style()->position() == FixedPosition;
- if (fixed) {
- // FIXME: This doesn't work correctly with transforms.
- FloatPoint fixedOffset = renderer.view()->localToAbsolute(FloatPoint(), IsFixed);
- m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset;
- } else {
- m_layoutOffset = m_next->m_layoutOffset + offset;
- }
+ m_layoutOffset = m_next->m_layoutOffset + offset;
- if (renderer.isOutOfFlowPositioned() && !fixed) {
+ if (renderer.isOutOfFlowPositioned()) {
if (RenderObject* container = renderer.container()) {
if (container->style()->hasInFlowPosition() && container->isRenderInline())
m_layoutOffset += toRenderInline(container)->offsetForInFlowPositionedInline(renderer);
« no previous file with comments | « sky/engine/core/rendering/ClipRects.h ('k') | sky/engine/core/rendering/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698