RESOLVED FIXED 186756
[GTK] Wrong variable used in RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=186756
Summary [GTK] Wrong variable used in RenderThemeGtk
Tomas Popela
Reported 2018-06-18 04:06:22 PDT
Found by Coverity scan: 1. webkitgtk-2.20.3/Source/WebCore/rendering/RenderThemeGtk.cpp:1304: cond_const: Condition "part != WebCore::SliderThumbHorizontalPart", taking false branch. Now the value of "part" is equal to 44. 2. webkitgtk-2.20.3/Source/WebCore/rendering/RenderThemeGtk.cpp:1304: cond_const: Condition "part != WebCore::SliderThumbVerticalPart", taking false branch. Now the value of "part" is equal to 45. 3. webkitgtk-2.20.3/Source/WebCore/rendering/RenderThemeGtk.cpp:1307: between: At condition "part == WebCore::SliderHorizontalPart", the value of "part" must be between 44 and 45. 4. webkitgtk-2.20.3/Source/WebCore/rendering/RenderThemeGtk.cpp:1307: dead_error_condition: The condition "part == WebCore::SliderHorizontalPart" cannot be true. 5. webkitgtk-2.20.3/Source/WebCore/rendering/RenderThemeGtk.cpp:1307: dead_error_line: Execution cannot reach the expression "WebCore::RenderThemeWidget::Type::HorizontalSlider" inside this statement: "sliderWidget = static_cast<...". # 1305| return; # 1306| # 1307|-> auto& sliderWidget = static_cast<RenderThemeSlider&>(RenderThemeWidget::getOrCreate(part == SliderHorizontalPart ? RenderThemeWidget::Type::HorizontalSlider : RenderThemeWidget::Type::VerticalSlider)); # 1308| sliderWidget.scale().setState(GTK_STATE_FLAG_NORMAL); # 1309| sliderWidget.trough().setState(GTK_STATE_FLAG_NORMAL);
Attachments
Patch (1.77 KB, patch)
2018-06-18 04:10 PDT, Tomas Popela
no flags
Tomas Popela
Comment 1 2018-06-18 04:10:59 PDT
Carlos Garcia Campos
Comment 2 2018-06-18 04:15:14 PDT
Comment on attachment 342922 [details] Patch Good catch!
Michael Catanzaro
Comment 3 2018-06-18 06:36:02 PDT
Comment on attachment 342922 [details] Patch Clearing flags on attachment: 342922 Committed r232928: <https://trac.webkit.org/changeset/232928>
Michael Catanzaro
Comment 4 2018-06-18 06:36:04 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.