Web Inspector: extract script navigator overlay logic into the scripts navigator controller.
https://bugs.webkit.org/show_bug.cgi?id=84244

Reviewed by Vsevolod Vlasov.

Overlay logic is well separable from the scripts panel and does not belong there.
Extracting it into a separate class.

* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigatorController.prototype.wasShown):
(WebInspector.ScriptsNavigatorController.prototype._createNavigatorControlButton):
(WebInspector.ScriptsNavigatorController.prototype._escDownWhileNavigatorOverlayOpen):
(WebInspector.ScriptsNavigatorController.prototype._toggleNavigator):
(WebInspector.ScriptsNavigatorController.prototype._hidePinnedNavigator):
(WebInspector.ScriptsNavigatorController.prototype.set _pinNavigator):
(WebInspector.ScriptsNavigatorController.prototype.set showNavigatorOverlay):
(WebInspector.ScriptsNavigatorController.prototype.hideNavigatorOverlay):
(WebInspector.ScriptsNavigatorController.prototype._navigatorOverlayWasShown):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.wasShown):
(WebInspector.ScriptsPanel.prototype._editorClosed):
(WebInspector.ScriptsPanel.prototype._editorSelected):
(WebInspector.ScriptsPanel.prototype._scriptSelected):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed, rebaseline compositing tests after r114283.
https://bugs.webkit.org/show_bug.cgi?id=84083

* platform/chromium-linux/compositing/overflow/overflow-positioning-expected.png:
* platform/chromium-mac-leopard/compositing/overflow/overflow-positioning-expected.png: Added.
* platform/chromium-mac-snowleopard/compositing/overflow/overflow-positioning-expected.png:
* platform/chromium-mac/compositing/overflow/overflow-positioning-expected.png:
* platform/chromium-win/compositing/backing/no-backing-for-clip-expected.txt: Added.
* platform/chromium-win/compositing/backing/no-backing-for-clip-overlap-expected.txt: Added.
* platform/chromium-win/compositing/backing/no-backing-for-perspective-expected.txt: Added.
* platform/chromium-win/compositing/geometry/preserve-3d-switching-expected.txt:
* platform/chromium-win/compositing/overflow/overflow-positioning-expected.png:
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, trying to fix QT build.

It was using a FilterEffectRenderer::prepare that changed to allocateBackingStoreIfNeeded in 114529.

* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
(WebCore::BitmapTextureImageBuffer::applyFilters):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Web Inspector: [Chromium] Module's require injects scripts before the debug id is set to the context.
https://bugs.webkit.org/show_bug.cgi?id=84166

Re-applying r114497.

* bindings/v8/V8IsolatedContext.cpp:
(WebCore::setInjectedScriptContextDebugId):
(WebCore):
(WebCore::V8IsolatedContext::V8IsolatedContext):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::evaluateInIsolatedWorld):
* bindings/v8/V8Proxy.h:
(V8Proxy):

LayoutTests: Unreviewed, rolling out r114506.
http://trac.webkit.org/changeset/114506
https://bugs.webkit.org/show_bug.cgi?id=84254

Seems to be making gtk's DumpRenderTree crash occasionally
(Requested by tomz on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-04-18

* platform/gtk/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK test_expectations update.

* platform/gtk/test_expectations.txt: Skip some failing tests and
mark 3 more frame flattening tests flaky.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use explicit casts for size_t to unsigned conversion
https://bugs.webkit.org/show_bug.cgi?id=83602

Reviewed by Eric Seidel.

No new tests, no change in functinality.

Not all platforms have implicit casts from size_t to unsigned and we
can't add size_t versions of the operators to FractionalLayoutUnit for
all platforms as it would conflict with the unsigned versions of same.

Change support methods to take unsigned instead of size_t and use
explicit casts when multiplying or dividing a FractionalLayoutUnit with
a size_t and the other way around.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustForColumns):
* rendering/RenderFlexibleBox.cpp:
(WebCore::initialPackingOffset):
(WebCore::packingSpaceBetweenChildren):
(WebCore::initialLinePackingOffset):
(WebCore::linePackingSpaceBetweenChildren):
(WebCore::RenderFlexibleBox::packFlexLines):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layout):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
matchMedia() MediaQueryList not updating
https://bugs.webkit.org/show_bug.cgi?id=75903

Patch by Luiz Agostini <luiz.agostini@palm.com> on 2012-04-18
Reviewed by Antti Koivisto.

Source/WebCore: 

Test: fast/media/media-query-list-08.html

Viewport related MediaQueryList listeners were not triggered and the value
of matches were not updated if the document's style selector were not
affected by viewport changes.

The new method evaluateMediaQueries() is now called by FrameView instead of
styleSelectorChanged() if the style selector is not affected by viewport changes.

* dom/Document.cpp:
(WebCore::Document::evaluateMediaQueries):
(WebCore):
(WebCore::Document::styleSelectorChanged):
* dom/Document.h:
(Document):
* page/FrameView.cpp:
(WebCore::FrameView::layout):

LayoutTests: 

Testing MediaQueryLists listeners related to viewport changes.

* fast/media/media-query-list-08-expected.txt: Added.
* fast/media/media-query-list-08.html: Added.

Skipping the new test in Mac and Qt due to an issue in its DumpRenderTree.

* platform/qt/Skipped:
* platform/mac/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove m_subclassData from JSArray, move the attribute to subclass as needed
https://bugs.webkit.org/show_bug.cgi?id=84249

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-04-18
Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

JSArray's m_subclassData is only used by WebCore's RuntimeArray. This patch moves
the attribute to RuntimeArray to avoid allocating memory for the pointer in the common
case.

This gives ~1% improvement in JSArray creation microbenchmark thanks to fewer allocations
of CopiedSpace.

* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateJSArray):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:

Source/WebCore: 

* bridge/runtime_array.cpp:
(JSC::RuntimeArray::RuntimeArray):
(JSC::RuntimeArray::finishCreation):
* bridge/runtime_array.h:
(JSC::RuntimeArray::getLength):
(JSC::RuntimeArray::getConcreteArray):
(RuntimeArray):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Pending setVersion call in worker prevents document from opening the db, even after worker termination
https://bugs.webkit.org/show_bug.cgi?id=83952

These two tests fail in DRT most proximately because DRT provides
different instances of IDBFactoryBackend to a document and worker:
https://bugs.webkit.org/show_bug.cgi?id=82776.

One fails in chromium because of a logic error tracked by
http://crbug.com/123418. The plan is to run them both as browser tests
when the logic is fixed, but just one in the meantime.

Also added SKIP for storage/indexeddb/dont-commit-on-blocked.html
since it also can't pass in DRT and just turns the flakiness dashboard
all red.

Reviewed by Ojan Vafai.

* platform/chromium/test_expectations.txt:
* storage/indexeddb/pending-version-change-stuck-expected.txt: Added.
* storage/indexeddb/pending-version-change-stuck-works-with-terminate-expected.txt: Added.
* storage/indexeddb/pending-version-change-stuck-works-with-terminate.html: Added.
* storage/indexeddb/pending-version-change-stuck.html: Added.
* storage/indexeddb/resources/pending-version-change-stuck.js: Added.
(test.request.onsuccess.request.onblocked):
(test.request.onsuccess):
(test):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Adding FIXME comment to FractionalLayoutUnit explaining the lack of size_t operators.

* platform/FractionalLayoutUnit.h:
(FractionalLayoutUnit):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][DRT] Update baselines after font-face support was fixed
https://bugs.webkit.org/show_bug.cgi?id=84234

Unreviewed, EFL gardening.

Fixing baselines for css/font-face* tests and tests affected
by working @font-face. A bunch of table/* rebaselines will
follow in a separate batch.

Patch by Dominik Röttsches <dominik.rottsches@linux.intel.com> on 2012-04-18

* platform/efl/fast/css/beforeSelectorOnCodeElement-expected.png:
* platform/efl/fast/css/font-face-default-font-expected.png:
* platform/efl/fast/css/font-face-in-media-rule-expected.png:
* platform/efl/fast/css/font-face-multiple-faces-expected.png:
* platform/efl/fast/css/font-face-multiple-faces-expected.txt:
* platform/efl/fast/css/font-face-opentype-expected.png:
* platform/efl/fast/css/font-face-opentype-expected.txt:
* platform/efl/fast/css/font-face-remote-expected.png:
* platform/efl/fast/css/font-face-remote-expected.txt:
* platform/efl/fast/css/font-face-synthetic-bold-italic-expected.png: Added.
* platform/efl/fast/css/font-face-synthetic-bold-italic-expected.txt: Added.
* platform/efl/fast/css/font-face-unicode-range-expected.png:
* platform/efl/fast/css/font-face-unicode-range-expected.txt:
* platform/efl/fast/css/font-face-weight-matching-expected.png: Added.
* platform/efl/fast/css/font-face-weight-matching-expected.txt: Added.
* platform/efl/fast/css/font-face-woff-expected.png:
* platform/efl/fast/css/font-face-woff-expected.txt:
* platform/efl/fast/css/rtl-ordering-expected.txt:
* platform/efl/fast/css/text-security-expected.txt:
* platform/efl/fast/events/updateLayoutForHitTest-expected.png:
* platform/efl/fast/writing-mode/broken-ideograph-small-caps-expected.png:
* platform/efl/fast/writing-mode/broken-ideograph-small-caps-expected.txt:
* platform/efl/fast/writing-mode/broken-ideographic-font-expected.png:
* platform/efl/fast/writing-mode/broken-ideographic-font-expected.txt:
* platform/efl/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] WheelEventQt.cpp should be deleted.
https://bugs.webkit.org/show_bug.cgi?id=84237

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-04-18
Reviewed by Simon Hausmann.

* platform/qt/WheelEventQt.cpp: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Turn on ENABLE_DATALIST for chromium
https://bugs.webkit.org/show_bug.cgi?id=84118

Reviewed by Kent Tamura.

Source/WebCore:

* html/HTMLDataListElement.cpp: Touched to avoid build issues. No code change.
* html/HTMLDataListElement.h: Ditto.
* html/HTMLInputElement.cpp: Ditto.
* html/HTMLInputElement.h: Ditto.

Source/WebKit/chromium:

* features.gypi: Turn on ENABLE_DATALIST.
* src/WebInputElement.cpp: Touched to avoid build issues. No code change.

LayoutTests:

* platform/chromium/fast/forms/label/labelable-elements-expected.txt: Update expectated result.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean-up WheelEvent Conversion.
https://bugs.webkit.org/show_bug.cgi?id=84243

Source/WebKit/qt:

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-04-18
Reviewed by Simon Hausmann.

* WebCoreSupport/WebEventConversion.cpp:
(WebCore::WebKitPlatformWheelEvent::applyDelta):

Source/WebKit2:

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-04-18
Reviewed by Simon Hausmann.

* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebWheelEvent):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::wheelEvent):

Tools:

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-04-18
Reviewed by Simon Hausmann.

Calculate proper wheel-delta from pixel-delta given.

* DumpRenderTree/qt/EventSenderQt.cpp:
(EventSender::EventSender):
(EventSender::mouseScrollBy):
(EventSender::continuousMouseScrollBy):

LayoutTests:

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-04-18
Reviewed by Simon Hausmann.

* platform/qt/fast/events/continuous-platform-wheelevent-in-scrolling-div-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GraphicsContextCG's roundToDevicePixels should round even when there's no transform
https://bugs.webkit.org/show_bug.cgi?id=84191

Reviewed by Eric Seidel.

When painting with the identify transform, the roundToDevicePixels function in GraphicsContextCG
does an early return that simply returns the FloatRect that was passed in. This proved to be a
problem in sub-pixel layout, as we wouldn't adjust the paint rect for text underline, and it could
end up being more than one pixel wide. Adding a roundedIntRect method on FloatRect for the simple
short-circuit case.

No new tests. No change in behavior before switching to sub-pixel layout.

* platform/graphics/FloatRect.cpp:
(WebCore::roundedIntRect):
* platform/graphics/FloatRect.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::roundToDevicePixels):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Sandbox violations prevent attaching files to gmail messages
        https://bugs.webkit.org/show_bug.cgi?id=84263
        <rdar://problem/11248260>

        Reviewed by Oliver Hunt.

        * page/DragActions.h: Removed the newly added upload action. We cannot know if or when an
        upload is going to happen - a drop even listener can always get a reference to a File object,
        and upload it with XMLHttpRequest.

        * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): Removed a separate
        willPerformDragDestinationAction call for upload action - ther is nothing we'd want to only
        do when dropping on a file upload button.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Solid color shader should use premultiplied alpha.
https://bugs.webkit.org/show_bug.cgi?id=84215

Patch by David Reveman <reveman@chromium.org> on 2012-04-18
Reviewed by Adrienne Walker.

For efficiency and consistency, expect premultiplied alpha in
solid color shader.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawDebugBorderQuad):
(WebCore::LayerRendererChromium::drawSolidColorQuad):
* platform/graphics/chromium/ShaderChromium.cpp:
(WebCore::FragmentShaderColor::getShaderString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Lion Production Test failing with error: "Failed to stop httpd: pid file still exists" https://bugs.webkit.org/show_bug.cgi?id=84177

Reviewed by Dirk Pranke.

Try to delete the pid file left by Apache in the case it was killed forcefully.

* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd._stop_running_server):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Rename overdraw histograms so we can use field trials in histograms.xml
https://bugs.webkit.org/show_bug.cgi?id=83500

Reviewed by James Robinson.

* platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
(WebCore::CCOverdrawMetrics::recordMetricsInternal):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSSValuePool: Make numeric value caches fixed-size arrays.
<http://webkit.org/b/84268>

Reviewed by Antti Koivisto.

Change the numeric CSSPrimitiveValue caches in CSSValuePool from HashMaps to
fixed-size arrays of RefPtr<CSSPrimitiveValue>s.

This is more space efficient and doesn't incur the cost of a hash lookup every
time a numeric CSSPrimitiveValue is needed. We retain the limit of caching
only values between 0-255 for now.

* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createValue):
* css/CSSValuePool.h:
(CSSValuePool):

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