| OLD | NEW |
| 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 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1831 // Clearing these bits is required to avoid leaving stale renderers. | 1831 // Clearing these bits is required to avoid leaving stale renderers. |
| 1832 // FIXME: We shouldn't need that hack if our logic was totally correct. | 1832 // FIXME: We shouldn't need that hack if our logic was totally correct. |
| 1833 if (diff.needsLayout()) { | 1833 if (diff.needsLayout()) { |
| 1834 setFloating(false); | 1834 setFloating(false); |
| 1835 clearPositionedState(); | 1835 clearPositionedState(); |
| 1836 } | 1836 } |
| 1837 } else { | 1837 } else { |
| 1838 s_affectsParentBlock = false; | 1838 s_affectsParentBlock = false; |
| 1839 } | 1839 } |
| 1840 | 1840 |
| 1841 if (view()->frameView()) { | |
| 1842 bool shouldBlitOnFixedBackgroundImage = false; | |
| 1843 if (RuntimeEnabledFeatures::fastMobileScrollingEnabled()) { | |
| 1844 // On low-powered/mobile devices, preventing blitting on a scroll ca
n cause noticeable delays | |
| 1845 // when scrolling a page with a fixed background image. As an optimi
zation, assuming there are | |
| 1846 // no fixed positoned elements on the page, we can acclerate scrolli
ng (via blitting) if we | |
| 1847 // ignore the CSS property "background-attachment: fixed". | |
| 1848 shouldBlitOnFixedBackgroundImage = true; | |
| 1849 } | |
| 1850 bool newStyleSlowScroll = !shouldBlitOnFixedBackgroundImage && newStyle.
hasFixedBackgroundImage(); | |
| 1851 bool oldStyleSlowScroll = m_style && !shouldBlitOnFixedBackgroundImage &
& m_style->hasFixedBackgroundImage(); | |
| 1852 | |
| 1853 bool drawsRootBackground = isDocumentElement(); | |
| 1854 if (drawsRootBackground && !shouldBlitOnFixedBackgroundImage) { | |
| 1855 if (view()->compositor()->supportsFixedRootBackgroundCompositing())
{ | |
| 1856 if (newStyleSlowScroll && newStyle.hasEntirelyFixedBackground()) | |
| 1857 newStyleSlowScroll = false; | |
| 1858 | |
| 1859 if (oldStyleSlowScroll && m_style->hasEntirelyFixedBackground()) | |
| 1860 oldStyleSlowScroll = false; | |
| 1861 } | |
| 1862 } | |
| 1863 | |
| 1864 if (oldStyleSlowScroll != newStyleSlowScroll) { | |
| 1865 if (oldStyleSlowScroll) | |
| 1866 view()->frameView()->removeSlowRepaintObject(); | |
| 1867 if (newStyleSlowScroll) | |
| 1868 view()->frameView()->addSlowRepaintObject(); | |
| 1869 } | |
| 1870 } | |
| 1871 | |
| 1872 // Elements with non-auto touch-action will send a SetTouchAction message | 1841 // Elements with non-auto touch-action will send a SetTouchAction message |
| 1873 // on touchstart in EventHandler::handleTouchEvent, and so effectively have | 1842 // on touchstart in EventHandler::handleTouchEvent, and so effectively have |
| 1874 // a touchstart handler that must be reported. | 1843 // a touchstart handler that must be reported. |
| 1875 // | 1844 // |
| 1876 // Since a CSS property cannot be applied directly to a text node, a | 1845 // Since a CSS property cannot be applied directly to a text node, a |
| 1877 // handler will have already been added for its parent so ignore it. | 1846 // handler will have already been added for its parent so ignore it. |
| 1878 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; | 1847 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; |
| 1879 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { | 1848 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { |
| 1880 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 1849 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
| 1881 if (newStyle.touchAction() != TouchActionAuto) | 1850 if (newStyle.touchAction() != TouchActionAuto) |
| (...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2888 { | 2857 { |
| 2889 if (object1) { | 2858 if (object1) { |
| 2890 const blink::RenderObject* root = object1; | 2859 const blink::RenderObject* root = object1; |
| 2891 while (root->parent()) | 2860 while (root->parent()) |
| 2892 root = root->parent(); | 2861 root = root->parent(); |
| 2893 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2862 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2894 } | 2863 } |
| 2895 } | 2864 } |
| 2896 | 2865 |
| 2897 #endif | 2866 #endif |
| OLD | NEW |