WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 51082
execCommand('JustifyCenter') adds extra BR
https://bugs.webkit.org/show_bug.cgi?id=51082
Summary
execCommand('JustifyCenter') adds extra BR
Ryosuke Niwa
Reported
2010-12-14 18:16:10 PST
execCommand('JustifyCenter') and any other editing command that modifies the CSS block properties will add an extra BR at the end of block. e.g. justifying center: "hello" yields <div style="text-align: center;">hello<br></div> as supposed to <div style="text-align: center;">hello<br></div>. This is a primary reason WebKit is scoring so low on
http://www.browserscope.org/richtext2/test
.
Attachments
fixes the bug
(15.30 KB, patch)
2010-12-14 18:55 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2010-12-14 18:55:15 PST
Created
attachment 76612
[details]
fixes the bug
Darin Adler
Comment 2
2010-12-15 18:57:22 PST
Comment on
attachment 76612
[details]
fixes the bug Seems inelegant to me to add a <br> and then later remove it.
Ryosuke Niwa
Comment 3
2010-12-15 19:14:37 PST
Thanks for the review! (In reply to
comment #2
)
> (From update of
attachment 76612
[details]
) > Seems inelegant to me to add a <br> and then later remove it.
It really is. I'm not happy about that either. But we do this all ever the place in editing whenever we move paragraphs because ReplaceSelectionCommand and others require a placeholder. We could avoid doing this if we had used moveParagraphWithClones instead. On a side note, we should really be using ApplyBlockElementCommand here because all we need to do is to wrap each paragraph with a div and ApplyBlockElementCommand does exactly that. However, when I tried to deploy ApplyBlockElementCommand while working on this bug, I encountered numerous crashes and failures and I had to give up. I'll come back to this issue later though.
Ryosuke Niwa
Comment 4
2010-12-16 14:08:14 PST
Comment on
attachment 76612
[details]
fixes the bug Clearing flags on attachment: 76612 Committed
r74214
: <
http://trac.webkit.org/changeset/74214
>
Ryosuke Niwa
Comment 5
2010-12-16 14:08:20 PST
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