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

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

Issue 319083004: Oilpan: add Element/Node Member fields to stack allocated objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/core/dom/PositionIterator.h ('k') | Source/core/dom/RenderTreeBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 void PositionIterator::decrement() 73 void PositionIterator::decrement()
74 { 74 {
75 if (!m_anchorNode) 75 if (!m_anchorNode)
76 return; 76 return;
77 77
78 if (m_nodeAfterPositionInAnchor) { 78 if (m_nodeAfterPositionInAnchor) {
79 m_anchorNode = m_nodeAfterPositionInAnchor->previousSibling(); 79 m_anchorNode = m_nodeAfterPositionInAnchor->previousSibling();
80 if (m_anchorNode) { 80 if (m_anchorNode) {
81 m_nodeAfterPositionInAnchor = 0; 81 m_nodeAfterPositionInAnchor = nullptr;
82 m_offsetInAnchor = m_anchorNode->hasChildren() ? 0 : lastOffsetForEd iting(m_anchorNode); 82 m_offsetInAnchor = m_anchorNode->hasChildren() ? 0 : lastOffsetForEd iting(m_anchorNode);
83 } else { 83 } else {
84 m_nodeAfterPositionInAnchor = m_nodeAfterPositionInAnchor->parentNod e(); 84 m_nodeAfterPositionInAnchor = m_nodeAfterPositionInAnchor->parentNod e();
85 m_anchorNode = m_nodeAfterPositionInAnchor->parentNode(); 85 m_anchorNode = m_nodeAfterPositionInAnchor->parentNode();
86 m_offsetInAnchor = 0; 86 m_offsetInAnchor = 0;
87 } 87 }
88 return; 88 return;
89 } 89 }
90 90
91 if (m_anchorNode->hasChildren()) { 91 if (m_anchorNode->hasChildren()) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer )) 173 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer ))
174 return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anch orNode); 174 return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anch orNode);
175 return m_anchorNode->rendererIsEditable() && !Position::nodeIsUserSe lectNone(m_anchorNode) && Position(*this).atEditingBoundary(); 175 return m_anchorNode->rendererIsEditable() && !Position::nodeIsUserSe lectNone(m_anchorNode) && Position(*this).atEditingBoundary();
176 } 176 }
177 } 177 }
178 178
179 return false; 179 return false;
180 } 180 }
181 181
182 } // namespace WebCore 182 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/PositionIterator.h ('k') | Source/core/dom/RenderTreeBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698