Bug 98631

Summary: Rename RenderObject::firstLineStyleSlowCase() to a more appropriate cachedFirstLineStyle()
Product: WebKit Reporter: Arpita Bahuguna <arpitabahuguna>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: arpitabahuguna, dbates, eric, esprehn, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.