void TextInputController::markedRange(const CppArgumentList&, CppVariant* result) { result->setNull(); WebFrame* mainFrame = getMainFrame(); if (!mainFrame) return; WebRange range = mainFrame->markedRange(); result->set(StringPrintf("%d,%d", range.startOffset(), range.endOffset())); }
void TextInputController::markedRange(const CppArgumentList&, CppVariant* result) { result->setNull(); WebFrame* mainFrame = getMainFrame(); if (!mainFrame) return; WebRange range = mainFrame->markedRange(); Vector<int> intArray(2); intArray[0] = range.startOffset(); intArray[1] = range.endOffset(); result->set(WebBindings::makeIntArray(intArray)); }
void TextInputController::markedRange(const CppArgumentList&, CppVariant* result) { result->setNull(); WebFrame* mainFrame = m_webView->mainFrame(); if (!mainFrame) return; WebRange range = mainFrame->markedRange(); vector<int> intArray(2); intArray[0] = range.startOffset(); intArray[1] = range.endOffset(); NPObject* resultArray = WebBindings::makeIntArray(intArray); result->set(resultArray); WebBindings::releaseObject(resultArray); }