Lines Matching defs:startOffset
66 DocumentMarker marker = {type, textPiece->startOffset(exception), textPiece->endOffset(exception), description, false};
79 int startOffset = textPiece->startOffset();
81 removeMarkers(textPiece->startContainer(), startOffset, endOffset - startOffset, markerTypes, shouldRemovePartiallyOverlappingMarker);
90 ASSERT(newMarker.endOffset >= newMarker.startOffset);
91 if (newMarker.endOffset == newMarker.startOffset)
114 if (marker.startOffset > newMarker.startOffset)
116 if (marker.type == newMarker.type && marker.endOffset >= newMarker.startOffset) {
117 newMarker.startOffset = marker.startOffset;
130 if (marker.startOffset > newMarker.endOffset)
155 void DocumentMarkerController::copyMarkers(Node* srcNode, unsigned startOffset, int length, Node* dstNode, int delta)
171 unsigned endOffset = startOffset + length - 1;
177 if (marker.startOffset > endOffset)
181 if (marker.endOffset < startOffset)
186 if (marker.startOffset < startOffset)
187 marker.startOffset = startOffset;
190 marker.startOffset += delta;
201 void DocumentMarkerController::removeMarkers(Node* node, unsigned startOffset, int length, DocumentMarker::MarkerTypes markerTypes, RemovePartiallyOverlappingMarkerOrNot shouldRemovePartiallyOverlappingMarker)
218 unsigned endOffset = startOffset + length;
223 if (marker.startOffset >= endOffset)
227 if (marker.endOffset <= startOffset || !markerTypes.contains(marker.type)) {
244 if (startOffset > marker.startOffset) {
246 newLeft.endOffset = startOffset;
254 newRight.startOffset = endOffset;
339 if (node == startContainer && it->endOffset <= static_cast<unsigned>(range->startOffset()))
341 if (node == endContainer && it->startOffset >= static_cast<unsigned>(range->endOffset()))
535 void DocumentMarkerController::shiftMarkers(Node* node, unsigned startOffset, int delta)
552 if (marker.startOffset >= startOffset) {
553 ASSERT((int)marker.startOffset + delta >= 0);
554 marker.startOffset += delta;
580 int startOffset = node == startContainer ? range->startOffset(ec) : 0;
582 setMarkersActive(node, startOffset, endOffset, active);
586 void DocumentMarkerController::setMarkersActive(Node* node, unsigned startOffset, unsigned endOffset, bool active)
600 if (marker.startOffset >= endOffset)
604 if (marker.endOffset < startOffset || marker.type != DocumentMarker::TextMatch)
634 if (node == startContainer && it->endOffset <= static_cast<unsigned>(range->startOffset()))
636 if (node == endContainer && it->startOffset >= static_cast<unsigned>(range->endOffset()))
655 unsigned startOffset = node == startContainer ? range->startOffset() : 0;
666 if (marker.startOffset >= endOffset)
670 if (marker.endOffset <= startOffset || !markerTypes.contains(marker.type)) {
692 fprintf(stderr, " %d:[%d:%d](%d)", markers[markerIndex].type, markers[markerIndex].startOffset, markers[markerIndex].endOffset, markers[markerIndex].activeMatch);