// See if we have a selection to paint at all.
int sPos, ePos;
selectionStartEnd(sPos, ePos);
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION_NOT_PAINT_SELECTION_FOR_INPUTBOX)
+ Node* shadowAncestor = 0;
+ if (renderer() && renderer()->node())
+ shadowAncestor = renderer()->node()->shadowAncestorNode();
+
+ if (shadowAncestor && (shadowAncestor->renderer()->isTextField() || shadowAncestor->renderer()->isTextArea())) {
+ if (selectionState() != RenderObject::SelectionBoth) {
+ RenderObject* startObj = textRenderer()->view()->selectionStart();
+ RenderObject* endObj = textRenderer()->view()->selectionEnd();
+ if (!(startObj->node()->isInShadowTree() && endObj->node()->isInShadowTree()))
+ return;
+ }
+ }
+#endif
+
if (sPos >= ePos)
return;
if (underline.thick && logicalHeight() - baseline >= 2)
lineThickness = 2;
+#if !ENABLE(TIZEN_WEBKIT2_SUPPORT_JAPANESE_IME)
// We need to have some space between underlines of subsequent clauses, because some input methods do not use different underline styles for those.
// We make each line shorter, which has a harmless side effect of shortening the first and last clauses, too.
start += 1;
width -= 2;
+#endif
+
ctx->setStrokeColor(underline.color, renderer()->style()->colorSpace());
ctx->setStrokeThickness(lineThickness);