Title: [137583] trunk/Tools
- Revision
- 137583
- Author
- [email protected]
- Date
- 2012-12-13 04:02:35 -0800 (Thu, 13 Dec 2012)
Log Message
[Tools] Add exception for gtk_style_context_get()
https://bugs.webkit.org/show_bug.cgi?id=104896
Patch by Claudio Saavedra <[email protected]> on 2012-12-13
Reviewed by Martin Robinson.
Add new exception for gtk_style_context_get().
* Scripts/webkitpy/style/checkers/cpp.py:
(check_for_null): Add exception for gtk_style_context_get().
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_null_false_zero): Add a unit
test for the new exception.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (137582 => 137583)
--- trunk/Tools/ChangeLog 2012-12-13 11:28:34 UTC (rev 137582)
+++ trunk/Tools/ChangeLog 2012-12-13 12:02:35 UTC (rev 137583)
@@ -1,3 +1,18 @@
+2012-12-13 Claudio Saavedra <[email protected]>
+
+ [Tools] Add exception for gtk_style_context_get()
+ https://bugs.webkit.org/show_bug.cgi?id=104896
+
+ Reviewed by Martin Robinson.
+
+ Add new exception for gtk_style_context_get().
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_for_null): Add exception for gtk_style_context_get().
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (WebKitStyleTest.test_null_false_zero): Add a unit
+ test for the new exception.
+
2012-12-13 Joaquim Rocha <[email protected]>
REGRESSION (r137432): The /webkit2/WebKitCookieManager/accept-policy unit test is failing
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (137582 => 137583)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2012-12-13 11:28:34 UTC (rev 137582)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2012-12-13 12:02:35 UTC (rev 137583)
@@ -2547,8 +2547,8 @@
if search(r'\bgdk_pixbuf_save_to\w+\b', line):
return
- # Don't warn about NULL usage in gtk_widget_style_get() or gtk_style_context_get_style. See Bug 51758
- if search(r'\bgtk_widget_style_get\(\w+\b', line) or search(r'\bgtk_style_context_get_style\(\w+\b', line):
+ # Don't warn about NULL usage in gtk_widget_style_get(), gtk_style_context_get_style(), or gtk_style_context_get(). See Bug 51758
+ if search(r'\bgtk_widget_style_get\(\w+\b', line) or search(r'\bgtk_style_context_get_style\(\w+\b', line) or search(r'\bgtk_style_context_get\(\w+\b', line):
return
# Don't warn about NULL usage in soup_server_new(). See Bug 77890.
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (137582 => 137583)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2012-12-13 11:28:34 UTC (rev 137582)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2012-12-13 12:02:35 UTC (rev 137583)
@@ -4396,6 +4396,9 @@
'gtk_style_context_get_style(context, "propertyName", &value, "otherName", &otherValue, NULL);',
'')
self.assert_lint(
+ 'gtk_style_context_get(context, static_cast<GtkStateFlags>(0), "property", &value, NULL);',
+ '')
+ self.assert_lint(
'gtk_widget_style_get_property(style, NULL, NULL);',
'Use 0 instead of NULL. [readability/null] [5]',
'foo.cpp')
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes