Bug 32086 - Repaint issues in text input under a scale transform
Summary: Repaint issues in text input under a scale transform
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-02 13:39 PST by Simon Fraser (smfr)
Modified: 2010-01-04 13:50 PST (History)
1 user (show)

See Also:


Attachments
Testcase (544 bytes, text/html)
2009-12-02 13:39 PST, Simon Fraser (smfr)
no flags Details
Patch (7.33 KB, patch)
2010-01-04 11:34 PST, Simon Fraser (smfr)
mitz: review-
Details | Formatted Diff | Diff
Patch v2 (7.38 KB, patch)
2010-01-04 13:40 PST, Simon Fraser (smfr)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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