Bug 141668

Summary: RenderTableRow should check if it has access to its ancestor chain.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, esprehn+autocc, glenn, kling, kondapallykalyan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description zalan 2015-02-16 15:05:23 PST
It might be in detached state.
Comment 1 zalan 2015-02-16 15:08:59 PST
Created attachment 246687 [details]
Patch
Comment 2 Andreas Kling 2015-02-16 15:11:06 PST
Comment on attachment 246687 [details]
Patch

r=me
Comment 3 Chris Dumez 2015-02-16 15:14:39 PST
Comment on attachment 246687 [details]
Patch

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

r=me % nits.

> Source/WebCore/rendering/RenderTableRow.h:46
> +    RenderTable* table() const

Now that this is no longer a one-liner, we may want to move it outside the class and mark it as inline.

> Source/WebCore/rendering/RenderTableRow.h:121
> +    RenderTableSection* section() const { return downcast<RenderTableSection>(parent()); }

Even though they are no outside callers now, I could imagine this getter being useful. Why not keep it public?
Comment 4 Chris Dumez 2015-02-16 15:15:10 PST
Andreas beat me to it :)
Comment 5 zalan 2015-02-16 15:32:55 PST
(In reply to comment #3)
> Comment on attachment 246687 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=246687&action=review
> 
> r=me % nits.
> 
> > Source/WebCore/rendering/RenderTableRow.h:46
> > +    RenderTable* table() const
> 
> Now that this is no longer a one-liner, we may want to move it outside the
> class and mark it as inline.
> 
Sure.

> > Source/WebCore/rendering/RenderTableRow.h:121
> > +    RenderTableSection* section() const { return downcast<RenderTableSection>(parent()); }
> 
> Even though they are no outside callers now, I could imagine this getter
> being useful. Why not keep it public?
I prefer the not public until required policy.
Comment 6 zalan 2015-02-16 15:37:24 PST
Created attachment 246690 [details]
Patch
Comment 7 zalan 2015-02-16 15:50:21 PST
Created attachment 246692 [details]
Patch
Comment 8 WebKit Commit Bot 2015-02-16 17:02:27 PST
Comment on attachment 246692 [details]
Patch

Clearing flags on attachment: 246692

Committed r180190: <http://trac.webkit.org/changeset/180190>
Comment 9 WebKit Commit Bot 2015-02-16 17:02:34 PST
All reviewed patches have been landed.  Closing bug.