+void TextSelection::initHandlesMouseDownedStatus()
+{
+ m_leftHandle->setIsMouseDowned(false);
+ m_rightHandle->setIsMouseDowned(false);
+}
+
+void TextSelection::changeContextMenuPosition(WebCore::IntPoint& position)
+{
+ if (m_leftHandle->isTop()) {
+ IntRect handleRect = m_leftHandle->getHandleRect();
+ position.setY(position.y() - handleRect.height());
+ }
+}
+
+#if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
+void TextSelection::informTextStyleState()
+{
+ WebCore::IntPoint startPoint, endPoint;
+ WebCore::IntRect leftRect, rightRect;
+
+ WebCore::IntRect caretRect;
+ m_viewImpl->page()->getCaretPosition(caretRect);
+ if (!caretRect.isEmpty()) {
+ startPoint.setX(caretRect.x());
+ startPoint.setY(caretRect.y() + caretRect.height());
+
+ endPoint.setX(caretRect.x() + caretRect.width());
+ endPoint.setY(caretRect.y() + caretRect.height());
+ }
+ else if (m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect)) {
+ startPoint.setX(leftRect.x());
+ startPoint.setY(leftRect.y() + leftRect.height());
+
+ endPoint.setX(rightRect.x() + rightRect.width());
+ endPoint.setY(rightRect.y() + rightRect.height());
+ }
+
+ AffineTransform toEvasTransform = m_viewImpl->transformToScene();
+ WebCore::IntPoint startEvasPoint = toEvasTransform.mapPoint(startPoint);
+ WebCore::IntPoint endEvasPoint = toEvasTransform.mapPoint(endPoint);
+
+ ewkViewTextStyleState(m_viewImpl->view(), startEvasPoint, endEvasPoint);
+}
+#endif