Log states as readable strings instead of as integers.
Created attachment 327000 [details] Proposed patch
<rdar://problem/35565687>
Attachment 327000 [details] did not pass style-queue: ERROR: Source/WebCore/platform/graphics/MediaPlayer.cpp:1525: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/platform/graphics/MediaPlayer.cpp:1545: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/html/HTMLMediaElement.cpp:266: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/WebCore/html/HTMLMediaElement.cpp:283: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 4 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 327000 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=327000&action=review > Source/WebCore/html/HTMLMediaElement.cpp:2555 > + ALWAYS_LOG(LOGIDENTIFIER, "AUTOPLAY BLOCKED, USER GESTURE REQUIRED"); IIANM, we will have twice the same message here and above. Would it be possible to disambiguate this with something like Autoplay blocked in future data state, User gesture required? Also I am not sure we should uppercase the message, or is it to attract the eye?
(In reply to youenn fablet from comment #4) > Comment on attachment 327000 [details] > Proposed patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=327000&action=review > > > Source/WebCore/html/HTMLMediaElement.cpp:2555 > > + ALWAYS_LOG(LOGIDENTIFIER, "AUTOPLAY BLOCKED, USER GESTURE REQUIRED"); > > IIANM, we will have twice the same message here and above. No, the first happens when readyState is HAVE_ENOUGH_DATA, the second when it is HAVE_FUTURE_DATA. > Would it be possible to disambiguate this with something like Autoplay > blocked in future data state, User gesture required? > Also I am not sure we should uppercase the message, or is it to attract the > eye? Yes, I put it upper case to make it more visible in the log. I suppose it isn't necessary, I will change back before landing.
Created attachment 327025 [details] Patch for landing.
Comment on attachment 327025 [details] Patch for landing. Clearing flags on attachment: 327025 Committed r224904: <https://trac.webkit.org/changeset/224904>