Bug 136474 - Remove PLATFORM(IOS) from WebCore/editing
Summary: Remove PLATFORM(IOS) from WebCore/editing
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords:
Depends on: 136596 136790 136871
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-02 18:44 PDT by Enrica Casucci
Modified: 2015-11-12 21:41 PST (History)
7 users (show)

See Also:


Attachments
Patch (25.03 KB, patch)
2014-09-02 18:54 PDT, Enrica Casucci
thorton: review+
Details | Formatted Diff | Diff
Patch2 (7.54 KB, patch)
2014-09-04 11:50 PDT, Enrica Casucci
thorton: review+
Details | Formatted Diff | Diff
Patch3 (13.81 KB, patch)
2014-09-05 15:48 PDT, Enrica Casucci
no flags Details | Formatted Diff | Diff
Patch4 (13.77 KB, patch)
2014-09-12 12:26 PDT, Enrica Casucci
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (3.28 MB, application/zip)
2014-09-12 13:51 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion (3.48 MB, application/zip)
2014-09-12 15:38 PDT, Build Bot
no flags Details
Patch4 (370.38 KB, patch)
2014-09-16 13:57 PDT, Enrica Casucci
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-09-02 18:44:15 PDT
This bug tracks the work to cleanup WebCore editing.
The goal is to remove PLATFORM(IOS).
Comment 1 Enrica Casucci 2014-09-02 18:54:23 PDT
Created attachment 237541 [details]
Patch
Comment 2 Tim Horton 2014-09-02 19:02:31 PDT
Comment on attachment 237541 [details]
Patch

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

Yay!

> Source/WebCore/dom/Range.h:49
>  #if PLATFORM(IOS)

Technically you don't need this #if around a forward declaration.

> Source/WebCore/editing/EditorCommand.cpp:1246
>      return frame.editor().canDHTMLCopy() || frame.editor().canCopy();

Is this right? This means we'll now check canDHTMLCopy on iOS, unlike previously.
Comment 3 Enrica Casucci 2014-09-02 22:39:07 PDT
(In reply to comment #2)
> (From update of attachment 237541 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=237541&action=review
> 
> Yay!
> 
> > Source/WebCore/dom/Range.h:49
> >  #if PLATFORM(IOS)
> 
> Technically you don't need this #if around a forward declaration.
> 
> > Source/WebCore/editing/EditorCommand.cpp:1246
> >      return frame.editor().canDHTMLCopy() || frame.editor().canCopy();
> 
> Is this right? This means we'll now check canDHTMLCopy on iOS, unlike previously.
I think this is correct. We added support to handle cut/copy/paste events in JS a while ago and this was probably an oversight.
Comment 4 Enrica Casucci 2014-09-03 15:15:52 PDT
Committed revision 173235.
Comment 5 Enrica Casucci 2014-09-04 11:50:09 PDT
Created attachment 237635 [details]
Patch2

Second block of changes.
Comment 6 Enrica Casucci 2014-09-04 15:39:26 PDT
Committed revision 173287.
Comment 7 Enrica Casucci 2014-09-05 15:48:51 PDT
Created attachment 237715 [details]
Patch3
Comment 8 WebKit Commit Bot 2014-09-05 15:51:01 PDT
Attachment 237715 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:300:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:301:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Benjamin Poulain 2014-09-05 16:00:45 PDT
Comment on attachment 237715 [details]
Patch3

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

> Source/WebCore/page/mac/WebCoreFrameView.h:32
>      class Frame;
> +    class IntPoint;

Wrong indent here.

> Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:300
> +                                         toDOMRange:kit(toRange) affinity:(selectionAffinity == UPSTREAM) ? NSSelectionAffinityUpstream : NSSelectionAffinityDownstream

I am not a fan of the 3 copies of "(selectionAffinity == UPSTREAM) ? NSSelectionAffinityUpstream : NSSelectionAffinityDownstream".
I would have static inline for that.
Comment 10 Enrica Casucci 2014-09-05 16:22:41 PDT
(In reply to comment #9)
> (From update of attachment 237715 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=237715&action=review
> 
> > Source/WebCore/page/mac/WebCoreFrameView.h:32
> >      class Frame;
> > +    class IntPoint;
> 
> Wrong indent here.
> 
> > Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:300
> > +                                         toDOMRange:kit(toRange) affinity:(selectionAffinity == UPSTREAM) ? NSSelectionAffinityUpstream : NSSelectionAffinityDownstream
> 
> I am not a fan of the 3 copies of "(selectionAffinity == UPSTREAM) ? NSSelectionAffinityUpstream : NSSelectionAffinityDownstream".
> I would have static inline for that.

Good idea, I'm adding it to WebEditorClient.h
Comment 11 Enrica Casucci 2014-09-05 16:30:54 PDT
Committed revision 173340.
Comment 12 Csaba Osztrogonác 2014-09-05 23:31:37 PDT
(In reply to comment #11)
> Committed revision 173340.

It made ~40 tests fail. Could you fix?
Comment 13 Alexey Proskuryakov 2014-09-06 00:00:21 PDT
Presumably not right now, so I'm rolling out the patch.

The failures are here:

http://build.webkit.org/results/Apple%20Mavericks%20Release%20WK1%20(Tests)/r173342%20(8391)/results.html
Comment 14 Enrica Casucci 2014-09-12 12:26:22 PDT
Created attachment 238046 [details]
Patch4

Second attempt to cleanup phase 3 that doesn't break the tests.
Comment 15 WebKit Commit Bot 2014-09-12 12:29:23 PDT
Attachment 238046 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebCoreSupport/WebEditorClient.h:187:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/mac/ScrollViewMac.mm:205:  One space before end of line comments  [whitespace/comments] [5]
Total errors found: 2 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 16 Enrica Casucci 2014-09-12 13:44:11 PDT
(In reply to comment #15)
> Attachment 238046 [details] did not pass style-queue:
> 
> 
> ERROR: Source/WebKit/mac/WebCoreSupport/WebEditorClient.h:187:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/mac/ScrollViewMac.mm:205:  One space before end of line comments  [whitespace/comments] [5]
> Total errors found: 2 in 14 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

I've already fixed them.
Comment 17 Build Bot 2014-09-12 13:51:37 PDT
Comment on attachment 238046 [details]
Patch4

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

New failing tests:
fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
fast/regions/selection/position-for-point-1-vert-rl.html
fast/dom/vertical-scrollbar-in-rtl.html
fast/regions/selection/position-for-point-vert-rl.html
fast/block/positioning/auto/vertical-rl/007.html
compositing/rtl/rtl-fixed-overflow-scrolled.html
fast/multicol/pagination/BottomToTop-tb.html
fast/multicol/pagination-v-horizontal-bt.html
fast/multicol/vertical-rl/column-break-with-balancing.html
fast/multicol/pagination/RightToLeft-lr.html
fast/dom/vertical-scrollbar-when-dir-change.html
fast/dom/scroll-reveal-top-overflow.html
fast/multicol/pagination/RightToLeft-rl-dynamic.html
fast/multicol/pagination/BottomToTop-bt.html
fast/dom/horizontal-scrollbar-in-rtl.html
fast/block/basic/truncation-rtl.html
fast/multicol/pagination/RightToLeft-tb.html
fast/dom/scroll-reveal-left-overflow.html
fast/multicol/pagination/RightToLeft-rl.html
fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
fast/multicol/pagination/BottomToTop-lr.html
fast/multicol/pagination/BottomToTop-rl.html
fast/block/positioning/vertical-rl/fixed-positioning.html
fast/dom/horizontal-scrollbar-when-dir-change.html
fast/multicol/pagination/RightToLeft-bt.html
fast/block/positioning/rtl-fixed-positioning.html
fast/multicol/pagination-h-vertical-rl.html
Comment 18 Build Bot 2014-09-12 13:51:42 PDT
Created attachment 238051 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 19 Build Bot 2014-09-12 15:38:00 PDT
Comment on attachment 238046 [details]
Patch4

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

New failing tests:
fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
fast/regions/selection/position-for-point-1-vert-rl.html
fast/dom/vertical-scrollbar-in-rtl.html
fast/regions/selection/position-for-point-vert-rl.html
fast/block/positioning/auto/vertical-rl/007.html
compositing/rtl/rtl-fixed-overflow-scrolled.html
fast/multicol/pagination/BottomToTop-tb.html
fast/multicol/pagination-v-horizontal-bt.html
fast/multicol/vertical-rl/column-break-with-balancing.html
fast/multicol/pagination/RightToLeft-rl.html
fast/dom/vertical-scrollbar-when-dir-change.html
fast/dom/scroll-reveal-top-overflow.html
fast/multicol/pagination/RightToLeft-rl-dynamic.html
fast/multicol/pagination/BottomToTop-bt.html
fast/dom/horizontal-scrollbar-in-rtl.html
fast/block/basic/truncation-rtl.html
fast/multicol/pagination/RightToLeft-tb.html
fast/dom/scroll-reveal-left-overflow.html
fast/multicol/pagination/RightToLeft-lr.html
fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
fast/multicol/pagination/BottomToTop-lr.html
fast/multicol/pagination/BottomToTop-rl.html
fast/block/positioning/vertical-rl/fixed-positioning.html
fast/dom/horizontal-scrollbar-when-dir-change.html
fast/multicol/pagination/RightToLeft-bt.html
fast/block/positioning/rtl-fixed-positioning.html
fast/multicol/pagination-h-vertical-rl.html
Comment 20 Build Bot 2014-09-12 15:38:03 PDT
Created attachment 238069 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 21 Enrica Casucci 2014-09-16 13:39:52 PDT
Committed revision 173669.
Comment 22 Enrica Casucci 2014-09-16 13:57:49 PDT
Created attachment 238208 [details]
Patch4
Comment 23 Enrica Casucci 2014-09-16 14:01:32 PDT
Committed revision 173670.
Comment 24 Jessie Berlin 2014-09-16 22:35:15 PDT
(In reply to comment #23)
> Committed revision 173670.

This was rolled out in http://trac.webkit.org/changeset/173679.
Comment 25 Csaba Osztrogonác 2015-09-14 11:08:40 PDT
Comment on attachment 237715 [details]
Patch3

Cleared Benjamin Poulain's review+ from obsolete attachment 237715 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Comment 26 Joseph Pecoraro 2015-11-12 21:41:42 PST
Comment on attachment 238046 [details]
Patch4

Clearing r? flag so this doesn't appear in review queue. It looks like dos too these pieces have already landed anyways.