Bug 76266 - Cache RenderStyle pointer in updateBoxModelInfoFromStyle methods
Summary: Cache RenderStyle pointer in updateBoxModelInfoFromStyle methods
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 76265
  Show dependency treegraph
Reported: 2012-01-13 04:36 PST by Mihnea Ovidenie
Modified: 2012-01-13 05:34 PST (History)
0 users

See Also:

Patch (3.70 KB, patch)
2012-01-13 04:42 PST, Mihnea Ovidenie
kling: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihnea Ovidenie 2012-01-13 04:36:45 PST
Modify RenderBoxModelObject/RenderBox::updateBoxModelInfoFromStyle to cache the result of RenderObject::style() and use that result instead of repeatedly calling the style() method.
Comment 1 Mihnea Ovidenie 2012-01-13 04:42:50 PST
Created attachment 122410 [details]
Comment 2 Andreas Kling 2012-01-13 05:34:49 PST
Comment on attachment 122410 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=122410&action=review

> Source/WebCore/ChangeLog:8
> +        Refactoring code therefore no new tests. (OOPS!)

CQ can't land this automatically with the OOPS intact, you need to remove it.

Also, you should mention why we are doing this, as it's not obvious since RenderObject::style() is just a trivial inline getter right now.