Bug 121605

Summary: CTTE: Tighten renderer types for InlineTextBox and SVGInlineTextBox.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2013-09-19 05:41:52 PDT
CTTE: Tighten renderer types for InlineTextBox and SVGInlineTextBox.
Comment 1 Andreas Kling 2013-09-19 05:42:28 PDT
Created attachment 212058 [details]
Patch
Comment 2 WebKit Commit Bot 2013-09-19 05:44:11 PDT
Attachment 212058 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/editing/VisibleUnits.cpp', u'Source/WebCore/rendering/InlineFlowBox.cpp', u'Source/WebCore/rendering/InlineTextBox.cpp', u'Source/WebCore/rendering/InlineTextBox.h', u'Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp', u'Source/WebCore/rendering/svg/SVGInlineTextBox.cpp', u'Source/WebCore/rendering/svg/SVGInlineTextBox.h', u'Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp', u'Source/WebCore/rendering/svg/SVGRootInlineBox.cpp', u'Source/WebCore/rendering/svg/SVGTextChunkBuilder.cpp', u'Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp', u'Source/WebCore/rendering/svg/SVGTextQuery.cpp']" exit_code: 1
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:84:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/rendering/svg/SVGInlineTextBox.h:28:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Antti Koivisto 2013-09-19 05:57:44 PDT
Comment on attachment 212058 [details]
Patch

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

> Source/WebCore/rendering/InlineFlowBox.cpp:391
> -            RenderText& rt = text->textRenderer();
> +            RenderText& rt = text->renderer();

It is bit sad that future call sites lose documentation about what type to use. It is now much easier to write

RenderObject* object = text->renderer();

without noticing that typing is loose.
Comment 4 WebKit Commit Bot 2013-09-19 06:47:40 PDT
Comment on attachment 212058 [details]
Patch

Clearing flags on attachment: 212058

Committed r156094: <http://trac.webkit.org/changeset/156094>
Comment 5 WebKit Commit Bot 2013-09-19 06:47:42 PDT
All reviewed patches have been landed.  Closing bug.