Compile WebCoreTestShimLibrary.cpp on iOS, but exclude the Carbon bits
https://bugs.webkit.org/show_bug.cgi?id=117360

Reviewed by Mark Rowe.

In r150114 we tried to make the WebCoreTestShim target build on iOS by
excluding its only source file from the build. While this allowed the
target to build, it prevented the target's product (WebCoreTestShim.dylib)
from being created. This causes xcodebuild to fail if you ask it to
install the target.

Fix this by building the target's product on iOS. Just use the
preprocessor to exclude the bits that won't build on iOS.

* Configurations/WebCoreTestShim.xcconfig:
* testing/WebCoreTestShimLibrary.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r151088): Crash navigating away from non-loaded main resources with non-loaded scripts.
<rdar://problem/14052886> and https://bugs.webkit.org/show_bug.cgi?id=117278

Reviewed by Anders Carlsson.

Source/WebCore:

Test: http/tests/navigation/slow-loading-page-with-slow-script.php

* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::isPendingScriptReady): The script runner might be told about a script
  after it has already been detached (the main resource load has finished/failed/cancelled).
  Don't dereference a null document in that case.

LayoutTests:

* http/tests/navigation/slow-loading-page-with-slow-script-expected.txt: Added.
* http/tests/navigation/slow-loading-page-with-slow-script.php: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of outdated raises() from Web IDL
https://bugs.webkit.org/show_bug.cgi?id=117350

Reviewed by Darin Adler.

Source/WebCore:

Stop using "raises()" in the IDL as this is no longer part of the Web IDL
specification. Web IDL no longer specifies exceptions for operations. Instead
it is now explained in prose.

WebKit still needs to know if the method can throw an exception (but does not
need the exception name) so this patch adds a WebKit specific IDL extended
attribute: [RaisesException]. The naming is consistent with Blink.

This results in more standard and concise IDL. This also simplifies a lot
the code of the IDL parser.

No new tests, no behavior change.

* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DirectoryEntrySync.idl:
* Modules/filesystem/DirectoryReaderSync.idl:
* Modules/filesystem/EntrySync.idl:
* Modules/filesystem/FileEntrySync.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/FileWriterSync.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseOperationRest):
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSupplemental.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/DOMImplementation.idl:
* dom/DataTransferItemList.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/EventTarget.idl:
* dom/MessagePort.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeIterator.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/WebKitNamedFlow.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMTokenList.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLDialogElement.idl:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLVideoElement.idl:
* html/MediaController.idl:
* html/TimeRanges.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/Crypto.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Performance.idl:
* storage/Storage.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGColor.idl:
* svg/SVGDocument.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGLocatable.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPointList.idl:
* svg/SVGStringList.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransformList.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathResult.idl:

Source/WebKit/win:

Replace raises() by [RaisesException].

* Interfaces/DOMEvents.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of not very helpful test that fails only on some machines because xcrun is not installed.

Rubberstamped by Ryousuke Niwa.

* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_build_check):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions][CSS Shapes] Incorrect compile flag in LayoutState.h
https://bugs.webkit.org/show_bug.cgi?id=117318

Reviewed by Alexandru Chiculita.

m_exclusionShapeInsideInfo should be guarded by the CSS_SHAPES flag,
not the CSS_EXCLUSIONS flag.

No tests required.

* rendering/LayoutState.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Layers inside the RenderFlowThread should be collected by the layer of RenderView
https://bugs.webkit.org/show_bug.cgi?id=117270

Reviewed by David Hyatt.

RenderNamedFlowThreads are attached to the RenderView, but they are painted
and hit-tested through their regions. The easiest way to prevent the RenderView
from seeing the RenderNamedFlowThreads as its own children was to avoid collecting
the layers of the RenderNamedFlowThreads as children layers of the RenderView.

However, most of the code is analyzing the layers tree starting from the root,
so having the RenderNamedFlowThread participate in the layer tree is needed
in order to enable compositing for layers inside the flow thread.

This patch makes the RenderNamedFlowThread visible to the RenderView, but
ignores it when iterates the children of the RenderView in paint and hit-test methods.

No new tests, no visible changes.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestList):
(WebCore::RenderLayer::calculateLayerBounds):
(WebCore::RenderLayer::collectLayers):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MathML line fraction needs to parse number values
https://bugs.webkit.org/show_bug.cgi?id=117305

Unreviewed. Rebaseline math fractions test on GTK.

* platform/gtk/mathml/presentation/fractions-expected.png:
* platform/gtk/mathml/presentation/fractions-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MathML line fraction needs to parse number values
https://bugs.webkit.org/show_bug.cgi?id=117305

Unreviewed. Rebaseline math fractions test on EFL.

* platform/efl/mathml/presentation/fractions-expected.png:
* platform/efl/mathml/presentation/fractions-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coalesce multiple calls to WebPageProxy::windowAndViewFramesChanged
https://bugs.webkit.org/show_bug.cgi?id=117364
<rdar://problem/14042099>

Reviewed by Geoffrey Garen.

-[WKView _updateWindowAndViewFrames] can be called many times per run loop iteration so coalesce calls
to WebPageProxy::windowAndViewFrames using dispatch_async.

* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[curl] Handling of blob elements is incorrect
https://bugs.webkit.org/show_bug.cgi?id=117301

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2013-06-08
Reviewed by Kenneth Rohde Christiansen.

No new tests, covered by existing ones:
http/tests/fileapi/xhr-send-form-data-filename-escaping.html
http/tests/fileapi/xhr-send-form-data-mimetype-normalization.html

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getFormElementsCount): Resolve Blob elements.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[curl] Allow headers with empty value
https://bugs.webkit.org/show_bug.cgi?id=117344

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2013-06-08
Reviewed by Brent Fulgham.

No new tests, already covered by:
http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
http/tests/xmlhttprequest/post-blob-content-type-sync.html

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] TestWebKitAPI fails to link.
https://bugs.webkit.org/show_bug.cgi?id=117345

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-06-08
Reviewed by Brent Fulgham.

Need to link with WTF.lib.

* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props: Link with WTF.lib.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WebGL] Enable webgl-background-color test.
https://bugs.webkit.org/show_bug.cgi?id=111428

Reviewed by Christophe Dumez.

This patch adds platform specific test expectation files for the
test and enables it for efl port.

* platform/efl/TestExpectations:
* platform/efl/compositing/webgl/webgl-background-color-expected.png: Added.
* platform/efl/compositing/webgl/webgl-background-color-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
before/after generated content is not working with HTMLSummaryElement and HTMLDetailsElement.
https://bugs.webkit.org/show_bug.cgi?id=117374

Source/WebCore:

Allow before/after pseudo generated content be added in HTMLDetailsElement and HTMLSumamaryElement.

Reviewed by Ryosuke Niwa.

Test: fast/css-generated-content/details-summary-before-after.html

* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::childShouldCreateRenderer):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::childShouldCreateRenderer):

LayoutTests:

Reviewed by Ryosuke Niwa.

* fast/css-generated-content/details-summary-before-after.html: Added.
* platform/mac/fast/css-generated-content/details-summary-before-after-expected.txt: Added.
* platform/mac/fast/css-generated-content/details-summary-before-after-expected.png: Added


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Coordinated Graphics] Pass the ownership of GraphicsSurface explicitly
https://bugs.webkit.org/show_bug.cgi?id=117379

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-06-08
Reviewed by Noam Rosenthal.

When creating WebCoordinatedSurface with GraphicsSurface, it is clearer
to pass the ownership of the created GraphicsSurface explicitly.

* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Scrolling with platformWidget and delegateScrolling is incorrectly clamped
https://bugs.webkit.org/show_bug.cgi?id=117369
<rdar://problem/13985064>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-06-09
Reviewed by Darin Adler.

The patch http://trac.webkit.org/changeset/142526 clamps the input position
in the ScrollView scroll range. This was done for the path to the ScrollingCoordinator.

The problem with that change is ScrollView::setScrollPosition() can delegate the scrolling
to either a platformWidget, or through delegateScrolling. After r142526, the position is clamped,
and we do not let those external scrolling mechanims handle the out-of-bound scrolling.

This patch fixes the issue by moving the threaded scrolling call to ScrollView,
after the delegate handling code.

* page/FrameView.cpp:
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::requestScrollPositionUpdate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split the 3 paths of SelectorDataList::execute() into 3 separate functions
https://bugs.webkit.org/show_bug.cgi?id=117378

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-06-09
Reviewed by Ryosuke Niwa.

Split those to have several small execute() fucntions instead of a giant one.

* dom/SelectorQuery.cpp:
(WebCore::selectorForIdLookup):
(WebCore::isTreeScopeRoot):
(WebCore::SelectorDataList::executeFastPathForIdSelector):
(WebCore::SelectorDataList::executeSingleSelectorData):
(WebCore::SelectorDataList::executeSingleMultiSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout info should never be cleared before delayed scroll information updates.
https://bugs.webkit.org/show_bug.cgi?id=116689.

Reviewed by Darin Adler.

Test: fast/flexbox/clear-overflow-before-scroll-update.html

Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic in RenderBlock.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::finishDelayUpdateScrollInfo): Call clearLayoutOverflow here.
(WebCore::RenderBlock::layout): Only call clearLayoutOverflow here if scrolling isn't being delayed.
(WebCore::RenderBlock::clearLayoutOverflow): Remove clearLayoutOverflow, move into RenderBlock to keep delayed scrolling logic in the same file.
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp: Should call updateScrollInfoAfterLayout, not layer()->updateScrollInfoAfterLayout(), so that it takes delayed scrolling logic into account.
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp: Ditto
(WebCore::RenderGrid::layoutBlock):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed test correction:  Prevent DumpRenderTree crashes
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::role): Prevent crashes when m_element is null. This
happends in some of the 'accessibility' test cases.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CoordinatedGraphics] Typo in argument decoder for CoordinatedGraphicsState
https://bugs.webkit.org/show_bug.cgi?id=117384

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-06-09
Reviewed by Noam Rosenthal.

For CSS Shaders, it must decode state.customFiltersToRemove instead of
state.updateAtlasesToRemove.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::decode):

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