[Webkit-unassigned] [Bug 80794] :first-line pseudo selector ignoring words created from :before

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 3 10:14:54 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=80794





--- Comment #19 from Daniel Bates <dbates at webkit.org>  2012-10-03 10:15:18 PST ---
(From update of attachment 166838)
View in context: https://bugs.webkit.org/attachment.cgi?id=166838&action=review

> Source/WebCore/rendering/RenderObject.cpp:2607
> +static PassRefPtr<RenderStyle> getFirstLineStyle(StyleCacheState type, const RenderObject* renderer, RenderStyle* style)

This is a very minor nit. We tend to prefix functions with the word "get" when it returns one or more values through out arguments (*). Notice that this function doesn't return any value through an out argument. Although we have functions that don't follow this convention, including RenderObject::{getCachedPseudoStyle, getUncachedPseudoStyle}(), it would be great if we could come up with a descriptive name for this function that omitted the prefix "get".

(*) See <http://www.webkit.org/coding/coding-style.html#names-out-argument>.

> Source/WebCore/rendering/RenderObject.cpp:2618
> +            // A first-line style is in effect. Cache a first-line style for ourselves.

I suggest that we move this comment inside the block associated with the "if (type == Cached)" statement (below) so as to scope it to that code.

> Source/WebCore/rendering/RenderObject.cpp:2629
> +            return firstLineBlock->getUncachedPseudoStyle(FIRST_LINE, style, firstLineBlock == renderer ? style : 0);

Can you give an example when firstLineBlock == renderer evaluates to true?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list