| Index: Source/core/editing/CompositeEditCommand.cpp
|
| diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp
|
| index f450f39a50e55eebb6626fb0c77c8c62a4e63225..728e5290286e92b6745310f101c9ecc69868a61e 100644
|
| --- a/Source/core/editing/CompositeEditCommand.cpp
|
| +++ b/Source/core/editing/CompositeEditCommand.cpp
|
| @@ -69,8 +69,6 @@
|
| #include "core/rendering/RenderListItem.h"
|
| #include "core/rendering/RenderText.h"
|
|
|
| -using namespace std;
|
| -
|
| namespace WebCore {
|
|
|
| using namespace HTMLNames;
|
| @@ -109,8 +107,8 @@ void EditCommandComposition::unapply()
|
| m_document->updateLayoutIgnorePendingStylesheets();
|
|
|
| {
|
| - size_t size = m_commands.size();
|
| - for (size_t i = size; i; --i)
|
| + std::size_t size = m_commands.size();
|
| + for (std::size_t i = size; i; --i)
|
| m_commands[i - 1]->doUnapply();
|
| }
|
|
|
| @@ -129,8 +127,8 @@ void EditCommandComposition::reapply()
|
| m_document->updateLayoutIgnorePendingStylesheets();
|
|
|
| {
|
| - size_t size = m_commands.size();
|
| - for (size_t i = 0; i != size; ++i)
|
| + std::size_t size = m_commands.size();
|
| + for (std::size_t i = 0; i != size; ++i)
|
| m_commands[i]->doReapply();
|
| }
|
|
|
| @@ -368,8 +366,8 @@ void CompositeEditCommand::removeChildrenInRange(PassRefPtrWillBeRawPtr<Node> no
|
| for (unsigned i = from; child && i < to; i++, child = child->nextSibling())
|
| children.append(child);
|
|
|
| - size_t size = children.size();
|
| - for (size_t i = 0; i < size; ++i)
|
| + std::size_t size = children.size();
|
| + for (std::size_t i = 0; i < size; ++i)
|
| removeNode(children[i].release());
|
| }
|
|
|
| @@ -501,9 +499,9 @@ Position CompositeEditCommand::replaceSelectedTextInNode(const String& text)
|
|
|
| static void copyMarkers(const WillBeHeapVector<DocumentMarker*>& markerPointers, Vector<DocumentMarker>& markers)
|
| {
|
| - size_t arraySize = markerPointers.size();
|
| + std::size_t arraySize = markerPointers.size();
|
| markers.reserveCapacity(arraySize);
|
| - for (size_t i = 0; i < arraySize; ++i)
|
| + for (std::size_t i = 0; i < arraySize; ++i)
|
| markers.append(*markerPointers[i]);
|
| }
|
|
|
| @@ -515,7 +513,7 @@ void CompositeEditCommand::replaceTextInNodePreservingMarkers(PassRefPtrWillBeRa
|
| copyMarkers(markerController.markersInRange(Range::create(document(), node.get(), offset, node.get(), offset + count).get(), DocumentMarker::AllMarkers()), markers);
|
| replaceTextInNode(node, offset, count, replacementText);
|
| RefPtrWillBeRawPtr<Range> newRange = Range::create(document(), node.get(), offset, node.get(), offset + replacementText.length());
|
| - for (size_t i = 0; i < markers.size(); ++i)
|
| + for (std::size_t i = 0; i < markers.size(); ++i)
|
| markerController.addMarker(newRange.get(), markers[i].type(), markers[i].description());
|
| }
|
|
|
| @@ -725,7 +723,7 @@ void CompositeEditCommand::deleteInsignificantText(PassRefPtrWillBeRawPtr<Text>
|
| return;
|
|
|
| Vector<InlineTextBox*> sortedTextBoxes;
|
| - size_t sortedTextBoxesPosition = 0;
|
| + std::size_t sortedTextBoxesPosition = 0;
|
|
|
| for (InlineTextBox* textBox = textRenderer->firstTextBox(); textBox; textBox = textBox->nextTextBox())
|
| sortedTextBoxes.append(textBox);
|
| @@ -762,7 +760,7 @@ void CompositeEditCommand::deleteInsignificantText(PassRefPtrWillBeRawPtr<Text>
|
| bool indicesIntersect = start <= gapEnd && end >= gapStart;
|
| int gapLen = gapEnd - gapStart;
|
| if (indicesIntersect && gapLen > 0) {
|
| - gapStart = max(gapStart, start);
|
| + gapStart = std::max(gapStart, start);
|
| if (str.isNull())
|
| str = textNode->data().substring(start, end - start);
|
| // remove text in the gap
|
| @@ -809,7 +807,7 @@ void CompositeEditCommand::deleteInsignificantText(const Position& start, const
|
| break;
|
| }
|
|
|
| - for (size_t i = 0; i < nodes.size(); ++i) {
|
| + for (std::size_t i = 0; i < nodes.size(); ++i) {
|
| Text* textNode = nodes[i].get();
|
| int startOffset = textNode == start.deprecatedNode() ? start.deprecatedEditingOffset() : 0;
|
| int endOffset = textNode == end.deprecatedNode() ? end.deprecatedEditingOffset() : static_cast<int>(textNode->length());
|
| @@ -1006,7 +1004,7 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(const Position& start,
|
|
|
| // Clone every node between start.deprecatedNode() and outerBlock.
|
|
|
| - for (size_t i = ancestors.size(); i != 0; --i) {
|
| + for (std::size_t i = ancestors.size(); i != 0; --i) {
|
| Node* item = ancestors[i - 1].get();
|
| RefPtrWillBeRawPtr<Node> child = item->cloneNode(isRenderedTableElement(item));
|
| appendNode(child, toElement(lastNode));
|
|
|