Summary: | [GTK] Off-by-one error in getStyleContext() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||
Component: | WebKitGTK | Assignee: | Michael Catanzaro <mcatanzaro> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bugs-noreply, commit-queue, esprehn+autocc, glenn, kondapallykalyan, mcatanzaro | ||||
Priority: | P2 | ||||||
Version: | Other | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Attachments: |
|
Description
Michael Catanzaro
2015-11-20 15:56:52 PST
Created attachment 266010 [details]
Patch
Comment on attachment 266010 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=266010&action=review Good catch, thanks! > Source/WebCore/rendering/RenderThemeGtk.cpp:178 > - gtk_widget_path_iter_add_class(path, 1, "text-button"); > + gtk_widget_path_iter_add_class(path, 0, "text-button"); I guess I understood this as the position of the class, rather than the widget at the given position. Since we always add one widget only, maybe it would be less confusing to use -1 in all cases. Now that I understand how the API works, using 0 seems better to me; I would use -1 when I don't know how long the widget path is. Comment on attachment 266010 [details] Patch Clearing flags on attachment: 266010 Committed r192724: <http://trac.webkit.org/changeset/192724> All reviewed patches have been landed. Closing bug. |