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

Side by Side Diff: sky/engine/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 715453002: Remove OverlayScrollbarSizeRelevancy. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/rendering/RenderLayerClipper.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 return false; 301 return false;
302 302
303 // We ignore overflow clip here; we want composited overflow content to 303 // We ignore overflow clip here; we want composited overflow content to
304 // behave as if it lives in an unclipped universe so it can prepaint, etc. 304 // behave as if it lives in an unclipped universe so it can prepaint, etc.
305 // This means that we need to check if we are actually clipped before 305 // This means that we need to check if we are actually clipped before
306 // setting up m_ancestorClippingLayer otherwise 306 // setting up m_ancestorClippingLayer otherwise
307 // updateAncestorClippingLayerGeometry will fail as the clip rect will be 307 // updateAncestorClippingLayerGeometry will fail as the clip rect will be
308 // infinite. 308 // infinite.
309 // FIXME: this should use cached clip rects, but this sometimes give 309 // FIXME: this should use cached clip rects, but this sometimes give
310 // inaccurate results (and trips the ASSERTS in RenderLayerClipper). 310 // inaccurate results (and trips the ASSERTS in RenderLayerClipper).
311 ClipRectsContext clipRectsContext(compositingAncestor, UncachedClipRects, Ig noreOverlayScrollbarSize); 311 ClipRectsContext clipRectsContext(compositingAncestor, UncachedClipRects);
312 clipRectsContext.setIgnoreOverflowClip(); 312 clipRectsContext.setIgnoreOverflowClip();
313 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro undClipRect(clipRectsContext).rect()); 313 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro undClipRect(clipRectsContext).rect());
314 return parentClipRect != PaintInfo::infiniteRect(); 314 return parentClipRect != PaintInfo::infiniteRect();
315 } 315 }
316 316
317 bool CompositedLayerMapping::updateGraphicsLayerConfiguration() 317 bool CompositedLayerMapping::updateGraphicsLayerConfiguration()
318 { 318 {
319 ASSERT(m_owningLayer.compositor()->lifecycle().state() == DocumentLifecycle: :InCompositingUpdate); 319 ASSERT(m_owningLayer.compositor()->lifecycle().state() == DocumentLifecycle: :InCompositingUpdate);
320 320
321 // Note carefully: here we assume that the compositing state of all descenda nts have been updated already, 321 // Note carefully: here we assume that the compositing state of all descenda nts have been updated already,
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 IntPoint scrollOrigin(renderBox->borderLeft(), renderBox->borderTop()); 669 IntPoint scrollOrigin(renderBox->borderLeft(), renderBox->borderTop());
670 graphicsLayerParentLocation = scrollOrigin - scrollOffset; 670 graphicsLayerParentLocation = scrollOrigin - scrollOffset;
671 } 671 }
672 } 672 }
673 673
674 void CompositedLayerMapping::updateAncestorClippingLayerGeometry(const RenderLay er* compositingContainer, const IntPoint& snappedOffsetFromCompositedAncestor, I ntPoint& graphicsLayerParentLocation) 674 void CompositedLayerMapping::updateAncestorClippingLayerGeometry(const RenderLay er* compositingContainer, const IntPoint& snappedOffsetFromCompositedAncestor, I ntPoint& graphicsLayerParentLocation)
675 { 675 {
676 if (!compositingContainer || !m_ancestorClippingLayer) 676 if (!compositingContainer || !m_ancestorClippingLayer)
677 return; 677 return;
678 678
679 ClipRectsContext clipRectsContext(compositingContainer, PaintingClipRectsIgn oringOverflowClip, IgnoreOverlayScrollbarSize); 679 ClipRectsContext clipRectsContext(compositingContainer, PaintingClipRectsIgn oringOverflowClip);
680 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro undClipRect(clipRectsContext).rect()); 680 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro undClipRect(clipRectsContext).rect());
681 ASSERT(parentClipRect != PaintInfo::infiniteRect()); 681 ASSERT(parentClipRect != PaintInfo::infiniteRect());
682 m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() - graphicsLayerParentLocation)); 682 m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() - graphicsLayerParentLocation));
683 m_ancestorClippingLayer->setSize(parentClipRect.size()); 683 m_ancestorClippingLayer->setSize(parentClipRect.size());
684 684
685 // backgroundRect is relative to compositingContainer, so subtract snappedOf fsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y to get back t o local coords. 685 // backgroundRect is relative to compositingContainer, so subtract snappedOf fsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y to get back t o local coords.
686 m_ancestorClippingLayer->setOffsetFromRenderer(parentClipRect.location() - s nappedOffsetFromCompositedAncestor); 686 m_ancestorClippingLayer->setOffsetFromRenderer(parentClipRect.location() - s nappedOffsetFromCompositedAncestor);
687 687
688 // The primary layer is then parented in, and positioned relative to this cl ipping layer. 688 // The primary layer is then parented in, and positioned relative to this cl ipping layer.
689 graphicsLayerParentLocation = parentClipRect.location(); 689 graphicsLayerParentLocation = parentClipRect.location();
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2170 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2171 name = "Scrolling Block Selection Layer"; 2171 name = "Scrolling Block Selection Layer";
2172 } else { 2172 } else {
2173 ASSERT_NOT_REACHED(); 2173 ASSERT_NOT_REACHED();
2174 } 2174 }
2175 2175
2176 return name; 2176 return name;
2177 } 2177 }
2178 2178
2179 } // namespace blink 2179 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayerClipper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698