Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: third_party/WebKit/Source/core/editing/InputMethodController.cpp

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: Extracting info through RHVW Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); 960 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets();
961 961
962 DocumentLifecycle::DisallowTransitionScope disallowTransition( 962 DocumentLifecycle::DisallowTransitionScope disallowTransition(
963 frame().document()->lifecycle()); 963 frame().document()->lifecycle());
964 964
965 // Emits an object replacement character for each replaced element so that 965 // Emits an object replacement character for each replaced element so that
966 // it is exposed to IME and thus could be deleted by IME on android. 966 // it is exposed to IME and thus could be deleted by IME on android.
967 info.value = plainText(EphemeralRange::rangeOfContents(*element), 967 info.value = plainText(EphemeralRange::rangeOfContents(*element),
968 TextIteratorEmitsObjectReplacementCharacter); 968 TextIteratorEmitsObjectReplacementCharacter);
969 969
970 element = frame().document()->focusedElement();
David Trainor- moved to gerrit 2016/10/26 01:36:42 This still has the problem of being in the common
971 info.placeholder = element->fastGetAttribute(HTMLNames::placeholderAttr);
972
970 if (info.value.isEmpty()) 973 if (info.value.isEmpty())
971 return info; 974 return info;
972 975
973 EphemeralRange firstRange = 976 EphemeralRange firstRange =
974 firstEphemeralRangeOf(frame().selection().selection()); 977 firstEphemeralRangeOf(frame().selection().selection());
975 if (firstRange.isNotNull()) { 978 if (firstRange.isNotNull()) {
976 PlainTextRange plainTextRange(PlainTextRange::create(*element, firstRange)); 979 PlainTextRange plainTextRange(PlainTextRange::create(*element, firstRange));
977 if (plainTextRange.isNotNull()) { 980 if (plainTextRange.isNotNull()) {
978 info.selectionStart = plainTextRange.start(); 981 info.selectionStart = plainTextRange.start();
979 info.selectionEnd = plainTextRange.end(); 982 info.selectionEnd = plainTextRange.end();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 1132
1130 return WebTextInputTypeNone; 1133 return WebTextInputTypeNone;
1131 } 1134 }
1132 1135
1133 DEFINE_TRACE(InputMethodController) { 1136 DEFINE_TRACE(InputMethodController) {
1134 visitor->trace(m_frame); 1137 visitor->trace(m_frame);
1135 visitor->trace(m_compositionRange); 1138 visitor->trace(m_compositionRange);
1136 } 1139 }
1137 1140
1138 } // namespace blink 1141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698