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

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

Issue 2532983004: Re-work <dialog>#show*() focus algorithm (Closed)
Patch Set: Created 4 years 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 void setTabIndexExplicitly(); 766 void setTabIndexExplicitly();
767 // Subclasses may override this method to affect focusability. This method 767 // Subclasses may override this method to affect focusability. This method
768 // must be called on an up-to-date ComputedStyle, so it may use existence of 768 // must be called on an up-to-date ComputedStyle, so it may use existence of
769 // layoutObject and the LayoutObject::style() to reason about focusability. 769 // layoutObject and the LayoutObject::style() to reason about focusability.
770 // However, it must not retrieve layout information like position and size. 770 // However, it must not retrieve layout information like position and size.
771 // This method cannot be moved to LayoutObject because some focusable nodes 771 // This method cannot be moved to LayoutObject because some focusable nodes
772 // don't have layoutObjects. e.g., HTMLOptionElement. 772 // don't have layoutObjects. e.g., HTMLOptionElement.
773 // TODO(tkent): Rename this to isFocusableStyle. 773 // TODO(tkent): Rename this to isFocusableStyle.
774 virtual bool layoutObjectIsFocusable() const; 774 virtual bool layoutObjectIsFocusable() const;
775 775
776 bool hasTabIndex() const { return hasElementFlag(TabIndexWasSetExplicitly); }
777
776 // classAttributeChanged() exists to share code between 778 // classAttributeChanged() exists to share code between
777 // parseAttribute (called via setAttribute()) and 779 // parseAttribute (called via setAttribute()) and
778 // svgAttributeChanged (called when element.className.baseValue is set) 780 // svgAttributeChanged (called when element.className.baseValue is set)
779 void classAttributeChanged(const AtomicString& newClassString); 781 void classAttributeChanged(const AtomicString& newClassString);
780 782
781 static bool attributeValueIsJavaScriptURL(const Attribute&); 783 static bool attributeValueIsJavaScriptURL(const Attribute&);
782 784
783 PassRefPtr<ComputedStyle> originalStyleForLayoutObject(); 785 PassRefPtr<ComputedStyle> originalStyleForLayoutObject();
784 786
785 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&); 787 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1157 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1156 static T* create(const QualifiedName&, Document&) 1158 static T* create(const QualifiedName&, Document&)
1157 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1159 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1158 T* T::create(const QualifiedName& tagName, Document& document) { \ 1160 T* T::create(const QualifiedName& tagName, Document& document) { \
1159 return new T(tagName, document); \ 1161 return new T(tagName, document); \
1160 } 1162 }
1161 1163
1162 } // namespace blink 1164 } // namespace blink
1163 1165
1164 #endif // Element_h 1166 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698