| 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. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 9 * (C) 2007 Eric Seidel (eric@webkit.org) | 9 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 10 * | 10 * |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 ? kScrollBehaviorSmooth | 521 ? kScrollBehaviorSmooth |
| 522 : kScrollBehaviorAuto; | 522 : kScrollBehaviorAuto; |
| 523 | 523 |
| 524 bool is_horizontal_writing_mode = | 524 bool is_horizontal_writing_mode = |
| 525 GetComputedStyle()->IsHorizontalWritingMode(); | 525 GetComputedStyle()->IsHorizontalWritingMode(); |
| 526 ScrollAlignment align_x = ToPhysicalAlignment(options, kHorizontalScroll, | 526 ScrollAlignment align_x = ToPhysicalAlignment(options, kHorizontalScroll, |
| 527 is_horizontal_writing_mode); | 527 is_horizontal_writing_mode); |
| 528 ScrollAlignment align_y = | 528 ScrollAlignment align_y = |
| 529 ToPhysicalAlignment(options, kVerticalScroll, is_horizontal_writing_mode); | 529 ToPhysicalAlignment(options, kVerticalScroll, is_horizontal_writing_mode); |
| 530 | 530 |
| 531 GetDocument().GetPage()->GetSmoothScrollSequencer()->AbortAnimations(); |
| 531 LayoutRect bounds = BoundingBox(); | 532 LayoutRect bounds = BoundingBox(); |
| 532 GetLayoutObject()->ScrollRectToVisible( | 533 GetLayoutObject()->ScrollRectToVisible( |
| 533 bounds, align_x, align_y, kProgrammaticScroll, | 534 bounds, align_x, align_y, kProgrammaticScroll, |
| 534 make_visible_in_visual_viewport, behavior); | 535 make_visible_in_visual_viewport, behavior); |
| 535 | 536 |
| 537 if (behavior == kScrollBehaviorSmooth) |
| 538 GetDocument().GetPage()->GetSmoothScrollSequencer()->RunQueuedAnimations(); |
| 539 |
| 536 GetDocument().SetSequentialFocusNavigationStartingPoint(this); | 540 GetDocument().SetSequentialFocusNavigationStartingPoint(this); |
| 537 } | 541 } |
| 538 | 542 |
| 539 void Element::scrollIntoViewIfNeeded(bool center_if_needed) { | 543 void Element::scrollIntoViewIfNeeded(bool center_if_needed) { |
| 540 GetDocument().EnsurePaintLocationDataValidForNode(this); | 544 GetDocument().EnsurePaintLocationDataValidForNode(this); |
| 541 | 545 |
| 542 if (!GetLayoutObject()) | 546 if (!GetLayoutObject()) |
| 543 return; | 547 return; |
| 544 | 548 |
| 545 bool make_visible_in_visual_viewport = | 549 bool make_visible_in_visual_viewport = |
| (...skipping 3885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4431 } | 4435 } |
| 4432 | 4436 |
| 4433 DEFINE_TRACE_WRAPPERS(Element) { | 4437 DEFINE_TRACE_WRAPPERS(Element) { |
| 4434 if (HasRareData()) { | 4438 if (HasRareData()) { |
| 4435 visitor->TraceWrappers(GetElementRareData()); | 4439 visitor->TraceWrappers(GetElementRareData()); |
| 4436 } | 4440 } |
| 4437 ContainerNode::TraceWrappers(visitor); | 4441 ContainerNode::TraceWrappers(visitor); |
| 4438 } | 4442 } |
| 4439 | 4443 |
| 4440 } // namespace blink | 4444 } // namespace blink |
| OLD | NEW |