#endif
#if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
- impl->pageClient->clearClipboardSelectionHandler();
+ if (impl->pageClient->isClipboardWindowOpened())
+ impl->pageClient->closeClipboardWindow();
#endif
#if ENABLE(TIZEN_DRAG_SUPPORT)
for (size_t i = 0; i < passwordFormData.size(); i++) {
passwordFormAutofill += String::format(" inputFields = document.getElementsByName(\"%s\");"
" for (var i = 0; i < inputFields.length; i++)"
- " if (inputFields[i].tagName.toLowerCase() == \"input\" && (inputFields[i].type.toLowerCase() == \"text\" || inputFields[i].type.toLowerCase() == \"password\"))"
+ " if (inputFields[i].tagName.toLowerCase() == \"input\" && (inputFields[i].type.toLowerCase() == \"text\" || inputFields[i].type.toLowerCase() == \"password\" || inputFields[i].type.toLowerCase() == \"email\"))"
" inputFields[i].value = \"%s\";",
passwordFormData[i].first.utf8().data(), passwordFormData[i].second.utf8().data());
}
return false;
#endif
- IntSize visibleSize(smartData->view.w, smartData->view.h);
// caret position can be outside of visible rect.
// we need to consider it.
IntRect selectionRect = impl->pageProxy->getSelectionRect(true);
if (selectionRect.isEmpty())
return false;
- // set paddings
- IntPoint scrollPosition(selectionRect.x() - visibleSize.width() / 3, selectionRect.y() - visibleSize.height() / 3);
- // If both input field's position x and selection rect can be displayed together,
- // adjust scroll position to input field's position x.
- if (!focusedNodeRect.isEmpty()
- && selectionRect.x() - focusedNodeRect.x() < visibleSize.width() * 4 / 5)
- scrollPosition.setX(focusedNodeRect.x());
+ IntRect visibleRect = impl->pageClient->visibleContentRect();
+ IntPoint scrollPosition = visibleRect.location();
+ // Do not adjust scroll position if selection rect (caret) is visible after scaling.
+ if (!visibleRect.contains(selectionRect)) {
+ // set paddings
+ scrollPosition = IntPoint(selectionRect.x() - visibleRect.width() / 3, selectionRect.y() - visibleRect.height() / 3);
+ // If both input field's position x and selection rect can be displayed together,
+ // adjust scroll position to input field's position x.
+ if (!focusedNodeRect.isEmpty() && selectionRect.x() - focusedNodeRect.x() < visibleRect.width() * 4 / 5)
+ scrollPosition.setX(focusedNodeRect.x());
+ }
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
impl->pageClient->setVisibleContentRect(IntRect(scrollPosition, impl->size()), newScaleFactor);