Commit a530930c authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

class="cue" is getting some default style

https://bugs.webkit.org/show_bug.cgi?id=108752

Source/WebCore:

Patch by Dima Gorbik <dgorbik@apple.com> on 2013-02-04
Reviewed by Dean Jackson.

The value variable inside the selector is used to store different information depending on the
type of the selector so we have to check explicitly that the selector we apply filtering to
matches a pseudo element.

Existing tests modified to cover this case.

* css/RuleSet.cpp:
(WebCore::determinePropertyWhitelistType):

LayoutTests:

Patch by Dima Gorbik <dgorbik@apple.com> on 2013-02-04
Reviewed by Dean Jackson.

* media/track/track-css-property-whitelist-expected.txt:
* media/track/track-css-property-whitelist.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 845c7017
2013-02-04 Dima Gorbik <dgorbik@apple.com>
class="cue" is getting some default style
https://bugs.webkit.org/show_bug.cgi?id=108752
Reviewed by Dean Jackson.
* media/track/track-css-property-whitelist-expected.txt:
* media/track/track-css-property-whitelist.html:
2013-02-04 Jessie Berlin <jberlin@apple.com>
 
[WK2] [Mac] Support drag in mouse events for WebKit2 EventSender
This should display inline
EVENT(canplaythrough)
EVENT(seeked)
......@@ -12,5 +13,8 @@ EXPECTED (getComputedStyle(cueNode).wordSpacing == '0px') OK
EXPECTED (getComputedStyle(cueNode).color == 'rgb(255, 0, 0)') OK
EXPECTED (getComputedStyle(cueNode).padding == '0px') OK
EXPECTED (getComputedStyle(cueNode).wordSpacing == '0px') OK
Test that filtering doesn't apply to elements which class equals 'cue' outside WebVTT scope.
EXPECTED (getComputedStyle(cueNode).display == 'inline') OK
END OF TEST
......@@ -10,6 +10,10 @@
<style>
::cue {word-spacing: 100px;}
::cue(c) {padding-left: 10px; color: red;}
.cue {
display: inline;
background-color: green;
}
</style>
<script>
......@@ -36,6 +40,10 @@
testExpected("getComputedStyle(cueNode).color", "rgb(255, 0, 0)");
testExpected("getComputedStyle(cueNode).padding", "0px");
testExpected("getComputedStyle(cueNode).wordSpacing", "0px");
consoleWrite("<br>Test that filtering doesn't apply to elements which class equals 'cue' outside WebVTT scope.");
cueNode = document.getElementsByClassName("cue")[0];
testExpected("getComputedStyle(cueNode).display", "inline");
endTest();
}
......@@ -54,5 +62,6 @@
<video controls >
<track src="captions-webvtt/whitelist.vtt" kind="captions" default>
</video>
<div><div class="cue">This should display inline</div></div>
</body>
</html>
2013-02-04 Dima Gorbik <dgorbik@apple.com>
class="cue" is getting some default style
https://bugs.webkit.org/show_bug.cgi?id=108752
Reviewed by Dean Jackson.
The value variable inside the selector is used to store different information depending on the
type of the selector so we have to check explicitly that the selector we apply filtering to
matches a pseudo element.
Existing tests modified to cover this case.
* css/RuleSet.cpp:
(WebCore::determinePropertyWhitelistType):
2013-02-04 Tom Sepez <tsepez@chromium.org>
 
[V8] Binding Integrity crash in V8HTMLEmbedElement::createWrapper
......@@ -122,7 +122,7 @@ static inline PropertyWhitelistType determinePropertyWhitelistType(const AddRule
return PropertyWhitelistRegion;
#if ENABLE(VIDEO_TRACK)
for (const CSSSelector* component = selector; component; component = component->tagHistory()) {
if (component->pseudoType() == CSSSelector::PseudoCue || (component->m_match != CSSSelector::Tag && component->value() == TextTrackCue::cueShadowPseudoId()))
if (component->pseudoType() == CSSSelector::PseudoCue || (component->m_match == CSSSelector::PseudoElement && component->value() == TextTrackCue::cueShadowPseudoId()))
return PropertyWhitelistCue;
}
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment