Bug 117347

Summary: [rendering] Use foreground color to render the overtype caret
Product: WebKit Reporter: Claudio Saavedra <csaavedra>
Component: New BugsAssignee: Claudio Saavedra <csaavedra>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, rniwa, svillar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Claudio Saavedra 2013-06-07 07:18:54 PDT
[rendering] Use foreground color to render the overtype caret
Comment 1 Claudio Saavedra 2013-06-07 07:22:21 PDT
Created attachment 204042 [details]
Patch
Comment 2 Darin Adler 2013-06-07 07:27:00 PDT
Comment on attachment 204042 [details]
Patch

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

> Source/WebCore/rendering/RenderObject.cpp:1640
> +                color = frame()->selection()->isFocusedAndActive() ?
>                      theme()->activeSelectionBackgroundColor() :
>                      theme()->inactiveSelectionBackgroundColor();

WebKit style guide says to put the "?" and ":" at the beginnings of lines, not the ends of lines, or this fits fine on one line, I think.

> Source/WebCore/rendering/RenderView.h:344
> +    bool m_selectionWasCaret;

It would be better to initialize this when in the RenderView constructor, even if the code will work OK with an uninitialized boolean. If nothing else, the uninitialized read it will irritate people using memory tools like valgrind.
Comment 3 Claudio Saavedra 2013-06-07 08:37:08 PDT
Committed r151322: <http://trac.webkit.org/changeset/151322>