| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 if (scrollState.fullyConsumed()) | 509 if (scrollState.fullyConsumed()) |
| 510 return; | 510 return; |
| 511 | 511 |
| 512 const double deltaX = scrollState.deltaX(); | 512 const double deltaX = scrollState.deltaX(); |
| 513 const double deltaY = scrollState.deltaY(); | 513 const double deltaY = scrollState.deltaY(); |
| 514 bool scrolled = false; | 514 bool scrolled = false; |
| 515 | 515 |
| 516 // Handle the documentElement separately, as it scrolls the FrameView. | 516 // Handle the documentElement separately, as it scrolls the FrameView. |
| 517 if (this == document().documentElement()) { | 517 if (this == document().documentElement()) { |
| 518 FloatSize delta(deltaX, deltaY); | 518 FloatSize delta(deltaX, deltaY); |
| 519 if (document().frame()->applyScrollDelta(delta, scrollState.isBeginning(
))) { | 519 if (document().frame()->applyScrollDelta(delta, scrollState.isBeginning(
)).didScroll()) { |
| 520 scrolled = true; | 520 scrolled = true; |
| 521 scrollState.consumeDeltaNative(scrollState.deltaX(), scrollState.del
taY()); | 521 scrollState.consumeDeltaNative(scrollState.deltaX(), scrollState.del
taY()); |
| 522 } | 522 } |
| 523 } else { | 523 } else { |
| 524 if (!layoutObject()) | 524 if (!layoutObject()) |
| 525 return; | 525 return; |
| 526 LayoutBox* curBox = layoutObject()->enclosingBox(); | 526 LayoutBox* curBox = layoutObject()->enclosingBox(); |
| 527 // FIXME: Native scrollers should only consume the scroll they | 527 // FIXME: Native scrollers should only consume the scroll they |
| 528 // apply. See crbug.com/457765. | 528 // apply. See crbug.com/457765. |
| 529 if (deltaX && curBox->scroll(ScrollLeft, ScrollByPrecisePixel, deltaX))
{ | 529 if (deltaX && curBox->scroll(ScrollLeft, ScrollByPrecisePixel, deltaX).d
idScroll) { |
| 530 scrollState.consumeDeltaNative(scrollState.deltaX(), 0); | 530 scrollState.consumeDeltaNative(scrollState.deltaX(), 0); |
| 531 scrolled = true; | 531 scrolled = true; |
| 532 } | 532 } |
| 533 | 533 |
| 534 if (deltaY && curBox->scroll(ScrollUp, ScrollByPrecisePixel, deltaY)) { | 534 if (deltaY && curBox->scroll(ScrollUp, ScrollByPrecisePixel, deltaY).did
Scroll) { |
| 535 scrollState.consumeDeltaNative(0, scrollState.deltaY()); | 535 scrollState.consumeDeltaNative(0, scrollState.deltaY()); |
| 536 scrolled = true; | 536 scrolled = true; |
| 537 } | 537 } |
| 538 } | 538 } |
| 539 | 539 |
| 540 if (!scrolled) | 540 if (!scrolled) |
| 541 return; | 541 return; |
| 542 | 542 |
| 543 // We need to setCurrentNativeScrollingElement in both the | 543 // We need to setCurrentNativeScrollingElement in both the |
| 544 // distributeScroll and applyScroll default implementations so | 544 // distributeScroll and applyScroll default implementations so |
| (...skipping 2905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3450 { | 3450 { |
| 3451 #if ENABLE(OILPAN) | 3451 #if ENABLE(OILPAN) |
| 3452 if (hasRareData()) | 3452 if (hasRareData()) |
| 3453 visitor->trace(elementRareData()); | 3453 visitor->trace(elementRareData()); |
| 3454 visitor->trace(m_elementData); | 3454 visitor->trace(m_elementData); |
| 3455 #endif | 3455 #endif |
| 3456 ContainerNode::trace(visitor); | 3456 ContainerNode::trace(visitor); |
| 3457 } | 3457 } |
| 3458 | 3458 |
| 3459 } // namespace blink | 3459 } // namespace blink |
| OLD | NEW |