REGRESSION (r138222?): Assertion failure on appcache/main-resource-redirect.html
https://bugs.webkit.org/show_bug.cgi?id=105591

Reviewed by Brady Eidson.

Source/WebCore:

Fixes crash in test http/tests/appcache/main-resource-redirect.html.

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::willSendRequest): In case of loading
substitute data from application cache host due to a redirect,
make sure the substitute data identifier is initialized.

LayoutTests:

Unskip http/tests/appcache/main-resource-redirect.html.

* platform/efl-wk2/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[SOUP] Convert WebSoupRequestManagerProxy to be WebContextSupplement
https://bugs.webkit.org/show_bug.cgi?id=106012

Reviewed by Martin Robinson.

* UIProcess/API/C/soup/WKContextSoup.cpp:
(WKContextGetSoupRequestManager):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::disconnectProcess):
* UIProcess/WebContext.h:
(WebKit):
(WebContext):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveURIRequest):
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
* UIProcess/soup/WebSoupRequestManagerProxy.cpp:
(WebKit::WebSoupRequestManagerProxy::supplementName):
(WebKit):
(WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy):
(WebKit::WebSoupRequestManagerProxy::initializeClient):
(WebKit::WebSoupRequestManagerProxy::contextDestroyed):
(WebKit::WebSoupRequestManagerProxy::processDidClose):
(WebKit::WebSoupRequestManagerProxy::refWebContextSupplement):
(WebKit::WebSoupRequestManagerProxy::derefWebContextSupplement):
(WebKit::WebSoupRequestManagerProxy::registerURIScheme):
(WebKit::WebSoupRequestManagerProxy::didHandleURIRequest):
(WebKit::WebSoupRequestManagerProxy::didReceiveURIRequestData):
* UIProcess/soup/WebSoupRequestManagerProxy.h:
(WebSoupRequestManagerProxy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement :future pseudo class for the WebVTT ::cue pseudo element
https://bugs.webkit.org/show_bug.cgi?id=105473

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

Source/WebCore:

This patch changes the approach of showing past/future node objects.
Before upper-level containers were used to put past and future nodes inside. Styles were applied
to containers. Now styles could be applied directly to nodes by using ::cue(:future).
That allows to style future/past WebVTT nodes even if they are nested.

Existing test was modified to cover new cases.

* css/CSSSelector.cpp: added :future pseudo class support.
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::extractPseudoType):
* css/CSSSelector.h:
* css/SelectorChecker.cpp: ditto.
(WebCore::SelectorChecker::checkOneSelector):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement): define style sharing rules for WebVTT objects.
* css/mediaControls.css:
(video::-webkit-media-text-track-all-nodes):
(video::cue(:future)): added standard user-agent styles for the future nodes.
* dom/Element.cpp: setter functions don't have an argument now because WebVTT type enum was introduced and the right type is set
when the setter is being called.
(WebCore::Element::setIsWebVTTNode):
(WebCore):
(WebCore::Element::isWebVTTFutureNode):
(WebCore::Element::setIsWebVTTFutureNode):
* dom/Element.h:
(Element):
* dom/ElementRareData.h:
(ElementRareData):
* dom/NodeRareData.cpp:
(SameSizeAsNodeRareData): added a dummy enum value. Enum is integer type and is aligned in Windows when placed in the bitfield,
so it takes more space.
* dom/NodeRareData.h:
(WebCore::NodeRareData::NodeRareData):
(WebCore::NodeRareData::isWebVTTNode):
(WebCore::NodeRareData::setIsWebVTTNode):
(WebCore::NodeRareData::isWebVTTFutureNode):
(WebCore::NodeRareData::setIsWebVTTFutureNode):
(NodeRareData):
* html/shadow/MediaControlElements.cpp:
(WebCore):
* html/track/TextTrack.h: add a WebVTT node object type enum.
(TextTrack):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::allNodesShadowPseudoId):
(WebCore::TextTrackCue::TextTrackCue):
(WebCore::TextTrackCue::getCueAsHTML):
(WebCore):
(WebCore::TextTrackCue::setNodeObjectFlags): determine if the node is future or past and mark as WebVTT node.
This combines the functionality related to marking nodes implemented before in updateDisplayTree and
markNodesAsWebVTTNodes.
(WebCore::TextTrackCue::updateDisplayTree):
(WebCore::TextTrackCue::getDisplayTree):
* html/track/TextTrackCue.h:
(TextTrackCue):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::constructTreeFromToken): no need to mark nodes as WebVTT nodes when parsing. This is done at the
rendering stage later.
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): the container name has changed.

LayoutTests:

Modified the track css matching test to cover :future pseudo-class case.

* media/track/captions-webvtt/captions-inner-timestamps.vtt: Removed.
* media/track/captions-webvtt/styling.vtt:
* media/track/track-css-matching-expected.txt:
* media/track/track-css-matching.html:
* media/track/track-cue-rendering-inner-timestamps-expected.txt: Removed.
* media/track/track-cue-rendering-inner-timestamps.html: The test was removed because it was based on the old
future/past nodes rendering logic.

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