| 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) 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |