Bug 121605 - CTTE: Tighten renderer types for InlineTextBox and SVGInlineTextBox.
Summary: CTTE: Tighten renderer types for InlineTextBox and SVGInlineTextBox.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
Depends on:
Reported: 2013-09-19 05:41 PDT by Andreas Kling
Modified: 2013-09-19 06:47 PDT (History)
1 user (show)

See Also:

Patch (40.82 KB, patch)
2013-09-19 05:42 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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]

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]

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.