Changeset 150697 in webkit
- Timestamp:
- May 25, 2013 7:22:04 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r150696 r150697 1 2013-05-25 Andreas Kling <akling@apple.com> 2 3 Move Node::focusDelegate() to Element. 4 <http://webkit.org/b/116768> 5 6 Reviewed by Anders Carlsson. 7 8 Only Element can be a focus delegate (it's currently only ever HTMLInputElement actually) 9 so move Node::focusDelegate() to Element. Sprinkled isElementNode() checks as needed. 10 11 * dom/Node.cpp: 12 * dom/Node.h: 13 * dom/Element.h: 14 * dom/Element.cpp: 15 * html/shadow/SliderThumbElement.cpp: 16 (WebCore::SliderThumbElement::focusDelegate): 17 * html/shadow/SliderThumbElement.h: 18 * rendering/RenderTheme.cpp: 19 (WebCore::RenderTheme::isFocused): 20 * rendering/RenderThemeMac.mm: 21 (WebCore::RenderThemeMac::paintSliderThumb): 22 1 23 2013-05-25 Alberto Garcia <agarcia@igalia.com> 2 24 -
trunk/Source/WebCore/dom/Element.cpp
r150692 r150697 245 245 } 246 246 247 Element* Element::focusDelegate() 248 { 249 return this; 250 } 251 247 252 short Element::tabIndex() const 248 253 { -
trunk/Source/WebCore/dom/Element.h
r150692 r150697 436 436 virtual bool isMouseFocusable() const; 437 437 438 virtual Element* focusDelegate(); 439 438 440 RenderStyle* computedStyle(PseudoId = NOPSEUDO); 439 441 -
trunk/Source/WebCore/dom/Node.cpp
r150692 r150697 886 886 } 887 887 888 Node* Node::focusDelegate()889 {890 return this;891 }892 893 888 unsigned Node::nodeIndex() const 894 889 { -
trunk/Source/WebCore/dom/Node.h
r150692 r150697 407 407 // Whether the node can actually be focused. 408 408 virtual bool isFocusable() const; 409 virtual Node* focusDelegate();410 409 411 410 enum UserSelectAllTreatment { -
trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp
r148545 r150697 238 238 } 239 239 240 Node* SliderThumbElement::focusDelegate()240 Element* SliderThumbElement::focusDelegate() 241 241 { 242 242 return hostInput(); -
trunk/Source/WebCore/html/shadow/SliderThumbElement.h
r149960 r150697 69 69 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; 70 70 virtual bool matchesReadWritePseudoClass() const OVERRIDE; 71 virtual Node* focusDelegate();71 virtual Element* focusDelegate() OVERRIDE; 72 72 void startDragging(); 73 73 void stopDragging(); -
trunk/Source/WebCore/rendering/RenderTheme.cpp
r150684 r150697 795 795 { 796 796 Node* node = o->node(); 797 if (!node )798 return false; 799 800 node = node->focusDelegate();801 Document* document = node->document();797 if (!node || !node->isElementNode()) 798 return false; 799 800 Element* focusDelegate = toElement(node)->focusDelegate(); 801 Document* document = focusDelegate->document(); 802 802 Frame* frame = document->frame(); 803 return node == document->focusedNode() && frame && frame->selection()->isFocusedAndActive();803 return focusDelegate == document->focusedNode() && frame && frame->selection()->isFocusedAndActive(); 804 804 } 805 805 -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r149255 r150697 1763 1763 updateActiveState(sliderThumbCell, o); 1764 1764 updateEnabledState(sliderThumbCell, o); 1765 updateFocusedState(sliderThumbCell, (o->node() && o->node()->focusDelegate()->renderer()) ? o->node()->focusDelegate()->renderer() : o); 1765 Element* focusDelegate = (o->node() && o->node()->isElementNode()) ? toElement(o->node())->focusDelegate() : 0; 1766 updateFocusedState(sliderThumbCell, focusDelegate ? focusDelegate->renderer() : 0); 1766 1767 1767 1768 // Update the pressed state using the NSCell tracking methods, since that's how NSSliderCell keeps track of it.
Note: See TracChangeset
for help on using the changeset viewer.