Bug 7692 - Should use an iterator in CompositeEditCommand::doUnapply()
Summary: Should use an iterator in CompositeEditCommand::doUnapply()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Justin Garcia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-09 21:49 PST by Justin Garcia
Modified: 2006-03-09 23:35 PST (History)
0 users

See Also:


Attachments
patch (892 bytes, patch)
2006-03-09 21:57 PST, Justin Garcia
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Garcia 2006-03-09 21:49:48 PST
About 25% of the time during an Undo is spent getting the ith EditCommand out of m_cmds:

    for (int i = m_cmds.count() - 1; i >= 0; --i)
        m_cmds[i]->unapply();

We should use an iterator.
Comment 1 Justin Garcia 2006-03-09 21:57:08 PST
Created attachment 6974 [details]
patch
Comment 2 Adele Peterson 2006-03-09 22:38:08 PST
Comment on attachment 6974 [details]
patch

Assuming all tests pass, r=me.