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

Side by Side Diff: Source/core/editing/EditingTestBase.cpp

Issue 1203613003: Make inSameLine() in VisibleUnits.cpp to work with positions in composed tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-24T17:52:54 Get rid of redundant explict in RenderedPosition Created 5 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/editing/EditingTestBase.h ('k') | Source/core/editing/PositionWithAffinity.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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/editing/EditingTestBase.h" 6 #include "core/editing/EditingTestBase.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/Range.h" 9 #include "core/dom/Range.h"
10 #include "core/dom/Text.h" 10 #include "core/dom/Text.h"
11 #include "core/frame/FrameView.h"
11 #include "core/html/HTMLElement.h" 12 #include "core/html/HTMLElement.h"
12 #include "core/testing/DummyPageHolder.h" 13 #include "core/testing/DummyPageHolder.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 EditingTestBase::EditingTestBase() 17 EditingTestBase::EditingTestBase()
17 { 18 {
18 } 19 }
19 20
20 EditingTestBase::~EditingTestBase() 21 EditingTestBase::~EditingTestBase()
(...skipping 20 matching lines...) Expand all
41 void EditingTestBase::setBodyContent(const char* bodyContent) 42 void EditingTestBase::setBodyContent(const char* bodyContent)
42 { 43 {
43 document().body()->setInnerHTML(String::fromUTF8(bodyContent), ASSERT_NO_EXC EPTION); 44 document().body()->setInnerHTML(String::fromUTF8(bodyContent), ASSERT_NO_EXC EPTION);
44 } 45 }
45 46
46 PassRefPtrWillBeRawPtr<ShadowRoot> EditingTestBase::setShadowContent(const char* shadowContent) 47 PassRefPtrWillBeRawPtr<ShadowRoot> EditingTestBase::setShadowContent(const char* shadowContent)
47 { 48 {
48 return createShadowRootForElementWithIDAndSetInnerHTML(document(), "host", s hadowContent); 49 return createShadowRootForElementWithIDAndSetInnerHTML(document(), "host", s hadowContent);
49 } 50 }
50 51
52 void EditingTestBase::updateLayoutAndStyleForPainting()
53 {
54 document().view()->updateLayoutAndStyleForPainting();
55 }
56
51 Position EditingTestBase::positionInDOMTree(Node& anchor, int offset) 57 Position EditingTestBase::positionInDOMTree(Node& anchor, int offset)
52 { 58 {
53 return Position(&anchor, offset, Position::PositionIsOffsetInAnchor); 59 return Position(&anchor, offset, Position::PositionIsOffsetInAnchor);
54 } 60 }
55 61
56 PositionInComposedTree EditingTestBase::positionInComposedTree(Node& anchor, int offset) 62 PositionInComposedTree EditingTestBase::positionInComposedTree(Node& anchor, int offset)
57 { 63 {
58 return PositionInComposedTree(&anchor, offset, PositionInComposedTree::Posit ionIsOffsetInAnchor); 64 return PositionInComposedTree(&anchor, offset, PositionInComposedTree::Posit ionIsOffsetInAnchor);
59 } 65 }
60 66
61 } // namespace blink 67 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/EditingTestBase.h ('k') | Source/core/editing/PositionWithAffinity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698