Home | History | Annotate | Download | only in dom

Lines Matching refs:Text

23 #include "core/dom/Text.h"
40 #include "wtf/text/CString.h"
41 #include "wtf/text/StringBuilder.h"
45 PassRefPtrWillBeRawPtr<Text> Text::create(Document& document, const String& data)
47 return adoptRefWillBeNoop(new Text(document, data, CreateText));
50 PassRefPtrWillBeRawPtr<Text> Text::createEditingText(Document& document, const String& data)
52 return adoptRefWillBeNoop(new Text(document, data, CreateEditingText));
55 PassRefPtrWillBeRawPtr<Node> Text::mergeNextSiblingNodesIfPossible()
59 // Remove empty text nodes.
67 // Merge text nodes.
72 RefPtrWillBeRawPtr<Text> nextText = toText(nextSibling);
74 // Remove empty text nodes.
80 // Both non-empty text nodes. Merge them.
105 PassRefPtrWillBeRawPtr<Text> Text::splitText(unsigned offset, ExceptionState& exceptionState)
110 exceptionState.throwDOMException(IndexSizeError, "The offset " + String::number(offset) + " is larger than the Text node's length.");
116 RefPtrWillBeRawPtr<Text> newText = cloneWithData(oldStr.substring(offset));
135 static const Text* earliestLogicallyAdjacentTextNode(const Text* t)
150 static const Text* latestLogicallyAdjacentTextNode(const Text* t)
165 String Text::wholeText() const
167 const Text* startText = earliestLogicallyAdjacentTextNode(this);
168 const Text* endText = latestLogicallyAdjacentTextNode(this);
192 PassRefPtrWillBeRawPtr<Text> Text::replaceWholeText(const String& newText)
194 // Remove all adjacent text nodes, and replace the contents of this one.
197 RefPtrWillBeRawPtr<Text> startText = const_cast<Text*>(earliestLogicallyAdjacentTextNode(this));
198 RefPtrWillBeRawPtr<Text> endText = const_cast<Text*>(latestLogicallyAdjacentTextNode(this));
200 RefPtrWillBeRawPtr<Text> protectedThis(this); // Mutation event handlers could cause our last ref to go away
227 String Text::nodeName() const
229 return "#text";
232 Node::NodeType Text::nodeType() const
237 PassRefPtrWillBeRawPtr<Node> Text::cloneNode(bool /*deep*/)
242 bool Text::textRendererIsNeeded(const RenderStyle& style, const RenderObject& parent)
274 // Avoiding creation of a Renderer for the text node is a non-essential memory optimization.
283 // make a render object for this text.
289 static bool isSVGText(Text* text)
291 Node* parentOrShadowHostNode = text->parentOrShadowHostNode();
296 RenderText* Text::createTextRenderer(RenderStyle* style)
307 void Text::attach(const AttachContext& context)
313 void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling)
329 bool Text::needsWhitespaceRenderer()
337 void Text::updateTextRenderer(unsigned offsetOfReplacedData, unsigned lengthOfReplacedData, RecalcStyleBehavior recalcStyleBehavior)
352 PassRefPtrWillBeRawPtr<Text> Text::cloneWithData(const String& data)
358 void Text::formatForDebugger(char *buffer, unsigned length) const