Bug 98631 - Rename RenderObject::firstLineStyleSlowCase() to a more appropriate cachedFirstLineStyle()
Summary: Rename RenderObject::firstLineStyleSlowCase() to a more appropriate cachedFir...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-07 23:48 PDT by Arpita Bahuguna
Modified: 2012-10-09 04:08 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.04 KB, patch)
2012-10-08 06:25 PDT, Arpita Bahuguna
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arpita Bahuguna 2012-10-07 23:48:59 PDT
Contrary to its name, firstLineStyleSlowCase() actually picks up the cached styles.

We should thus rename it to cachedFirstLineStyle() (in keeping with RenderObject::uncachedFirstLineStyle()).
Comment 1 Arpita Bahuguna 2012-10-08 06:25:35 PDT
Created attachment 167531 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-10-08 09:03:26 PDT
Comment on attachment 167531 [details]
Patch

It also fetches the first line style.  m_style/style() is where it's cached.  I don't think this change makes sense.
Comment 3 Elliott Sprehn 2012-10-08 09:45:46 PDT
(In reply to comment #2)
> (From update of attachment 167531 [details])
> It also fetches the first line style.  m_style/style() is where it's cached.  I don't think this change makes sense.

Can you explain what you mean? This is the same as getCachedPseudoStyle() and getUncachedPseudoStyle(). The naming right now doesn't make any sense to me because this isn't the slow case, it's just the default case when your document uses first line styles.
Comment 4 Elliott Sprehn 2012-10-08 09:47:12 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 167531 [details] [details])
> > It also fetches the first line style.  m_style/style() is where it's cached.  I don't think this change makes sense.
> 
> Can you explain what you mean? This is the same as getCachedPseudoStyle() and getUncachedPseudoStyle(). The naming right now doesn't make any sense to me because this isn't the slow case, it's just the default case when your document uses first line styles.

For reference, I requested this change because we have getUncached and getCached for pseudo styles, but first line has uncachedFirstLineStyle() and firstLineStyle() and firstLineStyleSlowCase of which the last one doesn't have a good name since it doesn't tell you what it's really doing. :)
Comment 5 Eric Seidel (no email) 2012-10-08 15:07:16 PDT
Comment on attachment 167531 [details]
Patch

OK.
Comment 6 WebKit Review Bot 2012-10-08 15:30:16 PDT
Comment on attachment 167531 [details]
Patch

Clearing flags on attachment: 167531

Committed r130694: <http://trac.webkit.org/changeset/130694>
Comment 7 WebKit Review Bot 2012-10-08 15:30:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Arpita Bahuguna 2012-10-09 04:08:30 PDT
Thanks Eric and Elliott for the review.