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

Side by Side Diff: third_party/WebKit/Source/web/WebSurroundingText.cpp

Issue 1865813002: Remove RawPtr from Source/web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google 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 29 matching lines...) Expand all
40 { 40 {
41 const Node* node = webNode.constUnwrap<Node>(); 41 const Node* node = webNode.constUnwrap<Node>();
42 if (!node || !node->layoutObject()) 42 if (!node || !node->layoutObject())
43 return; 43 return;
44 44
45 m_private.reset(new SurroundingText(createVisiblePosition(node->layoutObject ()->positionForPoint(static_cast<IntPoint>(nodePoint))).deepEquivalent().parentA nchoredEquivalent(), maxLength)); 45 m_private.reset(new SurroundingText(createVisiblePosition(node->layoutObject ()->positionForPoint(static_cast<IntPoint>(nodePoint))).deepEquivalent().parentA nchoredEquivalent(), maxLength));
46 } 46 }
47 47
48 void WebSurroundingText::initialize(const WebRange& webRange, size_t maxLength) 48 void WebSurroundingText::initialize(const WebRange& webRange, size_t maxLength)
49 { 49 {
50 if (RawPtr<Range> range = static_cast<RawPtr<Range>>(webRange)) 50 if (Range* range = static_cast<Range*>(webRange))
51 m_private.reset(new SurroundingText(*range, maxLength)); 51 m_private.reset(new SurroundingText(*range, maxLength));
52 } 52 }
53 53
54 WebString WebSurroundingText::textContent() const 54 WebString WebSurroundingText::textContent() const
55 { 55 {
56 return m_private->content(); 56 return m_private->content();
57 } 57 }
58 58
59 size_t WebSurroundingText::hitOffsetInTextContent() const 59 size_t WebSurroundingText::hitOffsetInTextContent() const
60 { 60 {
(...skipping 20 matching lines...) Expand all
81 { 81 {
82 return !m_private.get(); 82 return !m_private.get();
83 } 83 }
84 84
85 void WebSurroundingText::reset() 85 void WebSurroundingText::reset()
86 { 86 {
87 m_private.reset(0); 87 m_private.reset(0);
88 } 88 }
89 89
90 } // namespace blink 90 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('k') | third_party/WebKit/Source/web/WebTextCheckingCompletionImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698