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

Side by Side Diff: sky/engine/core/dom/Element.cpp

Issue 873963003: Remove more mouse-specific code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Build fixes Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/Node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. 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 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 bool Element::isFocusable() const 1243 bool Element::isFocusable() const
1244 { 1244 {
1245 return inDocument() && supportsFocus() && rendererIsFocusable(); 1245 return inDocument() && supportsFocus() && rendererIsFocusable();
1246 } 1246 }
1247 1247
1248 bool Element::isKeyboardFocusable() const 1248 bool Element::isKeyboardFocusable() const
1249 { 1249 {
1250 return isFocusable() && tabIndex() >= 0; 1250 return isFocusable() && tabIndex() >= 0;
1251 } 1251 }
1252 1252
1253 bool Element::isMouseFocusable() const
1254 {
1255 return isFocusable();
1256 }
1257
1258 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusType type) 1253 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusType type)
1259 { 1254 {
1260 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().domWindow(), 0, oldFocusedElement); 1255 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().domWindow(), 0, oldFocusedElement);
1261 EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(even t.release())); 1256 EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(even t.release()));
1262 } 1257 }
1263 1258
1264 void Element::dispatchBlurEvent(Element* newFocusedElement) 1259 void Element::dispatchBlurEvent(Element* newFocusedElement)
1265 { 1260 {
1266 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::blur, false, f alse, document().domWindow(), 0, newFocusedElement); 1261 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::blur, false, f alse, document().domWindow(), 0, newFocusedElement);
1267 EventDispatcher::dispatchEvent(this, BlurEventDispatchMediator::create(event .release())); 1262 EventDispatcher::dispatchEvent(this, BlurEventDispatchMediator::create(event .release()));
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 return false; 1757 return false;
1763 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) 1758 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue))
1764 return true; 1759 return true;
1765 // Host rules could also have effects. 1760 // Host rules could also have effects.
1766 if (ShadowRoot* shadowRoot = this->shadowRoot()) 1761 if (ShadowRoot* shadowRoot = this->shadowRoot())
1767 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); 1762 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue);
1768 return false; 1763 return false;
1769 } 1764 }
1770 1765
1771 } // namespace blink 1766 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698