Changeset 149432 in webkit
- Timestamp:
- May 1, 2013 7:17:12 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r149362 r149432 1 2013-05-01 Sergio Villar Senin <svillar@igalia.com> 2 3 Show a block cursor in overtype mode 4 https://bugs.webkit.org/show_bug.cgi?id=114819 5 6 Reviewed by Ryosuke Niwa. 7 8 * Source/autotools/symbols.filter: export some extra symbols for 9 testing purposes. 10 1 11 2013-04-30 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 12 -
trunk/LayoutTests/ChangeLog
r149407 r149432 1 2013-05-01 Sergio Villar Senin <svillar@igalia.com> 2 3 Show a block cursor in overtype mode 4 https://bugs.webkit.org/show_bug.cgi?id=114819 5 6 Reviewed by Ryosuke Niwa. 7 8 New test case for the new block cursor to be used in overtype 9 mode. The test verifies that the 1-pixel long caret is replaced by 10 a selection like 1-character long block cursor when in overtype 11 mode. This test covers LTR and RTL text in LTR and RTL blocks and 12 bidi text. 13 14 * editing/selection/block-cursor-overtype-mode-expected.txt: Added. 15 * editing/selection/block-cursor-overtype-mode.html: Added. 16 1 17 2013-04-30 David Hyatt <hyatt@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r149423 r149432 1 2013-05-01 Sergio Villar Senin <svillar@igalia.com> 2 3 Show a block cursor in overtype mode 4 https://bugs.webkit.org/show_bug.cgi?id=114819 5 6 Reviewed by Ryosuke Niwa. 7 8 Test: editing/selection/block-cursor-overtype-mode.html 9 10 Overtype mode will use block cursor instead of a caret to 11 highlight the next character to be replaced. It will fully cover 12 the next character to be replaced (except at the end of a line 13 where the usual blinking caret will be shown). 14 15 This new block cursor is internally implemented as a selection 16 (not exposed to JavaScript) because the selection code knows how 17 to deal with bidi text. 18 19 * WebCore.exp.in: Export symbols for testing purposes. 20 * WebCore.order: Ditto. 21 * editing/Editor.cpp: 22 (WebCore::Editor::toggleOverwriteModeEnabled): Added a call to 23 FrameLoader::setShouldShowBlockCursor. 24 (WebCore): 25 * editing/Editor.h: 26 (Editor): 27 * editing/FrameSelection.cpp: 28 (WebCore::FrameSelection::FrameSelection): 29 (WebCore::FrameSelection::updateAppearance): Use a 1-character 30 long selection to paint the cursor in overtype mode. 31 (WebCore::FrameSelection::setShouldShowBlockCursor): 32 (WebCore): 33 * editing/FrameSelection.h: 34 (WebCore::FrameSelection::shouldShowBlockCursor): 35 (FrameSelection): 36 * testing/Internals.cpp: 37 (WebCore): 38 (WebCore::Internals::selectionBounds): Added a new method which 39 returns the IntRect issued by FrameSelection::bounds(). 40 * testing/Internals.h: Ditto. 41 * testing/Internals.idl: Ditto. 42 1 43 2013-04-30 Darin Adler <darin@apple.com> 2 44 -
trunk/Source/WebCore/WebCore.exp.in
r149417 r149432 69 69 __ZN3WTF6StringC1EPK10__CFString 70 70 __ZN7WebCore10ClientRectC1ERKNS_7IntRectE 71 __ZN7WebCore10ClientRectC1ERKNS_9FloatRectE 71 72 __ZN7WebCore10ClientRectC1Ev 72 73 __ZN7WebCore10CredentialC1ERKN3WTF6StringES4_NS_21CredentialPersistenceE … … 961 962 __ZN7WebCore6Editor7commandERKN3WTF6StringE 962 963 __ZN7WebCore6Editor7outdentEv 964 __ZN7WebCore6Editor26toggleOverwriteModeEnabledEv 963 965 __ZN7WebCore6JSNode6s_infoE 964 966 __ZN7WebCore6Region5uniteERKS0_ -
trunk/Source/WebCore/WebCore.order
r148696 r149432 42860 42860 __ZN7WebCoreL12gFunctionMapE 42861 42861 __ZN7WebCoreL12gFunctionMapE 42862 __ZN7WebCore6Editor26toggleOverwriteModeEnabledEv -
trunk/Source/WebCore/editing/Editor.cpp
r149322 r149432 3125 3125 } 3126 3126 3127 void Editor::toggleOverwriteModeEnabled() 3128 { 3129 m_overwriteModeEnabled = !m_overwriteModeEnabled; 3130 frame()->selection()->setShouldShowBlockCursor(m_overwriteModeEnabled); 3131 }; 3132 3127 3133 } // namespace WebCore -
trunk/Source/WebCore/editing/Editor.h
r146907 r149432 247 247 248 248 bool isOverwriteModeEnabled() const { return m_overwriteModeEnabled; } 249 void toggleOverwriteModeEnabled() { m_overwriteModeEnabled = !m_overwriteModeEnabled; }249 void toggleOverwriteModeEnabled(); 250 250 251 251 #if USE(APPKIT) -
trunk/Source/WebCore/editing/FrameSelection.cpp
r149223 r149432 115 115 , m_isCaretBlinkingSuspended(false) 116 116 , m_focused(frame && frame->page() && frame->page()->focusController()->focusedFrame() == frame) 117 , m_shouldShowBlockCursor(false) 117 118 { 118 119 if (shouldAlwaysUseDirectionalSelection(m_frame)) … … 1754 1755 void FrameSelection::updateAppearance() 1755 1756 { 1757 // Paint a block cursor instead of a caret in overtype mode unless the caret is at the end of a line (in this case 1758 // the FrameSelection will paint a blinking caret as usual). 1759 VisiblePosition forwardPosition; 1760 if (m_shouldShowBlockCursor && m_selection.isCaret()) { 1761 forwardPosition = modifyExtendingForward(CharacterGranularity); 1762 m_caretPaint = forwardPosition.isNull(); 1763 } 1764 1756 1765 #if ENABLE(TEXT_CARET) 1757 1766 bool caretRectChangedOrCleared = recomputeCaretRect(); 1758 1767 1759 1768 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled(); 1760 bool shouldBlink = caretIsVisible() && isCaret() && (isContentEditable() || caretBrowsing) ;1769 bool shouldBlink = caretIsVisible() && isCaret() && (isContentEditable() || caretBrowsing) && forwardPosition.isNull(); 1761 1770 1762 1771 // If the caret moved, stop the blink timer so we can restart with a … … 1784 1793 // Construct a new VisibleSolution, since m_selection is not necessarily valid, and the following steps 1785 1794 // assume a valid selection. See <https://bugs.webkit.org/show_bug.cgi?id=69563> and <rdar://problem/10232866>. 1786 VisibleSelection selection(m_selection.visibleStart(), m_selection.visibleEnd());1795 VisibleSelection selection(m_selection.visibleStart(), forwardPosition.isNotNull() ? forwardPosition : m_selection.visibleEnd()); 1787 1796 1788 1797 if (!selection.isRange()) { … … 2057 2066 } 2058 2067 2068 void FrameSelection::setShouldShowBlockCursor(bool shouldShowBlockCursor) 2069 { 2070 m_shouldShowBlockCursor = shouldShowBlockCursor; 2071 2072 m_frame->document()->updateLayoutIgnorePendingStylesheets(); 2073 2074 updateAppearance(); 2075 } 2076 2059 2077 #ifndef NDEBUG 2060 2078 -
trunk/Source/WebCore/editing/FrameSelection.h
r148987 r149432 256 256 void setSelectionFromNone(); 257 257 258 bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; } 259 void setShouldShowBlockCursor(bool); 260 258 261 private: 259 262 enum EPositionType { START, END, BASE, EXTENT }; … … 312 315 bool m_isCaretBlinkingSuspended : 1; 313 316 bool m_focused : 1; 317 bool m_shouldShowBlockCursor : 1; 314 318 }; 315 319 -
trunk/Source/WebCore/testing/Internals.cpp
r149262 r149432 2296 2296 return ranges->nearest(time); 2297 2297 } 2298 #endif 2299 2300 } 2298 2299 PassRefPtr<ClientRect> Internals::selectionBounds(ExceptionCode& ec) 2300 { 2301 Document* document = contextDocument(); 2302 if (!document || !document->frame() || !document->frame()->selection()) { 2303 ec = INVALID_ACCESS_ERR; 2304 return ClientRect::create(); 2305 } 2306 2307 return ClientRect::create(document->frame()->selection()->bounds()); 2308 } 2309 2310 #endif 2311 2312 } -
trunk/Source/WebCore/testing/Internals.h
r148288 r149432 329 329 #endif 330 330 331 PassRefPtr<ClientRect> selectionBounds(ExceptionCode&); 332 331 333 private: 332 334 explicit Internals(Document*); -
trunk/Source/WebCore/testing/Internals.idl
r149368 r149432 288 288 289 289 boolean isSelectPopupVisible(Node node); 290 291 ClientRect selectionBounds() raises(DOMException); 290 292 }; -
trunk/Source/WebKit/ChangeLog
r149385 r149432 1 2013-05-01 Sergio Villar Senin <svillar@igalia.com> 2 3 Show a block cursor in overtype mode 4 https://bugs.webkit.org/show_bug.cgi?id=114819 5 6 Reviewed by Ryosuke Niwa. 7 8 Export three more WebCore symbols. 9 10 * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: 11 1 12 2013-04-29 Brent Fulgham <bfulgham@webkit.org> 2 13 -
trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
r149263 r149432 156 156 ??1Range@WebCore@@QAE@XZ 157 157 ?toNode@WebCore@@YAPAVNode@1@VJSValue@JSC@@@Z 158 ??0ClientRect@WebCore@@AAE@ABVFloatRect@1@@Z 158 159 ??0ClientRect@WebCore@@AAE@ABVIntRect@1@@Z 159 160 ??0ClientRect@WebCore@@AAE@XZ … … 188 189 ?find@StringImpl@WTF@@QAEIPAV12@@Z 189 190 ?absoluteCaretBounds@FrameSelection@WebCore@@QAE?AVIntRect@2@XZ 191 ?bounds@FrameSelection@WebCore@@QBE?AVFloatRect@2@_N@Z 190 192 ?fromUTF8@String@WTF@@SA?AV12@PBE@Z 191 193 ?fromUTF8WithLatin1Fallback@String@WTF@@SA?AV12@PBEI@Z … … 318 320 ?isContinuousSpellCheckingEnabled@Editor@WebCore@@QBE_NXZ 319 321 ?toggleContinuousSpellChecking@Editor@WebCore@@QAEXXZ 322 ?toggleOverwriteModeEnabled@Editor@WebCore@@QAEXXZ 320 323 #if ENABLE(FULLSCREEN_API) 321 324 ?webkitWillEnterFullScreenForElement@Document@WebCore@@QAEXPAVElement@2@@Z -
trunk/Source/WebKit/win/ChangeLog
r149385 r149432 1 2013-05-01 Sergio Villar Senin <svillar@igalia.com> 2 3 Show a block cursor in overtype mode 4 https://bugs.webkit.org/show_bug.cgi?id=114819 5 6 Reviewed by Ryosuke Niwa. 7 8 Export three more WebCore symbols. 9 10 * WebKit.vcproj/WebKitExports.def.in: 11 1 12 2013-04-29 Brent Fulgham <bfulgham@webkit.org> 2 13 -
trunk/Source/WebKit/win/WebKit.vcproj/WebKitExports.def.in
r149263 r149432 157 157 ??1Range@WebCore@@QAE@XZ 158 158 ?toNode@WebCore@@YAPAVNode@1@VJSValue@JSC@@@Z 159 ??0ClientRect@WebCore@@AAE@ABVFloatRect@1@@Z 159 160 ??0ClientRect@WebCore@@AAE@ABVIntRect@1@@Z 160 161 ??0ClientRect@WebCore@@AAE@XZ … … 189 190 ?find@StringImpl@WTF@@QAEIPAV12@@Z 190 191 ?absoluteCaretBounds@FrameSelection@WebCore@@QAE?AVIntRect@2@XZ 192 ?bounds@FrameSelection@WebCore@@QBE?AVFloatRect@2@_N@Z 191 193 ?fromUTF8@String@WTF@@SA?AV12@PBE@Z 192 194 ?fromUTF8WithLatin1Fallback@String@WTF@@SA?AV12@PBEI@Z … … 319 321 ?isContinuousSpellCheckingEnabled@Editor@WebCore@@QBE_NXZ 320 322 ?toggleContinuousSpellChecking@Editor@WebCore@@QAEXXZ 323 ?toggleOverwriteModeEnabled@Editor@WebCore@@QAEXXZ 321 324 #if ENABLE(FULLSCREEN_API) 322 325 ?webkitWillEnterFullScreenForElement@Document@WebCore@@QAEXPAVElement@2@@Z -
trunk/Source/autotools/symbols.filter
r149262 r149432 312 312 _ZNK7WebCore8Document13nodesFromRectEiijjjjj; 313 313 _ZTVN7WebCore14StaticNodeListE; 314 _ZN7WebCore6Editor26toggleOverwriteModeEnabledEv; 315 _ZNK7WebCore14FrameSelection6boundsEb; 316 _ZN7WebCore10ClientRectC1ERKNS_9FloatRectE; 314 317 315 318 local:
Note: See TracChangeset
for help on using the changeset viewer.