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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 59763011: Remove 'FAST_MOBILE_SCROLLING' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Remove FAST_MOBILE_SCROLLING altogether Created 7 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 | « Source/core/rendering/RenderBoxModelObject.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 } 1999 }
2000 setHorizontalWritingMode(true); 2000 setHorizontalWritingMode(true);
2001 setHasBoxDecorations(false); 2001 setHasBoxDecorations(false);
2002 setHasOverflowClip(false); 2002 setHasOverflowClip(false);
2003 setHasTransform(false); 2003 setHasTransform(false);
2004 setHasReflection(false); 2004 setHasReflection(false);
2005 } else 2005 } else
2006 s_affectsParentBlock = false; 2006 s_affectsParentBlock = false;
2007 2007
2008 if (view()->frameView()) { 2008 if (view()->frameView()) {
2009 bool shouldBlitOnFixedBackgroundImage = false; 2009 bool newStyleSlowScroll = newStyle && newStyle->hasFixedBackgroundImage( );
2010 #if ENABLE(FAST_MOBILE_SCROLLING) 2010 bool oldStyleSlowScroll = m_style && m_style->hasFixedBackgroundImage();
2011 // On low-powered/mobile devices, preventing blitting on a scroll can ca use noticeable delays
2012 // when scrolling a page with a fixed background image. As an optimizati on, assuming there are
2013 // no fixed positoned elements on the page, we can acclerate scrolling ( via blitting) if we
2014 // ignore the CSS property "background-attachment: fixed".
2015 shouldBlitOnFixedBackgroundImage = true;
2016 #endif
2017
2018 bool newStyleSlowScroll = newStyle && !shouldBlitOnFixedBackgroundImage && newStyle->hasFixedBackgroundImage();
2019 bool oldStyleSlowScroll = m_style && !shouldBlitOnFixedBackgroundImage & & m_style->hasFixedBackgroundImage();
2020 2011
2021 bool drawsRootBackground = isRoot() || (isBody() && !rendererHasBackgrou nd(document().documentElement()->renderer())); 2012 bool drawsRootBackground = isRoot() || (isBody() && !rendererHasBackgrou nd(document().documentElement()->renderer()));
2022 if (drawsRootBackground && !shouldBlitOnFixedBackgroundImage) { 2013 if (drawsRootBackground) {
2023 if (view()->compositor()->supportsFixedRootBackgroundCompositing()) { 2014 if (view()->compositor()->supportsFixedRootBackgroundCompositing()) {
2024 if (newStyleSlowScroll && newStyle->hasEntirelyFixedBackground() ) 2015 if (newStyleSlowScroll && newStyle->hasEntirelyFixedBackground() )
2025 newStyleSlowScroll = false; 2016 newStyleSlowScroll = false;
2026 2017
2027 if (oldStyleSlowScroll && m_style->hasEntirelyFixedBackground()) 2018 if (oldStyleSlowScroll && m_style->hasEntirelyFixedBackground())
2028 oldStyleSlowScroll = false; 2019 oldStyleSlowScroll = false;
2029 } 2020 }
2030 } 2021 }
2031 2022
2032 if (oldStyleSlowScroll != newStyleSlowScroll) { 2023 if (oldStyleSlowScroll != newStyleSlowScroll) {
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 { 3369 {
3379 if (object1) { 3370 if (object1) {
3380 const WebCore::RenderObject* root = object1; 3371 const WebCore::RenderObject* root = object1;
3381 while (root->parent()) 3372 while (root->parent())
3382 root = root->parent(); 3373 root = root->parent();
3383 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3374 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3384 } 3375 }
3385 } 3376 }
3386 3377
3387 #endif 3378 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698