WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
47629
Moving cursor back to autocorrected word in the same line shouldn't remove the underline
https://bugs.webkit.org/show_bug.cgi?id=47629
Summary
Moving cursor back to autocorrected word in the same line shouldn't remove th...
Jia Pu
Reported
2010-10-13 15:45:44 PDT
<
rdar://problem/8546758
>
Attachments
Proposed patch (v1)
(309.17 KB, patch)
2010-10-18 15:03 PDT
,
Jia Pu
no flags
Details
Formatted Diff
Diff
Additional Patch (v1)
(1.61 KB, patch)
2010-10-19 16:47 PDT
,
Jia Pu
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jia Pu
Comment 1
2010-10-18 15:03:23 PDT
Created
attachment 71088
[details]
Proposed patch (v1)
Adele Peterson
Comment 2
2010-10-18 15:22:58 PDT
Comment on
attachment 71088
[details]
Proposed patch (v1) View in context:
https://bugs.webkit.org/attachment.cgi?id=71088&action=review
> WebCore/editing/Editor.cpp:-3616 > - m_frame->document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::CorrectionIndicator);
Why remove this line?
Jia Pu
Comment 3
2010-10-18 15:35:08 PDT
(In reply to
comment #2
)
> (From update of
attachment 71088
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=71088&action=review
> > > WebCore/editing/Editor.cpp:-3616 > > - m_frame->document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::CorrectionIndicator); > > Why remove this line?
This marker value doesn't get added on SnowLeopard or earlier. So, since now this couple lines of code is only for SL or earlier OS, we don't need to remove this marker here anymore.
Adele Peterson
Comment 4
2010-10-18 15:47:17 PDT
Comment on
attachment 71088
[details]
Proposed patch (v1) View in context:
https://bugs.webkit.org/attachment.cgi?id=71088&action=review
>>> WebCore/editing/Editor.cpp:-3616 >>> - m_frame->document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::CorrectionIndicator); >> >> Why remove this line? > > This marker value doesn't get added on SnowLeopard or earlier. So, since now this couple lines of code is only for SL or earlier OS, we don't need to remove this marker here anymore.
Ah, ok. It looks like before recent changes, there was a call to removeMarkers for DocumentMarker::Replacement. Does that need to be re-added?
Jia Pu
Comment 5
2010-10-18 17:37:54 PDT
(In reply to
comment #4
)
> (From update of
attachment 71088
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=71088&action=review
> > >>> WebCore/editing/Editor.cpp:-3616 > >>> - m_frame->document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::CorrectionIndicator); > >> > >> Why remove this line? > > > > This marker value doesn't get added on SnowLeopard or earlier. So, since now this couple lines of code is only for SL or earlier OS, we don't need to remove this marker here anymore. > > Ah, ok. It looks like before recent changes, there was a call to removeMarkers for DocumentMarker::Replacement. Does that need to be re-added?
There's no need to add that. The statement for removing Replacement is also part of the patch for adding autocorrection support. But later on, I replaced "Replacement" with "CorrectionIndicator".
WebKit Commit Bot
Comment 6
2010-10-19 11:28:56 PDT
The commit-queue encountered the following flaky tests while processing
attachment 71088
[details]
: Please file bugs against the tests. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 7
2010-10-19 11:30:13 PDT
Comment on
attachment 71088
[details]
Proposed patch (v1) Clearing flags on attachment: 71088 Committed
r70071
: <
http://trac.webkit.org/changeset/70071
>
WebKit Commit Bot
Comment 8
2010-10-19 11:30:18 PDT
All reviewed patches have been landed. Closing bug.
James Robinson
Comment 9
2010-10-19 14:25:32 PDT
This changed the rendering for a number of editing tests in chromium mac (on 10.5, not on 10.7 obviously): editing/deleting/delete-3800834-fix.html editing/deleting/merge-unrendered-space.html editing/deleting/pruning-after-merge-2.html editing/deleting/smart-delete-002.html editing/execCommand/4924441.html editing/execCommand/5080333-1.html editing/execCommand/5080333-2.html editing/execCommand/insert-list-and-stitch.html editing/execCommand/remove-list-item-1.html editing/inserting/insert-div-026.html editing/inserting/insert-paragraph-04.html editing/inserting/insert-text-with-newlines.html editing/inserting/return-key-with-selection-001.html editing/inserting/return-key-with-selection-002.html editing/pasteboard/5483567.html editing/pasteboard/paste-text-019.html editing/pasteboard/smart-paste-008.html editing/pasteboard/subframe-dragndrop-1.html editing/selection/4983858.html editing/selection/5057506-2.html editing/selection/move-by-character-001.html editing/style/5046875-1.html editing/style/create-block-for-style-001.html editing/style/create-block-for-style-003.html editing/style/create-block-for-style-004.html editing/style/create-block-for-style-007.html editing/style/create-block-for-style-009.html editing/style/create-block-for-style-010.html editing/style/create-block-for-style-013.html I haven't confirmed if the rendering results are different yet in safari but will check that next. The new rendering has red squigglies under many words that previously did not.
James Robinson
Comment 10
2010-10-19 14:52:38 PDT
It appears this only affects chromium mac, not Safari or chromium on other platforms.
Jia Pu
Comment 11
2010-10-19 14:56:57 PDT
(In reply to
comment #10
)
> It appears this only affects chromium mac, not Safari or chromium on other platforms.
I think, instead of: #if PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)) I should add: #if !PLATFORM(MAC) || (PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD))) This way, it only changes the behavior in Safari on 10.7. Shall I create a separate bug for this, or adding another path in this bug? James, what do I need to run tests for chromium mac?
James Robinson
Comment 12
2010-10-19 15:01:32 PDT
I believe that would work. I'll try confirming locally.
Jia Pu
Comment 13
2010-10-19 15:02:27 PDT
(In reply to
comment #12
)
> I believe that would work. I'll try confirming locally.
Also, can we find out when were these tests created? <
http://trac.webkit.org/changeset/66643
> introduced a regression in the underline behavior, which has been corrected by this patch. So, if these tests were generated after <
http://trac.webkit.org/changeset/66643
>, we need to regenerate the screen shots after the fix.
Ryosuke Niwa
Comment 14
2010-10-19 15:03:56 PDT
(In reply to
comment #11
)
> (In reply to
comment #10
) > > It appears this only affects chromium mac, not Safari or chromium on other platforms. > I think, instead of: > > #if PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)) > > I should add: > > #if !PLATFORM(MAC) || (PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD))) > > This way, it only changes the behavior in Safari on 10.7. Shall I create a separate bug for this, or adding another path in this bug?
SGTM. But did you get comment about there's a code that adds correction indicator that's outside of ifdef's?
http://trac.webkit.org/browser/trunk/WebCore/editing/Editor.cpp?rev=70071#L2788
Could you verify that this is intended?
Ryosuke Niwa
Comment 15
2010-10-19 15:07:49 PDT
Also, I have to say that the new behavior seems better than the old behavior. In
http://trac.webkit.org/browser/trunk/LayoutTests/editing/deleting/delete-3800834-fix.html
for example, we have: <span id="test">Foo<BR><BLOCKQUOTE>Bar</BLOCKQUOTE></span> And we delete "\nBar" backwards. We have correction indicator (or whatever red dotted line is called) until we delete "Bar" but the indicator disappears when we delete "\n" between "Foo" and "Bar" (deleted by that moment). Is this intended?
Jia Pu
Comment 16
2010-10-19 15:19:35 PDT
(In reply to
comment #14
)
> (In reply to
comment #11
) > > (In reply to
comment #10
) > > > It appears this only affects chromium mac, not Safari or chromium on other platforms. > > I think, instead of: > > > > #if PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)) > > > > I should add: > > > > #if !PLATFORM(MAC) || (PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD))) > > > > This way, it only changes the behavior in Safari on 10.7. Shall I create a separate bug for this, or adding another path in this bug? > > SGTM. > > But did you get comment about there's a code that adds correction indicator that's outside of ifdef's? >
http://trac.webkit.org/browser/trunk/WebCore/editing/Editor.cpp?rev=70071#L2788
> > Could you verify that this is intended?
The CorrectionIndicator marker isn't used except in Safari on 10.7. But, for the sake of clarity, I suppose I should put that statement inside "#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)"
James Robinson
Comment 17
2010-10-19 15:24:01 PDT
(In reply to
comment #11
)
> (In reply to
comment #10
) > > It appears this only affects chromium mac, not Safari or chromium on other platforms. > I think, instead of: > > #if PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)) > > I should add: > > #if !PLATFORM(MAC) || (PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD))) > > This way, it only changes the behavior in Safari on 10.7. Shall I create a separate bug for this, or adding another path in this bug? > > James, what do I need to run tests for chromium mac?
Confirmed that this change restores the previous Chromium Mac behavior (which matches the current Safari Mac behavior).
Ryosuke Niwa
Comment 18
2010-10-19 15:25:59 PDT
(In reply to
comment #17
)
> Confirmed that this change restores the previous Chromium Mac behavior (which matches the current Safari Mac behavior).
Great! Jia, I think you can commit this change as build fix since it broke chromium test bots.
Jia Pu
Comment 19
2010-10-19 15:26:42 PDT
(In reply to
comment #15
)
> Also, I have to say that the new behavior seems better than the old behavior. In
http://trac.webkit.org/browser/trunk/LayoutTests/editing/deleting/delete-3800834-fix.html
for example, we have: > > <span id="test">Foo<BR><BLOCKQUOTE>Bar</BLOCKQUOTE></span> > > And we delete "\nBar" backwards. We have correction indicator (or whatever red dotted line is called) until we delete "Bar" but the indicator disappears when we delete "\n" between "Foo" and "Bar" (deleted by that moment). Is this intended?
I'm not quite sure about the rationale behind the old behavior. So for this patch, my intention is to only change introduce the new behavior into Safari on 10.7. If the new behavior is desirable across the board, I could certainly make this change to all platforms.
Jia Pu
Comment 20
2010-10-19 15:37:17 PDT
Reopen the bug. The first patch broke some Chromium Mac behavior.
Jia Pu
Comment 21
2010-10-19 16:47:51 PDT
Created
attachment 71225
[details]
Additional Patch (v1) New patch to make sure there's no change of behavior on non-Mac platforms.
James Robinson
Comment 22
2010-10-19 16:52:06 PDT
Comment on
attachment 71225
[details]
Additional Patch (v1) R=me Thanks for following up on this!
WebKit Commit Bot
Comment 23
2010-10-19 17:20:45 PDT
Comment on
attachment 71225
[details]
Additional Patch (v1) Clearing flags on attachment: 71225 Committed
r70113
: <
http://trac.webkit.org/changeset/70113
>
WebKit Commit Bot
Comment 24
2010-10-19 17:20:52 PDT
All reviewed patches have been landed. Closing bug.
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