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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2442833002: Fix the overflow clip rect rounding for overflow scrolling (Closed)
Patch Set: Fix Slimming Paint v2 Created 4 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
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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 } 1227 }
1228 1228
1229 void CompositedLayerMapping::updateScrollingLayerGeometry( 1229 void CompositedLayerMapping::updateScrollingLayerGeometry(
1230 const IntRect& localCompositingBounds) { 1230 const IntRect& localCompositingBounds) {
1231 if (!m_scrollingLayer) 1231 if (!m_scrollingLayer)
1232 return; 1232 return;
1233 1233
1234 ASSERT(m_scrollingContentsLayer); 1234 ASSERT(m_scrollingContentsLayer);
1235 LayoutBox* layoutBox = toLayoutBox(layoutObject()); 1235 LayoutBox* layoutBox = toLayoutBox(layoutObject());
1236 IntRect overflowClipRect = 1236 IntRect overflowClipRect =
1237 enclosingIntRect(layoutBox->overflowClipRect(LayoutPoint())); 1237 pixelSnappedIntRect(layoutBox->overflowClipRect(LayoutPoint()));
1238 FloatPoint scrollPosition = 1238 FloatPoint scrollPosition =
1239 m_owningLayer.getScrollableArea()->scrollPosition(); 1239 m_owningLayer.getScrollableArea()->scrollPosition();
1240 m_scrollingLayer->setPosition(FloatPoint( 1240 m_scrollingLayer->setPosition(FloatPoint(
1241 overflowClipRect.location() - localCompositingBounds.location() + 1241 overflowClipRect.location() - localCompositingBounds.location() +
1242 roundedIntSize(m_owningLayer.subpixelAccumulation()))); 1242 roundedIntSize(m_owningLayer.subpixelAccumulation())));
1243 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size())); 1243 m_scrollingLayer->setSize(FloatSize(overflowClipRect.size()));
1244 1244
1245 IntSize oldScrollingLayerOffset = m_scrollingLayer->offsetFromLayoutObject(); 1245 IntSize oldScrollingLayerOffset = m_scrollingLayer->offsetFromLayoutObject();
1246 m_scrollingLayer->setOffsetFromLayoutObject( 1246 m_scrollingLayer->setOffsetFromLayoutObject(
1247 -toIntSize(overflowClipRect.location())); 1247 -toIntSize(overflowClipRect.location()));
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after
3249 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 3249 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
3250 name = "Scrolling Contents Layer"; 3250 name = "Scrolling Contents Layer";
3251 } else { 3251 } else {
3252 ASSERT_NOT_REACHED(); 3252 ASSERT_NOT_REACHED();
3253 } 3253 }
3254 3254
3255 return name; 3255 return name;
3256 } 3256 }
3257 3257
3258 } // namespace blink 3258 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698