WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
136876
Should have an editing behavior specific for IOS
https://bugs.webkit.org/show_bug.cgi?id=136876
Summary
Should have an editing behavior specific for IOS
Enrica Casucci
Reported
2014-09-16 17:15:15 PDT
In order to avoid using PLATFORM guards to have different editing behaviors on iOS we should have an editing behavior that is specific to iOS.
Attachments
Patch
(9.45 KB, patch)
2014-09-16 17:27 PDT
,
Enrica Casucci
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Enrica Casucci
Comment 1
2014-09-16 17:27:44 PDT
Created
attachment 238228
[details]
Patch
WebKit Commit Bot
Comment 2
2014-09-16 17:29:20 PDT
Attachment 238228
[details]
did not pass style-queue: ERROR: Source/WebCore/editing/DeleteSelectionCommand.cpp:868: Consider using toText helper function in WebCore/dom/Text.h instead of static_cast<Text*> [readability/check] [4] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 3
2014-09-16 17:42:32 PDT
Comment on
attachment 238228
[details]
Patch Looks good! Now that we have this as a behavior, can we add a test for it.
Ryosuke Niwa
Comment 4
2014-09-16 17:47:36 PDT
Comment on
attachment 238228
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=238228&action=review
> Source/WebCore/editing/FrameSelection.cpp:619 > - if (m_frame && m_frame->settings().editingBehaviorType() == EditingMacBehavior) > + if (m_frame && (m_frame->settings().editingBehaviorType() == EditingMacBehavior || m_frame->settings().editingBehaviorType() == EditingIOSBehavior))
We should extract this into a helper function in EditingBehavior.h, not that you should do it in this patch.
> Source/WebCore/testing/InternalSettings.cpp:353 > + else if (equalIgnoringCase(editingBehavior, "ios")) > + settings()->setEditingBehaviorType(EditingIOSBehavior);
Are you gonna update existing tests in a follow up patch?
Enrica Casucci
Comment 5
2014-09-16 17:50:37 PDT
> We should extract this into a helper function in EditingBehavior.h, not that you should do it in this patch. >
Agreed. This is the only place where we check the EditingBehaviorType directly.
> > Source/WebCore/testing/InternalSettings.cpp:353 > > + else if (equalIgnoringCase(editingBehavior, "ios")) > > + settings()->setEditingBehaviorType(EditingIOSBehavior); > > Are you gonna update existing tests in a follow up patch?
All the tests currently set the editing behavior as Mac and they should all continue to work. We don't have any test that currently test the iOS behavior, but this change will allow us to have some.
Sam Weinig
Comment 6
2014-09-16 18:30:21 PDT
(In reply to
comment #5
)
> > We should extract this into a helper function in EditingBehavior.h, not that you should do it in this patch. > > > Agreed. This is the only place where we check the EditingBehaviorType directly. > > > > Source/WebCore/testing/InternalSettings.cpp:353 > > > + else if (equalIgnoringCase(editingBehavior, "ios")) > > > + settings()->setEditingBehaviorType(EditingIOSBehavior); > > > > Are you gonna update existing tests in a follow up patch? > All the tests currently set the editing behavior as Mac and they should all continue to work. > We don't have any test that currently test the iOS behavior, but this change will allow us to have some.
Hm, I probably should have had you break this up into two patches then, one to add the ability to test the iOS behavior, and one that actually changed the code and added a test. Please do add a test though.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug