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

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: 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
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 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (!wasFocusedByMouse()) 1293 if (!wasFocusedByMouse())
1294 return; 1294 return;
1295 if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown) 1295 if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown)
1296 return; 1296 return;
1297 setWasFocusedByMouse(false); 1297 setWasFocusedByMouse(false);
1298 if (renderer())
1299 renderer()->setShouldDoFullPaintInvalidation(true);
1300 } 1298 }
1301 1299
1302 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusType type) 1300 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusType type)
1303 { 1301 {
1304 if (type != FocusTypePage) 1302 if (type != FocusTypePage)
1305 setWasFocusedByMouse(type == FocusTypeMouse); 1303 setWasFocusedByMouse(type == FocusTypeMouse);
1306 1304
1307 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().domWindow(), 0, oldFocusedElement); 1305 RefPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().domWindow(), 0, oldFocusedElement);
1308 EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(even t.release())); 1306 EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(even t.release()));
1309 } 1307 }
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 document().ensureStyleResolver(); 1859 document().ensureStyleResolver();
1862 if (treeScope().scopedStyleResolver().features().hasSelectorForId(idValue)) 1860 if (treeScope().scopedStyleResolver().features().hasSelectorForId(idValue))
1863 return true; 1861 return true;
1864 // Host rules could also have effects. 1862 // Host rules could also have effects.
1865 if (ShadowRoot* shadowRoot = this->shadowRoot()) 1863 if (ShadowRoot* shadowRoot = this->shadowRoot())
1866 return shadowRoot->scopedStyleResolver().features().hasSelectorForId(idV alue); 1864 return shadowRoot->scopedStyleResolver().features().hasSelectorForId(idV alue);
1867 return false; 1865 return false;
1868 } 1866 }
1869 1867
1870 } // namespace blink 1868 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698