Bug 120402

Summary: Don't use NodeRenderingContext when attaching text renderers
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: DOMAssignee: 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 Flags
patch kling: review+

Antti Koivisto
Reported 2013-08-28 04:46:58 PDT
Simplify.
Attachments
patch (26.37 KB, patch)
2013-08-28 05:00 PDT, Antti Koivisto
kling: review+
Antti Koivisto
Comment 1 2013-08-28 05:00:48 PDT
Andreas Kling
Comment 2 2013-08-28 05:31:49 PDT
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.
Antti Koivisto
Comment 3 2013-08-28 06:13:02 PDT
Note You need to log in before you can comment on or make changes to this bug.