Bug 134086

Summary: Add an undo group for each dictated utterance in WebKit
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: TextAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, rniwa, sam
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch
none
patch
none
patch
none
patch
none
patch
enrica: review+, buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 none

Description chris fleizach 2014-06-19 17:56:06 PDT
While dictating on the web, streams of text are entered at different times.

To support a sane undo policy, where undo will remove just the last stream of text, instead of all the streamed text,
we need to honor the "undoable" attributed text key that tells us when to break undo grouping.

<rdar://problem/16601491>
Comment 1 chris fleizach 2014-06-24 23:00:07 PDT
Created attachment 233789 [details]
patch
Comment 2 WebKit Commit Bot 2014-06-24 23:01:26 PDT
Attachment 233789 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:6046:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:2242:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 chris fleizach 2014-06-24 23:03:18 PDT
Created attachment 233790 [details]
patch
Comment 4 WebKit Commit Bot 2014-06-24 23:04:10 PDT
Attachment 233790 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:6046:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:2242:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 chris fleizach 2014-06-25 00:30:48 PDT
Created attachment 233794 [details]
patch
Comment 6 WebKit Commit Bot 2014-06-25 00:32:11 PDT
Attachment 233794 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/PageClientImpl.mm:363:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:6046:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:2242:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/editing/mac/TextUndoInsertionMarkupMac.h:44:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 4 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 chris fleizach 2014-06-25 08:55:53 PDT
Created attachment 233816 [details]
patch
Comment 8 WebKit Commit Bot 2014-06-25 08:58:29 PDT
Attachment 233816 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/PageClientImpl.mm:363:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:6046:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:2242:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/editing/mac/TextUndoInsertionMarkupMac.h:44:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 4 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 chris fleizach 2014-06-25 08:59:32 PDT
Created attachment 233817 [details]
patch
Comment 10 WebKit Commit Bot 2014-06-25 09:02:08 PDT
Attachment 233817 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/mac/PageClientImpl.mm:363:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:6046:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:2242:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 3 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 chris fleizach 2014-06-25 09:05:48 PDT
Created attachment 233818 [details]
patch
Comment 12 WebKit Commit Bot 2014-06-25 09:07:08 PDT
Attachment 233818 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:6046:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:2242:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 Enrica Casucci 2014-06-25 09:14:18 PDT
Comment on attachment 233818 [details]
patch

Looks good to me. Please make sure the EWS are all green before landing.
Comment 14 Build Bot 2014-06-25 09:49:52 PDT
Comment on attachment 233818 [details]
patch

Attachment 233818 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/6348078684569600

New failing tests:
media/W3C/video/src/src_reflects_attribute_not_source_elements.html
Comment 15 Build Bot 2014-06-25 09:49:54 PDT
Created attachment 233821 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 16 chris fleizach 2014-06-25 16:51:34 PDT
http://trac.webkit.org/changeset/170447
Comment 17 Sam Weinig 2014-06-25 21:49:54 PDT
Comment on attachment 233818 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233818&action=review

> Source/WebCore/editing/mac/TextUndoInsertionMarkup.h:31
> +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
> +#define WTF_USE_INSERTION_UNDO_GROUPING 1
> +#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100

This should be in Platform.h
Comment 18 chris fleizach 2014-06-26 10:02:00 PDT
(In reply to comment #17)
> (From update of attachment 233818 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=233818&action=review
> 
> > Source/WebCore/editing/mac/TextUndoInsertionMarkup.h:31
> > +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
> > +#define WTF_USE_INSERTION_UNDO_GROUPING 1
> > +#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
> 
> This should be in Platform.h

Done. Thanks

http://trac.webkit.org/changeset/170482
Comment 19 Sam Weinig 2014-06-26 10:06:06 PDT
(In reply to comment #18)
> (In reply to comment #17)
> > (From update of attachment 233818 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=233818&action=review
> > 
> > > Source/WebCore/editing/mac/TextUndoInsertionMarkup.h:31
> > > +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
> > > +#define WTF_USE_INSERTION_UNDO_GROUPING 1
> > > +#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
> > 
> > This should be in Platform.h
> 
> Done. Thanks
> 
> http://trac.webkit.org/changeset/170482

Thank you!