WebKit-https.git
7 years agoREGRESSION(r125046): Breaks debug build (assertion in protocol type checks) (Requeste...
pfeldman@chromium.org [Wed, 8 Aug 2012 20:14:52 +0000 (20:14 +0000)]
REGRESSION(r125046): Breaks debug build (assertion in protocol type checks) (Requested by pfeldman on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=93505

Not reviewed: roll out.

Source/WebCore:

* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::addToFrontend):
* inspector/ConsoleMessage.h:
(ConsoleMessage):
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::wrapObject):
* inspector/InjectedScript.h:
(InjectedScript):
* inspector/InjectedScriptSource.js:
(.):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::addConsoleMessage):
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._format):
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype._printArray):
(WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry):
(WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
* inspector/front-end/DOMExtension.js:
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection):
* inspector/front-end/PropertiesSection.js:
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPayload):
* inspector/front-end/Section.js:
* inspector/front-end/inspector.css:
(.console-group-messages .section .header .title):
(.section .properties .name, .event-properties .name):

LayoutTests:

* inspector/console/command-line-api-inspect-expected.txt:
* inspector/console/console-dir-expected.txt:
* inspector/console/console-eval-global-expected.txt:
* inspector/console/console-eval-global.html:
* inspector/console/console-format-collections-expected.txt:
* inspector/console/console-format-collections.html:
* inspector/console/console-format-expected.txt:
* inspector/console/console-format.html:
* inspector/console/console-log-document-proto-expected.txt:
* inspector/console/console-log-document-proto.html:
* inspector/console/console-log-toString-object-expected.txt:
* inspector/debugger/watch-expressions-panel-switch-expected.txt:
* inspector/elements/event-listener-sidebar-expected.txt:
* inspector/elements/event-listeners-about-blank-expected.txt:
* platform/chromium/inspector/console/console-dir-expected.txt:
* platform/chromium/inspector/console/console-eval-global-expected.txt: Copied from LayoutTests/inspector/console/console-eval-global-expected.txt.
* platform/chromium/inspector/console/console-format-collections-expected.txt:
* platform/chromium/inspector/console/console-format-expected.txt: Copied from LayoutTests/inspector/console/console-format-expected.txt.
* platform/chromium/inspector/console/console-log-document-proto-expected.txt:
* platform/chromium/inspector/debugger/watch-expressions-panel-switch-expected.txt:
* platform/chromium/inspector/elements/event-listener-sidebar-expected.txt: Copied from LayoutTests/inspector/elements/event-listener-sidebar-expected.txt.

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

7 years ago[chromium] Enable occlusion tracker in the occlusion tests for surface cacheing
danakj@chromium.org [Wed, 8 Aug 2012 20:13:48 +0000 (20:13 +0000)]
[chromium] Enable occlusion tracker in the occlusion tests for surface cacheing
https://bugs.webkit.org/show_bug.cgi?id=93500

Reviewed by Adrienne Walker.

The occlusion tracker is not being used in these tests except to do
scissoring. We want to test occlusion with these occlusion tests,
and when scissoring is not part of occlusion tracker, these
tests would become useless otherwise.

* tests/CCLayerTreeHostImplTest.cpp:

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

7 years agoCrash when reloading a Chromium "platform" app
abarth@webkit.org [Wed, 8 Aug 2012 20:03:37 +0000 (20:03 +0000)]
Crash when reloading a Chromium "platform" app
https://bugs.webkit.org/show_bug.cgi?id=93497

Reviewed by Eric Seidel.

Source/WebCore:

The framework for Chromium "platform" apps executes a big blob of
script during the didCreateScriptContext callback. This blob of scripts
interacts with a bunch of JavaScript objects and triggers a number of
security checks.

When reloading a frame, the didCreateScriptContext is called during
Frame::setDocument (as a consequence of calling
ScriptController::updateDocument). At that time, the SecurityOrigin
object hasn't yet been copied over to the DOMWindow, and we crash
trying to grab it.

The long-term fix for this bug is to fix
https://bugs.webkit.org/show_bug.cgi?id=75793, at which point there
will no longer be a SecurityOrigin object on DOMWindow. In the
meantime, however, we can fix this crash by null checking the
DOMWindow's SecurityOrigin object.

* bindings/generic/BindingSecurity.cpp:
(WebCore::canAccessDocument):

Source/WebKit/chromium:

Test that we don't crash when executing script during the
didCreateScriptContext callback.

* tests/WebFrameTest.cpp:
* tests/data/hello_world.html: Added.

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

7 years ago[WK2] Coding style violation was brought with r125031
commit-queue@webkit.org [Wed, 8 Aug 2012 19:55:37 +0000 (19:55 +0000)]
[WK2] Coding style violation was brought with r125031
https://bugs.webkit.org/show_bug.cgi?id=93503

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-08-08
Reviewed by Alexey Proskuryakov.

WKURLResponseCopyMimeType is corrected to WKURLResponseCopyMIMEType.

Source/WebKit2:

* Shared/API/c/WKURLResponse.cpp:
(WKURLResponseCopyMIMEType):
* Shared/API/c/WKURLResponse.h:

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didReceiveResponseForResource):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(WTR::LayoutTestController::dumpProgressFinishedCallback): Removed trailing whitespace that was brought with the same revision.

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

7 years agoRemove several non-updated blogs from Planet WebKit
peter@chromium.org [Wed, 8 Aug 2012 19:39:00 +0000 (19:39 +0000)]
Remove several non-updated blogs from Planet WebKit
https://bugs.webkit.org/show_bug.cgi?id=92973

Reviewed by Eric Seidel.

Adam Treat's blog was last updated in 2009.
Justin Haygood's blog was last updated in 2008.
Mike Smith seems to have moved to Google+ entirely.
Pierre-Luc Beaudoin's blog is unavailable, cached copy says the last (non-WebKit specific update) was in 2010.
Cameron Zwarich' summer of JSC no longer exists.
Anthony Ricaud's blog was last updated in 2009.

* config.ini:

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

7 years agoUnreviewed build fix for Mac port after http://trac.webkit.org/changeset/125051
dino@apple.com [Wed, 8 Aug 2012 19:33:58 +0000 (19:33 +0000)]
Unreviewed build fix for Mac port after trac.webkit.org/changeset/125051

Add CachedImageClient.h to project.

* WebCore.xcodeproj/project.pbxproj:

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

7 years ago[BlackBerry] Tie up the scrolling machinery to the graphics tree when applicable...
tonikitoo@webkit.org [Wed, 8 Aug 2012 19:21:52 +0000 (19:21 +0000)]
[BlackBerry] Tie up the scrolling machinery to the graphics tree when applicable for in-region scroll
https://bugs.webkit.org/show_bug.cgi?id=93482
PR #187672
Make InRegionScroller a simple public webkit/ API
PR #188677

Reviewed by Rob Buis.
Patch by Antonio Gomes <agomes@rim.com>

In order to prepare InRegionScroller to be a public API
in webkit/, the patch:

1) Renamed the current InRegionScroller class to InRegionScrollerPrivate;
2) Moved InRegionScroller.cpp|h from WebKitSupport/ to Api/;
3) Renamed InRegionScroller.h to InRegionScroller_p.h;
4) Added a new public class implementation to InRegionScroller.h;
5) Adapted WebPage and TouchEventHandler classes to use InRegionScroller::d directly.

The most important API here is '::compositedSetScrollPosition'

It is a  UI/Compositing thread method only and sets the associated LayerCompositingThread
(camouflaged as a unsigned) for each created InRegionScrollableArea that supports
composited scrolling.

The way ::compositedSetScrollPosition "scrolls" a layer is by setting the boundsOrigin
property to the LayerCompositingThread's 'override' property in the UI/Compositing thread.

* PlatformBlackBerry.cmake: Build system adaptation.

* Api/InRegionScroller.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.cpp.
(WebKit):
(BlackBerry::WebKit::InRegionScroller::InRegionScroller):
(BlackBerry::WebKit::InRegionScroller::~InRegionScroller):
(BlackBerry::WebKit::InRegionScroller::compositedSetScrollPosition):
(BlackBerry::WebKit::InRegionScrollerPrivate::InRegionScrollerPrivate):
(BlackBerry::WebKit::InRegionScrollerPrivate::setNode):
(BlackBerry::WebKit::InRegionScrollerPrivate::node):
(BlackBerry::WebKit::InRegionScrollerPrivate::reset):
(BlackBerry::WebKit::InRegionScrollerPrivate::hasNode):
(BlackBerry::WebKit::InRegionScrollerPrivate::canScroll):
(BlackBerry::WebKit::InRegionScrollerPrivate::compositedSetScrollPosition):
(BlackBerry::WebKit::InRegionScrollerPrivate::scrollBy):
(BlackBerry::WebKit::InRegionScrollerPrivate::inRegionScrollableAreasForPoint):
(BlackBerry::WebKit::InRegionScrollerPrivate::scrollNodeRecursively):
(BlackBerry::WebKit::InRegionScrollerPrivate::scrollRenderer):
(BlackBerry::WebKit::InRegionScrollerPrivate::adjustScrollDelta):
(BlackBerry::WebKit::canScrollInnerFrame):
(BlackBerry::WebKit::canScrollRenderBox):
(BlackBerry::WebKit::parentLayer):
(BlackBerry::WebKit::enclosingLayerNode):
(BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
(BlackBerry::WebKit::pushBackInRegionScrollable):
* Api/InRegionScroller.h: Copied from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h.
(WebKit):
(InRegionScroller):
* Api/InRegionScroller_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h.
(WebCore):
(WebKit):
(InRegionScrollerPrivate):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::scrollBy):
(BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged):
(BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
(BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
(BlackBerry::WebKit::WebPage::inRegionScroller):
(WebKit):
* Api/WebPage.h:
(WebKit):
* WebKitSupport/InRegionScrollableArea.cpp:
(BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):

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

7 years ago[BlackBerry] Make WebOverlayPrivate::scheduleCompositingRun a WebPagePrivate method.
tonikitoo@webkit.org [Wed, 8 Aug 2012 19:20:59 +0000 (19:20 +0000)]
[BlackBerry] Make WebOverlayPrivate::scheduleCompositingRun a WebPagePrivate method.
https://bugs.webkit.org/show_bug.cgi?id=93480
PR #188682

Reviewed by Rob Buis.
Patch by Antonio Gomes <agomes@rim.com>

... this way it can be used by others.

No behavioural change. Another preparation patch.

* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlayPrivate::scheduleCompositingRun):
* Api/WebPage.cpp:
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun):
* Api/WebPage_p.h:
(WebPagePrivate):

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

7 years ago[BlackBerry] Add boundsOrigin accessors to LayerOverride
tonikitoo@webkit.org [Wed, 8 Aug 2012 19:20:10 +0000 (19:20 +0000)]
[BlackBerry] Add boundsOrigin accessors to LayerOverride
https://bugs.webkit.org/show_bug.cgi?id=93479
PR #188677

Reviewed by Yong Li.
Patch by Antonio Gomes <agomes@rim.com>

This is needed in order to allow us to directly set the boundsOrigin value
to the LayerCompositingThread and avoid it to get overridden by the respective
LayerWebKitThread's boundsOrigin value in the next commit.

No new tests, since this is another preparation PR.

* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::updateAnimations):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore::LayerOverride::isBoundsOriginSet):
(WebCore::LayerOverride::boundsOrigin):
(WebCore::LayerOverride::setBoundsOrigin):
(LayerOverride):
(WebCore::LayerOverride::LayerOverride):

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

7 years ago[BlackBerry] Propagate GraphicsLayer::boundsOrigin down to the platform layers
tonikitoo@webkit.org [Wed, 8 Aug 2012 19:19:18 +0000 (19:19 +0000)]
[BlackBerry] Propagate GraphicsLayer::boundsOrigin down to the platform layers
https://bugs.webkit.org/show_bug.cgi?id=93478
PR #188657

Reviewed by Yong Li.
Patch by Antonio Gomes <agomes@rim.com>

This property will be set from both WebKit and Compositing/UI
threads in order to fast scroll block elements.

No new tests, as it is a mid-step patch.

* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::setBoundsOrigin):
(WebCore):
(WebCore::GraphicsLayerBlackBerry::updateBoundsOrigin):
* platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
(GraphicsLayerBlackBerry):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore::LayerCompositingThread::setBoundsOrigin):
* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::boundsOrigin):
(LayerData):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::updateLayersRecursive):
* platform/graphics/blackberry/LayerWebKitThread.h:
(WebCore::LayerWebKitThread::setBoundsOrigin):
(LayerWebKitThread):

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

7 years agoUnreviewed, rolling out r124887.
commit-queue@webkit.org [Wed, 8 Aug 2012 19:14:05 +0000 (19:14 +0000)]
Unreviewed, rolling out r124887.
http://trac.webkit.org/changeset/124887
https://bugs.webkit.org/show_bug.cgi?id=93504

Dependent API being removed. (Requested by mfenton on
#webkit).

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

* Api/WebPageClient.h:
* WebKitSupport/InputHandler.cpp:
* WebKitSupport/InputHandler.h:
(InputHandler):
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
(BlackBerry::WebKit::TouchEventHandler::spellCheck):
(WebKit):
* WebKitSupport/TouchEventHandler.h:
(TouchEventHandler):

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

7 years agoBuildmaster changes in preparation of a Chromium Android tester
peter@chromium.org [Wed, 8 Aug 2012 19:11:37 +0000 (19:11 +0000)]
Buildmaster changes in preparation of a Chromium Android tester
https://bugs.webkit.org/show_bug.cgi?id=92251

Reviewed by Adam Barth.

Slightly update the build master's configuration in preparation of adding
a Chromium Android tester.

The change in built-product-archive is required as the out/ directory
for Android has a number of unstripped .so binaries and unaligned APKs,
causing the default release.zip file to be 2.7 gigabytes. By excluding
these file types, the file is only 59.7 megabytes. We can't disable
them for all of Chromium, as Mac and Linux do use their .so files.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(ArchiveBuiltProduct): Pass the full platform name instead of just the
    generic type, i.e. chromium-android instead of chromium.
(ExtractBuiltProduct): Dito, stay consistent for this script.
(RunUnitTests): Pass --chromium-android as well as --chromium. Since we
    now read the full platform name, stay on the safe side with 'win'
    even though there (as far as I know) is no win-* platform.
(RunChromiumWebKitUnitTests): Dito. The platform wasn't being passed
    at all, but we'll be needing different handling here.
(unitTestsSupported): Next to refactoring work required, as we'll be
    running this test on a device, there is no reason to disable this
    in the master's configuration.
* BuildSlaveSupport/built-product-archive:
(main): Determine the generic platform.
(archiveBuiltProduct): Use an identical set of ignorePatterns, but
    extend the list with .so, .pak and -unaligned.apk for Android.

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

7 years agoSet access to MemoryInfo enabled for the performance tests
zoltan@webkit.org [Wed, 8 Aug 2012 19:09:07 +0000 (19:09 +0000)]
Set access to MemoryInfo enabled for the performance tests
https://bugs.webkit.org/show_bug.cgi?id=92498

Reviewed by Ryosuke Niwa.

We need access to console.memory for the memory measurements.

* resources/runner.js:

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

7 years ago[chromium][win] Rebaseline css3/filters/custom tests
fmalita@chromium.org [Wed, 8 Aug 2012 19:07:34 +0000 (19:07 +0000)]
[chromium][win] Rebaseline css3/filters/custom tests
https://bugs.webkit.org/show_bug.cgi?id=93404

Unreviewed gardening: updating Chromium results after 125044.

* platform/chromium-linux-x86/css3/filters/custom/effect-color-check-expected.png: Removed.
* platform/chromium-linux/css3/filters/custom/effect-color-check-expected.png: Removed.
* platform/chromium-win-xp/css3/filters/custom/effect-color-check-expected.png: Removed.
* platform/chromium-win/css3/filters/custom/effect-color-check-expected.png:
* platform/chromium-win/css3/filters/custom/effect-custom-combined-missing-expected.png:
* platform/chromium-win/css3/filters/custom/effect-custom-parameters-expected.png:
* platform/chromium/TestExpectations:

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

7 years agoAnother unreviewed build fix after http://trac.webkit.org/changeset/125051
dino@apple.com [Wed, 8 Aug 2012 18:55:07 +0000 (18:55 +0000)]
Another unreviewed build fix after trac.webkit.org/changeset/125051

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

7 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 8 Aug 2012 18:54:25 +0000 (18:54 +0000)]
Unreviewed GTK gardening.

Adding expectations for three tests that are flaky crashers:
- editing/inserting/insert-character-in-first-letter-crash.html
- fast/history/nested-visited-test.html
- fast/css/first-letter-text-fragment-crash.html

* platform/gtk/TestExpectations:

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

7 years ago[chromium] Upstream android's FlingAnimator
japhet@chromium.org [Wed, 8 Aug 2012 18:52:00 +0000 (18:52 +0000)]
[chromium] Upstream android's FlingAnimator
https://bugs.webkit.org/show_bug.cgi?id=92900

Reviewed by James Robinson.

No new tests yet, will be added once this code is called.

Source/Platform:

* Platform.gypi:
* chromium/public/Platform.h:
(WebKit):
(WebKit::Platform::createFlingAnimator):
* chromium/public/WebFlingAnimator.h: Added.
(WebKit):
(WebFlingAnimator):
(WebKit::WebFlingAnimator::~WebFlingAnimator):

Source/WebCore:

* WebCore.gypi:
* platform/chromium/support/PlatformGestureCurveFactory.cpp: Added.
(WebKit):
(WebKit::PlatformGestureCurveFactory::get):
(WebKit::PlatformGestureCurveFactory::createCurve):
(WebKit::PlatformGestureCurveFactory::setWebFlingAnimatorForTest):
* platform/chromium/support/PlatformGestureCurveFactory.h: Added.
(WebKit):
(PlatformGestureCurveFactory):
* platform/chromium/support/WebFlingAnimatorToGestureCurveAdapter.h: Added.
(WebKit):
(WebFlingAnimatorToGestureCurveAdapter):
(WebKit::WebFlingAnimatorToGestureCurveAdapter::create):
(WebKit::WebFlingAnimatorToGestureCurveAdapter::WebFlingAnimatorToGestureCurveAdapter):

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

7 years agoUpdate HTMLMediaElement to the new OO MediaSource API.
annacc@chromium.org [Wed, 8 Aug 2012 18:38:43 +0000 (18:38 +0000)]
Update HTMLMediaElement to the new OO MediaSource API.
https://bugs.webkit.org/show_bug.cgi?id=91775

Reviewed by Eric Carlson.

This patch rips out the old-style MediaSource API and allows a
MediaSource object to be attached to HTMLMediaElement.
http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html

Source/WebCore:

Tests: updates to http/tests/media/media-source/*
       http/tests/media/media-source/video-media-source-add-and-remove-buffers.html
       http/tests/media/media-source/video-media-source-objects.html

* html/HTMLMediaElement.cpp:
(WebCore):
(WebCore::HTMLMediaElement::HTMLMediaElement): Remove old style API resources.
(WebCore::HTMLMediaElement::parseAttribute): Remove old style event attribute.
(WebCore::HTMLMediaElement::prepareForLoad): Set source state to "closed".
(WebCore::HTMLMediaElement::loadResource): Get MediaSource object from blob registry
    look up and, if found, set it's MediaPlayer pointer to the current MediaPlayer.
(WebCore::HTMLMediaElement::noneSupported): Set source state to "closed".
(WebCore::HTMLMediaElement::mediaEngineError): Set source state to "closed".
(WebCore::HTMLMediaElement::mediaPlayerSourceOpened): Set source state to "open".
(WebCore::HTMLMediaElement::mediaPlayerSourceURL): Change to new blob URL.
(WebCore::HTMLMediaElement::seek): Check if source state is "closed".
(WebCore::HTMLMediaElement::setSourceState): Helper function so that we don't have to
    keep checking for m_mediaSource.
(WebCore::HTMLMediaElement::userCancelledLoad): Set source state to "closed".
(WebCore::HTMLMediaElement::createMediaPlayer): If the current MediaPlayer is re-
     created, notify the MediaSource and reset its MediaPlayer.

* html/HTMLMediaElement.h: Remove old style API code and add a MediaSource object.
(HTMLMediaElement):
* html/HTMLMediaElement.idl: Remove old style API.

LayoutTests:

* http/tests/media/media-source/media-source.js:
(MediaSourceTest.SegmentHelper):
(MediaSourceTest.SegmentHelper.prototype.addSourceBuffer):
(MediaSourceTest.SegmentHelper.prototype.appendInitSegment):
(MediaSourceTest.SegmentHelper.prototype.appendMediaSegment):
(MediaSourceTest.SegmentHelper.prototype.appendUntilEndOfStream):
(MediaSourceTest.setSrcToMediaSourceTestURL):
(MediaSourceTest.defaultOnErrorChecks):
(MediaSourceTest.runOnSourceOpen.eventHandlerFunction):
(MediaSourceTest.runOnSourceOpen):
(MediaSourceTest.logSourceState):
(MediaSourceTest.expectSourceState):
* http/tests/media/media-source/video-media-source-abort-expected.txt:
* http/tests/media/media-source/video-media-source-abort.html:
* http/tests/media/media-source/video-media-source-add-and-remove-buffers-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids-expected.txt.
* http/tests/media/media-source/video-media-source-add-and-remove-buffers.html: Added.
* http/tests/media/media-source/video-media-source-add-and-remove-ids.html: Removed.
* http/tests/media/media-source/video-media-source-errors-expected.txt:
* http/tests/media/media-source/video-media-source-errors.html:
* http/tests/media/media-source/video-media-source-event-attributes-expected.txt:
* http/tests/media/media-source/video-media-source-event-attributes.html:
* http/tests/media/media-source/video-media-source-objects-expected.txt: Added.
* http/tests/media/media-source/video-media-source-objects.html: Added.
* http/tests/media/media-source/video-media-source-play-expected.txt:
* http/tests/media/media-source/video-media-source-play.html:
* http/tests/media/media-source/video-media-source-seek-expected.txt:
* http/tests/media/media-source/video-media-source-seek.html:
* http/tests/media/media-source/video-media-source-state-changes-expected.txt:
* http/tests/media/media-source/video-media-source-state-changes.html:

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

7 years agoUnreviewed. Stop running tests on the mac-ews while we wait for more
abarth@webkit.org [Wed, 8 Aug 2012 18:38:24 +0000 (18:38 +0000)]
Unreviewed. Stop running tests on the mac-ews while we wait for more
hardware. As requested by lforschler.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:

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

7 years agoUnreviewed build fix for Mac port after http://trac.webkit.org/changeset/125051
dino@apple.com [Wed, 8 Aug 2012 18:36:34 +0000 (18:36 +0000)]
Unreviewed build fix for Mac port after trac.webkit.org/changeset/125051

* platform/mac/ClipboardMac.mm:

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

7 years agoEvolution, empathy no longer build with webkint 1.9.6: webkit_dom_html_element_set_c...
commit-queue@webkit.org [Wed, 8 Aug 2012 18:34:08 +0000 (18:34 +0000)]
Evolution, empathy no longer build with webkint 1.9.6:  webkit_dom_html_element_set_class_name is gone
https://bugs.webkit.org/show_bug.cgi?id=93384

Patch by Xan Lopez <xlopez@igalia.com> on 2012-08-08
Reviewed by Adam Barth.

Provide custom backwards compatibility wrappers for HTMLElement
className accessors, since the attribute was moved to Element. The
previous fix attempted to define the attribute twice (once in each
class), but this is wrong, just provide again the old accessors
making them forward to the new methods.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_class_name): provide again
get_class_name for backwards compatibility.
(webkit_dom_html_element_set_class_name): provide again
set_class_name for backwards compatibility.
* bindings/gobject/WebKitDOMCustom.h: ditto.
* html/HTMLElement.idl: remove the className attribute
definition. Since it's already present in Element this will break
our bindings.

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

7 years agopercentage height/width values in quirks mode are incorrectly resolved in flexbox...
ojan@chromium.org [Wed, 8 Aug 2012 18:29:02 +0000 (18:29 +0000)]
percentage height/width values in quirks mode are incorrectly resolved in flexbox children
https://bugs.webkit.org/show_bug.cgi?id=81809

Reviewed by Tony Chang.

Source/WebCore:

When computing percentage logical heights we need to use the RenderBox helper methods
to make sure we handle all the edge cases correctly (e.g. walk up the containing block
ancestor chain in quirks mode until we find a definite size).

For widths, the containing block always has a definite size, so all we need to do
is call computeContentBoxLogicalWidth(valueForLength(...)), although I'm not sure
this does the right thing for the intrinsic sizing keywords.

Tests: css3/flexbox/box-sizing-min-max-sizes.html
       css3/flexbox/percentage-sizes-quirks.html
       css3/flexbox/percentage-sizes.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalClientHeight):
(WebCore):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisSizeForChild):
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
* rendering/RenderFlexibleBox.h:

LayoutTests:

* css3/flexbox/box-sizing-min-max-sizes-expected.txt: Added.
* css3/flexbox/box-sizing-min-max-sizes.html: Added.
* css3/flexbox/percentage-sizes-expected.txt: Added.
* css3/flexbox/percentage-sizes-quirks-expected.txt: Added.
* css3/flexbox/percentage-sizes-quirks.html: Added.
* css3/flexbox/percentage-sizes.html: Added.

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

7 years agoFire suspend event whenever network state is set to NETWORK_IDLE.
scherkus@chromium.org [Wed, 8 Aug 2012 18:18:09 +0000 (18:18 +0000)]
Fire suspend event whenever network state is set to NETWORK_IDLE.
https://bugs.webkit.org/show_bug.cgi?id=93052

Reviewed by Eric Carlson.

There was a regression in the Chromium port (http://crbug.com/139511) that revealed we didn't
have a layout test for suspend events. Upon further investigation it appeared we also had a bug
where we didn't fire the suspend event when a media engine reported they had completely loaded
the media.

Covered by new test http/tests/media/video-load-suspend.html.

Source/WebCore:

* html/HTMLMediaElement.cpp: Move firing of suspend event to changeNetworkStateFromLoadingToIdle
(WebCore::HTMLMediaElement::setNetworkState):
(WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):

LayoutTests:

* http/tests/media/video-load-suspend-expected.txt: Added.
* http/tests/media/video-load-suspend.html: Added.
* media/event-attributes-expected.txt: Updated to include suspend event.

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

7 years agoVideo element image loader must persist after element detach.
tsepez@chromium.org [Wed, 8 Aug 2012 17:57:58 +0000 (17:57 +0000)]
Video element image loader must persist after element detach.
https://bugs.webkit.org/show_bug.cgi?id=90801

Reviewed by Eric Carlson.

We rely on the OwnPtr in the element to cleanup the loader.

Source/WebCore:

Test: fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html

* html/HTMLVideoElement.cpp:
(WebCore):
* html/HTMLVideoElement.h:
(HTMLVideoElement):

LayoutTests:

* fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt: Added.
* fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html: Added.

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

7 years agoImprove RenderObject.h compile time - split CachedImage and CachedImageClient
commit-queue@webkit.org [Wed, 8 Aug 2012 17:54:28 +0000 (17:54 +0000)]
Improve RenderObject.h compile time - split CachedImage and CachedImageClient
https://bugs.webkit.org/show_bug.cgi?id=93400

Patch by Nikhil Bhargava <nbhargava@google.com> on 2012-08-08
Reviewed by Eric Seidel.

Splits loader/cache/CachedImage.h into two files. The remaining changes are to repair existing #includes

No new tests. No changes to existing functions/functionality.

* css/CSSCrossfadeValue.h:
* loader/ImageLoader.h:
* loader/cache/CachedImage.cpp:
* loader/cache/CachedImage.h:
(WebCore):
* loader/cache/CachedImageClient.h: Added.
(WebCore):
(CachedImageClient):
(WebCore::CachedImageClient::~CachedImageClient):
(WebCore::CachedImageClient::expectedType):
(WebCore::CachedImageClient::resourceClientType):
(WebCore::CachedImageClient::imageChanged):
(WebCore::CachedImageClient::willRenderImage):
* platform/chromium/ClipboardChromium.h:
* rendering/RenderObject.h:
(WebCore):
* rendering/style/StyleCachedImage.cpp:
* rendering/style/StyleCachedImage.h:
(WebCore):
* rendering/style/StyleCachedImageSet.h:
* svg/graphics/SVGImage.cpp:

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

7 years agoREGRESSION (r123171): <svg> element with intrinsic size and max-width gets sized...
mitz@apple.com [Wed, 8 Aug 2012 17:46:50 +0000 (17:46 +0000)]
REGRESSION (r123171): <svg> element with intrinsic size and max-width gets sized incorrectly
https://bugs.webkit.org/show_bug.cgi?id=93388

Reviewed by Beth Dakin.

Source/WebCore:

Test: svg/css/max-width-3.html

* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): Added code to set
m_intrinsicSize in the no-contentRenderer branch of this function so that the calls to
RenderBox::computeReplacedLogical{Height,Width} in the end use the right intrinsic size.
This is similar to what the contentRenderer branch of this function already does.

LayoutTests:

* svg/css/max-width-3-expected.html: Added.
* svg/css/max-width-3.html: Added.

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

7 years agoThe cr-android EWS should actually be building Chromium for Android
peter@chromium.org [Wed, 8 Aug 2012 17:38:18 +0000 (17:38 +0000)]
The cr-android EWS should actually be building Chromium for Android
https://bugs.webkit.org/show_bug.cgi?id=93489

Reviewed by Adam Barth.

The cr-android EWS bots should be building Chromium for Android, which
requires some additional flags to Chromium's default configuration.

* Scripts/webkitdirs.pm:
(buildChromium):
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(ChromiumAndroidPort):
(ChromiumAndroidPort.update_webkit_command):
(ChromiumAndroidPort.build_webkit_command):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_chromium_android_port):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(ChromiumAndroidEWS):
* Scripts/webkitpy/tool/steps/update_unittest.py:
(UpdateTest.test_update_command_non_interactive):
(UpdateTest.test_update_command_interactive):

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

7 years agoMake slider tick mark snapping threshold configurable for each platform
keishi@webkit.org [Wed, 8 Aug 2012 17:31:12 +0000 (17:31 +0000)]
Make slider tick mark snapping threshold configurable for each platform
https://bugs.webkit.org/show_bug.cgi?id=93429

Reviewed by Kent Tamura.

Source/WebCore:

This makes the slider tick mark snapping threshold configurable for each platform.
And we increase the threshold for the Chromium port.

No new tests. Covered by range-snap-to-datalist.html.

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::sliderTickSnappingThreshold):
(WebCore):
* rendering/RenderTheme.h:
(RenderTheme):
(WebCore::RenderTheme::sliderTickSnappingThreshold): Returns the threshold distance to the tick mark for snapping to occur.
* rendering/RenderThemeChromiumCommon.cpp:
(WebCore::RenderThemeChromiumCommon::sliderTickSnappingThreshold):
(WebCore):
* rendering/RenderThemeChromiumCommon.h:
(RenderThemeChromiumCommon):
* rendering/RenderThemeChromiumMac.h:
* rendering/RenderThemeChromiumMac.mm:
(WebCore):
(WebCore::RenderThemeChromiumMac::sliderTickSnappingThreshold):
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore):
(WebCore::RenderThemeChromiumSkia::sliderTickSnappingThreshold):
* rendering/RenderThemeChromiumSkia.h:

LayoutTests:

* fast/forms/datalist/range-snap-to-datalist-expected.txt: Removed.
* fast/forms/datalist/range-snap-to-datalist.html: Changed so we can use this test for different snapping thresholds.
* platform/chromium/fast/forms/datalist/range-snap-to-datalist-expected.txt: Added.

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

7 years agoUntil CSP fully supports paths, we should log a warning if we encounter a source...
commit-queue@webkit.org [Wed, 8 Aug 2012 17:24:41 +0000 (17:24 +0000)]
Until CSP fully supports paths, we should log a warning if we encounter a source with a path.
https://bugs.webkit.org/show_bug.cgi?id=93468

Patch by Mike West <mkwst@chromium.org> on 2012-08-08
Reviewed by Adam Barth.

Source/WebCore:

CSP 1.0 ignores path components of sources in directives' source lists.
'script-src http://example.com/path/to/directory' is treated exactly the
same as 'script-src http://example.com'. It's likely that this behavior
will change in CSP 1.1, which could break with developers' expectations.
This patch adds a warning when a path is encountered, alerting
developers to the fact that their current source is interpreted
differently than they might expect.

See http://crbug.com/128493 for additional context and discussion.

Tests for this change are covered by updating the existing Content
Security Policy tests to include the new console warnings.

* page/ContentSecurityPolicy.cpp:
(CSPSourceList):
(WebCore::CSPSourceList::CSPSourceList):
    Passing the directive name down into CSPSourceList so that we can
    generate informative error messages.
(WebCore::CSPSourceList::parse):
    Create a 'path' string, pass it into 'parseSource', and use it after
    parsing each source to determine whether a warning should be sent.
(WebCore::CSPSourceList::parseSource):
    Adding a 'path' argument so that we can see whether or not a
    specific source should generate a warning.
(WebCore::CSPDirective::CSPDirective):
    Passing the directive name down into CSPSourceList so that we can
    generate informative error messages.
(WebCore::ContentSecurityPolicy::reportIgnoredPathComponent):
    Generate the new warning message.
(WebCore):
* page/ContentSecurityPolicy.h:

LayoutTests:

* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowfontfrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowframefrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowimagefrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowmediafrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowobjectfrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowscriptfrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowstylefrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-reporturi.html:
    All of the SecurityPolicy API tests with source lists contained
    sources with a trailing `/`. I've fixed that oversight.
* http/tests/security/contentSecurityPolicy/source-list-parsing-05-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-05.html:
* http/tests/security/contentSecurityPolicy/source-list-parsing-06-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-06.html:
    Updating the text of the test, and updating them to include the new
    console warnings.

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

7 years agoWeb Inspector: generate preview for the objects dumped into the console upon logging.
pfeldman@chromium.org [Wed, 8 Aug 2012 17:22:21 +0000 (17:22 +0000)]
Web Inspector: generate preview for the objects dumped into the console upon logging.
https://bugs.webkit.org/show_bug.cgi?id=35801

Reviewed by Vsevolod Vlasov.

Source/WebCore:

As of today, dumping an object (array) into console will result in objects' properties being
read upon console object expansion (i.e. lazily). This means that dumping the same object while
mutating it will be hard to debug using the console.

This change starts generating abbreviated previews for objects / arrays at the moment of their
logging and passes this information along into the front-end. This only happens when the front-end
is already opened, it only works for console.log(), not live console interaction.

Covered by the existing console tests + collections test has been expanded to capture both: pre and post-
front-end opening scenarios.

* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::addToFrontend):
* inspector/ConsoleMessage.h:
(ConsoleMessage):
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::wrapObject):
* inspector/InjectedScript.h:
(InjectedScript):
* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::addConsoleMessage):
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._format):
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArrayOrObject):
(WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype._printArray):
(WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry):
(WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
* inspector/front-end/DOMExtension.js:
(Element.prototype.createTextChild):
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection):
* inspector/front-end/PropertiesSection.js:
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.get previewProperties):
* inspector/front-end/Section.js:
* inspector/front-end/inspector.css:
(.console-group-messages .section .header .title):
(.section .console-formatted-node):
(.console-object-preview):
(.section .properties .name, .event-properties .name, .console-formatted-object .name):

LayoutTests:

* inspector/console/command-line-api-inspect-expected.txt:
* inspector/console/console-dir-expected.txt:
* inspector/console/console-eval-global-expected.txt:
* inspector/console/console-eval-global.html:
* inspector/console/console-format-collections-expected.txt:
* inspector/console/console-format-collections.html:
* inspector/console/console-format-expected.txt:
* inspector/console/console-format.html:
* inspector/console/console-log-document-proto-expected.txt:
* inspector/console/console-log-document-proto.html:
* inspector/console/console-log-toString-object-expected.txt:
* inspector/debugger/watch-expressions-panel-switch-expected.txt:
* inspector/elements/event-listener-sidebar-expected.txt:
* inspector/elements/event-listeners-about-blank-expected.txt:
* platform/chromium/inspector/console/console-dir-expected.txt:
* platform/chromium/inspector/console/console-eval-global-expected.txt: Removed.
* platform/chromium/inspector/console/console-format-collections-expected.txt:
* platform/chromium/inspector/console/console-format-expected.txt: Removed.
* platform/chromium/inspector/console/console-log-document-proto-expected.txt:
* platform/chromium/inspector/debugger/watch-expressions-panel-switch-expected.txt:
* platform/chromium/inspector/elements/event-listener-sidebar-expected.txt: Removed.

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

7 years ago[GStreamer] media/media-continues-playing-after-replace-source.html fails
philn@webkit.org [Wed, 8 Aug 2012 17:18:09 +0000 (17:18 +0000)]
[GStreamer] media/media-continues-playing-after-replace-source.html fails
https://bugs.webkit.org/show_bug.cgi?id=86310

Reviewed by Eric Carlson.

Source/WebCore:

Reset the player's network and ready states, this allows the media
player client to potentially emit a timeupdate event while the new
location is being loaded. States are synchronized again after the
pipeline pre-rolled.

No new tests but fixes
media/media-continues-playing-after-replace-source.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):

LayoutTests:

Unflag now passing media test on GTK and EFL.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

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

7 years ago[Chromium] Skia assert triggered by custom filter unmultiplied results
achicu@adobe.com [Wed, 8 Aug 2012 17:13:42 +0000 (17:13 +0000)]
[Chromium] Skia assert triggered by custom filter unmultiplied results
https://bugs.webkit.org/show_bug.cgi?id=92758

Reviewed by Dean Jackson.

Source/WebCore:

The FECustomFilter (which renders the CSS Shaders) used premultiplied colors for both input and ouput.
The problem with that is that some shaders do not pre-multiply the values and the reality is that
we cannot trust the shader to do that. The easy way would be to use only unpremultiplied colors and do the
computation in C++ code. This will be changed when the mix blending is implemented to do that in the shader itself.

No new tests, just updated existing tests to take unpremultiplied colors instead.

* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::platformApplySoftware):

LayoutTests:

Updated the shaders to output un-premultiplied colors. Also, updated the output results where needed.

* css3/filters/custom/custom-filter-shader-cache-expected.png:
* css3/filters/custom/effect-color-check-expected.png:
* css3/filters/custom/effect-custom-combined-missing-expected.png:
* css3/filters/custom/effect-custom-expected.png:
* css3/filters/custom/effect-custom-parameters-expected.png:
* css3/filters/custom/filter-repaint-custom-expected.png:
* css3/filters/custom/missing-custom-filter-shader-expected.png:
* css3/filters/resources/color-add.fs:
* css3/filters/resources/color-fill.fs:
* platform/chromium/TestExpectations: Disabled the following tests on Windows. They need a rebaseline.
* platform/chromium-linux/css3/filters/custom/effect-color-check-expected.png:
* platform/chromium-linux/css3/filters/custom/effect-custom-combined-missing-expected.png:
* platform/chromium-linux/css3/filters/custom/effect-custom-parameters-expected.png:
* platform/chromium-mac/css3/filters/custom/effect-color-check-expected.png:
* platform/chromium-mac/css3/filters/custom/effect-custom-combined-missing-expected.png:
* platform/chromium-mac/css3/filters/custom/effect-custom-parameters-expected.png:

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

7 years agoUnreviewed, build fix after r125041.
philn@webkit.org [Wed, 8 Aug 2012 17:07:45 +0000 (17:07 +0000)]
Unreviewed, build fix after r125041.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::didReceiveResponse): Fix arguments order of the
notifyGstTagsOnPad() call.

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

7 years agoRemove All Custom binding code for TypedArray.
commit-queue@webkit.org [Wed, 8 Aug 2012 17:00:54 +0000 (17:00 +0000)]
Remove All Custom binding code for TypedArray.
https://bugs.webkit.org/show_bug.cgi?id=93371

Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-08-08
Reviewed by Kentaro Hara.

Removing Custom bindings completely with help of [TypedArray] attribute.

Tests: TestTypedArray.idl
There should not be any behavioral change and all tests should pass.

* GNUmakefile.list.am: Removed Custom files.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* UseV8.cmake: Ditto.
* WebCore.gypi: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/JSFloat32ArrayCustom.cpp: Removed.
* bindings/js/JSFloat64ArrayCustom.cpp: Removed.
* bindings/js/JSInt16ArrayCustom.cpp: Removed.
* bindings/js/JSInt32ArrayCustom.cpp: Removed.
* bindings/js/JSInt8ArrayCustom.cpp: Removed.
* bindings/js/JSUint16ArrayCustom.cpp: Removed.
* bindings/js/JSUint32ArrayCustom.cpp: Removed.
* bindings/js/JSUint8ArrayCustom.cpp: Removed.
* bindings/js/JSUint8ClampedArrayCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateHeader): Skip implementaion for TypedArray.
(GenerateImplementation): Skip implementaion for TypedArray.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Skip implementaion for TypedArray.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Generates binding for set() call.
(GenerateConstructorDefinition): ConstructorTemplate implementation for TypedArray.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader): Skip implementaion for TypedArray.
(GenerateImplementation): Skip implementaion for TypedArray.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallback): Generates binding for setCallback().
(GenerateTypedArrayConstructorCallback): Generates binding for constructorCallback().
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt: Support ConstructorTemplate for TypedArray as well.
* bindings/scripts/test/JS/JSFloat64Array.cpp: Binding tests results.
(WebCore::toJS):
(WebCore::JSFloat64Array::indexSetter):
(WebCore::JSFloat64ArrayConstructor::getConstructData):
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
(WebCore::jsFloat64ArrayPrototypeFunctionSet):
* bindings/scripts/test/JS/JSFloat64Array.h: Binding tests results.
* bindings/scripts/test/TestTypedArray.idl: Binding tests.
* bindings/scripts/test/V8/V8Float64Array.cpp: Binding tests results.
(WebCore::Float64ArrayV8Internal::setCallback):
(Float64ArrayV8Internal):
(WebCore):
(WebCore::V8Float64Array::constructorCallback):
(WebCore::ConfigureV8Float64ArrayTemplate):
* bindings/v8/custom/V8Float32ArrayCustom.cpp: Removed.
* bindings/v8/custom/V8Float64ArrayCustom.cpp: Removed.
* bindings/v8/custom/V8Int16ArrayCustom.cpp: Removed.
* bindings/v8/custom/V8Int32ArrayCustom.cpp: Removed.
* bindings/v8/custom/V8Int8ArrayCustom.cpp: Removed.
* bindings/v8/custom/V8Uint16ArrayCustom.cpp: Removed.
* bindings/v8/custom/V8Uint32ArrayCustom.cpp: Removed.
* bindings/v8/custom/V8Uint8ArrayCustom.cpp: Removed.
* bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: Removed.
* html/canvas/Float32Array.idl: Using [ConstructorTemplate = TypedArray] instead of custom implementaion.
* html/canvas/Float64Array.idl: Ditto.
* html/canvas/Int16Array.idl: Ditto.
* html/canvas/Int32Array.idl: Ditto.
* html/canvas/Int8Array.idl: Ditto.
* html/canvas/Uint16Array.idl: Ditto.
* html/canvas/Uint32Array.idl: Ditto.
* html/canvas/Uint8Array.idl: Ditto.
* html/canvas/Uint8ClampedArray.idl: Ditto.

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

7 years ago[GStreamer] 0.11 build broken (again)
philn@webkit.org [Wed, 8 Aug 2012 16:52:20 +0000 (16:52 +0000)]
[GStreamer] 0.11 build broken (again)
https://bugs.webkit.org/show_bug.cgi?id=93474

Reviewed by Martin Robinson.

.:

* configure.ac: Disable media-stream build if GStreamer 0.11
support is enabled, due to farstream-0.1 still messing up with
gstreamer-0.10 include path.

Source/WebCore:

Adapt the GStreamer media player backend to the latest GStreamer
0.11 API changes.

* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
(gstObjectIsFloating):
* platform/graphics/gstreamer/GStreamerVersioning.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::didReceiveResponse):

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

7 years ago [WK2] MiniBrowser crashes on window.open()
ap@apple.com [Wed, 8 Aug 2012 16:32:05 +0000 (16:32 +0000)]
    [WK2] MiniBrowser crashes on window.open()
        https://bugs.webkit.org/show_bug.cgi?id=93413

        Reviewed by Dan Bernstein.

        * MiniBrowser/mac/BrowserWindowController.m: (createNewPage): This is a "create"
        API, so it needs to return a retained result.

        * MiniBrowser/mac/WebBundle/WebBundleMain.m: (didClearWindowObjectForFrame):
        When this function is called, URL appears to be poorly defined. Sometimes, it's
        the new URL, other times it's the old one. An "old" URL is null in a new page.

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

7 years ago[Qt] Compile errors with OpenGLES2
commit-queue@webkit.org [Wed, 8 Aug 2012 15:42:32 +0000 (15:42 +0000)]
[Qt] Compile errors with OpenGLES2
https://bugs.webkit.org/show_bug.cgi?id=93206

Patch by Loïc Yhuel <loic.yhuel@softathome.com> on 2012-08-08
Reviewed by Noam Rosenthal.

Fix build with OpenGLES2 on Linux desktop

Source/WebCore:

* platform/graphics/OpenGLESShims.h: removed unused define conflicting with gl2ext.h from ANGLE

Tools:

* qmake/mkspecs/features/features.prf: Don't use GLX with OpenGLES2

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

7 years agoIntroduce cr-android bots in the EWS system
peter@chromium.org [Wed, 8 Aug 2012 15:18:25 +0000 (15:18 +0000)]
Introduce cr-android bots in the EWS system
https://bugs.webkit.org/show_bug.cgi?id=93472

Reviewed by Adam Barth.

This adds the queue to the EWS scripts. Two builders are ready to be
attached to the queue. All webkitpy tests pass with this change applied.

* QueueStatusServer/model/queues.py:
(Queue):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(ChromiumAndroidEWS):
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(EarlyWarningSytemTest.test_builder_ewses):

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

7 years agoUnreviewed. Fix GTK+ build with GTK2 after r121475.
carlosgc@webkit.org [Wed, 8 Aug 2012 15:10:14 +0000 (15:10 +0000)]
Unreviewed. Fix GTK+ build with GTK2 after r121475.

* TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp: Add missing
include required when building with GTK2.

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

7 years ago[BlackBerry] Add relayout after updating fixed reported size
commit-queue@webkit.org [Wed, 8 Aug 2012 14:41:39 +0000 (14:41 +0000)]
[BlackBerry] Add relayout after updating fixed reported size
https://bugs.webkit.org/show_bug.cgi?id=93116
PR #160059

Patch by Ed Baker <edbaker@rim.com> on 2012-08-08
Reviewed by Antonio Gomes.

Reviewed internally by Antonio Gomes.

On an orientation change and after fixed reported size is
updated perform a layout and update the fixed elements after
scrolling. This will recalculate the height and width of
fixed position elements using percentage values with the
new fixed reported size. Otherwise using the old fixed reported
size in the new orientation overflowing or clipping could occur.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):

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

7 years ago[EFL] EFL Webkit needs a class wrapping eina stringshare
commit-queue@webkit.org [Wed, 8 Aug 2012 14:40:54 +0000 (14:40 +0000)]
[EFL] EFL Webkit needs a class wrapping eina stringshare
https://bugs.webkit.org/show_bug.cgi?id=93229

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-08-08
Reviewed by Kenneth Rohde Christiansen.

Added a new auxiliary class wrapping Eina Stringshare and providing
more convenient C++ interface for using it.

* PlatformEfl.cmake:
* UIProcess/API/cpp/efl/WKEinaSharedString.cpp: Added.
(:m_string):
(WKEinaSharedString::~WKEinaSharedString):
(WKEinaSharedString::operator=):
* UIProcess/API/cpp/efl/WKEinaSharedString.h: Added.
(WebKit):

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

7 years ago[Qt] Snowshoe desktop crashes when opening a new tab
kbalazs@webkit.org [Wed, 8 Aug 2012 14:09:29 +0000 (14:09 +0000)]
[Qt] Snowshoe desktop crashes when opening a new tab
https://bugs.webkit.org/show_bug.cgi?id=92753

Reviewed by Jocelyn Turcotte.

Change back forceRepaint to consider the UI process state.
It has been tweaked to satisfy the needs of WKPageForceRepaint but
it has other callers so this new behavior was not safe. This patch
implements WebPage::forceRepaintAsync for testing purposes. It is
done by LayerTreeCoordinator that holds the callback and sends the
reply message in the next flushPendingLayerChanges. In theory it
could be implemented for the non conposited path in DrawingAreaImpl
as well but neither it is needed nor can I test it.

* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::forceRepaintAsync):
(WebKit):
(WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::forceRepaintAsync):
(WebKit):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::forceRepaintAsync):

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

7 years agoWeb Inspector: store last evaluation result in $_
pfeldman@chromium.org [Wed, 8 Aug 2012 13:21:41 +0000 (13:21 +0000)]
Web Inspector: store last evaluation result in $_
https://bugs.webkit.org/show_bug.cgi?id=93377

Reviewed by Vsevolod Vlasov.

Source/WebCore:

All "console" evaluations end up in that variable on command line API.

Test: inspector/console/console-last-result.html

* inspector/InjectedScriptSource.js:
(.):

LayoutTests:

* inspector/console/console-last-result-expected.txt: Added.
* inspector/console/console-last-result.html: Added.

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

7 years ago[Qt] Port internal findMethodIndex method matcher to use JSC C API
commit-queue@webkit.org [Wed, 8 Aug 2012 13:19:22 +0000 (13:19 +0000)]
[Qt] Port internal findMethodIndex method matcher to use JSC C API
https://bugs.webkit.org/show_bug.cgi?id=93463

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-08-08
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Based on patch by No'am Rosenthal.

* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::setException):
(Bindings):
(JSC::Bindings::findMethodIndex): Fixed also coding style while at it.
(JSC::Bindings::QtRuntimeMetaMethod::call): Use new findMethodIndex. The
created JSValueRefs should not need GC protection because we only support
up to 10 method arguments and thus they will live on the stack storage
of the vector.
* bridge/qt/qt_runtime.h:
(Bindings):

Source/WebKit/qt:

Adjust the expectations of the unit test for some of the exceptions the
method throws when signals/slots cannot be found/matched. The C API doesn't allow
us to create syntax (type) errors, only generic error exceptions.

* tests/qobjectbridge/tst_qobjectbridge.cpp:
(tst_QObjectBridge::callQtInvokable):

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

7 years ago[WK2] [WTR] Provide Resource Response dumping.
commit-queue@webkit.org [Wed, 8 Aug 2012 13:18:18 +0000 (13:18 +0000)]
[WK2] [WTR] Provide Resource Response dumping.
https://bugs.webkit.org/show_bug.cgi?id=93454

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-08-08
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Several new getter functions were added to WKURLResponse and WKURL, so that WTR has
necessary data for dumping.

* Shared/API/c/WKURL.cpp:
(WKURLCopyLastPathComponent):
* Shared/API/c/WKURL.h:
* Shared/API/c/WKURLResponse.cpp:
(WKURLResponseCopyURL): Returns URL of the response.
(WKURLResponseCopyMimeType): Returns MIME type of the response.
* Shared/API/c/WKURLResponse.h:
* Shared/WebURL.h:
(WebKit::WebURL::lastPathComponent): Returns last path component of the URL.
(WebURL):

Tools:

Added missing dumpResourceResponseMIMETypes() method to testRunner. Provided resource response dumping.

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didReceiveResponseForResource):
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::LayoutTestController):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(WTR::LayoutTestController::dumpProgressFinishedCallback):
(WTR::LayoutTestController::dumpResourceResponseMIMETypes):
(WTR::LayoutTestController::shouldDumpResourceResponseMIMETypes):
(LayoutTestController):

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

7 years ago[EFL][WK2] Make ewk_view inheritable in the WebKit2.
commit-queue@webkit.org [Wed, 8 Aug 2012 13:15:59 +0000 (13:15 +0000)]
[EFL][WK2] Make ewk_view inheritable in the WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=90054

Patch by Eunmi Lee <eunmi15.lee@samsung.com> on 2012-08-08
Reviewed by Kenneth Rohde Christiansen.

Make the ewk_view inheritable by exposing ewk_view_smart_class_set()
API. Additionally, the ewk_view_smart_add() API is added to create
Evas_Object for WebKit2 EFL. The default initialization is done in the
ewk_view_smart_add(), so the object which inherits the ewk_view should
use ewk_view_smart_add() instead of evas_object_smart_add() to create
Evas_Object.

* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_new_from_WKContext):
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_smart_class_set):
(_ewk_view_smart_class_new):
(_ewk_view_initialize):
(_ewk_view_add_with_smart):
(ewk_view_base_add):
(ewk_view_smart_add):
(ewk_view_add_with_context):
* UIProcess/API/efl/ewk_view.h:

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

7 years ago[Qt] Add unit test for QObject bindings for scriptable plugins
hausmann@webkit.org [Wed, 8 Aug 2012 13:13:43 +0000 (13:13 +0000)]
[Qt] Add unit test for QObject bindings for scriptable plugins
https://bugs.webkit.org/show_bug.cgi?id=93462

Reviewed by Kenneth Rohde Christiansen.

The bindings code is subject to refactoring in the future, so added a unit test to verify that
accessing an embedded QWidget from JavaScript goes through the QObject bindings.

* tests/qobjectbridge/tst_qobjectbridge.cpp:
(tst_QObjectBridge):
(TestPluginWidget):
(TestPluginWidget::TestPluginWidget):
(TestPluginWidget::slotWithReturnValue):
(TestWebPage):
(TestWebPage::TestWebPage):
(TestWebPage::createPlugin):
(tst_QObjectBridge::scriptablePlugin):

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

7 years agoWeb Inspector: move setTouchEventEmulationEnabled from DOMAgent to PageAgent
apavlov@chromium.org [Wed, 8 Aug 2012 13:11:54 +0000 (13:11 +0000)]
Web Inspector: move setTouchEventEmulationEnabled from DOMAgent to PageAgent
https://bugs.webkit.org/show_bug.cgi?id=93437

Reviewed by Pavel Feldman.

* inspector/Inspector.json:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::clearFrontend):
(WebCore::InspectorDOMAgent::restore):
* inspector/InspectorDOMAgent.h:
(InspectorDOMAgent):
* inspector/InspectorPageAgent.cpp:
(PageAgentState):
(WebCore::InspectorPageAgent::clearFrontend):
(WebCore::InspectorPageAgent::restore):
(WebCore):
(WebCore::InspectorPageAgent::updateTouchEventEmulationInPage):
(WebCore::InspectorPageAgent::setTouchEmulationEnabled):
* inspector/InspectorPageAgent.h:
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype._emulateTouchEventsChanged):

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

7 years agoUnreviewed build fix for Qt on Linux.
alexis.menard@openbossa.org [Wed, 8 Aug 2012 13:04:58 +0000 (13:04 +0000)]
Unreviewed build fix for Qt on Linux.

* platform/qt/GamepadsQt.cpp:

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

7 years ago[EFL] Support DataList for <input type="range">
commit-queue@webkit.org [Wed, 8 Aug 2012 12:53:18 +0000 (12:53 +0000)]
[EFL] Support DataList for <input type="range">
https://bugs.webkit.org/show_bug.cgi?id=92634

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2012-08-08
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

DataList theme for EFL is implemented. DataList feature of
<input type="range"> is supported.

Test: fast/forms/datalist/input-list.html

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintSliderTrack):
(WebCore::RenderThemeEfl::sliderTickSize):
(WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeEfl::supportsDataListUI):
(WebCore):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):

LayoutTests:

Update platform/efl/fast/forms/datalist/input-list-expected.txt because
range type of data list feature is passed.

* platform/efl/fast/forms/datalist/input-list-expected.txt:

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

7 years agoWeb Inspector: renaming DOMNodeHighlighter to InspectorOverlay
commit-queue@webkit.org [Wed, 8 Aug 2012 12:51:18 +0000 (12:51 +0000)]
Web Inspector: renaming DOMNodeHighlighter to InspectorOverlay
https://bugs.webkit.org/show_bug.cgi?id=93253

Patch by Sergey Rogulenko <rogulenko@google.com> on 2012-08-08
Reviewed by Pavel Feldman.

Renaming DOMNodeHighlighter to InspectorOverlay where necessary.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorOverlay.cpp: Renamed from Source/WebCore/inspector/DOMNodeHighlighter.cpp.
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore):
(WebCore::InspectorOverlay::paint):
(WebCore::InspectorOverlay::drawOutline):
(WebCore::InspectorOverlay::getHighlight):
(WebCore::InspectorOverlay::setPausedInDebuggerMessage):
(WebCore::InspectorOverlay::hideHighlight):
(WebCore::InspectorOverlay::highlightNode):
(WebCore::InspectorOverlay::highlightRect):
(WebCore::InspectorOverlay::highlightedNode):
(WebCore::InspectorOverlay::update):
(WebCore::InspectorOverlay::drawNodeHighlight):
(WebCore::InspectorOverlay::drawRectHighlight):
(WebCore::InspectorOverlay::drawPausedInDebugger):
* inspector/InspectorOverlay.h: Renamed from Source/WebCore/inspector/DOMNodeHighlighter.h.
(WebCore):
(HighlightConfig):
(WebCore::Highlight::setColors):
(Highlight):
(InspectorOverlay):
(WebCore::InspectorOverlay::create):
* inspector/InspectorPageAgent.cpp:
* inspector/PageDebuggerAgent.cpp:
* page/GestureTapHighlighter.h:
* testing/Internals.cpp:

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

7 years ago[Qt] WebProcess hangs on plugin initialization.
allan.jensen@nokia.com [Wed, 8 Aug 2012 12:42:09 +0000 (12:42 +0000)]
[Qt] WebProcess hangs on plugin initialization.
https://bugs.webkit.org/show_bug.cgi?id=93272

Reviewed by Kenneth Rohde Christiansen.

* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching): Ensure PluginProcessConnectionManager is informed of plugin crashes.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Let setIsInWindow set canStartMedia asynchronously.

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

7 years ago[Qt][Win] Fix compilation of DumpRenderTree
commit-queue@webkit.org [Wed, 8 Aug 2012 12:33:16 +0000 (12:33 +0000)]
[Qt][Win] Fix compilation of DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=93461

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-08-08
Reviewed by Tor Arne Vestbø.

DRT includes stdint.h, for which we have wrappers in Source/JavaScriptCore/os-win32. Use these not only
for libraries but any building template.

* qmake/mkspecs/features/default_post.prf:

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

7 years ago[Blackberry] missing a Multipart header when m_multipartResponse is null
commit-queue@webkit.org [Wed, 8 Aug 2012 12:11:23 +0000 (12:11 +0000)]
[Blackberry] missing a Multipart header when m_multipartResponse is null
https://bugs.webkit.org/show_bug.cgi?id=93440

Patch by Chris Guan <chris.guan@torchmobile.com.cn> on 2012-08-08
Reviewed by George Staikos.

when m_multipartResponse is null, we just created new one but not called
setHTTPHeaderField. So we missed this received multipart Header. We should
call setHTTPHeaderField for each reveived header.

No new tests, because those current multipart test cases (http/tests/multipart/*)
are enough.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyMultipartHeaderReceived):

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

7 years agoRefactor console logging out of CSPDirectiveList into ContentSecurityPolicy
commit-queue@webkit.org [Wed, 8 Aug 2012 11:56:44 +0000 (11:56 +0000)]
Refactor console logging out of CSPDirectiveList into ContentSecurityPolicy
https://bugs.webkit.org/show_bug.cgi?id=93205

Patch by Mike West <mkwst@chromium.org> on 2012-08-08
Reviewed by Adam Barth.

We currently pass a protected resource's ScriptExecutionContext down
into CSPDirectiveList in order to log errors, grab the SecurityOrigin,
resolve relative URLs, and one or two other bits. This implementation
requires us to maintain state inside of low-level objects that shouldn't
really know about the ScriptExecutionContext, and makes logging errors
difficult, as CSPDirectiveList is the only piece of the puzzle that can
interact with the console.

This patch removes the dependence on ScriptExecutionContext, replacing
it with a pointer to the ContentSecurityPolicy object itself. The low-
level objects like CSPDirectiveList now make requests to the policy
object, which understands how to resolve them. This gives a cleaner
separation between the CSP implementation and the rest of WebCore, and
opens the door for future patches that teach the remaining low-level
objects about the policy in which they're contained in order to improve
error logging.

This should be a purely internal refactoring of the location from which
warnings are logged to the console. No new tests have been added; the
behavior should be covered by the existing CSP tests.

* page/ContentSecurityPolicy.cpp:
(CSPSourceList):
(WebCore::CSPSourceList::CSPSourceList):
    Pass the policy object into CSPSourceList, rather than a pointer to
    ScriptExecutionContext.
(WebCore::CSPSourceList::parse):
(WebCore::CSPSourceList::addSourceSelf):
    Read the SecurityOrigin from the policy object, rather than from the
    ScriptExecutionContext.
(WebCore::CSPDirective::CSPDirective):
    Pass the policy object into CSPDirective, rather than a pointer to
    ScriptExecutionContext. Use it to read the protected resource's
    URL.
(CSPDirectiveList):
(WebCore::CSPDirectiveList::CSPDirectiveList):
    Pass the policy object into CSPSourceList, rather than a pointer to
    ScriptExecutionContext.
(WebCore::CSPDirectiveList::create):
    Move the enforcement of eval restrictions out of CSPDirectiveList,
    and into ContentSecurityPolicy::ContentSecurityPolicy.
(WebCore::CSPDirectiveList::reportViolation):
    Move most of the logic out of this method, and into
    ContentSecurityPolicy::reportViolation.
(WebCore::CSPDirectiveList::parseDirective):
    Use the policy object for logging.
(WebCore::CSPDirectiveList::parseReportURI):
    Use the policy object for logging, and URL completion.
(WebCore::CSPDirectiveList::parseScriptNonce):
    Use the policy object for logging.
(WebCore::CSPDirectiveList::setCSPDirective):
    Use the policy object for logging.
(WebCore::CSPDirectiveList::applySandboxPolicy):
    Use the policy object for logging, and move enforcement to
    ContentSecurityPolicy::enforceSandboxFlags.
(WebCore::CSPDirectiveList::addDirective):
    Use the policy object for logging.
(WebCore::ContentSecurityPolicy::didReceiveHeader):
    Pass the policy object to CSPDirectiveList, and disable eval if
    necessary after parsing the policy.
(WebCore::ContentSecurityPolicy::securityOrigin):
(WebCore):
(WebCore::ContentSecurityPolicy::url):
(WebCore::ContentSecurityPolicy::completeURL):
(WebCore::ContentSecurityPolicy::enforceSandboxFlags):
    Move the enforcement of the sandbox directive out of
    CSPDirectiveList and into the policy object.
(WebCore::ContentSecurityPolicy::reportViolation):
(WebCore::ContentSecurityPolicy::reportUnrecognizedDirective):
(WebCore::ContentSecurityPolicy::reportDuplicateDirective):
(WebCore::ContentSecurityPolicy::reportInvalidNonce):
    Move CSPDirectiveList::logXXX out to the policy object. The
    directive list is now responsible for reporting errors and
    violations; the policy decides what to do with them.
(WebCore::ContentSecurityPolicy::logToConsole):
    Wrap the call to addConsoleMessage to make it simpler for the
    various ContentSecurityPolicy::reportXXX methods.
* page/ContentSecurityPolicy.h:
(WebCore):

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

7 years ago[V8] Rename V8Helpers to V8BindingHelpers
haraken@chromium.org [Wed, 8 Aug 2012 11:44:52 +0000 (11:44 +0000)]
[V8] Rename V8Helpers to V8BindingHelpers
https://bugs.webkit.org/show_bug.cgi?id=93318

Reviewed by Eric Seidel.

For naming consistency, a file including binding utility methods
should be prefixed by "V8Binding". In a follow-up patch, I'll move
methods from V8Binding to V8BindingHelpers.

In addition this patch makes V8Binding.h include V8BindingHelpers.h,
and removes #include V8BindingHelpers.h from binding files.

No tests. No change in behavior.

* UseV8.cmake:
* WebCore.gypi:
* bindings/v8/NPV8Object.cpp:
* bindings/v8/V8BindingHelpers.cpp: Renamed from Source/WebCore/bindings/v8/V8Helpers.cpp.
(WebCore):
(WebCore::toV8Context):
(WebCore::toV8Proxy):
* bindings/v8/V8BindingHelpers.h: Renamed from Source/WebCore/bindings/v8/V8Helpers.h.
(WebCore):
* bindings/v8/V8NPObject.cpp:

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

7 years ago[WK2] [WTR] Refactoring: LayoutTestController::shouldDumpProgressFinishedCallback...
commit-queue@webkit.org [Wed, 8 Aug 2012 11:20:40 +0000 (11:20 +0000)]
[WK2] [WTR] Refactoring: LayoutTestController::shouldDumpProgressFinishedCallback() should be const
https://bugs.webkit.org/show_bug.cgi?id=93457

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-08-08
Reviewed by Csaba Osztrogonác.

* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(WTR::LayoutTestController::shouldDumpProgressFinishedCallback): Added constness.

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

7 years agoRemove ce_time.(cpp|h) from list of source files
paroga@webkit.org [Wed, 8 Aug 2012 10:43:48 +0000 (10:43 +0000)]
Remove ce_time.(cpp|h) from list of source files
https://bugs.webkit.org/show_bug.cgi?id=93446

Reviewed by Simon Hausmann.

r125004 removed the last dependency on functions defined in ce_time.cpp.

Source/JavaScriptCore:

* Target.pri:

Source/WTF:

* wtf/PlatformWinCE.cmake:

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

7 years ago'class WrapperTypeInfo' should be 'struct WrapperTypeInfo'
haraken@chromium.org [Wed, 8 Aug 2012 10:38:18 +0000 (10:38 +0000)]
'class WrapperTypeInfo' should be 'struct WrapperTypeInfo'

Unreviewed. Build fix for r125015.

* bindings/v8/V8BindingPerIsolateData.h:
(WebCore):

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

7 years agoCrash when inspecting an element with border-image
commit-queue@webkit.org [Wed, 8 Aug 2012 10:22:02 +0000 (10:22 +0000)]
Crash when inspecting an element with border-image
https://bugs.webkit.org/show_bug.cgi?id=93380

Patch by Matt Arsenault <arsenm2@gmail.com> on 2012-08-08
Reviewed by Tim Horton.

Source/WebCore:

The second value in the CSSPair should be the same as the first if
we are in a shorthand and the next value is not a
border-image-repeat keyword.

Test: fast/css/parse-border-image-repeat-null-crash.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseBorderImageRepeat):

LayoutTests:

Add a test that ensures css Text on a border image shorthand with
border-image-repeat does not crash.

* fast/css/parse-border-image-repeat-null-crash-expected.txt: Added.
* fast/css/parse-border-image-repeat-null-crash.html: Added.

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

7 years ago[V8] Factor out V8BindingPerIsolateData from V8Binding to a separate file
haraken@chromium.org [Wed, 8 Aug 2012 10:20:46 +0000 (10:20 +0000)]
[V8] Factor out V8BindingPerIsolateData from V8Binding to a separate file
https://bugs.webkit.org/show_bug.cgi?id=93333

Reviewed by Adam Barth.

This patch moves V8BindingPerIsolateData to V8BindingPerIsolateData.{h,cpp}.

To avoid circular #include dependency, I used OwnPtrs for m_stringCache,
m_integerCache, m_hiddenPropertyName and m_gcEventData.

No tests. No change in behavior.

* UseV8.cmake:
* WebCore.gypi:
* bindings/v8/ScriptGCEvent.cpp:
(WebCore::isolateGCEventData):
(WebCore::ScriptGCEvent::addEventListener):
(WebCore::ScriptGCEvent::removeEventListener):
(WebCore::ScriptGCEvent::gcPrologueCallback):
(WebCore::ScriptGCEvent::gcEpilogueCallback):
* bindings/v8/V8Binding.cpp:
* bindings/v8/V8Binding.h:
(GCEventData):
(WebCore):
* bindings/v8/V8BindingPerIsolateData.cpp: Added.
(WebCore):
(WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
(WebCore::V8BindingPerIsolateData::~V8BindingPerIsolateData):
(WebCore::V8BindingPerIsolateData::create):
(WebCore::V8BindingPerIsolateData::ensureInitialized):
(WebCore::V8BindingPerIsolateData::dispose):
(WebCore::V8BindingPerIsolateData::reportMemoryUsage):
* bindings/v8/V8BindingPerIsolateData.h: Added.
(WebCore):
(V8BindingPerIsolateData):
(WebCore::V8BindingPerIsolateData::current):
(WebCore::V8BindingPerIsolateData::rawTemplateMap):
(WebCore::V8BindingPerIsolateData::templateMap):
(WebCore::V8BindingPerIsolateData::toStringName):
(WebCore::V8BindingPerIsolateData::toStringTemplate):
(WebCore::V8BindingPerIsolateData::lazyEventListenerToStringTemplate):
(WebCore::V8BindingPerIsolateData::stringCache):
(WebCore::V8BindingPerIsolateData::integerCache):
(WebCore::V8BindingPerIsolateData::allStores):
(WebCore::V8BindingPerIsolateData::hiddenPropertyName):
(WebCore::V8BindingPerIsolateData::auxiliaryContext):
(WebCore::V8BindingPerIsolateData::registerDOMDataStore):
(WebCore::V8BindingPerIsolateData::unregisterDOMDataStore):
(WebCore::V8BindingPerIsolateData::domDataStore):
(WebCore::V8BindingPerIsolateData::setDOMDataStore):
(WebCore::V8BindingPerIsolateData::recursionLevel):
(WebCore::V8BindingPerIsolateData::incrementRecursionLevel):
(WebCore::V8BindingPerIsolateData::decrementRecursionLevel):
(WebCore::V8BindingPerIsolateData::globalHandleMap):
(WebCore::V8BindingPerIsolateData::internalScriptRecursionLevel):
(WebCore::V8BindingPerIsolateData::incrementInternalScriptRecursionLevel):
(WebCore::V8BindingPerIsolateData::decrementInternalScriptRecursionLevel):
(WebCore::V8BindingPerIsolateData::gcEventData):
(WebCore::V8BindingPerIsolateData::setShouldCollectGarbageSoon):
(WebCore::V8BindingPerIsolateData::clearShouldCollectGarbageSoon):
(WebCore::V8BindingPerIsolateData::shouldCollectGarbageSoon):

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

7 years agoSource/WebCore: Web Inspector: show whitespace nodes if they are the only tag's children.
pfeldman@chromium.org [Wed, 8 Aug 2012 10:16:00 +0000 (10:16 +0000)]
Source/WebCore: Web Inspector: show whitespace nodes if they are the only tag's children.
https://bugs.webkit.org/show_bug.cgi?id=93441

Reviewed by Vsevolod Vlasov.

Pass whitespace node info into the front-end when it is the only element's child.

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildArrayForContainerChildren):

LayoutTests: Web Inspector: show white space nodes if they are the only tag's children.
https://bugs.webkit.org/show_bug.cgi?id=93441

Reviewed by Vsevolod Vlasov.

* inspector/elements/set-outer-html-2-expected.txt:
* inspector/styles/styles-update-from-js.html:

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

7 years ago[Qt][WK2] Set the fixed layout setting before creating the page
abecsi@webkit.org [Wed, 8 Aug 2012 09:50:54 +0000 (09:50 +0000)]
[Qt][WK2] Set the fixed layout setting before creating the page
https://bugs.webkit.org/show_bug.cgi?id=93374

Reviewed by Noam Rosenthal.

Any page setting should preferrable be set before creating the page
but fixed layout was set after the initialization of the web page.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewFlickablePrivate::initialize):

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

7 years ago[V8] Pass Isolate to ArrayValue and Dictionary
haraken@chromium.org [Wed, 8 Aug 2012 09:45:23 +0000 (09:45 +0000)]
[V8] Pass Isolate to ArrayValue and Dictionary
https://bugs.webkit.org/show_bug.cgi?id=93315

Reviewed by Adam Barth.

This patch passes Isolate to ArrayValue and Dictionary.

Rationale 1: We want to replace V8Proxy::throwError(ExceptionCode)
with setDOMException(ExceptionCode, Isolate*). For the replacement,
we need to pass Isolate to V8Utilities::extractTransferables().
To pass Isolate to V8Utilities::extractTransferables(), ( ...omitted... ),
we need to pass Isolate to ArrayValue and Dictionary.

Rationale 2: JSC already passes ExecState to ArrayValue and Dictionary.

Tests: storage/indexeddb/*
       fast/files/*

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateEventConstructorCallback):
(JSValueToNative):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::constructorCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::optionsObjectCallback):
* bindings/v8/ArrayValue.cpp:
(WebCore::ArrayValue::operator=):
(WebCore::ArrayValue::get):
* bindings/v8/ArrayValue.h:
(WebCore::ArrayValue::ArrayValue):
(ArrayValue):
* bindings/v8/Dictionary.cpp:
(WebCore::Dictionary::Dictionary):
(WebCore::Dictionary::operator=):
(WebCore::Dictionary::get):
* bindings/v8/Dictionary.h:
(Dictionary):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCallback):
* bindings/v8/custom/V8IntentConstructor.cpp:
(WebCore::V8Intent::constructorCallback):

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

7 years agoWeb Inspector: cached images memory instrumentation regression after r124744
yurys@chromium.org [Wed, 8 Aug 2012 09:16:30 +0000 (09:16 +0000)]
Web Inspector: cached images memory instrumentation regression after r124744
https://bugs.webkit.org/show_bug.cgi?id=93366

Reviewed by Vsevolod Vlasov.

Source/WebCore:

CachedImage memory usage data no includes size of both encoded and
decoded data.

Test: inspector/profiler/memory-instrumentation-cached-images.html

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::reportMemoryUsage):

LayoutTests:

Added a sanity test checking that memory usage data includes decoded image size.

* inspector/profiler/memory-instrumentation-cached-images-expected.txt: Added.
* inspector/profiler/memory-instrumentation-cached-images.html: Added.

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

7 years agoAtomics.h has incorrect GCC test for ext/atomicity.h when using LSB compilers
commit-queue@webkit.org [Wed, 8 Aug 2012 09:10:21 +0000 (09:10 +0000)]
Atomics.h has incorrect GCC test for ext/atomicity.h when using LSB compilers
https://bugs.webkit.org/show_bug.cgi?id=51974

Patch by Alvaro Lopez Ortega <alvaro@alobbs.com> on 2012-08-08
Reviewed by Simon Hausmann.

* wtf/Atomics.h: Inhibits the inclusion of the atomicity.h GNU C++
extension when compiling with a LSB compliant compiler. Thanks to
Craig Scott for the new precompiler check code.

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

7 years agoOptimize Element::hasAttribute() by replacing String with AtomicString
haraken@chromium.org [Wed, 8 Aug 2012 08:43:22 +0000 (08:43 +0000)]
Optimize Element::hasAttribute() by replacing String with AtomicString
https://bugs.webkit.org/show_bug.cgi?id=90273

Reviewed by Adam Barth.

Based on the observation described in this ChangeLog
(http://trac.webkit.org/changeset/121439), this patch optimizes the
performance of Element::hasAttribute() by replacing String with AtomicString.

Performance test: https://bugs.webkit.org/attachment.cgi?id=150144

hasAttribute (Chromium/Linux):
329.60ms => 259.00ms

hasAttributeNS (Chromium/Linux):
549.60ms => 435.80ms

* dom/Element.cpp:
(WebCore::Element::hasAttribute):
(WebCore::Element::hasAttributeNS):
* dom/Element.h:
(Element):

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

7 years agoOptimize Element::removeAttribute() by replacing String with AtomicString
haraken@chromium.org [Wed, 8 Aug 2012 08:24:44 +0000 (08:24 +0000)]
Optimize Element::removeAttribute() by replacing String with AtomicString
https://bugs.webkit.org/show_bug.cgi?id=90265

Reviewed by Adam Barth.

Based on the observation described in this ChangeLog
(http://trac.webkit.org/changeset/121439), this patch optimizes
Element::removeAttribute() by replacing String with AtomicString.

Performance test: https://bugs.webkit.org/attachment.cgi?id=150140

removeAttribute (Chromium/Linux):
334.20ms => 240.60ms

removeAttributeNS (Chromium/Linux):
552.80ms => 421.60ms

* dom/Element.cpp:
(WebCore::Element::removeAttribute):
(WebCore::Element::removeAttributeNS):
* dom/Element.h:
(Element):

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

7 years agoRemove Element::ensureShadowRoot
shinyak@chromium.org [Wed, 8 Aug 2012 08:13:11 +0000 (08:13 +0000)]
Remove Element::ensureShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=77608

Reviewed by Ryosuke Niwa.

Since Element::ensureShadowRoot is not used anymore, we can remove this safely.

No new tests, no change in behavior.

* WebCore.order:
* dom/Element.cpp:
* dom/Element.h:
(Element):

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

7 years agoRemove an unused member variable.
haraken@chromium.org [Wed, 8 Aug 2012 07:51:42 +0000 (07:51 +0000)]
Remove an unused member variable.

Unreviewed, build fix for r124990.

* dom/ContainerNode.h:
(WebCore::ChildNodesLazySnapshot::ChildNodesLazySnapshot):
(ChildNodesLazySnapshot):

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

7 years agoWeb Inspector: TabbedPane should use floating point width values for measuring.
vsevik@chromium.org [Wed, 8 Aug 2012 07:39:14 +0000 (07:39 +0000)]
Web Inspector: TabbedPane should use floating point width values for measuring.
https://bugs.webkit.org/show_bug.cgi?id=93349

Reviewed by Pavel Feldman.

TabbedPane now uses getBoundingClientRect().width instead of offsetWidth for more precise calculation.

* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane.prototype._totalWidth):
(WebInspector.TabbedPane.prototype._updateTabsDropDown):
(WebInspector.TabbedPane.prototype._measureDropDownButton):
(WebInspector.TabbedPane.prototype._updateWidths):
(WebInspector.TabbedPaneTab.prototype._measure):

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

7 years ago[WIN] Use GetTimeZoneInformation() for getting the timezone name
paroga@webkit.org [Wed, 8 Aug 2012 07:31:12 +0000 (07:31 +0000)]
[WIN] Use GetTimeZoneInformation() for getting the timezone name
https://bugs.webkit.org/show_bug.cgi?id=91936

Reviewed by Ryosuke Niwa.

The MS CRT implementation of strftime calls the same functions in the background.
Using them directly avoids the overhead of parsing the format string and removes
the dependency on strftime() for WinCE where this function does not exist.

* runtime/DateConversion.cpp:
(JSC::formatTime):

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

7 years ago'highlight' should not be parsed for a composite operation
commit-queue@webkit.org [Wed, 8 Aug 2012 07:13:36 +0000 (07:13 +0000)]
'highlight' should not be parsed for a composite operation
https://bugs.webkit.org/show_bug.cgi?id=92615

Patch by Douglas Stockwell <dstockwell@chromium.org> on 2012-08-08
Reviewed by Ryosuke Niwa.

Source/WebCore:

r88144 removed support for highlight as a composite operation but did
not update the parser.

Test: fast/backgrounds/composite-highlight-is-invalid.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillProperty):

LayoutTests:

* fast/backgrounds/composite-highlight-is-invalid-expected.txt: Added.
* fast/backgrounds/composite-highlight-is-invalid.html: Added.

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

7 years ago[WK2] Add new C API to generate MHTML data from the UI process
mario@webkit.org [Wed, 8 Aug 2012 07:12:26 +0000 (07:12 +0000)]
[WK2] Add new C API to generate MHTML data from the UI process
https://bugs.webkit.org/show_bug.cgi?id=89872

Reviewed by Anders Carlsson.

Add new C API in the UI Process, using ENABLE(MHTML) guards as needed.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetContentsAsMHTMLData):
* UIProcess/API/C/WKPage.h:

Implementation in the UI Process's WebPage proxy object.

* UIProcess/WebPageProxy.cpp:
(WebKit):
(WebKit::WebPageProxy::getContentsAsMHTMLData):
* UIProcess/WebPageProxy.h:
(WebPageProxy):

Implementation in the WebProcess, relying in WebCore::MHTMLArchive.

* WebProcess/WebPage/WebPage.cpp:
(WebKit):
(WebKit::WebPage::getContentsAsMHTMLData):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:

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

7 years agoUnreviewed, adding new results for chromium.
toyoshim@chromium.org [Wed, 8 Aug 2012 07:06:28 +0000 (07:06 +0000)]
Unreviewed, adding new results for chromium.

http://trac.webkit.org/changeset/124986 this change added new results
for Mac and it has a high priority. Then, we need to add specific
results for chromium.

Patch by Takashi Toyoshima <toyoshim@chromium.org> on 2012-08-08

* platform/chromium/media/video-seek-past-end-paused-expected.txt: Added.

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

7 years agoshowNodePath should show the age of ShadowRoot
commit-queue@webkit.org [Wed, 8 Aug 2012 07:02:52 +0000 (07:02 +0000)]
showNodePath should show the age of ShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=93347

Patch by Takashi Sakamoto <tasak@google.com> on 2012-08-08
Reviewed by Ryosuke Niwa.

No new tests, because this patch is for fixing a bug of a method for
debugging. If NDEBUG is defined, the method is not compiled.

* dom/Node.cpp:
(WebCore::Node::showNodePathForThis):
Fixed the bug to obtain the oldest shadow root from a shadow root.
oldestShadowRootFor only works for an element node, not for a shadow root.

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

7 years agoUnreviewed. Remove fail expectations for tests that should not be
mario@webkit.org [Wed, 8 Aug 2012 06:58:16 +0000 (06:58 +0000)]
Unreviewed. Remove fail expectations for tests that should not be
crashing anymore after r124997.

* platform/gtk/TestExpectations: Update test expectations.

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

7 years agoRemove fractionDigits argument of WebCore::convertToLocalizedNumber()
tkent@chromium.org [Wed, 8 Aug 2012 06:49:04 +0000 (06:49 +0000)]
Remove fractionDigits argument of WebCore::convertToLocalizedNumber()
https://bugs.webkit.org/show_bug.cgi?id=93435

Reviewed by Kentaro Hara.

Remove the fractionDigits argument of convertToLocalizedNumber because
we don't use it any more. Also, we can remove
parseToDoubleForNumberTypeWithDecimalPlaces() functions, which are used
to obtain the fractionDigits argument.

No new tests because of no behavior changes.

* platform/text/LocalizedNumber.h:
(WebCore): Remove the fractionDigits argument of convertToLocalizedNumber.
* platform/text/LocalizedNumberICU.cpp:
(WebCore::convertToLocalizedNumber): ditto.
* platform/text/LocalizedNumberNone.cpp:
(WebCore::convertToLocalizedNumber): ditto.
* platform/text/mac/LocalizedNumberMac.mm:
(WebCore::convertToLocalizedNumber): ditto.
* platform/text/win/LocalizedNumberWin.cpp:
(WebCore::convertToLocalizedNumber): ditto.

* html/NumberInputType.cpp:
(WebCore::NumberInputType::localizeValue):
Remove the code to make the decimalPlace value.
* html/parser/HTMLParserIdioms.cpp:
Remove parseToDoubleForNumberTypeWithDecimalPlaces.
* html/parser/HTMLParserIdioms.h: ditto.

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

7 years agoREGRESSION(r65062): out of bound access in TextIterator (5 editing tests) on GTK
mario@webkit.org [Wed, 8 Aug 2012 06:47:46 +0000 (06:47 +0000)]
REGRESSION(r65062): out of bound access in TextIterator (5 editing tests) on GTK
https://bugs.webkit.org/show_bug.cgi?id=63611

Reviewed by Ryosuke Niwa.

Ensure document's layout is up-to-date before using TextIterator
to properly calculate the offset for a text change when emitting
accessibility related signals in GTK.

* accessibility/gtk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Call
to document->updateLayout() before using TextIterator.

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

7 years agoUnreviewed, update expectation.
toyoshim@chromium.org [Wed, 8 Aug 2012 06:46:01 +0000 (06:46 +0000)]
Unreviewed, update expectation.
https://bugs.webkit.org/show_bug.cgi?id=93225

Patch by Takashi Toyoshima <toyoshim@chromium.org> on 2012-08-07

* platform/chromium/TestExpectations:

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

7 years agoUnreviewed, update expectation.
toyoshim@chromium.org [Wed, 8 Aug 2012 06:31:18 +0000 (06:31 +0000)]
Unreviewed, update expectation.
https://bugs.webkit.org/show_bug.cgi?id=93439

Patch by Takashi Toyoshima <toyoshim@chromium.org> on 2012-08-07

* platform/chromium/TestExpectations:

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

7 years agoUnreviewed typo fix after r124988.
ossy@webkit.org [Wed, 8 Aug 2012 06:23:22 +0000 (06:23 +0000)]
Unreviewed typo fix after r124988.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations):

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

7 years agoUnreviewed, rebaseline for chromium Mac10.7
toyoshim@chromium.org [Wed, 8 Aug 2012 06:01:57 +0000 (06:01 +0000)]
Unreviewed, rebaseline for chromium Mac10.7

Patch by Takashi Toyoshima <toyoshim@chromium.org> on 2012-08-07

* platform/chromium-mac/fast/speech/input-appearance-searchandspeech-expected.png:

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

7 years agoUnreviewed build fix after http://trac.webkit.org/changeset/124975
hayato@chromium.org [Wed, 8 Aug 2012 05:51:32 +0000 (05:51 +0000)]
Unreviewed build fix after trac.webkit.org/changeset/124975

Remove assertion introduced in r124975.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::EventDispatcher):
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventDispatcher.h:
(EventDispatcher):

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

7 years agoUnreviewed, rolling out r124969.
commit-queue@webkit.org [Wed, 8 Aug 2012 05:43:34 +0000 (05:43 +0000)]
Unreviewed, rolling out r124969.
http://trac.webkit.org/changeset/124969
https://bugs.webkit.org/show_bug.cgi?id=93436

Causes assertion failure in RenderQueue (Requested by toyoshim
on #webkit).

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

* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
(WebCore::RenderObjectChildList::appendChildNode):
(WebCore::RenderObjectChildList::insertChildNode):
* rendering/RenderQuote.cpp:
(WebCore::adjustDepth):
(WebCore::RenderQuote::RenderQuote):
(WebCore::RenderQuote::~RenderQuote):
(WebCore::RenderQuote::willBeDestroyed):
(WebCore::RenderQuote::renderName):
(WebCore):
(WebCore::RenderQuote::placeQuote):
(WebCore::RenderQuote::originalText):
(WebCore::RenderQuote::computePreferredLogicalWidths):
(WebCore::RenderQuote::rendererSubtreeAttached):
(WebCore::RenderQuote::rendererRemovedFromTree):
(WebCore::RenderQuote::styleDidChange):
* rendering/RenderQuote.h:
(RenderQuote):
(WebCore::RenderQuote::isQuote):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
(WebCore):
(RenderView):
(WebCore::RenderView::addRenderQuote):
(WebCore::RenderView::removeRenderQuote):
(WebCore::RenderView::hasRenderQuotes):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):

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

7 years agoOptimize ChildNode{Insertion,Removal}Notifier::notify() by lazily taking a snapshot...
haraken@chromium.org [Wed, 8 Aug 2012 05:38:33 +0000 (05:38 +0000)]
Optimize ChildNode{Insertion,Removal}Notifier::notify() by lazily taking a snapshot of child nodes
https://bugs.webkit.org/show_bug.cgi?id=92965

Reviewed by Adam Barth.

This patch improves performance of Dromaeo/dom-modify by 8.2% in both Chromium and Safari.

[Mac/Safari]     4590.33 runs/s  =>  4965.79 runs/s  (+8.18%)
[Chromium/Linux] 3970.63 runs/s  =>  4299.65 runs/s  (+8.29%)

notifyDescendantRemovedFromDocument() cannot iterate child nodes in this way:

void notifyDescendantRemovedFromDocument(Node* node) {
    for (Node* child = node->firstChild(); child; child = child->nextSibling()) {
        ...;
        notifyNodeRemovedFromDocument(child);
    }
}

This is because notifyNodeRemovedFromDocument(child) might dispatch events
and the events might change child trees. To avoid security issues, the current
code takes a snapshot of child nodes before starting the iteration.

void notifyDescendantRemovedFromDocument(Node* node) {
    NodeVector children;
    getChildNodes(node, children); // Take a snapshot.
    for (int i = 0; i < children.size(); i++) {
        ...;
        notifyNodeRemovedFromDocument(children[i]);
    }
}

Based on the observation that in almost all cases events won't be dispatched
from inside notifyNodeRemovedFromDocument(), this patch implements
a "lazy" snapshot. The snapshot is taken at the point where
EventDispatcher::dispatchEvent() is invoked. The snapshot is not taken unless
any event is dispatched.

No tests. Confirm that all existing tests pass.
Actually, at present there is (should be) no case where an event is
dispatched from inside notifyNodeRemovedFromDocument(). Even DOMNodeInserted
and DOMNodeRemoved events are not dispatched. Originally the snapshot was
implemented "just in case" to protect the code from future attacks.
I manually confirmed that the lazy snapshot works correctly by inserting
takeChildNodesSnapshot() to notifyDescendantRemovedFromDocument()
in a random manner.

* dom/ContainerNode.cpp:
(WebCore):
* dom/ContainerNode.h:
(ChildNodesLazySnapshot):
(WebCore::ChildNodesLazySnapshot::ChildNodesLazySnapshot):
(WebCore::ChildNodesLazySnapshot::~ChildNodesLazySnapshot):
(WebCore::ChildNodesLazySnapshot::nextNode):
(WebCore::ChildNodesLazySnapshot::takeSnapshot):
(WebCore::ChildNodesLazySnapshot::nextSnapshot):
(WebCore::ChildNodesLazySnapshot::hasSnapshot):
(WebCore::ChildNodesLazySnapshot::takeChildNodesLazySnapshot):
(WebCore):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):

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

7 years ago[WK2][EFL] Implement accelerated compositing on WK2 Efl port
commit-queue@webkit.org [Wed, 8 Aug 2012 05:38:28 +0000 (05:38 +0000)]
[WK2][EFL] Implement accelerated compositing on WK2 Efl port
https://bugs.webkit.org/show_bug.cgi?id=89840

Patch by YoungTaeck Song <youngtaeck.song@samsung.com> on 2012-08-07
Reviewed by Noam Rosenthal.

.:

Implement accelerated composition with TiledBackingStore on WK2 Efl port.
This implementation is based on COORDINATED_GRAPHICS.
Add COORDINATED_GRAPHICS related definitions in OptionsEfl.cmake.

* Source/cmake/OptionsEfl.cmake:

Source/WebKit2:

Implement accelerated composition with TiledBackingStore on WK2 Efl port.
This implementation is based on COORDINATED_GRAPHICS.

* CMakeLists.txt:
* PlatformEfl.cmake:
* Shared/ShareableSurface.cpp:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::didChangeContentsSize):
(WebKit):
* UIProcess/API/efl/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/efl/ViewportProcessor.cpp: Added.
(WebKit):
(WebKit::ViewportProcessor::ViewportProcessor):
(WebKit::ViewportProcessor::~ViewportProcessor):
(WebKit::ViewportProcessor::display):
(WebKit::ViewportProcessor::updateViewportSize):
(WebKit::ViewportProcessor::setVisibleContentsRect):
(WebKit::ViewportProcessor::didChangeContentsSize):
* UIProcess/API/efl/ViewportProcessor.h: Added.
(WebKit):
(ViewportProcessor):
(WebKit::ViewportProcessor::create):
(WebKit::ViewportProcessor::drawingArea):
(WebKit::ViewportProcessor::viewSize):
* UIProcess/API/efl/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_smart_calculate):
(ewk_view_base_add):
(ewk_view_display):
(ewk_view_contents_size_changed):
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/WebPageProxy.cpp:
(WebKit):
(WebKit::WebPageProxy::didChangeContentsSize):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit):
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):

Tools:

Implement accelerated composition with TiledBackingStore on WK2 Efl port.
Add OPENGL_LIBRARIES in CMakeList.txt.

* MiniBrowser/efl/CMakeLists.txt:
* WebKitTestRunner/PlatformEfl.cmake:

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

7 years ago[NRWT] REGRESSION(r124967): New tests without expected results handled as failures
ossy@webkit.org [Wed, 8 Aug 2012 05:34:45 +0000 (05:34 +0000)]
[NRWT] REGRESSION(r124967): New tests without expected results handled as failures
https://bugs.webkit.org/show_bug.cgi?id=93434

Reviewed by Tony Chang.

Change back "missing results" to "no expected result found", because master.cfg's results parser expects it.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations):

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

7 years agopercentage margins + flex incorrectly overflows the flexbox
ojan@chromium.org [Wed, 8 Aug 2012 05:25:34 +0000 (05:25 +0000)]
percentage margins + flex incorrectly overflows the flexbox
https://bugs.webkit.org/show_bug.cgi?id=93411

Reviewed by Tony Chang.

Source/WebCore:

Percent margins should always be computed with respect to the containing
block's width, not it's height. We were getting this wrong in column flows.

Test: css3/flexbox/percent-margins.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMarginValue):
(WebCore):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
* rendering/RenderFlexibleBox.h:

LayoutTests:

* css3/flexbox/percent-margins-expected.txt: Added.
* css3/flexbox/percent-margins.html: Added.

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

7 years agoREGRESSION (r124710-r124713): media/video-seek-past-end-paused.html failing on Apple...
eric.carlson@apple.com [Wed, 8 Aug 2012 05:22:46 +0000 (05:22 +0000)]
REGRESSION (r124710-r124713): media/video-seek-past-end-paused.html failing on Apple Lion Debug WK1 (Tests)
https://bugs.webkit.org/show_bug.cgi?id=93394

Unreviewed. Adding new results for failing tests on Mac.

* platform/mac/media/video-seek-past-end-paused-expected.txt: Added.

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

7 years ago[V8] Replace throwError(ExceptionCode, Isolate*) with setDOMException(ExceptionCode...
haraken@chromium.org [Wed, 8 Aug 2012 05:06:32 +0000 (05:06 +0000)]
[V8] Replace throwError(ExceptionCode, Isolate*) with setDOMException(ExceptionCode, Isolate*) in v8/* and v8/custom/*
https://bugs.webkit.org/show_bug.cgi?id=93226

Reviewed by Eric Seidel.

Now throwError(ExceptionCode, Isolate*) is equivalent to
setDOMException(ExceptionCode, Isolate*). We can replace the former with
the latter. After this replacement, the rule becomes simple and sane:
"Use throwError() for throwing JavaScript errors, use setDOMException()
for throwing DOM exceptions".

No tests. No change in behavior.

* bindings/v8/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::SerializedScriptValue):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallback):
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertySetter):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertySetter):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getDirectoryCallback):
(WebCore::V8DirectoryEntry::getFileCallback):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::V8Document::evaluateCallback):
* bindings/v8/custom/V8HistoryCustom.cpp:
(WebCore::V8History::pushStateCallback):
(WebCore::V8History::replaceStateCallback):
* bindings/v8/custom/V8IntentConstructor.cpp:
(WebCore::V8Intent::constructorCallback):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8MutationObserverCustom.cpp:
(WebCore::V8MutationObserver::constructorCallback):
* bindings/v8/custom/V8NotificationCenterCustom.cpp:
(WebCore::V8NotificationCenter::createHTMLNotificationCallback):
(WebCore::V8NotificationCenter::createNotificationCallback):
(WebCore::V8NotificationCenter::requestPermissionCallback):
* bindings/v8/custom/V8SQLTransactionCustom.cpp:
(WebCore::V8SQLTransaction::executeSqlCallback):
* bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
(WebCore::V8SQLTransactionSync::executeSqlCallback):
* bindings/v8/custom/V8StorageCustom.cpp:
(WebCore::storageSetter):
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback):
(WebCore::V8WebSocket::sendCallback):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::V8WorkerContext::importScriptsCallback):
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::responseTextAccessorGetter):
(WebCore::V8XMLHttpRequest::openCallback):
(WebCore::V8XMLHttpRequest::sendCallback):

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

7 years ago[V8] Replace v8::Handle<v8::Value>() in custom bindings with v8Undefined()
haraken@chromium.org [Wed, 8 Aug 2012 05:02:35 +0000 (05:02 +0000)]
[V8] Replace v8::Handle<v8::Value>() in custom bindings with v8Undefined()
https://bugs.webkit.org/show_bug.cgi?id=93215

Reviewed by Eric Seidel.

We should use v8Undefined() everywhere in V8 bindings.

No tests. No change in behavior.

* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
(WebCore::V8CSSStyleDeclaration::namedPropertySetter):
* bindings/v8/custom/V8ConsoleCustom.cpp:
(WebCore::V8Console::traceCallback):
(WebCore::V8Console::assertCallback):
(WebCore::V8Console::profileCallback):
(WebCore::V8Console::profileEndCallback):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyGetter):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::indexedPropertyGetter):
(WebCore::V8DOMWindow::namedPropertyGetter):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::V8DataView::setInt8Callback):
(WebCore::V8DataView::setUint8Callback):
* bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
(WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
* bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
(WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getDirectoryCallback):
(WebCore::V8DirectoryEntry::getFileCallback):
* bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
(WebCore::getNamedItems):
(WebCore::V8HTMLAllCollection::namedPropertyGetter):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::getNamedItems):
(WebCore::V8HTMLCollection::namedPropertyGetter):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::GetNamedProperty):
* bindings/v8/custom/V8HTMLFormElementCustom.cpp:
(WebCore::V8HTMLFormElement::indexedPropertyGetter):
(WebCore::V8HTMLFormElement::namedPropertyGetter):
* bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
(WebCore::V8HTMLFrameSetElement::namedPropertyGetter):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::indexedPropertyGetter):
* bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
(WebCore::npObjectNamedGetter):
(WebCore::npObjectNamedSetter):
(WebCore::npObjectIndexedGetter):
(WebCore::npObjectIndexedSetter):
* bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
(WebCore::V8HTMLSelectElement::indexedPropertyGetter):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::V8Location::reloadAccessorGetter):
(WebCore::V8Location::replaceAccessorGetter):
(WebCore::V8Location::assignAccessorGetter):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::V8NamedNodeMap::indexedPropertyGetter):
(WebCore::V8NamedNodeMap::namedPropertyGetter):
* bindings/v8/custom/V8NodeListCustom.cpp:
(WebCore::V8NodeList::namedPropertyGetter):
* bindings/v8/custom/V8SVGLengthCustom.cpp:
(WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
* bindings/v8/custom/V8StorageCustom.cpp:
(WebCore::storageGetter):
(WebCore::V8Storage::namedPropertyGetter):
(WebCore::storageSetter):
* bindings/v8/custom/V8StyleSheetListCustom.cpp:
(WebCore::V8StyleSheetList::namedPropertyGetter):

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

7 years ago[Qt] Make it possible to build without QtQuick
ossy@webkit.org [Wed, 8 Aug 2012 04:59:28 +0000 (04:59 +0000)]
[Qt] Make it possible to build without QtQuick

Patch by No'am Rosenthal <noam.rosenthal@nokia.com> on 2012-08-07
Reviewed by Simon Hausmann.

* Source/QtWebKit.pro:
* Source/tests.pri:

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

7 years ago[BlackBerry] always set PolicyAction to PolicyIgnore if the chrome returns false...
charles.wei@torchmobile.com.cn [Wed, 8 Aug 2012 04:55:07 +0000 (04:55 +0000)]
[BlackBerry] always set PolicyAction to PolicyIgnore if the chrome returns false for acceptNavigationRequest
https://bugs.webkit.org/show_bug.cgi?id=93251

Reviewed by George Staikos.

In acceptNavigationRequest(), webkit will ask if the chrome will accept the navigation request.
We will take this chance to see if the request is an internal-webkit protocol, otherwise,
we will try to launch an external application to handle the request, and ask webkit to ignore
the request by returning false in acceptNavigationRequest().

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):

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

7 years ago[V8] Replace v8::Handle<v8::Value>() in bindings/v8/* with v8Undefined()
haraken@chromium.org [Wed, 8 Aug 2012 04:38:20 +0000 (04:38 +0000)]
[V8] Replace v8::Handle<v8::Value>() in bindings/v8/* with v8Undefined()
https://bugs.webkit.org/show_bug.cgi?id=93211

Reviewed by Eric Seidel.

We should use v8Undefined() everywhere in V8 bindings.
Replacing v8::Local<v8::Value>() etc with v8Undefined() can cause build
errors due to type conversion mismatch. I'll do the replacement in follow-up
patches.

No tests. No change in behavior.

* bindings/v8/IDBBindingUtilities.cpp:
(WebCore):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::pauseOnExceptionsState):
(WebCore::ScriptDebugServer::handleV8DebugEvent):
* bindings/v8/SerializedScriptValue.cpp:
* bindings/v8/V8Binding.cpp:
(WebCore::batchConfigureCallbacks):
* bindings/v8/V8Collection.h:
(WebCore::getV8Object):
(WebCore::collectionNamedPropertyGetter):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::convertEventTargetToV8Object):
* bindings/v8/V8NPObject.cpp:
(WebCore::npObjectGetProperty):
(WebCore::npObjectSetProperty):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::setDOMException):
(WebCore::V8Proxy::throwError):
* bindings/v8/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::addListener):

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

7 years agoFix regression in credential storage when using Negotiate auth
commit-queue@webkit.org [Wed, 8 Aug 2012 04:34:26 +0000 (04:34 +0000)]
Fix regression in credential storage when using Negotiate auth
https://bugs.webkit.org/show_bug.cgi?id=93386

Patch by Joe Mason <jmason@rim.com> on 2012-08-07
Reviewed by George Staikos.

r124205 regressed credential storage and lookup.  It added code to update the scheme used in
credential storage if the scheme chosen by the network stack is different from that requested by
webkit (currently this is only used when webkit requests Negotiate auth, but the Negotiate
infrastructure isn't set up correctly, so the network stack falls back to another auth type, usually
NTLM).  But the credentials are saved when a "success" status is received, and the scheme in the
credentials is not updated until notifyAuthReceived is called to report the actual auth scheme used.
The result is that the credentials are stored with the wrong auth scheme and can never be retreived.

Fixed by delaying the credential save until notifyAuthReceived.

RIM PR 166514
Internally reviewed by George Staikos

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyStatusReceived): Stop storing credentials here.
(WebCore::NetworkJob::notifyAuthReceived): Store credentials here instead.

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

7 years ago[Mac] Do not reformat numbers in <input type=number>
tkent@chromium.org [Wed, 8 Aug 2012 04:15:02 +0000 (04:15 +0000)]
[Mac] Do not reformat numbers in <input type=number>
https://bugs.webkit.org/show_bug.cgi?id=93236

Reviewed by Hajime Morita.

Source/WebCore:

We had bugs such as stripping leading zeros, dropping lower digits of
large numbers because we parse a user-input string to a double value,
and generate a string from the double value.

In order to avoid such reformatting, we use
platform/text/NumberLocalizer, which maps ASCII digits to the
corresponding localized digits.

Test: fast/forms/number/number-lossless-localization.html

* WebCore.xcodeproj/project.pbxproj:
Add the following files:
 - platform/text/NumberLocalizer.cpp
 - platform/text/NumberLocalizer.h
 - platform/mac/LocaleMac.h
 - platform/mac/LocaleMac.mm
* platform/text/mac/LocaleMac.h:
(LocaleMac): Inherit NumberLocalizer, and declare
initializeNumberLocalizerData() for it.
Add m_didInitializeNumberData flag.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::LocaleMac): Initialize m_didInitializeNumberData
(WebCore::LocaleMac::initializeNumberLocalizerData):
Added. Prepare data for number localization, and call
NumberLocalizer::setNumberLocalizerData().
A tricky part is to format 9876543210 for m_locale. It seems OSX doesn't
have API to get localized digits.
* platform/text/mac/LocalizedNumberMac.mm:
Remove many lines, and calls the corresponding functions of LocaleMac.
(WebCore::convertToLocalizedNumber):
(WebCore::convertFromLocalizedNumber):
(WebCore::localizedDecimalSeparator):

LayoutTests:

* fast/forms/number/number-lossless-localization-expected.txt: Added.
* fast/forms/number/number-lossless-localization.html: Added.

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

7 years ago[V8] Move V8BindingMacros.h from bindings/v8/custom/ to bindings/v8/
haraken@chromium.org [Wed, 8 Aug 2012 04:07:13 +0000 (04:07 +0000)]
[V8] Move V8BindingMacros.h from bindings/v8/custom/ to bindings/v8/
https://bugs.webkit.org/show_bug.cgi?id=93254

Reviewed by Eric Seidel.

V8BindingMacros.h should exist in bindings/v8/.
This patch also moves related enums from V8Binding.h to V8BindingMacros.h.

No tests. No change in behavior.

* WebCore.gypi:
* bindings/v8/V8BindingMacros.h: Renamed from Source/WebCore/bindings/v8/custom/V8BindingMacros.h.
(WebCore):

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

7 years ago[V8] StringCache::m_lastStringImpl and StringCache::m_lastV8String should be in sync
haraken@chromium.org [Wed, 8 Aug 2012 04:01:25 +0000 (04:01 +0000)]
[V8] StringCache::m_lastStringImpl and StringCache::m_lastV8String should be in sync
https://bugs.webkit.org/show_bug.cgi?id=93065

Reviewed by Eric Seidel.

StringCache::m_lastStringImpl caches a StringImpl that was accessed most
recently. StringCache::m_lastV8String caches Persistent<String> corresponding
to the StringImpl. Hence m_lastStringImpl and m_lastV8String should be in sync.

However, StringCache::remove() breaks the sync. StringCache::remove() clears
m_lastStringImpl but does not clear m_lastV8String. As far as I analyze the code,
this won't cause any problem, but we should fix it just in case.

No tests. No change in behavior.

* bindings/v8/V8Binding.cpp:
(WebCore::StringCache::remove):

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

7 years ago[WTF] Add using WTF::msPerHour into DateMath.h
yosin@chromium.org [Wed, 8 Aug 2012 03:48:25 +0000 (03:48 +0000)]
[WTF] Add using WTF::msPerHour into DateMath.h
https://bugs.webkit.org/show_bug.cgi?id=93428

Reviewed by Kent Tamura.

This patch adds "using WTF::msPerHour" into DateMath.h for some codes
which will use it, e.g. bug 92960. Note: DateMath.h already has had
using statements for msPerDay, msPerMinute and msPerSecond.

* wtf/DateMath.h: Added "using WTF::msPerHour".

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