XMLViewer_js and XMLViewer_css should be minified
https://bugs.webkit.org/show_bug.cgi?id=121334

Reviewed by Timothy Hatcher.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* xml/XMLViewer.css:
* xml/XMLViewer.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=121372

Reviewed by Eric Carlson.

Converts the following to take a Document reference:
    - HTMLFormControlElement
    - HTMLFormControlElementWithState
    - HTMLMapElement
    - HTMLMarqueeElement
    - HTMLMediaElement
    - HTMLMenuElement
    - HTMLMetaElement
    - HTMLMeterElement
    - HTMLOListElement
    - HTMLObjectElement
    - HTMLOptGroupElement
    - HTMLOptionElement
    - HTMLOutputElement
    - HTMLParagraphElement
    - HTMLParamElement
    - HTMLProgressElement
    - HTMLScriptElement
    - HTMLSelectElement
    - HTMLSourceElement
    - HTMLSpanElement
    - HTMLStyleElement
    - HTMLSummaryElement
    - HTMLTableCellElement
    - HTMLTableElement
    - HTMLTableRowElement
    - HTMLTableSectionElement
    - HTMLTemplateElement
    - HTMLTextAreaElement
    - HTMLTextFormControlElement
    - HTMLTitleElement
    - HTMLTrackElement
    - HTMLUListElement
    - InlineStyleSheetOwner
    - LabelableElement
    - All the MediaControl elements


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Update RTCDataChannel to match the specification
https://bugs.webkit.org/show_bug.cgi?id=120889

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-14
Reviewed by Eric Carlson

Merged from https://chromium.googlesource.com/chromium/blink/+/c3862b0a83e20fc8b1f770c7e4a886a7cceb80d2
by Tommy Widenflycht.

According to WebRTC specification, RTCDataChannel must have the following new attributes:
boolean ordered
unsigned short maxRetransmitTime
unsigned short maxRetransmits
DOMString protocol
boolean negotiated
unsigned short id

and the following one was deprecated:
boolean reliable

Test updates will be landed with https://webkit.org/b/121102.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::ordered):
(WebCore::RTCDataChannel::maxRetransmitTime):
(WebCore::RTCDataChannel::maxRetransmits):
(WebCore::RTCDataChannel::protocol):
(WebCore::RTCDataChannel::negotiated):
(WebCore::RTCDataChannel::id):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:
* platform/mediastream/RTCDataChannelHandler.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
It should be easy to add new nodes that do OSR forward rewiring in both DFG and FTL
https://bugs.webkit.org/show_bug.cgi?id=121371

Reviewed by Sam Weinig.
        
Forward rewiring is a tricky part of OSR that handles the following:
        
    a: Something(...)
       SetLocal(@a, locX)
    b: Int32ToDouble(@a)
    c: SomethingThatExits(@b)
       <no further uses of @a or @b>

Note that at @c, OSR will think that locX->@a, but @a will be dead. So it must be
smart enough to find @b, which contains an equivalent value. It must do this for
any identity functions we support. Currently we support four such functions.
        
Currently the code for doing this is basically duplicated between the DFG and the
FTL. Also both versions of the code have some really weirdly written logic for
picking the "best" identity function to use.
        
We should fix this by simply having a way to ask "is this node an identity
function, and if so, then how good is it?"  Then both the DFG and FTL could use
this and have no hard-wired knowledge of those identity functions.
        
While we're at it, this also changes some terminology because I found the use of
the word "needs" confusing. Note that this retains the somewhat confusing behavior
that we don't search all possible forward/backward uses. We only search one step
in each direction. This is because we only need to handle cases that FixupPhase
and the parser insert. All other code that tries to insert intermediate conversion
nodes should ensure to Phantom the original node. For example, the following
transformation is illegal:
        
Before:
    x: SomethingThatExits(@a)
        
After:
    w: Conversion(@a)
    x: SomethingThatExits(@w)
        
The correct form of that transformation is one of these:
        
Correct #1:
        
    v: DoAllChecks(@a) // exit here
    w: Conversion(@a)
    x: Something(@w) // no exit
        
Correct #2:
        
    w: Conversion(@a)
    x: SomethingThatExits(@w)
    y: Phantom(@a)
        
Correct #3:
        
    w: Conversion(@a)
    x: SomethingThatExits(@w, @a)
        
Note that we use #3 for some heap accesses, but of course it requires that the
node you're using has an extra slot for a "dummy" use child.
        
Broadly speaking though, such transformations should be relegated to something
below DFG IR, like LLVM IR.

* dfg/DFGNodeType.h:
(JSC::DFG::forwardRewiringSelectionScore):
(JSC::DFG::needsOSRForwardRewiring):
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::reconstruct):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Update RTCDataChannel
https://bugs.webkit.org/show_bug.cgi?id=121102

Reviewed by Sam Weinig.

Source/WebCore: 

Based on https://chromium.googlesource.com/chromium/blink/+/c6975c41956acded7cf0363012d7d6b69d0c6d96,
and https://chromium.googlesource.com/chromium/blink/+/214dab0bd6385f573c918ba5ce58a5aa206ce186.

No new tests, existing tests updated.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::create): Take an options Dictionary.
(WebCore::RTCDataChannel::didChangeReadyState): String -> AtomicString. Early return if the
    state hasn't changed.
(WebCore::RTCDataChannel::binaryType): String -> AtomicString.
(WebCore::RTCDataChannel::setBinaryType): String -> AtomicString.
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createDataChannel): Take an options struct.
* platform/mediastream/RTCDataChannelHandler.h:

* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore::RTCDataChannelInit::RTCDataChannelInit): Take an options struct.

LayoutTests: 

* fast/mediastream/RTCPeerConnection-datachannel-expected.txt:
* fast/mediastream/RTCPeerConnection-datachannel.html:


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