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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 } | 656 } |
657 | 657 |
658 return 0; | 658 return 0; |
659 } | 659 } |
660 | 660 |
661 void Element::setScrollLeft(double newLeft) | 661 void Element::setScrollLeft(double newLeft) |
662 { | 662 { |
663 document().updateLayoutIgnorePendingStylesheets(); | 663 document().updateLayoutIgnorePendingStylesheets(); |
664 | 664 |
665 if (document().documentElement() != this) { | 665 if (document().documentElement() != this) { |
666 if (RenderBox* rend = renderBox()) | 666 RenderBox* rend = renderBox(); |
| 667 if (rend && !std::isnan(newLeft)) |
667 rend->setScrollLeft(LayoutUnit::fromFloatRound(newLeft * rend->style
()->effectiveZoom())); | 668 rend->setScrollLeft(LayoutUnit::fromFloatRound(newLeft * rend->style
()->effectiveZoom())); |
668 return; | 669 return; |
669 } | 670 } |
670 | 671 |
671 if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) { | 672 if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) { |
672 if (document().inQuirksMode()) | 673 if (document().inQuirksMode()) |
673 return; | 674 return; |
674 | 675 |
675 LocalFrame* frame = document().frame(); | 676 LocalFrame* frame = document().frame(); |
676 if (!frame) | 677 if (!frame) |
(...skipping 25 matching lines...) Expand all Loading... |
702 | 703 |
703 // FIXME: Use scrollBehavior to decide whether to scroll smoothly or instant
ly. | 704 // FIXME: Use scrollBehavior to decide whether to scroll smoothly or instant
ly. |
704 setScrollLeft(position); | 705 setScrollLeft(position); |
705 } | 706 } |
706 | 707 |
707 void Element::setScrollTop(double newTop) | 708 void Element::setScrollTop(double newTop) |
708 { | 709 { |
709 document().updateLayoutIgnorePendingStylesheets(); | 710 document().updateLayoutIgnorePendingStylesheets(); |
710 | 711 |
711 if (document().documentElement() != this) { | 712 if (document().documentElement() != this) { |
712 if (RenderBox* rend = renderBox()) | 713 RenderBox* rend = renderBox(); |
| 714 if (rend && !std::isnan(newTop)) |
713 rend->setScrollTop(LayoutUnit::fromFloatRound(newTop * rend->style()
->effectiveZoom())); | 715 rend->setScrollTop(LayoutUnit::fromFloatRound(newTop * rend->style()
->effectiveZoom())); |
714 return; | 716 return; |
715 } | 717 } |
716 | 718 |
717 if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) { | 719 if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) { |
718 if (document().inQuirksMode()) | 720 if (document().inQuirksMode()) |
719 return; | 721 return; |
720 | 722 |
721 LocalFrame* frame = document().frame(); | 723 LocalFrame* frame = document().frame(); |
722 if (!frame) | 724 if (!frame) |
(...skipping 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3262 return wrapper; | 3264 return wrapper; |
3263 | 3265 |
3264 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); | 3266 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); |
3265 | 3267 |
3266 wrapper->SetPrototype(binding->prototype()); | 3268 wrapper->SetPrototype(binding->prototype()); |
3267 | 3269 |
3268 return V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType
, wrapper, isolate); | 3270 return V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType
, wrapper, isolate); |
3269 } | 3271 } |
3270 | 3272 |
3271 } // namespace blink | 3273 } // namespace blink |
OLD | NEW |