[Webkit-unassigned] [Bug 13487] Implement O(1) absoluteClippedOverflowRect and absoluteOutlineBox during layout for a possible speed gain

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 28 13:50:16 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=13487





------- Comment #20 from darin at apple.com  2007-04-28 13:50 PDT -------
(From update of attachment 14243)
LayoutState should inherit from Noncopyable.

+    struct LayoutState* m_next;

LayoutState is a class not a struct, but also, just LayoutState* should work
here.

+        // Our layuot state is not valid for the repaints we are going to
trigger by

Typo, layuot.

+    bool layoutOnlyPositionedObjects();

The verb form is "layOut" and the noun form is "layout". I know that the
layout() function violates this, but layOutAxis() respects it. I'm not sure
others would agree with my take on this.

+    void offsetUnderRelPositionedInline(RenderObject*, int& x, int& y) const;

I'm not completely comfortable with the verb use of offset here either. Ideally
long-term something like this would return an IntSize that you would then add
to your existing local IntPoint variable with +=.

+        // FIXME: Optimize using LayuotState and remove the
disableLayoutState() call

Typo here, LayuoutState.

Given the paired nature of push/pop and disable/enable, perhaps we should use
stack-based objects with destructors to ensure we don't forget to match them
up. We could even make ones with features to cleanly deal with cases like the
ones that currently have pushedLayoutState booleans.

+    void pushLayoutState(RenderBox* renderer, const IntSize& offset) {
+        if (m_layoutStateDisableCount || m_frameView->needsFullRepaint())
+            return;
+        m_layoutState = new (renderArena()) LayoutState(m_layoutState,
renderer, offset);
+    }

I think we should put braces on separate lines for multiline functions, even
ones that are inlines in a header. The style guidelines should say something
about this if they don't already.

I think Hyatt should review this too; I'm not sure I understand the
optimization well enough.


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



More information about the webkit-unassigned mailing list