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

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: Removed TODO that was already fixed Created 4 years, 10 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
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): I think the scroll deltas here are backwards.
skobes 2016/02/29 18:52:47 Can you clarify this TODO? Why are they backwards
bokan 2016/03/01 05:56:24 Done. (I have a follow up patch which fixes the TO
573 if (deltaX && curBox.scroll(ScrollByPrecisePixel, FloatSize(-deltaX, 0)) .didScrollX) {
573 scrollState.consumeDeltaNative(scrollState.deltaX(), 0); 574 scrollState.consumeDeltaNative(scrollState.deltaX(), 0);
574 scrolled = true; 575 scrolled = true;
575 } 576 }
576 577
577 if (deltaY && curBox.scroll(ScrollUp, ScrollByPrecisePixel, deltaY).didS croll) { 578 if (deltaY && curBox.scroll(ScrollByPrecisePixel, FloatSize(0, -deltaY)) .didScrollY) {
578 scrollState.consumeDeltaNative(0, scrollState.deltaY()); 579 scrollState.consumeDeltaNative(0, scrollState.deltaY());
579 scrolled = true; 580 scrolled = true;
580 } 581 }
581 } 582 }
582 583
583 if (!scrolled) 584 if (!scrolled)
584 return; 585 return;
585 586
586 // We need to setCurrentNativeScrollingElement in both the 587 // We need to setCurrentNativeScrollingElement in both the
587 // distributeScroll and applyScroll default implementations so 588 // distributeScroll and applyScroll default implementations so
(...skipping 3052 matching lines...) Expand 10 before | Expand all | Expand 10 after
3640 { 3641 {
3641 #if ENABLE(OILPAN) 3642 #if ENABLE(OILPAN)
3642 if (hasRareData()) 3643 if (hasRareData())
3643 visitor->trace(elementRareData()); 3644 visitor->trace(elementRareData());
3644 visitor->trace(m_elementData); 3645 visitor->trace(m_elementData);
3645 #endif 3646 #endif
3646 ContainerNode::trace(visitor); 3647 ContainerNode::trace(visitor);
3647 } 3648 }
3648 3649
3649 } // namespace blink 3650 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698