[Webkit-unassigned] [Bug 91812] Implement UndoManager's automatic DOM transactions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 17 22:28:07 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=91812





--- Comment #9 from Ryosuke Niwa <rniwa at webkit.org>  2012-08-17 22:28:39 PST ---
(From update of attachment 159259)
View in context: https://bugs.webkit.org/attachment.cgi?id=159259&action=review

> Source/WebCore/bindings/v8/DOMTransaction.cpp:38
> +DOMTransaction* DOMTransaction::s_recordingDOMTransaction = 0;

It's probably better to put this on undoManager so that we can share code with JSC.

> Source/WebCore/bindings/v8/DOMTransaction.cpp:58
> +        m_transactionSteps = adoptPtr(new Vector<RefPtr<DOMTransactionStep> >);

We can't just have Vector<RefPtr<DOMTransactionStep> > as a member?

> Source/WebCore/editing/DOMTransactionStep.h:45
> +class DOMTransactionStep : public RefCounted<DOMTransactionStep> {
> +public:
> +    virtual ~DOMTransactionStep() { }

You need to make the constructor private and add a static create() function. See other RefCounted classes for an example.

> Source/WebCore/editing/DOMTransactionStep.h:62
> +    RefPtr<Node> m_parent;
> +    RefPtr<Node> m_refChild;
> +    RefPtr<Node> m_child;

Don't we have that cycle problem?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list