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

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

Issue 24278008: [oilpan] Handlify Nodes in htmlediting (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 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 | 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 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 if (isRootEditableElement()) { 1949 if (isRootEditableElement()) {
1950 Frame* frame = document()->frame(); 1950 Frame* frame = document()->frame();
1951 if (!frame) 1951 if (!frame)
1952 return; 1952 return;
1953 1953
1954 // When focusing an editable element in an iframe, don't reset the selec tion if it already contains a selection. 1954 // When focusing an editable element in an iframe, don't reset the selec tion if it already contains a selection.
1955 if (this == frame->selection()->rootEditableElement()) 1955 if (this == frame->selection()->rootEditableElement())
1956 return; 1956 return;
1957 1957
1958 // FIXME: We should restore the previous selection if there is one. 1958 // FIXME: We should restore the previous selection if there is one.
1959 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBefore Node(this), DOWNSTREAM); 1959 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBefore Node(selfHandle()), DOWNSTREAM);
1960 1960
1961 if (frame->selection()->shouldChangeSelection(newSelection)) { 1961 if (frame->selection()->shouldChangeSelection(newSelection)) {
1962 frame->selection()->setSelection(newSelection); 1962 frame->selection()->setSelection(newSelection);
1963 frame->selection()->revealSelection(); 1963 frame->selection()->revealSelection();
1964 } 1964 }
1965 } else if (renderer() && !renderer()->isWidget()) 1965 } else if (renderer() && !renderer()->isWidget())
1966 renderer()->scrollRectToVisible(boundingBox()); 1966 renderer()->scrollRectToVisible(boundingBox());
1967 } 1967 }
1968 1968
1969 void Element::blur() 1969 void Element::blur()
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
3139 return &m_attributeVector.at(index); 3139 return &m_attributeVector.at(index);
3140 } 3140 }
3141 3141
3142 void UniqueElementData::acceptHeapVisitor(Visitor* visitor) const 3142 void UniqueElementData::acceptHeapVisitor(Visitor* visitor) const
3143 { 3143 {
3144 visitor->visit(m_presentationAttributeStyle); 3144 visitor->visit(m_presentationAttributeStyle);
3145 ElementData::acceptHeapVisitor(visitor); 3145 ElementData::acceptHeapVisitor(visitor);
3146 } 3146 }
3147 3147
3148 } // namespace WebCore 3148 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698