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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 625073002: Merge RenderWidget into single subclass, RenderPart (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: s/widget/part wherever it made sense Created 6 years, 2 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 | Annotate | Revision Log
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 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after
2069 // When focusing an editable element in an iframe, don't reset the selec tion if it already contains a selection. 2069 // When focusing an editable element in an iframe, don't reset the selec tion if it already contains a selection.
2070 if (this == frame->selection().rootEditableElement()) 2070 if (this == frame->selection().rootEditableElement())
2071 return; 2071 return;
2072 2072
2073 // FIXME: We should restore the previous selection if there is one. 2073 // FIXME: We should restore the previous selection if there is one.
2074 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBefore Node(this), DOWNSTREAM); 2074 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBefore Node(this), DOWNSTREAM);
2075 // Passing DoNotSetFocus as this function is called after FocusControlle r::setFocusedElement() 2075 // Passing DoNotSetFocus as this function is called after FocusControlle r::setFocusedElement()
2076 // and we don't want to change the focus to a new Element. 2076 // and we don't want to change the focus to a new Element.
2077 frame->selection().setSelection(newSelection, FrameSelection::CloseTypi ng | FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus); 2077 frame->selection().setSelection(newSelection, FrameSelection::CloseTypi ng | FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus);
2078 frame->selection().revealSelection(); 2078 frame->selection().revealSelection();
2079 } else if (renderer() && !renderer()->isWidget()) 2079 } else if (renderer() && !renderer()->isRenderPart())
2080 renderer()->scrollRectToVisible(boundingBox()); 2080 renderer()->scrollRectToVisible(boundingBox());
2081 } 2081 }
2082 2082
2083 void Element::blur() 2083 void Element::blur()
2084 { 2084 {
2085 cancelFocusAppearanceUpdate(); 2085 cancelFocusAppearanceUpdate();
2086 if (treeScope().adjustedFocusedElement() == this) { 2086 if (treeScope().adjustedFocusedElement() == this) {
2087 Document& doc = document(); 2087 Document& doc = document();
2088 if (doc.page()) 2088 if (doc.page())
2089 doc.page()->focusController().setFocusedElement(0, doc.frame()); 2089 doc.page()->focusController().setFocusedElement(0, doc.frame());
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
3264 return wrapper; 3264 return wrapper;
3265 3265
3266 CustomElementBinding* binding = perContextData->customElementBinding(customE lementDefinition()); 3266 CustomElementBinding* binding = perContextData->customElementBinding(customE lementDefinition());
3267 3267
3268 wrapper->SetPrototype(binding->prototype()); 3268 wrapper->SetPrototype(binding->prototype());
3269 3269
3270 return V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType , wrapper, isolate); 3270 return V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType , wrapper, isolate);
3271 } 3271 }
3272 3272
3273 } // namespace blink 3273 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698