Bug 124563 - Removal of redundant function call in Editor::insertTextWithoutSendingTextEvent
Summary: Removal of redundant function call in Editor::insertTextWithoutSendingTextEvent
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Seokju Kwon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-18 22:21 PST by Seokju Kwon
Modified: 2013-11-19 21:16 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.46 KB, patch)
2013-11-18 22:24 PST, Seokju Kwon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seokju Kwon 2013-11-18 22:21:53 PST
'text' can never be empty as it's already been checked.
Comment 1 Seokju Kwon 2013-11-18 22:24:25 PST
Created attachment 217273 [details]
Patch
Comment 2 Brent Fulgham 2013-11-19 16:58:43 PST
(In reply to comment #0)
> 'text' can never be empty as it's already been checked.

Where does the check happen? It looks like "shouldInsertText" is effectively a delegate, and we have no specific say over what it does.

Do you mean that the "text.isEmpty()" test always happens before Editor::insertTextWithoutSendingTextEvent?
Comment 3 Seokju Kwon 2013-11-19 17:04:56 PST
(In reply to comment #2)
> (In reply to comment #0)
> > 'text' can never be empty as it's already been checked.
> 
> Where does the check happen? It looks like "shouldInsertText" is effectively a delegate, and we have no specific say over what it does.
> 
> Do you mean that the "text.isEmpty()" test always happens before Editor::insertTextWithoutSendingTextEvent?


It's been checked at top of Editor::insertTextWithoutSendingTextEvent().
(See : http://trac.webkit.org/browser/trunk/Source/WebCore/editing/Editor.cpp#L958 )
Comment 4 Brent Fulgham 2013-11-19 20:52:28 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #0)
> > > 'text' can never be empty as it's already been checked.
> > 
> > Where does the check happen? It looks like "shouldInsertText" is effectively a delegate, and we have no specific say over what it does.
> > 
> > Do you mean that the "text.isEmpty()" test always happens before Editor::insertTextWithoutSendingTextEvent?
> 
> 
> It's been checked at top of Editor::insertTextWithoutSendingTextEvent().
> (See : http://trac.webkit.org/browser/trunk/Source/WebCore/editing/Editor.cpp#L958 )

Got it. I had to look outside the patch to see that.

r=me.
Comment 5 WebKit Commit Bot 2013-11-19 21:16:41 PST
Comment on attachment 217273 [details]
Patch

Clearing flags on attachment: 217273

Committed r159544: <http://trac.webkit.org/changeset/159544>
Comment 6 WebKit Commit Bot 2013-11-19 21:16:43 PST
All reviewed patches have been landed.  Closing bug.