Bug 169610

Summary: Remove redundant check for “firstLine” in RenderBlock::lineHeight()
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WebCore Misc.Assignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, ddkilzer, dino, hyatt, koivisto, mcatanzaro, simon.fraser, zalan
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 104114    
Attachments:
Description Flags
Patch none

Adrian Perez
Reported 2017-03-14 09:07:35 PDT
Found by Coverity Scan: webkitgtk-2.14.5/Source/WebCore/rendering/RenderBlock.cpp:2922: cond_const: Condition "firstLine", taking true branch. Now the value of "firstLine" is equal to 1. webkitgtk-2.14.5/Source/WebCore/rendering/RenderBlock.cpp:2923: const: At condition "firstLine", the value of "firstLine" must be equal to 1. webkitgtk-2.14.5/Source/WebCore/rendering/RenderBlock.cpp:2923: dead_error_condition: The condition "firstLine" must be true. webkitgtk-2.14.5/Source/WebCore/rendering/RenderBlock.cpp:2923: dead_error_line: Execution cannot reach the expression "this->style()" inside this statement: "s = (firstLine ? this->firs...". # 2921| # 2922| if (firstLine && view().usesFirstLineRules()) { # 2923|-> auto& s = firstLine ? firstLineStyle() : style(); # 2924| if (&s != &style()) # 2925| return s.computedLineHeight();
Attachments
Patch (1.49 KB, patch)
2017-03-14 09:12 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2017-03-14 09:12:08 PDT
WebKit Commit Bot
Comment 2 2017-03-14 11:53:36 PDT
Comment on attachment 304386 [details] Patch Clearing flags on attachment: 304386 Committed r213923: <http://trac.webkit.org/changeset/213923>
WebKit Commit Bot
Comment 3 2017-03-14 11:53:42 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.