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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1738243002: Removed main-thread one dimensional scrolling paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removeStepFromUserScroll
Patch Set: Rebase Created 4 years, 9 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 | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | 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) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 if (document().frame()->applyScrollDelta(ScrollByPrecisePixel, delta, sc rollState.isBeginning()).didScroll()) { 562 if (document().frame()->applyScrollDelta(ScrollByPrecisePixel, delta, sc rollState.isBeginning()).didScroll()) {
563 scrolled = true; 563 scrolled = true;
564 scrollState.consumeDeltaNative(scrollState.deltaX(), scrollState.del taY()); 564 scrollState.consumeDeltaNative(scrollState.deltaX(), scrollState.del taY());
565 } 565 }
566 } else { 566 } else {
567 if (!layoutObject()) 567 if (!layoutObject())
568 return; 568 return;
569 LayoutBoxItem curBox = LayoutBoxItem(toLayoutBox(layoutObject())).enclos ingBox(); 569 LayoutBoxItem curBox = LayoutBoxItem(toLayoutBox(layoutObject())).enclos ingBox();
570 // FIXME: Native scrollers should only consume the scroll they 570 // FIXME: Native scrollers should only consume the scroll they
571 // apply. See crbug.com/457765. 571 // apply. See crbug.com/457765.
572 if (deltaX && curBox.scroll(ScrollLeft, ScrollByPrecisePixel, deltaX).di dScroll) { 572 // TODO(bokan): The deltas here are the screen-space touchpoint deltas
573 // which are inverted relative to scrolling deltas.
574 if (deltaX && curBox.scroll(ScrollByPrecisePixel, FloatSize(-deltaX, 0)) .didScrollX) {
573 scrollState.consumeDeltaNative(scrollState.deltaX(), 0); 575 scrollState.consumeDeltaNative(scrollState.deltaX(), 0);
574 scrolled = true; 576 scrolled = true;
575 } 577 }
576 578
577 if (deltaY && curBox.scroll(ScrollUp, ScrollByPrecisePixel, deltaY).didS croll) { 579 if (deltaY && curBox.scroll(ScrollByPrecisePixel, FloatSize(0, -deltaY)) .didScrollY) {
578 scrollState.consumeDeltaNative(0, scrollState.deltaY()); 580 scrollState.consumeDeltaNative(0, scrollState.deltaY());
579 scrolled = true; 581 scrolled = true;
580 } 582 }
581 } 583 }
582 584
583 if (!scrolled) 585 if (!scrolled)
584 return; 586 return;
585 587
586 // We need to setCurrentNativeScrollingElement in both the 588 // We need to setCurrentNativeScrollingElement in both the
587 // distributeScroll and applyScroll default implementations so 589 // distributeScroll and applyScroll default implementations so
(...skipping 3052 matching lines...) Expand 10 before | Expand all | Expand 10 after
3640 { 3642 {
3641 #if ENABLE(OILPAN) 3643 #if ENABLE(OILPAN)
3642 if (hasRareData()) 3644 if (hasRareData())
3643 visitor->trace(elementRareData()); 3645 visitor->trace(elementRareData());
3644 visitor->trace(m_elementData); 3646 visitor->trace(m_elementData);
3645 #endif 3647 #endif
3646 ContainerNode::trace(visitor); 3648 ContainerNode::trace(visitor);
3647 } 3649 }
3648 3650
3649 } // namespace blink 3651 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698