Bug 32086

Summary: Repaint issues in text input under a scale transform
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Testcase
none
Patch
mitz: review-
Patch v2 mitz: review+

Description Simon Fraser (smfr) 2009-12-02 13:39:06 PST
Created attachment 44179 [details]
Testcase

The attached testcase shows a repaint bug when typing into a text input inside an element with a scale transform.
Comment 1 Simon Fraser (smfr) 2010-01-04 10:37:02 PST
This seems to be an issue where the subtree layout for the text input is using layout state, which is ignorant of the transform on a container.
Comment 2 Simon Fraser (smfr) 2010-01-04 11:34:40 PST
Created attachment 45809 [details]
Patch
Comment 3 mitz 2010-01-04 11:44:12 PST
Comment on attachment 45809 [details]
Patch

> +        (WebCore::RenderView::enableLayoutStateForSubtreeLayout):

This sounds like a method that enables layout state, but it isn’t. How about “canUseLayoutStateForSubtree()” (I don’t think Layout is necessary) or better yet “shouldDisableLayoutStateForSubtree()” (with the opposite return value of course)?

> +    bool enableLayoutState;

If you rename the method to shouldDisable… then you can rename the variable too.

> +    if (subtree) {
> +        RenderView* view = root->view();
> +        enableLayoutState = view->enableLayoutStateForSubtreeLayout(root);
> +        view->pushLayoutState(root);

Do you have to push if you disable?

> +    bool enableLayoutStateForSubtreeLayout(RenderObject* root) const;

Can drop “root”.

r- because I think the above name is too confusing.
Comment 4 Simon Fraser (smfr) 2010-01-04 13:40:53 PST
Created attachment 45827 [details]
Patch v2
Comment 5 Simon Fraser (smfr) 2010-01-04 13:50:55 PST
http://trac.webkit.org/changeset/52757