WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23389
Clean up ApplyStyleCommand and deploy a bit more PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=23389
Summary
Clean up ApplyStyleCommand and deploy a bit more PassRefPtr
Eric Seidel (no email)
Reported
2009-01-16 14:30:21 PST
Clean up ApplyStyleCommand and deploy a bit more PassRefPtr Patch coming...
Attachments
Small cleanups
(16.61 KB, patch)
2009-01-16 14:34 PST
,
Eric Seidel (no email)
justin.garcia
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2009-01-16 14:34:48 PST
Created
attachment 26807
[details]
Small cleanups WebCore/ChangeLog | 37 ++++++++++++++++++++ WebCore/editing/ApplyStyleCommand.cpp | 35 ++++++------------- WebCore/editing/ApplyStyleCommand.h | 2 +- WebCore/editing/CompositeEditCommand.cpp | 7 ++-- WebCore/editing/IndentOutdentCommand.cpp | 4 +- WebCore/editing/InsertLineBreakCommand.cpp | 8 ++-- .../editing/InsertParagraphSeparatorCommand.cpp | 2 +- WebCore/editing/InsertTextCommand.cpp | 2 +- WebCore/editing/ModifySelectionListLevel.cpp | 4 +- WebCore/editing/ReplaceSelectionCommand.cpp | 24 ++++++------ WebCore/editing/ReplaceSelectionCommand.h | 6 ++-- 11 files changed, 77 insertions(+), 54 deletions(-)
Justin Garcia
Comment 2
2009-01-16 14:43:21 PST
Comment on
attachment 26807
[details]
Small cleanups - if (styleChange.applyBold()) { - RefPtr<Element> boldElement = document()->createElementNS(xhtmlNamespaceURI, "b", ec); - ASSERT(ec == 0); - insertNodeBefore(boldElement.get(), startNode); - surroundNodeRangeWithElement(startNode, endNode, boldElement.get()); - } + if (styleChange.applyBold()) + surroundNodeRangeWithElement(startNode, endNode, document()->createElementNS(xhtmlNamespaceURI, "b", ec)); You no longer ASSERT that createElementNS completed without error, I suppose if it encounters an error it will return 0 and that will be caught by surroundNodeRangeWithElement, ya? r=me
Eric Seidel (no email)
Comment 3
2009-01-16 16:35:22 PST
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebCore/ChangeLog M WebCore/editing/ApplyStyleCommand.cpp M WebCore/editing/ApplyStyleCommand.h M WebCore/editing/CompositeEditCommand.cpp M WebCore/editing/IndentOutdentCommand.cpp M WebCore/editing/InsertLineBreakCommand.cpp M WebCore/editing/InsertParagraphSeparatorCommand.cpp M WebCore/editing/InsertTextCommand.cpp M WebCore/editing/ModifySelectionListLevel.cpp M WebCore/editing/ReplaceSelectionCommand.cpp M WebCore/editing/ReplaceSelectionCommand.h Committed
r39997
Yeah, the ASSERT was unnecessary. Thanks for the review!
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