Summary: | Don't use NodeRenderingContext when attaching text renderers | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, kangil.han, kling, WebkitBugTracker | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Antti Koivisto
2013-08-28 04:46:58 PDT
Created attachment 209865 [details]
patch
Comment on attachment 209865 [details] patch 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. |