Slider should snap to datalist tick marks
https://bugs.webkit.org/show_bug.cgi?id=92640

Reviewed by Kent Tamura.

Source/WebCore:

Input type=range slider snaps to datalist tick marks.

Test: fast/forms/datalist/range-snap-to-datalist.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::findClosestTickMarkValue): Just calls InputType::findClosestTickMarkValue.
(WebCore):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/InputType.cpp:
(WebCore):
(WebCore::InputType::findClosestTickMarkValue): Overridden by RangeInputType.
* html/InputType.h:
(InputType):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::RangeInputType):
(WebCore):
(WebCore::RangeInputType::listAttributeTargetChanged): Mark m_tickMarkValues as dirty.
(WebCore::decimalCompare):
(WebCore::RangeInputType::updateTickMarkValues): Sets m_tickMarkValues to a list of sorted valid datalist values.
(WebCore::RangeInputType::findClosestTickMarkValue): Finds closest tick mark value to a given value.
* html/RangeInputType.h:
(RangeInputType):
* html/shadow/SliderThumbElement.cpp:
(WebCore):
(WebCore::SliderThumbElement::setPositionFromPoint): Snaps to the closest tick mark value if it is within a certain distance.

LayoutTests:

* fast/forms/datalist/range-snap-to-datalist-expected.txt: Added.
* fast/forms/datalist/range-snap-to-datalist.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add default implementation of GraphicsLayerClient::contentsVisible()
https://bugs.webkit.org/show_bug.cgi?id=93036

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-08-02
Reviewed by George Staikos.

Source/WebCore:

Returning true by default would cause memory usage to balloon, because
the LayerTiler would believe every tile is visible and always needs to
be rendered. Instead, we choose to return false by default, relying
entirely on reactive rendering through render jobs.

However this revealed a subtle bug. If the entire layer was invalidated
every frame, checkerboard would never resolve with this default
implementation.

Fixed by not clearing render jobs when the entire layer is invalidated,
thus making us robust against an incomplete contentsVisible
implementation.

Also removed dead code related to the deprecated
LayerTiler::m_tilesWebKitThread mechanism, which has been replaced by
the implicit visibility management resulting from render jobs.

With m_tilesWebKitThread out of the way, rename m_tilesCompositingThread
to be simply m_tiles.

PR 187458

This is not currently testable using BlackBerry testing infrastructure.

* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::contentsVisible): Gets a default implementation instead of being pure virtual.
* platform/graphics/blackberry/LayerTile.cpp:
(WebCore::LayerTile::LayerTile): Merged LayerTileData into LayerTile now that m_tilesWebKitThread is gone.
* platform/graphics/blackberry/LayerTile.h:
(LayerTile):
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::~LayerTiler):
(WebCore::LayerTiler::updateTextureContentsIfNeeded): Bug fix to make us robust against the new default implementation of GraphicsLayerClient::contentsVisible()
(WebCore::LayerTiler::shouldPerformRenderJob):
(WebCore::LayerTiler::layerVisibilityChanged):
(WebCore::LayerTiler::uploadTexturesIfNeeded):
(WebCore::LayerTiler::drawTexturesInternal):
(WebCore::LayerTiler::deleteTextures):
(WebCore::LayerTiler::pruneTextures):
(WebCore::LayerTiler::bindContentsTexture):
* platform/graphics/blackberry/LayerTiler.h:
(LayerTiler):

Source/WebKit/blackberry:

Remove implementation of GraphicsLayerClient::contentsVisible() now
that it has a default implementation.

This also fixes a bug where memory usage for the inspector highlight
overlay would balloon because it returned true from contentsVisible()
which would cause the LayerTiler to populate all tiles. The default
implementation returns false instead.

PR 187458, 184377

* WebCoreSupport/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::showRepaintCounter):
* WebCoreSupport/InspectorOverlay.h:
(InspectorOverlay):
* WebKitSupport/DefaultTapHighlight.h:
* WebKitSupport/SelectionOverlay.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test: fast/css/image-orientation/image-orientation needs to be added to skip list for Windows.
https://bugs.webkit.org/show_bug.cgi?id=93053

Patch by Roger Fong <roger_fong@apple.com> on 2012-08-02
Reviewed by Tim Horton.

The feature has not been completed yet.
It has been added to all other platforms' skip lists (see https://bugs.webkit.org/show_bug.cgi?id=89624), except for Windows.

* platform/win/Skipped:
Added fast/css/image-orientation/image-orientation to skip list.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Fix wrong assigned value of BatteryStatus
https://bugs.webkit.org/show_bug.cgi?id=93058

Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-08-02
Reviewed by Kentaro Hara.

There is a wrong change in the bug 92964.
property variable have to be used after assigned value in the setBatteryClient.

* platform/efl/BatteryProviderEfl.cpp:
(WebCore::BatteryProviderEfl::setBatteryClient):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] add lost context test case for HW video decoder
https://bugs.webkit.org/show_bug.cgi?id=93057

Reviewed by Adrienne Walker.

We check that we don't use resources after a lost context (assuming
proper WebVideoFrameProvider behavior).

* tests/CCLayerTreeHostImplTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Rebaseline fast/forms/basic-selects.html for Chromium-Mac and Chromium-Win.

r124416 changes rendering of non-disabled option element in disabled select.

* platform/chromium-mac-snowleopard/fast/forms/basic-selects-expected.png:
* platform/chromium-mac/fast/forms/basic-selects-expected.png:
* platform/chromium-mac/fast/forms/basic-selects-expected.txt: Added.
* platform/chromium-win/fast/forms/basic-selects-expected.png:
* platform/chromium-win/fast/forms/basic-selects-expected.txt:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: at(m_compileIndex).canExit() || m_isCheckingArgumentTypes
https://bugs.webkit.org/show_bug.cgi?id=91074

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore: 

Fixes a bug where the speculative JIT was performing an unnecessary speculation that the
CFA had proven shouldn't be performed, leading to asserts that a node should not have
exit sites. This is a debug-only assert with no release symptom - we were just emitting
a check that was not reachable.
        
Also found, and fixed, a bug where structure check hoisting was slightly confusing the
CFA by inserting GetLocal's into the graph. CSE would clean the GetLocal's up, which
would make the backend happy - but the CFA would produce subtly wrong results.

* bytecode/SpeculatedType.h:
(JSC::isOtherOrEmptySpeculation):
(JSC):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):

LayoutTests: 

Added a test for this specific case (dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object)
as well as three other tests to cover similar, though not necessarily currently broken, cases, since it was previously the
case that we apparently had no explicit coverage for these code paths.

* fast/js/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt: Added.
* fast/js/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object.html: Added.
* fast/js/dfg-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt: Added.
* fast/js/dfg-compare-final-object-to-final-object-or-other-when-proven-final-object.html: Added.
* fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt: Added.
* fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object.html: Added.
* fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt: Added.
* fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-proven-final-object.html: Added.
* fast/js/script-tests/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object.js: Added.
(foo):
* fast/js/script-tests/dfg-compare-final-object-to-final-object-or-other-when-proven-final-object.js: Added.
(foo):
* fast/js/script-tests/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object.js: Added.
(foo):
* fast/js/script-tests/dfg-peephole-compare-final-object-to-final-object-or-other-when-proven-final-object.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crashes for <input> and <textarea> with display:run-in.
https://bugs.webkit.org/show_bug.cgi?id=87300

Reviewed by Abhishek Arya.

Source/WebCore:

Introduce RenderObject::canBeReplacedWithInlineRunIn, and renderers which
should not be run-in override it so that it returns false.

Test: fast/runin/input-text-runin.html
      fast/runin/textarea-runin.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
Checks canBeReplacedWithInlineRunIn instead of checking tag names.
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::canBeReplacedWithInlineRunIn):
Added. Disallow run-in.
* rendering/RenderFileUploadControl.h:
(RenderFileUploadControl): Declare canBeReplacedWithInlineRunIn.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::canBeReplacedWithInlineRunIn):
Added. Disallow run-in. This is not a behavior change.
* rendering/RenderListBox.h:
(RenderListBox): Declare canBeReplacedWithInlineRunIn.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::canBeReplacedWithInlineRunIn):
Added. Disallow run-in. This is not a behavior change.
* rendering/RenderMenuList.h:
(RenderMenuList): Declare canBeReplacedWithInlineRunIn.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::canBeReplacedWithInlineRunIn):
Added. Allow run-in by default.
* rendering/RenderObject.h:
(RenderObject): Declare canBeReplacedWithInlineRunIn.
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::canBeReplacedWithInlineRunIn):
Added. Disallow run-in. This is not a behavior change.
* rendering/RenderProgress.h:
(RenderProgress): Declare canBeReplacedWithInlineRunIn.
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::canBeReplacedWithInlineRunIn):
Added. Disallow run-in.
* rendering/RenderSlider.h:
(RenderSlider): Declare canBeReplacedWithInlineRunIn.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::canBeReplacedWithInlineRunIn):
Added. Disallow run-in.
* rendering/RenderTextControl.h:
(RenderTextControl): Declare canBeReplacedWithInlineRunIn.

LayoutTests:

* fast/runin/input-text-runin-expected.txt: Added.
* fast/runin/input-text-runin.html: Added.
* fast/runin/textarea-runin-expected.txt: Added.
* fast/runin/textarea-text-runin.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, land some overrides for Chromium for the tests I just added, since
V8 attachs a slightly different (but equally valid) string for the exception we
expect to see.

* platform/chromium/fast/js/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt: Added.
* platform/chromium/fast/js/dfg-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt: Added.
* platform/chromium/fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt: Added.
* platform/chromium/fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, revert debugging stuff I landed in http://trac.webkit.org/changeset/124557
by accident.

* tests/v8-v6/v8-crypto.js:
(am1):
(am2):
(am3):
(am4):
(bnpCopyTo):
(bnpFromString):
(bnpClamp):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Build break when building DumpRenderTree/gtk/EditingCallbacks.cpp
https://bugs.webkit.org/show_bug.cgi?id=93061

Unreviewed, Fix build break for WebKitGtk+.

Use webkit_dom_element_get_class_name instead of webkit_dom_html_element_get_class_name.

Patch by Joone Hur <joone.hur@intel.com> on 2012-08-02

* DumpRenderTree/gtk/EditingCallbacks.cpp:
(shouldShowDeleteInterfaceForElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move getLocalTime() as static inline function to DateMath
https://bugs.webkit.org/show_bug.cgi?id=92955

Reviewed by Ryosuke Niwa.

getCurrentLocalTime() and getLocalTime() has been superseded with the
GregorianDateTime class. So we can move it into DateMath.cpp as an static inline
function. This allows us to remove the dependecy on time() and localtime()
for Windows CE, where this functions require the ce_time library to work.

Source/JavaScriptCore:

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

Source/WTF:

* wtf/CurrentTime.cpp:
(WTF):
* wtf/CurrentTime.h:
* wtf/DateMath.cpp:
(WTF):
(WTF::getLocalTime):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: remove leftover chromium stubs from putIndexWithKeys
https://bugs.webkit.org/show_bug.cgi?id=93032

Patch by Alec Flett <alecflett@chromium.org> on 2012-08-02
Reviewed by Darin Fisher.

Remove old chromium APIs that are no longer called by chrome.

* public/WebIDBCursor.h:
* public/WebIDBObjectStore.h:
* public/WebIDBTransaction.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make order of attribute/method in HTMLTrackElement.idl as same as specification
https://bugs.webkit.org/show_bug.cgi?id=80102

Reviewed by Kentaro Hara.

No new tests. This patch doesn't change behavior.

* html/HTMLTrackElement.idl: Reorder attribute/method position.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
V8Proxy::retrieveFrameFor*Context are used only by BindingState and should be removed as separate functions
https://bugs.webkit.org/show_bug.cgi?id=93049

Reviewed by Eric Seidel.

No one calls these functions directly anymore. This patch removes them
from V8Proxy and inlines their logic into BindingState.cpp.

* bindings/v8/BindingState.cpp:
(WebCore::activeContext):
(WebCore):
(WebCore::activeWindow):
(WebCore::activeFrame):
(WebCore::firstFrame):
(WebCore::currentFrame):
* bindings/v8/V8Proxy.cpp:
* bindings/v8/V8Proxy.h:
(V8Proxy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash due to layer not removed from parent for anonymous block.
https://bugs.webkit.org/show_bug.cgi?id=90800

Reviewed by Kent Tamura.

Source/WebCore:

Reverse the order of setStyle and removeChildNode calls. This ensures that setting the style
properly removes its layer from the parent in RenderBoxModelObject::styleDidChange. Calling
removeChildNode before calling setStyle is problematic since the parent layer never gets
notified.

Test: fast/block/layer-not-removed-from-parent-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeChild):

LayoutTests:

* fast/block/layer-not-removed-from-parent-crash-expected.txt: Added.
* fast/block/layer-not-removed-from-parent-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed attempt at fixing the GTK 64-bit debug build.

* Source/autotools/symbols.filter:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Make v8NonStringValueToWebCoreString a static method
https://bugs.webkit.org/show_bug.cgi?id=93066

Reviewed by Adam Barth.

v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString()
are not intended to be used from outside V8Binding.cpp.
They should be static methods.

No tests. No change in behavior.

* bindings/v8/V8Binding.cpp:
(WebCore::v8NonStringValueToWebCoreString):
(WebCore):
(WebCore::v8NonStringValueToAtomicWebCoreString):
* bindings/v8/V8Binding.h:
(WebCore::v8StringToWebCoreString):
(WebCore::v8StringToAtomicWebCoreString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WTR should be able to load external resources
https://bugs.webkit.org/show_bug.cgi?id=89382

Reviewed by Ryosuke Niwa.

Allow to load an external resource as the main frame
and allow all subsequent external loads for such a main
frame. This behavior is necessary for being able to run
performance tests (wkb.ug/84008).

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::isLocalHost):
(WTR):
(WTR::isHTTPOrHTTPSScheme):
(WTR::InjectedBundlePage::willSendRequestForFrame):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][DRT] WebKitAnimation API compile-time disabled
https://bugs.webkit.org/show_bug.cgi?id=84593

Patch by Joone Hur <joone.hur@intel.com> on 2012-08-03
Reviewed by Laszlo Gombos.

.:

Enable ENABLE_ANIMATION_API by default on the Efl port.

* Source/cmake/OptionsEfl.cmake:
* Source/cmakeconfig.h.cmake:

Tools:

Enable ENABLE_ANIMATION_API by default on the Efl port.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Removing animations/animation-api-1.html from TestExpectations
by enabling ENABLE_ANIMATION_API.

* platform/efl/TestExpectations:

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