Web Inspector: In a DataGrid, store value of columnIdentifier to DOM node representing a cell
https://bugs.webkit.org/show_bug.cgi?id=127613

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-01-28
Reviewed by Timothy Hatcher.

* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype._editingCallback):
* UserInterface/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype._keyDown):
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
(WebInspector.DataGridNode.prototype.createCell):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] accessibility/range-alter-by-percent.html is failing after r162587.
https://bugs.webkit.org/show_bug.cgi?id=127774

Reviewed by Mario Sanchez Prada.

Implicit value of step in range type elements should be one or larger.

No new tests. Covered by exiting one.

* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
(webkitAccessibleValueGetMinimumIncrement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for menclose element
https://bugs.webkit.org/show_bug.cgi?id=85729

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2014-01-28
Reviewed by Chris Fleizach.

Source/WebCore:

Added support for menclose element. MathML <menclose> element renders
its content inside an enclosing notation specified by the notation
attribute. The notation attribute can have values longdiv, box, left,
right, top, bottom , radical, madruwb, actuarial, roundedbox, circle,
updiagonalstrike, downdiagonalstrike, verticalstrike and
horizontalstrike.

Tests: mathml/presentation/menclose-add-children.html
       mathml/presentation/menclose-notation-attribute-add.html
       mathml/presentation/menclose-notation-attribute-change-value.html
       mathml/presentation/menclose-notation-attribute-remove.html
       mathml/presentation/menclose-notation-attribute-set1.html
       mathml/presentation/menclose-notation-attribute-set2.html
       mathml/presentation/menclose-notation-no-overlap.html
       mathml/presentation/menclose-notation-radical.html
       mathml/presentation/menclose-remove-children.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/mathml.css:
(mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose):
(math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose):
* mathml/MathMLAllInOne.cpp:
* mathml/MathMLElement.h:
* mathml/MathMLInlineContainerElement.cpp:
* mathml/MathMLMencloseElement.cpp: Added.
(WebCore::MathMLMencloseElement::MathMLMencloseElement):
(WebCore::MathMLMencloseElement::create):
(WebCore::MathMLMencloseElement::createElementRenderer):
(WebCore::MathMLMencloseElement::isPresentationAttribute):
(WebCore::MathMLMencloseElement::finishParsingChildren):
(WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
(WebCore::MathMLMencloseElement::longDivLeftPadding):
* mathml/MathMLMencloseElement.h: Added.
(WebCore::toMathMLMencloseElement):
* mathml/mathattrs.in:
* mathml/mathtags.in:
* rendering/mathml/RenderMathMLMenclose.cpp: Added.
(WebCore::RenderMathMLMenclose::RenderMathMLMenclose):
(WebCore::RenderMathMLMenclose::addChild):
(WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
(WebCore::RenderMathMLMenclose::updateLogicalHeight):
(WebCore::RenderMathMLMenclose::paint):
(WebCore::RenderMathMLMenclose::checkNotationalValuesValidity):
* rendering/mathml/RenderMathMLMenclose.h: Added.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::RenderMathMLRoot):
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLSquareRoot.cpp:
(WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot):
(WebCore::RenderMathMLSquareRoot::createAnonymousWithParentRenderer):
* rendering/mathml/RenderMathMLSquareRoot.h:
Added new file related to menclose element implementation. Menclose
element is created and while parsing its notation attribute based on
its values like top, left CSSBorder properties are applied and for
values like circle, verticalstrike, longidv its taken care in paint.
For radical value an anonymous RenderMathMLSquareRoot is created as
a child of menclose.

LayoutTests:

* mathml/presentation/inferred-mrow-baseline-expected.txt:
* mathml/presentation/inferred-mrow-baseline.html:
* mathml/presentation/inferred-mrow-stretchy-expected.txt:
* mathml/presentation/inferred-mrow-stretchy.html:
Rebaselining existing tests as per the new behavior.

* mathml/presentation/menclose-add-children-expected.html: Added.
* mathml/presentation/menclose-add-children.html: Added.
* mathml/presentation/menclose-notation-attribute-add-expected.html: Added.
* mathml/presentation/menclose-notation-attribute-add.html: Added.
* mathml/presentation/menclose-notation-attribute-change-value-expected.html: Added.
* mathml/presentation/menclose-notation-attribute-change-value.html: Added.
* mathml/presentation/menclose-notation-attribute-remove-expected.html: Added.
* mathml/presentation/menclose-notation-attribute-remove.html: Added.
* mathml/presentation/menclose-notation-attribute-set1-expected.txt: Added.
* mathml/presentation/menclose-notation-attribute-set1.html: Added.
* mathml/presentation/menclose-notation-attribute-set2-expected-mismatch.html: Added.
* mathml/presentation/menclose-notation-attribute-set2.html: Added.
* mathml/presentation/menclose-notation-no-overlap-expected.txt: Added.
* mathml/presentation/menclose-notation-no-overlap.html: Added.
* mathml/presentation/menclose-notation-radical-expected.html: Added.
* mathml/presentation/menclose-notation-radical.html: Added.
* mathml/presentation/menclose-remove-children-expected.html: Added.
* mathml/presentation/menclose-remove-children.html: Added.
Added new test cases for verifying the behaviour of menclose element
with different values of notation attribute and removing/changing/adding
notation attribute.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use std::mutex instead of WTF::Mutex in WTF
https://bugs.webkit.org/show_bug.cgi?id=127783

Reviewed by Antti Koivisto.

* wtf/CryptographicallyRandomNumber.cpp:
* wtf/MainThread.cpp:
(WTF::mainThreadFunctionQueueMutex):
(WTF::functionQueue):
(WTF::dispatchFunctionsFromMainThread):
(WTF::callOnMainThread):
(WTF::cancelCallOnMainThread):
* wtf/StackStats.cpp:
(WTF::StackStats::initialize):
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
(WTF::StackStats::LayoutCheckPoint::~LayoutCheckPoint):
* wtf/StackStats.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 View Gestures (Swipe): Use CGSCaptureWindowsContentsToRect for now
https://bugs.webkit.org/show_bug.cgi?id=127768
<rdar://problem/15923662>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Until <rdar://problem/15709646> is resolved, we'll use
CGSCaptureWindowsContentsToRect instead of CGWindowListCreateImage.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add stubbed out VisitedLinkProvider class
https://bugs.webkit.org/show_bug.cgi?id=127744

Reviewed by Andreas Kling.

This is a first step towards moving responsibility of visited links from
the page group to a separate object.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
* page/PageGroup.h:
(WebCore::PageGroup::visitedLinkProvider):
* page/VisitedLinkProvider.cpp: Added.
(WebCore::VisitedLinkProvider::VisitedLinkProvider):
(WebCore::VisitedLinkProvider::~VisitedLinkProvider):
* page/VisitedLinkProvider.h: Added.
(WebCore::VisitedLinkProvider::create):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Turn stack stats back off.

* wtf/StackStats.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Actually turn stack stats back off.

* wtf/StackStats.cpp:
* wtf/StackStats.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Jettison DFG code when neither breakpoints or the profiler are active.
<https://webkit.org/b/127766>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

We need to jettison the DFG CodeBlocks under the following circumstances:
1. When adding breakpoints to a CodeBlock, jettison it if it is a DFG CodeBlock.
2. When enabling stepping mode in a CodeBlock, jettison it if it a DFG CodeBlock.
3. When settign the enabled profiler in the VM, we need to jettison all DFG
   CodeBlocks.

Instead of emitting speculation checks, the DFG code will now treat Breakpoint,
ProfileWillCall, and ProfileDidCall as no-ops similar to a Phantom node. We
still need to track these nodes so that they match the corresponding opcodes
in the baseline JIT when we jettison and OSR exit. Without them, we would OSR
exit to the wrong location in the baseline JIT code.

In DFGDriver's compileImpl() and DFGPlan's finalizeWithoutNotifyingCallback()
we fail the compilation effort with a CompilationInvalidated result. This allows
the DFG compiler to re-attampt the compilation of the function after some time
if it is hot. The CompilationInvalidated result is supposed to cause the DFG
to exercise an exponential back off before re-attempting compilation again
(see runtime/CompilationResult.h).

This patch improves the Octane score from ~2950 to ~3067.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::addBreakpoint):
(JSC::CodeBlock::setSteppingMode):
* bytecode/CodeBlock.h:
* debugger/Debugger.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* profiler/LegacyProfiler.cpp:
(JSC::LegacyProfiler::startProfiling):
(JSC::LegacyProfiler::stopProfiling):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::SetEnabledProfilerFunctor::operator()):
(JSC::VM::setEnabledProfiler):
* runtime/VM.h:
(JSC::VM::enabledProfiler):

LayoutTests: 

Added a test to exercise setting a breakpoint in 2 DFG compiled functions:
1 not inlined, and 1 inlined.

* inspector-protocol/debugger/resources/breakpoint.js:
(notInlineable):
(inlineable):
(notInliningFoo):
(inliningFoo):
(dfgWithoutInline):
(dfgWithInline):
* inspector-protocol/debugger/setBreakpoint-dfg-expected.txt: Added.
* inspector-protocol/debugger/setBreakpoint-dfg.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Setting muted attribute on <video> element is not reflected in controls
https://bugs.webkit.org/show_bug.cgi?id=127726

Reviewed by Eric Carlson.

Source/WebCore:

If the 'muted' IDL attribute is queried after the 'muted' and 'src' content attributes are
set but before loading begins, it will return 'false' until loading begins, but with no
way to query whether that value is valid, nor firing a volumechange event when its value
changes.

The HTML spec says that the 'muted' content attribute controls whether audio output is
muted "when the media element is created", not when loading begins, but we don't
necessarily have a signal that the element is fully parsed.  Additionally, this means its
impossible to make an element via script and get this behavior.

So the new behavior is that the 'muted' IDL attribute will always reflect the 'muted'
content attribute up until one of the following three conditions:

- The 'muted' IDL attribute is set via script.
- The element is inserted in the document.
- The element begins loading.

After the first one of the above conditions, the 'muted' IDL attribute will no longer
change when the 'muted' content attribute changes.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:

LayoutTests:

* media/video-defaultmuted-expected.txt:
* media/video-defaultmuted.html:


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