Bug 112072

Summary: Replace static_casts with to* functions - Part 2
Product: WebKit Reporter: Abhishek Arya <inferno>
Component: WebKit Misc.Assignee: Abhishek Arya <inferno>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, pdr, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 112097    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Abhishek Arya
Reported 2013-03-11 15:05:08 PDT
Replace static_casts with to* functions
Attachments
Patch (30.97 KB, patch)
2013-03-11 15:08 PDT, Abhishek Arya
no flags
Patch (31.39 KB, patch)
2013-03-11 15:35 PDT, Abhishek Arya
no flags
Patch (31.37 KB, patch)
2013-03-11 20:11 PDT, Abhishek Arya
no flags
Patch (31.38 KB, patch)
2013-03-11 22:58 PDT, Abhishek Arya
no flags
Abhishek Arya
Comment 1 2013-03-11 15:08:23 PDT
Philip Rogers
Comment 2 2013-03-11 15:29:09 PDT
Comment on attachment 192570 [details] Patch Can you add a bit more to the ChangeLog so people aren't confused when they see this in a few years? Just a small summary of what we're doing here. LGTM otherwise.
Abhishek Arya
Comment 3 2013-03-11 15:35:50 PDT
WebKit Review Bot
Comment 4 2013-03-11 19:01:25 PDT
Comment on attachment 192579 [details] Patch Clearing flags on attachment: 192579 Committed r145462: <http://trac.webkit.org/changeset/145462>
WebKit Review Bot
Comment 5 2013-03-11 19:01:32 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 6 2013-03-11 19:49:33 PDT
Re-opened since this is blocked by bug 112097
Abhishek Arya
Comment 7 2013-03-11 20:11:42 PDT
Abhishek Arya
Comment 8 2013-03-11 22:47:27 PDT
Loads of toElement() crashes in WebCore::ApplyStyleCommand::applyBlockStyle http://build.webkit.org/results/Apple%20Lion%20Debug%20WK1%20(Tests)/r145468%20(7365)/results.html
Ryosuke Niwa
Comment 9 2013-03-11 22:52:38 PDT
(In reply to comment #8) > Loads of toElement() crashes in WebCore::ApplyStyleCommand::applyBlockStyle > > http://build.webkit.org/results/Apple%20Lion%20Debug%20WK1%20(Tests)/r145468%20(7365)/results.html That's a false positive. We should be using toContainerNode instead.
Ryosuke Niwa
Comment 10 2013-03-11 22:54:54 PDT
Comment on attachment 192629 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192629&action=review > Source/WebCore/editing/ApplyStyleCommand.cpp:294 > - startRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), startIndex, 0, true); > - endRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), endIndex, 0, true); > + startRange = TextIterator::rangeFromLocationAndLength(toElement(scope), startIndex, 0, true); > + endRange = TextIterator::rangeFromLocationAndLength(toElement(scope), endIndex, 0, true); Please use toContainerNode here. scope can be Document.
Abhishek Arya
Comment 11 2013-03-11 22:58:06 PDT
(In reply to comment #10) > (From update of attachment 192629 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=192629&action=review > > > Source/WebCore/editing/ApplyStyleCommand.cpp:294 > > - startRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), startIndex, 0, true); > > - endRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), endIndex, 0, true); > > + startRange = TextIterator::rangeFromLocationAndLength(toElement(scope), startIndex, 0, true); > > + endRange = TextIterator::rangeFromLocationAndLength(toElement(scope), endIndex, 0, true); > > Please use toContainerNode here. scope can be Document. Thanks a lot Ryosuke for confirming. I don't understand why cr-linux-debug didnt shout at me :(.
Abhishek Arya
Comment 12 2013-03-11 22:58:41 PDT
Ryosuke Niwa
Comment 13 2013-03-11 22:58:54 PDT
(In reply to comment #11) > > Thanks a lot Ryosuke for confirming. I don't understand why cr-linux-debug didnt shout at me :(. cr-linux-debug doesn't run tests.
Build Bot
Comment 14 2013-03-12 09:10:37 PDT
Comment on attachment 192643 [details] Patch Attachment 192643 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/17174047 New failing tests: platform/mac/fast/speechsynthesis/speech-synthesis-speak.html
Abhishek Arya
Comment 15 2013-03-12 09:55:00 PDT
Lets me check these out locally, they might be real bugs. Regressions: Unexpected crashes (2) editing/selection/selection-modify-crash.html [ Crash ] platform/mac/fast/speechsynthesis/speech-synthesis-speak.html [ Crash ]
Abhishek Arya
Comment 16 2013-03-12 10:16:32 PDT
Comment on attachment 192643 [details] Patch Nothing crashes locally on mac, going cq+.
WebKit Review Bot
Comment 17 2013-03-12 10:46:50 PDT
Comment on attachment 192643 [details] Patch Clearing flags on attachment: 192643 Committed r145562: <http://trac.webkit.org/changeset/145562>
WebKit Review Bot
Comment 18 2013-03-12 10:46:54 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.