[webkit-reviews] review granted: [Bug 120402] Don't use NodeRenderingContext when attaching text renderers : [Attachment 209865] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 28 05:32:25 PDT 2013


Andreas Kling <akling at apple.com> has granted Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 120402: Don't use NodeRenderingContext when attaching text renderers
https://bugs.webkit.org/show_bug.cgi?id=120402

Attachment 209865: patch
https://bugs.webkit.org/attachment.cgi?id=209865&action=review

------- Additional Comments from Andreas Kling <akling at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=209865&action=review


r=me

> Source/WebCore/style/StyleResolveTree.cpp:210
> +static void crateTextRendererIfNeeded(Text* textNode)

Typo, cr_e_ate.

> Source/WebCore/style/StyleResolveTree.cpp:276
> +    RenderText* textRenderer = toRenderText(textNode->renderer());

We could add a tightly-typed override and avoid casts like this:
RenderText* Text::renderer() const;

> Source/WebCore/style/StyleResolveTree.h:56
> +void attachTextRenderer(Text*);
> +void detachTextRenderer(Text*);
> +void updateTextRendererAfterContentChange(Text*, unsigned
offsetOfReplacedData, unsigned lengthOfReplacedData);

Can we make these take Text& instead? They shouldn't have to deal with null
inputs.


More information about the webkit-reviews mailing list