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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 options.setBlock("start"); | 460 options.setBlock("start"); |
461 else | 461 else |
462 options.setBlock("end"); | 462 options.setBlock("end"); |
463 options.setInlinePosition("nearest"); | 463 options.setInlinePosition("nearest"); |
464 } else if (arg.isScrollIntoViewOptions()) { | 464 } else if (arg.isScrollIntoViewOptions()) { |
465 options = arg.getAsScrollIntoViewOptions(); | 465 options = arg.getAsScrollIntoViewOptions(); |
466 if (!RuntimeEnabledFeatures::CSSOMSmoothScrollEnabled() && | 466 if (!RuntimeEnabledFeatures::CSSOMSmoothScrollEnabled() && |
467 options.behavior() == "smooth") { | 467 options.behavior() == "smooth") { |
468 options.setBehavior("instant"); | 468 options.setBehavior("instant"); |
469 } | 469 } |
470 } else if (arg.isNull()) { | |
471 options.setBlock("start"); | |
472 options.setInlinePosition("nearest"); | |
473 } | 470 } |
474 scrollIntoViewWithOptions(options); | 471 scrollIntoViewWithOptions(options); |
475 } | 472 } |
476 | 473 |
477 void Element::scrollIntoView(bool align_to_top) { | 474 void Element::scrollIntoView(bool align_to_top) { |
478 ScrollIntoViewOptionsOrBoolean arg; | 475 ScrollIntoViewOptionsOrBoolean arg; |
479 arg.setBoolean(align_to_top); | 476 arg.setBoolean(align_to_top); |
480 scrollIntoView(arg); | 477 scrollIntoView(arg); |
481 } | 478 } |
482 | 479 |
(...skipping 3962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4445 } | 4442 } |
4446 | 4443 |
4447 DEFINE_TRACE_WRAPPERS(Element) { | 4444 DEFINE_TRACE_WRAPPERS(Element) { |
4448 if (HasRareData()) { | 4445 if (HasRareData()) { |
4449 visitor->TraceWrappers(GetElementRareData()); | 4446 visitor->TraceWrappers(GetElementRareData()); |
4450 } | 4447 } |
4451 ContainerNode::TraceWrappers(visitor); | 4448 ContainerNode::TraceWrappers(visitor); |
4452 } | 4449 } |
4453 | 4450 |
4454 } // namespace blink | 4451 } // namespace blink |
OLD | NEW |