| Index: Source/core/editing/htmlediting.cpp
|
| diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
|
| index 6397edcfd56e5dd402ef6a8b6c3951dbbec9bf4e..ee9eb74b16607fb50b00e10fe267327558b69752 100644
|
| --- a/Source/core/editing/htmlediting.cpp
|
| +++ b/Source/core/editing/htmlediting.cpp
|
| @@ -529,9 +529,9 @@ VisiblePosition visiblePositionAfterNode(Node* node)
|
| // Create a range object with two visible positions, start and end.
|
| // create(Document*, const Position&, const Position&); will use deprecatedEditingOffset
|
| // Use this function instead of create a regular range object (avoiding editing offset).
|
| -PassRefPtr<Range> createRange(Document* document, const VisiblePosition& start, const VisiblePosition& end, ExceptionState& es)
|
| +PassRefPtr<Range> createRange(Document& document, const VisiblePosition& start, const VisiblePosition& end, ExceptionState& es)
|
| {
|
| - RefPtr<Range> selectedRange = Range::create(document);
|
| + RefPtr<Range> selectedRange = Range::create(&document);
|
| selectedRange->setStart(start.deepEquivalent().containerNode(), start.deepEquivalent().computeOffsetInContainerNode(), es);
|
| if (!es.hadException())
|
| selectedRange->setEnd(end.deepEquivalent().containerNode(), end.deepEquivalent().computeOffsetInContainerNode(), es);
|
| @@ -816,45 +816,45 @@ bool isEmptyTableCell(const Node* node)
|
| return !childRenderer->nextSibling();
|
| }
|
|
|
| -PassRefPtr<HTMLElement> createDefaultParagraphElement(Document* document)
|
| +PassRefPtr<HTMLElement> createDefaultParagraphElement(Document& document)
|
| {
|
| - switch (document->frame()->editor().defaultParagraphSeparator()) {
|
| + switch (document.frame()->editor().defaultParagraphSeparator()) {
|
| case EditorParagraphSeparatorIsDiv:
|
| - return HTMLDivElement::create(document);
|
| + return HTMLDivElement::create(&document);
|
| case EditorParagraphSeparatorIsP:
|
| - return HTMLParagraphElement::create(document);
|
| + return HTMLParagraphElement::create(&document);
|
| }
|
|
|
| ASSERT_NOT_REACHED();
|
| return 0;
|
| }
|
|
|
| -PassRefPtr<HTMLElement> createBreakElement(Document* document)
|
| +PassRefPtr<HTMLElement> createBreakElement(Document& document)
|
| {
|
| - return HTMLBRElement::create(document);
|
| + return HTMLBRElement::create(&document);
|
| }
|
|
|
| -PassRefPtr<HTMLElement> createOrderedListElement(Document* document)
|
| +PassRefPtr<HTMLElement> createOrderedListElement(Document& document)
|
| {
|
| - return HTMLOListElement::create(document);
|
| + return HTMLOListElement::create(&document);
|
| }
|
|
|
| -PassRefPtr<HTMLElement> createUnorderedListElement(Document* document)
|
| +PassRefPtr<HTMLElement> createUnorderedListElement(Document& document)
|
| {
|
| - return HTMLUListElement::create(document);
|
| + return HTMLUListElement::create(&document);
|
| }
|
|
|
| -PassRefPtr<HTMLElement> createListItemElement(Document* document)
|
| +PassRefPtr<HTMLElement> createListItemElement(Document& document)
|
| {
|
| - return HTMLLIElement::create(document);
|
| + return HTMLLIElement::create(&document);
|
| }
|
|
|
| -PassRefPtr<HTMLElement> createHTMLElement(Document* document, const QualifiedName& name)
|
| +PassRefPtr<HTMLElement> createHTMLElement(Document& document, const QualifiedName& name)
|
| {
|
| - return HTMLElementFactory::createHTMLElement(name, document, 0, false);
|
| + return HTMLElementFactory::createHTMLElement(name, &document, 0, false);
|
| }
|
|
|
| -PassRefPtr<HTMLElement> createHTMLElement(Document* document, const AtomicString& tagName)
|
| +PassRefPtr<HTMLElement> createHTMLElement(Document& document, const AtomicString& tagName)
|
| {
|
| return createHTMLElement(document, QualifiedName(nullAtom, tagName, xhtmlNamespaceURI));
|
| }
|
| @@ -888,30 +888,30 @@ Position positionOutsideTabSpan(const Position& pos)
|
| return positionInParentBeforeNode(node);
|
| }
|
|
|
| -PassRefPtr<Element> createTabSpanElement(Document* document, PassRefPtr<Node> prpTabTextNode)
|
| +PassRefPtr<Element> createTabSpanElement(Document& document, PassRefPtr<Node> prpTabTextNode)
|
| {
|
| RefPtr<Node> tabTextNode = prpTabTextNode;
|
|
|
| // Make the span to hold the tab.
|
| - RefPtr<Element> spanElement = document->createElement(spanTag, false);
|
| + RefPtr<Element> spanElement = document.createElement(spanTag, false);
|
| spanElement->setAttribute(classAttr, AppleTabSpanClass);
|
| spanElement->setAttribute(styleAttr, "white-space:pre");
|
|
|
| // Add tab text to that span.
|
| if (!tabTextNode)
|
| - tabTextNode = document->createEditingTextNode("\t");
|
| + tabTextNode = document.createEditingTextNode("\t");
|
|
|
| spanElement->appendChild(tabTextNode.release());
|
|
|
| return spanElement.release();
|
| }
|
|
|
| -PassRefPtr<Element> createTabSpanElement(Document* document, const String& tabText)
|
| +PassRefPtr<Element> createTabSpanElement(Document& document, const String& tabText)
|
| {
|
| - return createTabSpanElement(document, document->createTextNode(tabText));
|
| + return createTabSpanElement(document, document.createTextNode(tabText));
|
| }
|
|
|
| -PassRefPtr<Element> createTabSpanElement(Document* document)
|
| +PassRefPtr<Element> createTabSpanElement(Document& document)
|
| {
|
| return createTabSpanElement(document, PassRefPtr<Node>());
|
| }
|
|
|