Skip to content
  • darin's avatar
    Reviewed by Geoff. · 8c216134
    darin authored
            - <rdar://problem/4885227>
              frame resizing is now live and no longer does direct drawing
    
            * html/HTMLFrameSetElement.h: Made frameBorder() and noResize() const.
            Added rowLengths() and colLengths() getters so that we don't have to
            have RenderFrameSet as a friend. Stopped using bit fields.
    
            * html/HTMLFrameSetElement.cpp:
            (WebCore::HTMLFrameSetElement::defaultEventHandler): Removed now-uneeded
            check for contextmenu events. Look at return value from userResize to
            decide whether to mark the event as "default handled". In the case where
            the event is handled, don't call through to the base class.
    
            * rendering/RenderFrameSet.h: No longer mark HTMLFrameSetElement as a
            friend. Made positionFrames and canResize private, and changed canResize
            to take an IntPoint. Added isResizingRow, isResizingColumn, canResizeRow,
            and canResizeColumn functions to be used soon for cursor feedback.
            Removed override of non-virtual element() function and replaced it with
            a private frameSet() inline function. Grouped all the data members for
            each axis into a GridAxis class, and made one called m_cols and one called
            m_rows. Used vectors for the resizable bits of this instead of new/delete
            arrays. Added a constant named "noSplit" so we don't have to use -1
            everywhere explicitly for this purpose. Renamed setResizing to
            setIsResizing and made it private. Eliminated resizing() function.
            Added new private helper functions, layOutAxis, findNonResizableSplits,
            splitPosition, hitTestSplit, startResizing, and continueResizing.
            Renamed m_resizing to m_isResizing, and m_clientResizing to
            m_isChildResizing.
    
            * rendering/RenderFrameSet.cpp:
            (WebCore::RenderFrameSet::RenderFrameSet): Removed now-unneeded initialization
            that is handled by the GridAxis and Vector constructors.
            (WebCore::RenderFrameSet::~RenderFrameSet): Ditto (for destructors).
            (WebCore::RenderFrameSet::GridAxis::GridAxis): Added.
            (WebCore::RenderFrameSet::frameSet): Added. Inline function so we don't have
            to cast the result of node() or element() everywhere.
            (WebCore::RenderFrameSet::nodeAtPoint): Updated for name changes.
            (WebCore::RenderFrameSet::GridAxis::resize): Added. Helper function to be used
            in the layout function.
            (WebCore::RenderFrameSet::layOutAxis): Added. Factored out the part of the
            layout function that used to be inside a for loop for the two axes.
            The algorithm is otherwise unchanged.
            (WebCore::RenderFrameSet::findNonResizableSplits): Added. Factored out the
            code that set up the "split variable" arrays from the layout function.
            (WebCore::RenderFrameSet::layout): Moved the bulk of this function into the
            new helpers. This allowed me to remove the use of goto.
            (WebCore::RenderFrameSet::positionFrames): Updated for change to data structures.
            Also added some more local variables for clarity.
            (WebCore::RenderFrameSet::startResizing): Added. Code factored out of the
            userResize function that handles mousedown events that might begin a resize.
            (WebCore::RenderFrameSet::continueResizing): Added. Code factored out of the
            userResize function that handles mouse events that continue a resize already
            in progress, including mouseup events that end the resizing. Uses the new
            splitPosition function so it can be used over and over again while resizing.
            (WebCore::RenderFrameSet::userResize): Restructured to use the new helper
            functions. Removed the direct drawing of a gray bar during mouse movement;
            instead we do the resizing live.
            (WebCore::RenderFrameSet::setIsResizing): Updated for name changes.
            (WebCore::RenderFrameSet::isResizingRow): Added.
            (WebCore::RenderFrameSet::isResizingColumn): Added.
            (WebCore::RenderFrameSet::canResize): Changed to use hitTestSplit for clarity.
            (WebCore::RenderFrameSet::canResizeRow): Added.
            (WebCore::RenderFrameSet::canResizeColumn): Added.
            (WebCore::RenderFrameSet::splitPosition): Added.
            (WebCore::RenderFrameSet::hitTestSplit): Added. Contains the guts of the code
            that was used both in canResize and userResize before -- now it's shared.
            (WebCore::RenderFrameSet::dump): Updated for name changes.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    8c216134