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

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

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 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 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 // animations) is difficult, for now we match IE's heuristic and bring 2049 // animations) is difficult, for now we match IE's heuristic and bring
2050 // up the keyboard if there's been any gesture since load. 2050 // up the keyboard if there's been any gesture since load.
2051 document().page()->chrome().client().showImeIfNeeded(); 2051 document().page()->chrome().client().showImeIfNeeded();
2052 } 2052 }
2053 } 2053 }
2054 2054
2055 void Element::updateFocusAppearance(bool /*restorePreviousSelection*/) 2055 void Element::updateFocusAppearance(bool /*restorePreviousSelection*/)
2056 { 2056 {
2057 if (isRootEditableElement()) { 2057 if (isRootEditableElement()) {
2058 // Taking the ownership since setSelection() may release the last refere nce to |frame|. 2058 // Taking the ownership since setSelection() may release the last refere nce to |frame|.
2059 RefPtr<LocalFrame> frame(document().frame()); 2059 RefPtrWillBeRawPtr<LocalFrame> frame(document().frame());
2060 if (!frame) 2060 if (!frame)
2061 return; 2061 return;
2062 2062
2063 // When focusing an editable element in an iframe, don't reset the selec tion if it already contains a selection. 2063 // When focusing an editable element in an iframe, don't reset the selec tion if it already contains a selection.
2064 if (this == frame->selection().rootEditableElement()) 2064 if (this == frame->selection().rootEditableElement())
2065 return; 2065 return;
2066 2066
2067 // FIXME: We should restore the previous selection if there is one. 2067 // FIXME: We should restore the previous selection if there is one.
2068 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBefore Node(this), DOWNSTREAM); 2068 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBefore Node(this), DOWNSTREAM);
2069 // Passing DoNotSetFocus as this function is called after FocusControlle r::setFocusedElement() 2069 // Passing DoNotSetFocus as this function is called after FocusControlle r::setFocusedElement()
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
3254 return v8::Handle<v8::Object>(); 3254 return v8::Handle<v8::Object>();
3255 3255
3256 wrapper->SetPrototype(binding->prototype()); 3256 wrapper->SetPrototype(binding->prototype());
3257 3257
3258 wrapperType->refObject(toScriptWrappableBase()); 3258 wrapperType->refObject(toScriptWrappableBase());
3259 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp er, isolate); 3259 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp er, isolate);
3260 return wrapper; 3260 return wrapper;
3261 } 3261 }
3262 3262
3263 } // namespace blink 3263 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698