OLD | NEW |
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 Loading... |
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 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3267 return v8::Handle<v8::Object>(); | 3267 return v8::Handle<v8::Object>(); |
3268 | 3268 |
3269 wrapper->SetPrototype(binding->prototype()); | 3269 wrapper->SetPrototype(binding->prototype()); |
3270 | 3270 |
3271 wrapperType->refObject(toScriptWrappableBase()); | 3271 wrapperType->refObject(toScriptWrappableBase()); |
3272 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp
er, isolate); | 3272 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp
er, isolate); |
3273 return wrapper; | 3273 return wrapper; |
3274 } | 3274 } |
3275 | 3275 |
3276 } // namespace blink | 3276 } // namespace blink |
OLD | NEW |