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

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

Issue 1840113005: Move viewport actions into an ApplyScroll callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase over my own changes Created 4 years, 8 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 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 virtual const AtomicString imageSourceURL() const; 397 virtual const AtomicString imageSourceURL() const;
398 virtual Image* imageContents() { return nullptr; } 398 virtual Image* imageContents() { return nullptr; }
399 399
400 virtual void focus(const FocusParams& = FocusParams()); 400 virtual void focus(const FocusParams& = FocusParams());
401 virtual void updateFocusAppearance(SelectionBehaviorOnFocus); 401 virtual void updateFocusAppearance(SelectionBehaviorOnFocus);
402 virtual void blur(); 402 virtual void blur();
403 403
404 void setDistributeScroll(ScrollStateCallback*, String nativeScrollBehavior); 404 void setDistributeScroll(ScrollStateCallback*, String nativeScrollBehavior);
405 void nativeDistributeScroll(ScrollState&); 405 void nativeDistributeScroll(ScrollState&);
406 void setApplyScroll(ScrollStateCallback*, String nativeScrollBehavior); 406 void setApplyScroll(ScrollStateCallback*, String nativeScrollBehavior);
407 void removeApplyScroll();
407 void nativeApplyScroll(ScrollState&); 408 void nativeApplyScroll(ScrollState&);
408 409
409 void callDistributeScroll(ScrollState&); 410 void callDistributeScroll(ScrollState&);
410 void callApplyScroll(ScrollState&); 411 void callApplyScroll(ScrollState&);
411 412
413 ScrollStateCallback* getApplyScroll();
414
412 // Whether this element can receive focus at all. Most elements are not 415 // Whether this element can receive focus at all. Most elements are not
413 // focusable but some elements, such as form controls and links, are. Unlike 416 // focusable but some elements, such as form controls and links, are. Unlike
414 // layoutObjectIsFocusable(), this method may be called when layout is not u p to 417 // layoutObjectIsFocusable(), this method may be called when layout is not u p to
415 // date, so it must not use the layoutObject to determine focusability. 418 // date, so it must not use the layoutObject to determine focusability.
416 virtual bool supportsFocus() const; 419 virtual bool supportsFocus() const;
417 // isFocusable(), isKeyboardFocusable(), and isMouseFocusable() check 420 // isFocusable(), isKeyboardFocusable(), and isMouseFocusable() check
418 // whether the element can actually be focused. Callers should ensure 421 // whether the element can actually be focused. Callers should ensure
419 // ComputedStyle is up to date; 422 // ComputedStyle is up to date;
420 // e.g. by calling Document::updateLayoutTreeIgnorePendingStylesheets(). 423 // e.g. by calling Document::updateLayoutTreeIgnorePendingStylesheets().
421 bool isFocusable() const; 424 bool isFocusable() const;
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 static T* create(const QualifiedName&, Document&) 961 static T* create(const QualifiedName&, Document&)
959 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 962 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
960 T* T::create(const QualifiedName& tagName, Document& document) \ 963 T* T::create(const QualifiedName& tagName, Document& document) \
961 { \ 964 { \
962 return new T(tagName, document); \ 965 return new T(tagName, document); \
963 } 966 }
964 967
965 } // namespace blink 968 } // namespace blink
966 969
967 #endif // Element_h 970 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698