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

Unified Diff: Source/core/editing/FrameSelection.cpp

Issue 420103002: Use tighter typing in editing: FormatBlockCommand / FrameSelection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Keep body change out Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/FrameSelection.h ('k') | Source/core/editing/InputMethodController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index 55db7b776bc49c8f96fb84cccf87fef731630808..2bdb784a54b5310dd898186f71a4e8263a04b8fa 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -121,7 +121,7 @@ Element* FrameSelection::rootEditableElementOrDocumentElement() const
return selectionRoot ? selectionRoot : m_frame->document()->documentElement();
}
-Node* FrameSelection::rootEditableElementOrTreeScopeRootNode() const
+ContainerNode* FrameSelection::rootEditableElementOrTreeScopeRootNode() const
{
Element* selectionRoot = m_selection.rootEditableElement();
if (selectionRoot)
@@ -1346,7 +1346,7 @@ void FrameSelection::selectFrameElementInParentIfFullySelected()
// Get to the <iframe> or <frame> (or even <object>) element in the parent frame.
// FIXME: Doesn't work for OOPI.
- Element* ownerElement = m_frame->deprecatedLocalOwner();
+ HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
if (!ownerElement)
return;
ContainerNode* ownerElementParent = ownerElement->parentNode();
@@ -1624,7 +1624,7 @@ bool FrameSelection::shouldBlinkCaret() const
if (m_frame->settings() && m_frame->settings()->caretBrowsingEnabled())
return false;
- Node* root = rootEditableElement();
+ Element* root = rootEditableElement();
if (!root)
return false;
@@ -1813,10 +1813,10 @@ void FrameSelection::setSelectionFromNone()
if (!isNone() || !(document->hasEditableStyle() || caretBrowsing))
return;
- Node* node = document->documentElement();
- if (!node)
+ Element* documentElement = document->documentElement();
+ if (!documentElement)
return;
- Node* body = isHTMLBodyElement(*node) ? node : Traversal<HTMLBodyElement>::next(*node);
+ HTMLBodyElement* body = isHTMLBodyElement(*documentElement) ? toHTMLBodyElement(documentElement) : Traversal<HTMLBodyElement>::next(*documentElement);
if (body)
setSelection(VisibleSelection(firstPositionInOrBeforeNode(body), DOWNSTREAM));
}
« no previous file with comments | « Source/core/editing/FrameSelection.h ('k') | Source/core/editing/InputMethodController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698