Changeset 55673 in webkit
- Timestamp:
- Mar 8, 2010 11:22:44 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r55670 r55673 1 2010-03-08 Stuart Morgan <stuartmorgan@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Added a new USE definition for secure text mode on the Mac. 6 https://bugs.webkit.org/show_bug.cgi?id=31265 7 8 * wtf/Platform.h: 9 1 10 2010-03-08 Jian Li <jianli@chromium.org> 2 11 -
trunk/JavaScriptCore/wtf/Platform.h
r55500 r55673 580 580 #endif /* PLATFORM(MAC) && !PLATFORM(IPHONE) */ 581 581 582 #if PLATFORM(MAC) 583 #define WTF_USE_CARBON_SECURE_INPUT_MODE 1 584 #endif 585 582 586 #if PLATFORM(CHROMIUM) && OS(DARWIN) 583 587 #define WTF_PLATFORM_CF 1 584 588 #define WTF_USE_PTHREADS 1 585 589 #define HAVE_PTHREAD_RWLOCK 1 590 #define WTF_USE_CARBON_SECURE_INPUT_MODE 1 586 591 #endif 587 592 -
trunk/WebCore/ChangeLog
r55672 r55673 1 2010-03-08 Stuart Morgan <stuartmorgan@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Move the details of secure text mode into WebCore/platform. 6 Move the higher-level logic for secure text mode from Frame 7 to SelectionController. 8 9 https://bugs.webkit.org/show_bug.cgi?id=31265 10 11 No new tests: no functional changes. 12 13 * WebCore.gypi: 14 * WebCore.xcodeproj/project.pbxproj: 15 * dom/Document.cpp: 16 (WebCore::Document::setUseSecureKeyboardEntryWhenActive): 17 * editing/SelectionController.cpp: 18 (WebCore::SelectionController::focusedOrActiveStateChanged): 19 (WebCore::SelectionController::updateSecureKeyboardEntryIfActive): 20 (WebCore::SelectionController::setUseSecureKeyboardEntry): 21 * editing/SelectionController.h: 22 * page/Frame.cpp: 23 (WebCore::Frame::setDocument): 24 * page/Frame.h: 25 * platform/SecureTextInput.cpp: Added. 26 (WebCore::enableSecureTextInput): 27 (WebCore::disableSecureTextInput): 28 * platform/SecureTextInput.h: Added. 29 (WebCore::enableSecureTextInput): 30 (WebCore::disableSecureTextInput): 31 1 32 2010-03-08 Brady Eidson <beidson@apple.com> 2 33 -
trunk/WebCore/WebCore.gypi
r55635 r55673 2861 2861 'platform/ScrollbarThemeComposite.h', 2862 2862 'platform/SearchPopupMenu.h', 2863 'platform/SecureTextInput.cpp', 2864 'platform/SecureTextInput.h', 2863 2865 'platform/SharedBuffer.cpp', 2864 2866 'platform/SharedBuffer.h', -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r55638 r55673 681 681 3390CA560FFC157B00921962 /* NotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA520FFC157B00921962 /* NotificationCenter.h */; }; 682 682 3390CA580FFC157B00921962 /* NotificationContents.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA540FFC157B00921962 /* NotificationContents.h */; }; 683 33C0CCD4112C5E6200CE057D /* SecureTextInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33C0CCD2112C5E6200CE057D /* SecureTextInput.cpp */; }; 684 33C0CCD5112C5E6200CE057D /* SecureTextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 33C0CCD3112C5E6200CE057D /* SecureTextInput.h */; }; 683 685 371F4F400D25B9AF00ECE0D5 /* FontData.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4F3E0D25B9AF00ECE0D5 /* FontData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 684 686 371F4F410D25B9AF00ECE0D5 /* FontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */; }; … … 6052 6054 3390CA530FFC157B00921962 /* NotificationCenter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NotificationCenter.idl; path = notifications/NotificationCenter.idl; sourceTree = "<group>"; }; 6053 6055 3390CA540FFC157B00921962 /* NotificationContents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationContents.h; path = notifications/NotificationContents.h; sourceTree = "<group>"; }; 6056 33C0CCD2112C5E6200CE057D /* SecureTextInput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecureTextInput.cpp; sourceTree = "<group>"; }; 6057 33C0CCD3112C5E6200CE057D /* SecureTextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecureTextInput.h; sourceTree = "<group>"; }; 6054 6058 371F4F3E0D25B9AF00ECE0D5 /* FontData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontData.h; sourceTree = "<group>"; }; 6055 6059 371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontData.cpp; sourceTree = "<group>"; }; … … 15320 15324 BC6D6E2509AF943500F59759 /* ScrollView.h */, 15321 15325 AB7170880B3118080017123E /* SearchPopupMenu.h */, 15326 33C0CCD2112C5E6200CE057D /* SecureTextInput.cpp */, 15327 33C0CCD3112C5E6200CE057D /* SecureTextInput.h */, 15322 15328 1A4A954B0B4EDCCB002D8C3C /* SharedBuffer.cpp */, 15323 15329 1A4A954C0B4EDCCB002D8C3C /* SharedBuffer.h */, … … 18646 18652 9F2A322C1125A0A2003C3056 /* JavaScriptProfile.h in Headers */, 18647 18653 9F2A322E1125A0A2003C3056 /* JavaScriptProfileNode.h in Headers */, 18654 33C0CCD5112C5E6200CE057D /* SecureTextInput.h in Headers */, 18648 18655 7AFD4A8B1131C2760035B883 /* ScriptBreakpoint.h in Headers */, 18649 18656 7AFD4FF4113277B60035B883 /* ScriptDebugListener.h in Headers */, … … 20847 20854 9F2A322B1125A0A2003C3056 /* JavaScriptProfile.cpp in Sources */, 20848 20855 9F2A322D1125A0A2003C3056 /* JavaScriptProfileNode.cpp in Sources */, 20856 33C0CCD4112C5E6200CE057D /* SecureTextInput.cpp in Sources */, 20849 20857 6E21C6C01126338500A7BE02 /* GraphicsContext3D.cpp in Sources */, 20850 20858 6E21C6C21126339900A7BE02 /* GraphicsContext3DCG.cpp in Sources */, -
trunk/WebCore/dom/Document.cpp
r55635 r55673 4381 4381 4382 4382 m_useSecureKeyboardEntryWhenActive = usesSecureKeyboard; 4383 m_frame-> updateSecureKeyboardEntryIfActive();4383 m_frame->selection()->updateSecureKeyboardEntryIfActive(); 4384 4384 } 4385 4385 -
trunk/WebCore/editing/SelectionController.cpp
r55669 r55673 48 48 #include "RenderTheme.h" 49 49 #include "RenderView.h" 50 #include "SecureTextInput.h" 50 51 #include "Settings.h" 51 52 #include "TextIterator.h" … … 1322 1323 // Secure keyboard entry is set by the active frame. 1323 1324 if (m_frame->document()->useSecureKeyboardEntryWhenActive()) 1324 m_frame->setUseSecureKeyboardEntry(activeAndFocused);1325 setUseSecureKeyboardEntry(activeAndFocused); 1325 1326 } 1326 1327 … … 1328 1329 { 1329 1330 focusedOrActiveStateChanged(); 1331 } 1332 1333 void SelectionController::updateSecureKeyboardEntryIfActive() 1334 { 1335 if (m_frame->document() && isFocusedAndActive()) 1336 setUseSecureKeyboardEntry(m_frame->document()->useSecureKeyboardEntryWhenActive()); 1337 } 1338 1339 void SelectionController::setUseSecureKeyboardEntry(bool enable) 1340 { 1341 if (enable) 1342 enableSecureTextInput(); 1343 else 1344 disableSecureTextInput(); 1330 1345 } 1331 1346 -
trunk/WebCore/editing/SelectionController.h
r55669 r55673 132 132 void updateAppearance(); 133 133 134 void updateSecureKeyboardEntryIfActive(); 135 134 136 #ifndef NDEBUG 135 137 void formatForDebugger(char* buffer, unsigned length) const; … … 169 171 170 172 void caretBlinkTimerFired(Timer<SelectionController>*); 173 174 void setUseSecureKeyboardEntry(bool); 171 175 172 176 Frame* m_frame; -
trunk/WebCore/page/Frame.cpp
r55387 r55673 85 85 #include <wtf/StdLibExtras.h> 86 86 87 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))88 #import <Carbon/Carbon.h>89 #endif90 91 87 #if USE(JSC) 92 88 #include "JSDOMWindowShell.h" … … 282 278 283 279 m_doc = newDoc; 284 if (m_doc && selection()->isFocusedAndActive()) 285 setUseSecureKeyboardEntry(m_doc->useSecureKeyboardEntryWhenActive()); 280 selection()->updateSecureKeyboardEntryIfActive(); 286 281 287 282 if (m_doc && !m_doc->attached()) … … 843 838 } 844 839 845 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))846 const short enableRomanKeyboardsOnly = -23;847 #endif848 void Frame::setUseSecureKeyboardEntry(bool enable)849 {850 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))851 if (enable == IsSecureEventInputEnabled())852 return;853 if (enable) {854 EnableSecureEventInput();855 #ifdef BUILDING_ON_TIGER856 KeyScript(enableRomanKeyboardsOnly);857 #else858 // WebKit substitutes nil for input context when in password field, which corresponds to null TSMDocument. So, there is859 // no need to call TSMGetActiveDocument(), which may return an incorrect result when selection hasn't been yet updated860 // after focusing a node.861 CFArrayRef inputSources = TISCreateASCIICapableInputSourceList();862 TSMSetDocumentProperty(0, kTSMDocumentEnabledInputSourcesPropertyTag, sizeof(CFArrayRef), &inputSources);863 CFRelease(inputSources);864 #endif865 } else {866 DisableSecureEventInput();867 #ifdef BUILDING_ON_TIGER868 KeyScript(smKeyEnableKybds);869 #else870 TSMRemoveDocumentProperty(0, kTSMDocumentEnabledInputSourcesPropertyTag);871 #endif872 }873 #endif874 }875 876 void Frame::updateSecureKeyboardEntryIfActive()877 {878 if (selection()->isFocusedAndActive())879 setUseSecureKeyboardEntry(m_doc->useSecureKeyboardEntryWhenActive());880 }881 882 840 CSSMutableStyleDeclaration *Frame::typingStyle() const 883 841 { -
trunk/WebCore/page/Frame.h
r55387 r55673 245 245 bool isContentEditable() const; // if true, everything in frame is editable 246 246 247 void updateSecureKeyboardEntryIfActive();248 249 247 CSSMutableStyleDeclaration* typingStyle() const; 250 248 void setTypingStyle(CSSMutableStyleDeclaration*); … … 259 257 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, bool revealExtent = false); 260 258 void setSelectionFromNone(); 261 262 void setUseSecureKeyboardEntry(bool);263 259 264 260 SelectionController* dragCaretController() const;
Note: See TracChangeset
for help on using the changeset viewer.