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

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

Issue 2936283003: Update CSSOM SmoothScroll Web Platform Test (Closed)
Patch Set: Update the tests and idl Created 3 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
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. 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
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()) {
foolip 2017/06/16 08:20:33 This can be removed again because the argument can
471 options.setBlock("start");
472 options.setInlinePosition("nearest");
470 } 473 }
471 scrollIntoViewWithOptions(options); 474 scrollIntoViewWithOptions(options);
472 } 475 }
473 476
474 void Element::scrollIntoView(bool align_to_top) { 477 void Element::scrollIntoView(bool align_to_top) {
475 ScrollIntoViewOptionsOrBoolean arg; 478 ScrollIntoViewOptionsOrBoolean arg;
476 arg.setBoolean(align_to_top); 479 arg.setBoolean(align_to_top);
477 scrollIntoView(arg); 480 scrollIntoView(arg);
478 } 481 }
479 482
(...skipping 3955 matching lines...) Expand 10 before | Expand all | Expand 10 after
4435 } 4438 }
4436 4439
4437 DEFINE_TRACE_WRAPPERS(Element) { 4440 DEFINE_TRACE_WRAPPERS(Element) {
4438 if (HasRareData()) { 4441 if (HasRareData()) {
4439 visitor->TraceWrappers(GetElementRareData()); 4442 visitor->TraceWrappers(GetElementRareData());
4440 } 4443 }
4441 ContainerNode::TraceWrappers(visitor); 4444 ContainerNode::TraceWrappers(visitor);
4442 } 4445 }
4443 4446
4444 } // namespace blink 4447 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698