Implement ::cue() pseudo element property whitelist
https://bugs.webkit.org/show_bug.cgi?id=105477

Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-18
Reviewed by Antti Koivisto.

Source/WebCore:

Only allowed by specs properties are applied to WebVTT nodes. We used whitelists before for the region
style rule so this refactors the code a little bit to pass bitfields that contain the information on which
whitelists should be used.

Test: media/track/track-css-property-whitelist.html

* css/RuleSet.cpp:
(WebCore::RuleData::RuleData): set a region bit when creating a RuleData.
(WebCore::RuleSet::addRule): set a cue bit when PseudoCue type is set for a selector.
* css/RuleSet.h: add the new bitfield as an ivar and setters/getters to access it.
(WebCore::RuleData::isInRegionRule):
(WebCore::RuleData::whitelistType):
(WebCore::RuleData::isInCueRule):
(WebCore::RuleData::setIsInCueRule):
* css/StyleResolver.cpp: refactor the code to pass a bitfield instead of single bits.
(WebCore::StyleResolver::addMatchedProperties):
(WebCore::StyleResolver::sortAndTransferMatchedRules):
(WebCore::StyleResolver::applyProperties):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::isValidCueStyleProperty):
* css/StyleResolver.h:

LayoutTests:

* media/track/captions-webvtt/whitelist.vtt: Added.
* media/track/track-css-property-whitelist-expected.txt: Added.
* media/track/track-css-property-whitelist.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cannot abort multiple XHR POSTs made to same url
https://bugs.webkit.org/show_bug.cgi?id=106937

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: http/tests/cache/cancel-multiple-post-xhrs.html

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient): Call allClientsRemoved() regardless
    of whether this resource is inCache(). Otherwise, CachedRawResources will
    not have the opportunity to cancel as expected. However, don't cancel
    if the last client was removed because we're in the middle of switching
    the clients over to a successfully revalidated resource.

LayoutTests:

* http/tests/cache/cancel-multiple-post-xhrs-expected.txt: Added.
* http/tests/cache/cancel-multiple-post-xhrs.html: Added.
* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140174 268f45cc-cd09-0410-ab3c-d52691b4dbfc