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

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

Issue 323123004: Replace compile time guard with runtime flag in blink and remove ENABLE_FAST_MOBILE_SCROLLING in gy… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix gni file. Created 6 years, 6 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 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 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 if (diff.needsLayout()) { 2228 if (diff.needsLayout()) {
2229 setFloating(false); 2229 setFloating(false);
2230 clearPositionedState(); 2230 clearPositionedState();
2231 } 2231 }
2232 } else { 2232 } else {
2233 s_affectsParentBlock = false; 2233 s_affectsParentBlock = false;
2234 } 2234 }
2235 2235
2236 if (view()->frameView()) { 2236 if (view()->frameView()) {
2237 bool shouldBlitOnFixedBackgroundImage = false; 2237 bool shouldBlitOnFixedBackgroundImage = false;
2238 #if ENABLE(FAST_MOBILE_SCROLLING) 2238 if (RuntimeEnabledFeatures::fastMobileScrollingEnabled()) {
2239 // On low-powered/mobile devices, preventing blitting on a scroll can ca use noticeable delays 2239 // On low-powered/mobile devices, preventing blitting on a scroll ca n cause noticeable delays
2240 // when scrolling a page with a fixed background image. As an optimizati on, assuming there are 2240 // when scrolling a page with a fixed background image. As an optimi zation, assuming there are
2241 // no fixed positoned elements on the page, we can acclerate scrolling ( via blitting) if we 2241 // no fixed positoned elements on the page, we can acclerate scrolli ng (via blitting) if we
2242 // ignore the CSS property "background-attachment: fixed". 2242 // ignore the CSS property "background-attachment: fixed".
2243 shouldBlitOnFixedBackgroundImage = true; 2243 shouldBlitOnFixedBackgroundImage = true;
2244 #endif 2244 }
2245
2246 bool newStyleSlowScroll = !shouldBlitOnFixedBackgroundImage && newStyle. hasFixedBackgroundImage(); 2245 bool newStyleSlowScroll = !shouldBlitOnFixedBackgroundImage && newStyle. hasFixedBackgroundImage();
2247 bool oldStyleSlowScroll = m_style && !shouldBlitOnFixedBackgroundImage & & m_style->hasFixedBackgroundImage(); 2246 bool oldStyleSlowScroll = m_style && !shouldBlitOnFixedBackgroundImage & & m_style->hasFixedBackgroundImage();
2248 2247
2249 bool drawsRootBackground = isDocumentElement() || (isBody() && !renderer HasBackground(document().documentElement()->renderer())); 2248 bool drawsRootBackground = isDocumentElement() || (isBody() && !renderer HasBackground(document().documentElement()->renderer()));
2250 if (drawsRootBackground && !shouldBlitOnFixedBackgroundImage) { 2249 if (drawsRootBackground && !shouldBlitOnFixedBackgroundImage) {
2251 if (view()->compositor()->supportsFixedRootBackgroundCompositing()) { 2250 if (view()->compositor()->supportsFixedRootBackgroundCompositing()) {
2252 if (newStyleSlowScroll && newStyle.hasEntirelyFixedBackground()) 2251 if (newStyleSlowScroll && newStyle.hasEntirelyFixedBackground())
2253 newStyleSlowScroll = false; 2252 newStyleSlowScroll = false;
2254 2253
2255 if (oldStyleSlowScroll && m_style->hasEntirelyFixedBackground()) 2254 if (oldStyleSlowScroll && m_style->hasEntirelyFixedBackground())
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
3551 { 3550 {
3552 if (object1) { 3551 if (object1) {
3553 const WebCore::RenderObject* root = object1; 3552 const WebCore::RenderObject* root = object1;
3554 while (root->parent()) 3553 while (root->parent())
3555 root = root->parent(); 3554 root = root->parent();
3556 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3555 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3557 } 3556 }
3558 } 3557 }
3559 3558
3560 #endif 3559 #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