if (spellCheckingEnabled) {
// Consider adding spelling-related or grammar-related context menu items (never both, since a single selected range
// is never considered a misspelling and bad grammar at the same time)
+#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
+ bool misspelling = false;
+ bool badGrammar = false;
+#else
bool misspelling;
bool badGrammar;
+#endif
Vector<String> guesses = frame->editor()->guessesForMisspelledOrUngrammaticalSelection(misspelling, badGrammar);
if (misspelling || badGrammar) {
size_t size = guesses.size();
}
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
- if (m_hitTestResult.isSelected()) {
+ if (m_hitTestResult.isSelected() && !inPasswordField) {
appendItem(CutItem, m_contextMenu.get());
appendItem(CopyItem, m_contextMenu.get());
}
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
if (frame->selection()) {
Node* baseNode = frame->selection()->base().containerNode();
- if (baseNode && baseNode->isTextNode()) {
- if (!(baseNode->textContent().isEmpty())) {
+ if (baseNode && baseNode->isTextNode() && (!(baseNode->textContent().isEmpty()))) {
+ if (inPasswordField) {
+ if (!m_hitTestResult.isSelected())
+ appendItem(SelectWordItem, m_contextMenu.get());
+ } else {
#endif
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
appendItem(SelectAllItem, m_contextMenu.get());