Unreviewed. Build fix for Apple Windows port.

* rendering/RenderThemeWin.cpp:
(WebCore::cssValueIdToSysColorIndex):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebProcess hangs loading eff.org (Waiting forever on a sync XHR, NetworkProcess unable to service it).
<rdar://problem/14112329> and https://bugs.webkit.org/show_bug.cgi?id=117842

Reviewed by Alexey Proskuryakov.

* NetworkProcess/HostRecord.cpp:
(WebKit::removeLoaderFromQueue): Utility to clear a Loader out of a LoaderQueue.
(WebKit::HostRecord::removeLoader): Use removeLoaderFromQueue, and also try to clear the loader from m_syncLoadersPending.
(WebKit::HostRecord::servePendingRequestsForQueue): Small refactoring/cleanup.
(WebKit::HostRecord::limitsRequests): Change so that if the number of loaders in flight is exactly equal to the limit, then
  allow serving a synchronous loader to go exactly one beyond the limit.
* NetworkProcess/HostRecord.h:

Make the static maxRequestsInFlightPerHost a member of the NetworkResourceLoadScheduler, instead:
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
(WebKit::NetworkResourceLoadScheduler::hostForURL):
* NetworkProcess/NetworkResourceLoadScheduler.h:

* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Tell CFNetwork to allow
  7 connections per host instead of 6, but tell the scheduler that 6 is still the normal limit.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERT removing then adding a <track> element
https://bugs.webkit.org/show_bug.cgi?id=117814

Reviewed by Jer Noble.

Source/WebCore:

Test: media/track/add-and-remove-track.html

* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::insertedInto): Always call ensureTrack before adding the track
    to the parent <video> element.
(WebCore::HTMLTrackElement::ensureTrack): Call m_track->setTrackElement() in case the
    parent was cleared after m_track was created.

* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::setTrackElement): New, set m_trackElement.
* html/track/LoadableTextTrack.h:

LayoutTests:

* media/track/add-and-remove-track-expected.txt: Added.
* media/track/add-and-remove-track.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gstreamer] cleanup buffering and state updates
https://bugs.webkit.org/show_bug.cgi?id=116642

Reviewed by Philippe Normand.

Source/WebCore:

Covered by existing media tests, especially the ones that have been unskipped.

Always do download buffering. It should not differ if preload is "none" because
it's about when to start buffering, not about how. Fix a bunch other subtle issues
to make this change go smoothly with the tests. As a bonus some tests that were
failing so far started to pass.
It is possible to further tweak the buffering in a way that will enable us to support
a different and appropriate behavior for preload="metadata" but it should be managed
a bit differently. I will implement it in a follow-up.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::load): Don't call setDownloadBuffering
yet. Now it also responsible for starting the fill timer and it turned out that
setting the download flag before the pipeline is set to a state has negative
effect on some tests. Most probably GStreamer starts buffering too early if
we set the download flag.
(WebCore::MediaPlayerPrivateGStreamer::commitLoad): Call setDownloadBuffering now.
(WebCore::MediaPlayerPrivateGStreamer::play): Ditto, plus set m_delayingLoad to false
because otherwise setPreload will wrongly assume that the load has not been committed
yet if prepareToPlay is not called before play.
(WebCore::MediaPlayerPrivateGStreamer::pause): Make sure we don't commit a load here
if it was not committed yet by looking in the pipeline state.
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): No need to observe the
type of buffering.
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Introduced m_downloadFinished to update
ready and network states in updateStates based on it. The previously used condition
- (maxTimeLoaded() == duration()) - was not correct in the case when duration is not known.
(WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded): Removed a lie. If the fill timer is not active
it does not necesarily means that download has been finished. This lie was actually ensuring
a lot of tests to pass because it made the condition (maxTimeLoaded() == duration()) true.
Now that state updates has been cleaned up we don't need to lie.
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Merge all the parts that takes part in updating
ready and network states. It was untrackable. Unset download buffering for for live streams early so
we don't need to restart them.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer): Removed m_startedBuffering because there is no need for it now.

LayoutTests:

Remove failure expectations from tests that started to pass.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r151788.
http://trac.webkit.org/changeset/151788
https://bugs.webkit.org/show_bug.cgi?id=117847

"This is the wrong fix" (Requested by rhogan on #webkit).

Source/WebCore:

* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
(WebCore::RenderTextControl::computePreferredLogicalWidths):

LayoutTests:

* fast/forms/onselect-textfield-expected.txt:
* fast/replaced/height-of-positioned-text-control-expected.html: Removed.
* fast/replaced/height-of-positioned-text-control.html: Removed.
* fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt:
* platform/mac/fast/forms/input-appearance-preventDefault-expected.png:
* platform/mac/fast/forms/input-appearance-preventDefault-expected.txt:
* platform/mac/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png:
* platform/mac/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt:
* platform/qt/fast/forms/input-appearance-preventDefault-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r151451.
http://trac.webkit.org/changeset/151451
https://bugs.webkit.org/show_bug.cgi?id=117848

"Broke quite a lot of sites" (Requested by rhogan on #webkit).

Source/WebCore:

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderReplaced.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:

LayoutTests:

* fast/forms/onselect-textfield-expected.txt:
* fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Removed.
* fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
* fast/replaced/width-and-height-of-positioned-replaced-elements.html: Removed.
* platform/mac-wk2/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
* platform/mac/fast/forms/button-positioned-expected.txt:
* platform/mac/fast/forms/input-appearance-preventDefault-expected.txt:
* platform/mac/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
* platform/qt/fast/forms/button-positioned-expected.txt:
* platform/qt/fast/forms/input-appearance-preventDefault-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
https://bugs.webkit.org/show_bug.cgi?id=117830

Reviewed by Anders Carlsson.

The order of the template arguments at HashSet alternate 'find', 'contains' and
'add' methods is reversed so that callers can just pass the translator
and let the compiler deduce input argument type.

Source/JavaScriptCore:

* runtime/Identifier.h:
(JSC::IdentifierTable::add):

Source/WebCore:

No new tests. No new functionality.

* dom/QualifiedName.cpp:
(WebCore::QualifiedName::QualifiedName):
* platform/graphics/cg/SubimageCacheWithTimer.cpp:
(WebCore::SubimageCacheWithTimer::getSubimage):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::isSupportedAttribute):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::isSupportedAttribute):
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::isSupportedAttribute):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isSupportedAttribute):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::isSupportedAttribute):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::isSupportedAttribute):
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::isSupportedAttribute):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::isSupportedAttribute):
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::isSupportedAttribute):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::isSupportedAttribute):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::isSupportedAttribute):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::isSupportedAttribute):
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::isSupportedAttribute):
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::isSupportedAttribute):
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::isSupportedAttribute):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::isSupportedAttribute):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::isSupportedAttribute):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::isSupportedAttribute):
(WebCore::SVGFilterElement::childShouldCreateRenderer):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::isSupportedAttribute):
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::isSupportedAttribute):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::isSupportedAttribute):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isSupportedAttribute):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::isSupportedAttribute):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::isSupportedAttribute):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::isSupportedAttribute):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::isSupportedAttribute):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::isSupportedAttribute):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::isSupportedAttribute):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::isSupportedAttribute):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::isSupportedAttribute):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::isSupportedAttribute):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::isSupportedAttribute):
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::isSupportedAttribute):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::isSupportedAttribute):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::isSupportedAttribute):
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::isSupportedAttribute):
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::isSupportedAttribute):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::isSupportedAttribute):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::isSupportedAttribute):
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::isSupportedAttribute):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::isSupportedAttribute):
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::isSupportedAttribute):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::isSupportedAttribute):
(WebCore::isDisallowedElement):
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::isSupportedAttribute):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::isSupportedAttribute):

Source/WTF:

* wtf/HashSet.h:
* wtf/text/AtomicString.cpp:
(WTF::addToStringTable):
(WTF::findString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r151463.
http://trac.webkit.org/changeset/151463
https://bugs.webkit.org/show_bug.cgi?id=117850

"r151451 was rolled out" (Requested by rhogan on #webkit).

* platform/efl/fast/forms/button-positioned-expected.txt:
* platform/efl/fast/forms/input-appearance-preventDefault-expected.txt:
* platform/efl/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
* platform/gtk/fast/forms/button-positioned-expected.txt:
* platform/gtk/fast/forms/input-appearance-preventDefault-expected.png:
* platform/gtk/fast/forms/input-appearance-preventDefault-expected.txt:
* platform/gtk/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Removed.
* platform/win/fast/forms/onselect-textfield-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sticky elements are missing or misplaced sometimes when reloading a page that scrolls to a named anchor
https://bugs.webkit.org/show_bug.cgi?id=117819

Reviewed by Anders Carlsson.

At the end of FrameView::performPostLayoutTasks() we call scrollToAnchor() which attempts
to restore the scroll position to a named anchor, even when the document has been
changed by layout. This ends up in a call to ScrollView::scrollTo(), which in turn
calls repaintFixedElementsAfterScrolling(). However, repaintFixedElementsAfterScrolling()
would bail if m_nestedLayoutCount != 0, so we never updated layer positions which
depend on scroll position (but which would not be updated by layout, since their
renderers are not marked for layout when scrolling happens).

We've solved this problem once before in updateFixedElementsAfterScrolling() which
checks for m_nestedLayoutCount <= 1, so that we do work on the outermost nested layout.
Apply that same fix to repaintFixedElementsAfterScrolling().

Very timing-dependent, so hard to make a test.

* page/FrameView.cpp:
(WebCore::FrameView::repaintFixedElementsAfterScrolling):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FrameView needs to initialize paintsEntireContents on creation
https://bugs.webkit.org/show_bug.cgi?id=117844

Source/WebCore:

Reviewed by Anders Carlsson.

In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
In this mode, FrameView::paintsEntireContents() is true. However,
we would only call setPaintsEntireContents(true) on the FrameView
when the view's layer-backed status changes. FrameView also needs
to fetch this state when it is initialized, because we may be creating
a new FrameView for an already layer-backed WebHTMLView.

* page/ChromeClient.h:
(WebCore::ChromeClient::shouldPaintEntireContents):
* page/FrameView.cpp:
(WebCore::FrameView::init):

Source/WebKit/mac:

Reviewed by Anders Carlsson.

In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
In this mode, FrameView::paintsEntireContents() is true. However,
we would only call setPaintsEntireContents(true) on the FrameView
when the view's layer-backed status changes. FrameView also needs
to fetch this state when it is initialized, because we may be creating
a new FrameView for an already layer-backed WebHTMLView.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::shouldPaintEntireContents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed WebGL compile errors on Windows.
https://bugs.webkit.org/show_bug.cgi?id=117805

Reviewed by Brent Fulgham.

* html/canvas/WebGLRenderingContext.cpp: Included CString.h.
Added PLATFORM(WIN) to existing lists of platform macros.
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap):
* platform/graphics/OpenGLESShims.h:


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