Example #1
0
static PassRefPtr<Range> expandToParagraphBoundary(PassRefPtr<Range> range)
{
    RefPtr<Range> paragraphRange = range->cloneRange(IGNORE_EXCEPTION);
    setStart(paragraphRange.get(), startOfParagraph(range->startPosition()));
    setEnd(paragraphRange.get(), endOfParagraph(range->endPosition()));
    return paragraphRange;
}
Example #2
0
static Ref<Range> expandToParagraphBoundary(PassRefPtr<Range> range)
{
    Ref<Range> paragraphRange = range->cloneRange();
    setStart(paragraphRange.ptr(), startOfParagraph(range->startPosition()));
    setEnd(paragraphRange.ptr(), endOfParagraph(range->endPosition()));
    return paragraphRange;
}
Example #3
0
static PassRefPtr<Range> expandToParagraphBoundary(PassRefPtr<Range> range)
{
    ExceptionCode ec = 0;
    RefPtr<Range> paragraphRange = range->cloneRange(ec);
    setStart(paragraphRange.get(), startOfParagraph(range->startPosition()));
    setEnd(paragraphRange.get(), endOfParagraph(range->endPosition()));
    return paragraphRange;
}