- Revision
- 243164
- Author
- [email protected]
- Date
- 2019-03-19 13:05:33 -0700 (Tue, 19 Mar 2019)
Log Message
media/track/track-in-band-style.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=195922
Reviewed by Eric Carlson.
Source/WebCore:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
Small optimization: some of the if checks were missing their "continue;"
statement. This would cause us to keep checking following keys even though
we already got a match.
LayoutTests:
* media/track/track-in-band-style-expected.txt:
* media/track/track-in-band-style.html:
- Check element.style instead of getComputedStyle(element) to get the
CSS colors as this seems more reliable.
- For the foreground text color, check cueNode.style.color instead of
cueDisplayElement given that the implementation sets the CSS attribute
on the cueNode, not the cueDisplayElement.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (243163 => 243164)
--- trunk/LayoutTests/ChangeLog 2019-03-19 20:04:34 UTC (rev 243163)
+++ trunk/LayoutTests/ChangeLog 2019-03-19 20:05:33 UTC (rev 243164)
@@ -1,3 +1,18 @@
+2019-03-19 Chris Dumez <[email protected]>
+
+ media/track/track-in-band-style.html is flaky
+ https://bugs.webkit.org/show_bug.cgi?id=195922
+
+ Reviewed by Eric Carlson.
+
+ * media/track/track-in-band-style-expected.txt:
+ * media/track/track-in-band-style.html:
+ - Check element.style instead of getComputedStyle(element) to get the
+ CSS colors as this seems more reliable.
+ - For the foreground text color, check cueNode.style.color instead of
+ cueDisplayElement given that the implementation sets the CSS attribute
+ on the cueNode, not the cueDisplayElement.
+
2019-03-19 Devin Rousso <[email protected]>
Unreviewed, fix test failures after r243119.
Modified: trunk/LayoutTests/media/track/track-in-band-style-expected.txt (243163 => 243164)
--- trunk/LayoutTests/media/track/track-in-band-style-expected.txt 2019-03-19 20:04:34 UTC (rev 243163)
+++ trunk/LayoutTests/media/track/track-in-band-style-expected.txt 2019-03-19 20:05:33 UTC (rev 243164)
@@ -13,7 +13,7 @@
EVENT(cuechange)
** Test current cue colors
-EXPECTED (getComputedStyle(cueDisplayElement).color == 'rgb(255, 255, 255)') OK
-EXPECTED (getComputedStyle(cueNode).backgroundColor == 'rgb(0, 0, 0)') OK
+EXPECTED (cueNode.style.color == 'rgb(255, 255, 255)') OK
+EXPECTED (cueNode.style.backgroundColor == 'rgb(0, 0, 0)') OK
END OF TEST
Modified: trunk/LayoutTests/media/track/track-in-band-style.html (243163 => 243164)
--- trunk/LayoutTests/media/track/track-in-band-style.html 2019-03-19 20:04:34 UTC (rev 243163)
+++ trunk/LayoutTests/media/track/track-in-band-style.html 2019-03-19 20:05:33 UTC (rev 243164)
@@ -25,8 +25,8 @@
}
consoleWrite("<br><i>** Test current cue colors<" + "/i>");
- testExpected("getComputedStyle(cueDisplayElement).color", "rgb(255, 255, 255)");
- testExpected("getComputedStyle(cueNode).backgroundColor", "rgb(0, 0, 0)");
+ testExpected("cueNode.style.color", "rgb(255, 255, 255)");
+ testExpected("cueNode.style.backgroundColor", "rgb(0, 0, 0)");
endTest();
}
Modified: trunk/Source/WebCore/ChangeLog (243163 => 243164)
--- trunk/Source/WebCore/ChangeLog 2019-03-19 20:04:34 UTC (rev 243163)
+++ trunk/Source/WebCore/ChangeLog 2019-03-19 20:05:33 UTC (rev 243164)
@@ -1,3 +1,16 @@
+2019-03-19 Chris Dumez <[email protected]>
+
+ media/track/track-in-band-style.html is flaky
+ https://bugs.webkit.org/show_bug.cgi?id=195922
+
+ Reviewed by Eric Carlson.
+
+ * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
+ (WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
+ Small optimization: some of the if checks were missing their "continue;"
+ statement. This would cause us to keep checking following keys even though
+ we already got a match.
+
2019-03-19 Michael Catanzaro <[email protected]>
Build cleanly with GCC 9
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp (243163 => 243164)
--- trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp 2019-03-19 20:04:34 UTC (rev 243163)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp 2019-03-19 20:05:33 UTC (rev 243164)
@@ -270,6 +270,7 @@
if (!makeRGBA32FromARGBCFArray(arrayValue, color))
continue;
cueData.setForegroundColor(color);
+ continue;
}
if (CFStringCompare(key, kCMTextMarkupAttribute_BackgroundColorARGB, 0) == kCFCompareEqualTo) {
@@ -281,6 +282,7 @@
if (!makeRGBA32FromARGBCFArray(arrayValue, color))
continue;
cueData.setBackgroundColor(color);
+ continue;
}
if (CFStringCompare(key, kCMTextMarkupAttribute_CharacterBackgroundColorARGB, 0) == kCFCompareEqualTo) {
@@ -292,6 +294,7 @@
if (!makeRGBA32FromARGBCFArray(arrayValue, color))
continue;
cueData.setHighlightColor(color);
+ continue;
}
}