Parse MIME-types and strip them down to the base type when needed.

The use of charset in a MIME-type interferes with our type maps,
preventing the right syntax highlighting mode and pretty printing.

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

Reviewed by Joseph Pecoraro.

* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
* UserInterface/FontResourceContentView.js:
* UserInterface/Resource.js:
(WebInspector.Resource.Type.fromMIMEType):
(WebInspector.Resource.prototype.get mimeTypeComponents):
(WebInspector.Resource.prototype.get syntheticMIMEType):
(WebInspector.Resource.prototype.get contentURL):
(WebInspector.Resource.prototype.updateForResponse):
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
* UserInterface/SyntaxHighlightingSupport.js:
(WebInspector.syntaxHighlightStringAsDocumentFragment):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set mimeType):
* UserInterface/Utilities.js:
(parseMIMEType): Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r156185.
http://trac.webkit.org/changeset/156185
https://bugs.webkit.org/show_bug.cgi?id=121727

Caused a lot of crashes in tests (Requested by ap on #webkit).

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle):
(WebCore::Document::updateLayout):
* dom/Document.h:

LayoutTests:

* fast/dom/HTMLDocument/active-element-gets-unfocusable-expected.txt: Removed.
* fast/dom/HTMLDocument/active-element-gets-unfocusable.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r153215): New iCloud site crashes
https://bugs.webkit.org/show_bug.cgi?id=121710

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Don't claim to be able to rely on the arguments structure, use the Arguments
speculation type

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):

LayoutTests:

New test case

* js/dfg-arguments-mutated-structure-expected.txt: Added.
* js/dfg-arguments-mutated-structure.html: Added.
* js/script-tests/dfg-arguments-mutated-structure.js: Added.
(foo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r156047): WebCore hangs inside JSC::toInt32(double)
https://bugs.webkit.org/show_bug.cgi?id=121648

Source/JavaScriptCore: 

Reviewed by Mark Hahnenberg.
        
The Int52<->StrictInt52 conversion did the opposite fill() than what it was
supposed to. For example when converting a Int52 to a StrictInt52 it would fill
as Int52, and vice-versa.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateInt52):

LayoutTests: 

Reviewed by Mark Hahnenberg.

* js/dfg-int52-change-format-expected.txt: Added.
* js/dfg-int52-change-format.html: Added.
* js/script-tests/dfg-int52-change-format.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix test after <http://trac.webkit.org/changeset/156203>

* platform/mac/accessibility/aria-help.html: Correct paths to JS tests.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
(un)shiftCountWithAnyIndexingType will start over in the middle of copying if it sees a hole
https://bugs.webkit.org/show_bug.cgi?id=121717

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

This bug caused the array to become corrupted. We now check for holes before we start moving things,
and start moving things only once we've determined that there are none.

* runtime/JSArray.cpp:
(JSC::JSArray::shiftCountWithAnyIndexingType):
(JSC::JSArray::unshiftCountWithAnyIndexingType):

LayoutTests:

Added test to make sure that splicing an array with holes works correctly.

* js/array-splice-with-holes-expected.txt: Added.
* js/array-splice-with-holes.html: Added.
* js/script-tests/array-splice-with-holes.js: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CSS Regions] Display CSS Regions chain when highlighting a CSS Region node
https://bugs.webkit.org/show_bug.cgi?id=121719

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/elements/highlight-node-regions.html

When a CSS Region node is highlighted through the WebInspector, it will also lookup all the regions
that are part of the same flow and inject enough information into InspectorOverlayPage.js to get the other
CSS Regions highlighted as well. A chain will also link the regions and a number will display the ordering
of the content.

* WebCore.exp.in:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::buildObjectForHighlightedNode):
* inspector/InspectorController.h:
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRegionHighlight):
(WebCore::buildObjectForCSSRegionsHighlight):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::drawNodeHighlight): Separated the InspectorObject building part out of this function,
so that we can call buildObjectForHighlightedNode from the Internals APIs for testing.
* inspector/InspectorOverlay.h:
* inspector/InspectorOverlayPage.js:
(_drawRegionNumber):
(_quadMidPoint):
(_drawRegionLink):
(_fixQuadScrollPosition):
(_drawRegionsHighlight):
(drawNodeHighlight):
* testing/Internals.cpp: Exposed the generated InspectorObject to the layout test.
(WebCore::Internals::inspectorHighlightObject):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Added test to check the position of the CSS Regions part of the same flow thread with
the highlighted CSS Region node.

* http/tests/inspector/elements-test.js:
* inspector/elements/highlight-node-regions-expected.txt: Added.
* inspector/elements/highlight-node-regions.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WINDOWS] Unreviewed build fix after r156215.
   * WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
   Add missing symbols needed by DumpRenderTree.dll.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build fix after r156216.

        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: I
        accidentally exposed the symbol of the calling function, not
        the missing symbol!


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix link errors for external users when building WebKit with Xcode 5.

Reviewed by Oliver Hunt.

* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:

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