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

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

Issue 1056983004: OverscrollGlow for mainThread-{BLINK CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased to latest Created 5 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 | « no previous file | Source/core/frame/FrameView.cpp » ('j') | Source/core/frame/LocalFrame.cpp » ('J')
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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 if (scrollState.fullyConsumed()) 508 if (scrollState.fullyConsumed())
509 return; 509 return;
510 510
511 const double deltaX = scrollState.deltaX(); 511 const double deltaX = scrollState.deltaX();
512 const double deltaY = scrollState.deltaY(); 512 const double deltaY = scrollState.deltaY();
513 bool scrolled = false; 513 bool scrolled = false;
514 514
515 // Handle the documentElement separately, as it scrolls the FrameView. 515 // Handle the documentElement separately, as it scrolls the FrameView.
516 if (this == document().documentElement()) { 516 if (this == document().documentElement()) {
517 FloatSize delta(deltaX, deltaY); 517 FloatSize delta(deltaX, deltaY);
518 if (document().frame()->applyScrollDelta(delta, scrollState.isBeginning( ))) { 518 if (document().frame()->applyScrollDelta(delta, scrollState.isBeginning( )).didScroll()) {
519 scrolled = true; 519 scrolled = true;
520 scrollState.consumeDeltaNative(scrollState.deltaX(), scrollState.del taY()); 520 scrollState.consumeDeltaNative(scrollState.deltaX(), scrollState.del taY());
521 } 521 }
522 } else { 522 } else {
523 if (!layoutObject()) 523 if (!layoutObject())
524 return; 524 return;
525 LayoutBox* curBox = layoutObject()->enclosingBox(); 525 LayoutBox* curBox = layoutObject()->enclosingBox();
526 // FIXME: Native scrollers should only consume the scroll they 526 // FIXME: Native scrollers should only consume the scroll they
527 // apply. See crbug.com/457765. 527 // apply. See crbug.com/457765.
528 if (deltaX && curBox->scroll(ScrollLeft, ScrollByPrecisePixel, deltaX)) { 528 if (deltaX && curBox->scroll(ScrollLeft, ScrollByPrecisePixel, deltaX).d idScroll) {
529 scrollState.consumeDeltaNative(scrollState.deltaX(), 0); 529 scrollState.consumeDeltaNative(scrollState.deltaX(), 0);
530 scrolled = true; 530 scrolled = true;
531 } 531 }
532 532
533 if (deltaY && curBox->scroll(ScrollUp, ScrollByPrecisePixel, deltaY)) { 533 if (deltaY && curBox->scroll(ScrollUp, ScrollByPrecisePixel, deltaY).did Scroll) {
534 scrollState.consumeDeltaNative(0, scrollState.deltaY()); 534 scrollState.consumeDeltaNative(0, scrollState.deltaY());
535 scrolled = true; 535 scrolled = true;
536 } 536 }
537 } 537 }
538 538
539 if (!scrolled) 539 if (!scrolled)
540 return; 540 return;
541 541
542 // We need to setCurrentNativeScrollingElement in both the 542 // We need to setCurrentNativeScrollingElement in both the
543 // distributeScroll and applyScroll default implementations so 543 // distributeScroll and applyScroll default implementations so
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
3435 { 3435 {
3436 #if ENABLE(OILPAN) 3436 #if ENABLE(OILPAN)
3437 if (hasRareData()) 3437 if (hasRareData())
3438 visitor->trace(elementRareData()); 3438 visitor->trace(elementRareData());
3439 visitor->trace(m_elementData); 3439 visitor->trace(m_elementData);
3440 #endif 3440 #endif
3441 ContainerNode::trace(visitor); 3441 ContainerNode::trace(visitor);
3442 } 3442 }
3443 3443
3444 } // namespace blink 3444 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | Source/core/frame/LocalFrame.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698