Bug 23428 - Frame Refactor: Move forceLayout,adjustPageHeight,forceLa. to FrameView
Summary: Frame Refactor: Move forceLayout,adjustPageHeight,forceLa. to FrameView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-20 03:55 PST by Holger Freyther
Modified: 2009-02-02 05:43 PST (History)
0 users

See Also:


Attachments
Carry out the move (15.96 KB, patch)
2009-01-20 04:38 PST, Holger Freyther
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Freyther 2009-01-20 03:55:14 PST
Move the following methods to FrameView:

void forceLayout(bool allowSubtree = false);
void forceLayoutWithPageWidthRange(float minPageWidth, float maxPageWidth, bool adjustViewSize);
void adjustPageHeight(float* newBottom, float oldTop, float oldBottom, float bottomLimit);
Comment 1 Holger Freyther 2009-01-20 04:38:14 PST
Created attachment 26858 [details]
Carry out the move

Tested on the mac. Zoom functions were left in Frame due the state they store in the Frame (which would have to be saved/restored on navigation and FrameView creation)
Comment 2 Darin Adler 2009-01-23 14:22:09 PST
Comment on attachment 26858 [details]
Carry out the move

> +    // We cannot unschedule a pending relayout, since the force can be called with
> +    // a tiny rectangle from a drawRect update.  By unscheduling we in effect
> +    // "validate" and stop the necessary full repaint from occurring.  Basically any basic
> +    // append/remove DHTML is broken by this call.  For now, I have removed the optimization
> +    // until we have a better invalidation stategy. -dwh
> +    //v->unscheduleRelayout();

The "v->" no longer makes sense here.

>      if (minPageWidth > 0.0)
> -        coreFrame->forceLayoutWithPageWidthRange(minPageWidth, maxPageWidth, adjustViewSize);
> +        coreFrame->view()->forceLayoutWithPageWidthRange(minPageWidth, maxPageWidth, adjustViewSize);
>      else {
> -        coreFrame->forceLayout(!adjustViewSize);
> +        coreFrame->view()->forceLayout(!adjustViewSize);
>          if (adjustViewSize)
>              coreFrame->view()->adjustViewSize();
>      }

No need to null-check view() here? Are you sure?

r=me
Comment 3 Holger Freyther 2009-02-02 05:43:50 PST
Landed in r40473. I added a null check for the view.