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

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

Issue 791023006: Delete invalidateTreeIfNeeded. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove unneeded call 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/Document.cpp ('k') | sky/engine/core/editing/InputMethodController.cpp » ('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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 return isFocusable() && tabIndex() >= 0; 1283 return isFocusable() && tabIndex() >= 0;
1284 } 1284 }
1285 1285
1286 bool Element::isMouseFocusable() const 1286 bool Element::isMouseFocusable() const
1287 { 1287 {
1288 return isFocusable(); 1288 return isFocusable();
1289 } 1289 }
1290 1290
1291 void Element::willCallDefaultEventHandler(const Event& event) 1291 void Element::willCallDefaultEventHandler(const Event& event)
1292 { 1292 {
1293 // FIXME(sky): wasFocusedByMouse always returns false. Remove this function.
1293 if (!wasFocusedByMouse()) 1294 if (!wasFocusedByMouse())
1294 return; 1295 return;
1295 if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown) 1296 if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown)
1296 return; 1297 return;
1297 setWasFocusedByMouse(false); 1298 setWasFocusedByMouse(false);
1298 if (renderer())
1299 renderer()->setShouldDoFullPaintInvalidation(true);
1300 } 1299 }
1301 1300
1302 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusType type) 1301 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusType type)
1303 { 1302 {
1304 if (type != FocusTypePage) 1303 if (type != FocusTypePage)
1305 setWasFocusedByMouse(type == FocusTypeMouse); 1304 setWasFocusedByMouse(type == FocusTypeMouse);
1306 1305
1307 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().domWindow(), 0, oldFocusedElement); 1306 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().domWindow(), 0, oldFocusedElement);
1308 EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(even t.release())); 1307 EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(even t.release()));
1309 } 1308 }
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 document().ensureStyleResolver(); 1860 document().ensureStyleResolver();
1862 if (treeScope().scopedStyleResolver().features().hasSelectorForId(idValue)) 1861 if (treeScope().scopedStyleResolver().features().hasSelectorForId(idValue))
1863 return true; 1862 return true;
1864 // Host rules could also have effects. 1863 // Host rules could also have effects.
1865 if (ShadowRoot* shadowRoot = this->shadowRoot()) 1864 if (ShadowRoot* shadowRoot = this->shadowRoot())
1866 return shadowRoot->scopedStyleResolver().features().hasSelectorForId(idV alue); 1865 return shadowRoot->scopedStyleResolver().features().hasSelectorForId(idV alue);
1867 return false; 1866 return false;
1868 } 1867 }
1869 1868
1870 } // namespace blink 1869 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/editing/InputMethodController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698