WebKit-https.git
6 years agoReplace DOMException TYPE_MISMATCH_ERR with TypeError
arv@chromium.org [Tue, 13 Nov 2012 04:03:41 +0000 (04:03 +0000)]
Replace DOMException TYPE_MISMATCH_ERR with TypeError
https://bugs.webkit.org/show_bug.cgi?id=101604

Reviewed by Adam Barth.

Source/WebCore:

DOMException.TYPE_MISMATCH_ERR is deprecated in favor of using TypeError.

We have historically used TYPE_MISMATCH_ERR as a blanket DOMException code when
the spec mandates TypeError being thrown.

Updated existing tests.

* Modules/mediastream/MediaConstraintsImpl.cpp:
* Modules/mediastream/MediaStreamTrackList.cpp:
* Modules/mediastream/PeerConnection00.cpp:
* Modules/mediastream/RTCDataChannel.cpp:
* Modules/mediastream/RTCIceCandidate.cpp:
* Modules/mediastream/RTCPeerConnection.cpp:
* Modules/mediastream/RTCSessionDescription.cpp:
* Modules/mediastream/SessionDescription.cpp:
* bindings/js/CallbackFunction.cpp:
* bindings/js/JSCustomXPathNSResolver.cpp:
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
* bindings/js/JSHTMLSelectElementCustom.cpp:
* bindings/js/JSMutationObserverCustom.cpp:
* bindings/js/JSSQLResultSetRowListCustom.cpp:
* bindings/js/JSSQLTransactionCustom.cpp:
* bindings/js/JSSQLTransactionSyncCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/v8/V8Callback.h:
* bindings/v8/V8Collection.cpp:
* bindings/v8/custom/V8DocumentCustom.cpp:
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
* bindings/v8/custom/V8MutationObserverCustom.cpp:
* bindings/v8/custom/V8SQLTransactionCustom.cpp:
* bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
* dom/DOMCoreException.idl:
* html/HTMLElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLOptionsCollection.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
* page/Crypto.cpp:
* page/DOMSelection.cpp:
* svg/properties/SVGTransformListPropertyTearOff.h:

LayoutTests:

Update the tests to test for TypeError instead of DOMException with the TYPE_MISMATCH_ERR code.

* canvas/philip/tests/2d.drawImage.null.html:
* canvas/philip/tests/2d.imageData.put.null.html:
* canvas/philip/tests/2d.pattern.image.null.html:
* editing/selection/extend-expected.txt:
* fast/dom/Geolocation/argument-types-expected.txt:
* fast/dom/Geolocation/not-enough-arguments-expected.txt:
* fast/dom/Geolocation/script-tests/argument-types.js:
* fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
* fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
* fast/js/select-options-add-expected.txt:
* fast/mediastream/RTCIceCandidate-expected.txt:
* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCSessionDescription-expected.txt:
* fast/mediastream/SessionDescription-expected.txt:
* fast/mediastream/peerconnection-addstream-expected.txt:
* fast/mediastream/peerconnection-iceoptions-expected.txt:
* fast/mediastream/peerconnection-iceoptions.html:
* fast/mediastream/peerconnection-removestream-expected.txt:
* media/encrypted-media/encrypted-media-syntax.html:
* media/video-test.js:
* platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt:
* security/crypto-random-values-types-expected.txt:
* svg/dom/SVGTransformList-expected.txt:

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

6 years agoPerl errors from Tools/Scripts/copy-webkitlibraries-to-product-directory
dbates@webkit.org [Tue, 13 Nov 2012 04:01:37 +0000 (04:01 +0000)]
Perl errors from Tools/Scripts/copy-webkitlibraries-to-product-directory
https://bugs.webkit.org/show_bug.cgi?id=101980

Reviewed by Mark Rowe.

Remove library libWebKitSystemInterfaceLeopard.a and libWebKitSystemInterfaceSnowLeopard.a
from the list of libraries to copy to the specified built products directory
as these libraries were removed from the repository in <http://trac.webkit.org/changeset/133670>.

* Scripts/copy-webkitlibraries-to-product-directory:

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

6 years agoIndexedDB: storage/indexeddb/cursor-prev-no-duplicate.html is flaky
jsbell@chromium.org [Tue, 13 Nov 2012 03:38:47 +0000 (03:38 +0000)]
IndexedDB: storage/indexeddb/cursor-prev-no-duplicate.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=101990

Reviewed by Tony Chang.

Race condition in test leads to flaky behavior. Refactor test to remove flake
and clean up output.

* storage/indexeddb/cursor-prev-no-duplicate-expected.txt:
* storage/indexeddb/resources/cursor-prev-no-duplicate.js:
(testFarRangeCursor_closed):
(.trans.oncomplete):
(.storeReq.onsuccess):
(runTest):

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

6 years agoIndexedDB: Use sequence<> instead of DOMString[] in IDL
jsbell@chromium.org [Tue, 13 Nov 2012 03:09:31 +0000 (03:09 +0000)]
IndexedDB: Use sequence<> instead of DOMString[] in IDL
https://bugs.webkit.org/show_bug.cgi?id=100539

Reviewed by Adam Barth.

In the binding layer, DOMString[] is implemented as an alias for DOMStringList.
WebIDL usage is tending towards sequence<DOMString> anyway for inputs, so switch
to that. Note webkit.org/b/100537 which requires sequence<String> instead.

Covered by storage/indexeddb/transaction-basics.html and objectstore-basics.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::transaction): DOMStringList -> Vector<String>
* Modules/indexeddb/IDBDatabase.h:
(WebCore::IDBDatabase::transaction):
(IDBDatabase):
* Modules/indexeddb/IDBDatabase.idl: DOMString[] -> sequence<String>
* Modules/indexeddb/IDBObjectStore.cpp: Move trivial impls to header.
* Modules/indexeddb/IDBObjectStore.h:
(WebCore::IDBObjectStore::createIndex):
* Modules/indexeddb/IDBObjectStore.idl: DOMString[] -> sequence<String>

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

6 years agoUnreviewed, gardening.
hayato@chromium.org [Tue, 13 Nov 2012 02:48:40 +0000 (02:48 +0000)]
Unreviewed, gardening.

Rebase after r134287.

* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/repaint/invalidations-on-composited-layers-expected.txt:

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

6 years agoRemove Leopard only gradient code
andersca@apple.com [Tue, 13 Nov 2012 02:48:39 +0000 (02:48 +0000)]
Remove Leopard only gradient code
https://bugs.webkit.org/show_bug.cgi?id=102033

Reviewed by Dan Bernstein.

USE_CG_SHADING was only ever true on Leopard, so we can remove it now.

* platform/graphics/Gradient.h:
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformDestroy):
(WebCore::Gradient::platformGradient):
(WebCore::Gradient::paint):

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

6 years agoAdd WebCore::Setting to block displaying and/or running insecure content on secure...
commit-queue@webkit.org [Tue, 13 Nov 2012 02:47:43 +0000 (02:47 +0000)]
Add WebCore::Setting to block displaying and/or running insecure content on secure pages
https://bugs.webkit.org/show_bug.cgi?id=58378

Patch by Josh Rickmar <jrick@devio.us> on 2012-11-12
Reviewed by Martin Robinson.

* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_set_property):
(webkit_web_settings_get_property):
(webkit_web_settings_copy):
* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):

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

6 years ago[BlackBerry] Update BB10 form theme.
commit-queue@webkit.org [Tue, 13 Nov 2012 02:28:56 +0000 (02:28 +0000)]
[BlackBerry] Update BB10 form theme.
https://bugs.webkit.org/show_bug.cgi?id=100760

Patch by Tiancheng Jiang <tijiang@rim.com> on 2012-11-12
Reviewed by Rob Buis.

RIM PR 237003
Internally Reviewed by Eli Fidler.
Since we nolonger use small font for form controls, adjust paddingDivisor
ratio to decrease the padding value.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore):

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

6 years agoInclude child layers in the remote layer tree transaction
andersca@apple.com [Tue, 13 Nov 2012 02:10:09 +0000 (02:10 +0000)]
Include child layers in the remote layer tree transaction
https://bugs.webkit.org/show_bug.cgi?id=102026

Reviewed by Andreas Kling.

* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
Encode and decode child layer IDs.

(WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
Grab all child layer IDs and stick them in a vector.

(WebKit::dumpChangedLayers):
Dump child layer IDs as well.

* WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
(WebKit::RemoteGraphicsLayer::setChildren):
(WebKit::RemoteGraphicsLayer::addChild):
(WebKit::RemoteGraphicsLayer::addChildAtIndex):
(WebKit::RemoteGraphicsLayer::addChildAbove):
(WebKit::RemoteGraphicsLayer::addChildBelow):
(WebKit::RemoteGraphicsLayer::replaceChild):
Call noteSublayersChanged.

(WebKit::RemoteGraphicsLayer::noteSublayersChanged):
Note that the Children property changed.

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

6 years agoIndexedDB: Convert some non-simple tests from setVersion to upgradeneeded
dgrogan@chromium.org [Tue, 13 Nov 2012 02:09:45 +0000 (02:09 +0000)]
IndexedDB: Convert some non-simple tests from setVersion to upgradeneeded
https://bugs.webkit.org/show_bug.cgi?id=101959

Reviewed by Tony Chang.

Ongoing work to remove calls to setVersion from our tests before
removing it from the IndexedDB API.

* storage/indexeddb/create-and-remove-object-store-expected.txt:
* storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt:
* storage/indexeddb/duplicates-expected.txt:
* storage/indexeddb/resources/create-and-remove-object-store.js:
  Create and delete were running between open and setVersion, which no
  longer makes sense.

* storage/indexeddb/resources/database-deletepending-flag.js:
  Use optional object parameter instead of optional version parameter.

* storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js:
  This used to call delete just after issuing setVersion but before
  receiving the corresponding success event.  Now it calls delete while
  in the upgradeneeded transaction, still causing the delete to be
  delayed by an in flight versionchange transaction.

* storage/indexeddb/resources/duplicates.js:
  Call indexedDBTest twice to rerun the tests with a different
  database.

* storage/indexeddb/resources/shared.js:
  Added a suffix option to support duplicates.js, switched to an
  optional object parameter.

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

6 years agoFix windowRect calculation for webplugin due to page scale factors
commit-queue@webkit.org [Tue, 13 Nov 2012 02:09:35 +0000 (02:09 +0000)]
Fix windowRect calculation for webplugin due to page scale factors
https://bugs.webkit.org/show_bug.cgi?id=100182

Patch by Min Qin <qinmin@chromium.org> on 2012-11-12
Reviewed by Adam Barth.

The current calculaton of windowRect in WebPluginContainerImpl is wrong. Even after some of our latest changes.
The problem is caused by page scale factor.
For example, windowToContents(IntPoint) will return an unscaled offset for an iframe, but will return a scaled offset for the main frame. So in order to obtain the correct window coordinate, we need to use contentsToWindow().
Since webview_plugin.cc is expecting window coordinates, we need to use contentsToWindow(IntRect) to calculate the windowRect so that the rect size can get correctly scaled.
It is difficult to write a test for this because it's pixel-based, and plugin placeholder is managed on the Chromium side (webview_plugin.cc).

* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::paint):

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

6 years ago[BlackBerry] Ensure we only receive one KeyUp per key event
commit-queue@webkit.org [Tue, 13 Nov 2012 02:01:05 +0000 (02:01 +0000)]
[BlackBerry] Ensure we only receive one KeyUp per key event
https://bugs.webkit.org/show_bug.cgi?id=101967

Patch by Nima Ghanavatian <nghanavatian@rim.com> on 2012-11-12
Reviewed by Rob Buis.

We are creating synthetic KeyUps too often, and get into trouble since IMF will send up a KeyUp on all key events.
Furthermore, these KeyUps can arrive both when we are composing and not. To bypass this check, we are storing the KeyDown
character and comparing against it on KeyUp.

Internally reviewed by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::InputHandler):
(BlackBerry::WebKit::InputHandler::handleKeyboardInput):
(BlackBerry::WebKit::InputHandler::insertText):
(BlackBerry::WebKit::InputHandler::setText):
* WebKitSupport/InputHandler.h:
(InputHandler):

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

6 years agoPatching of jumps to stubs should use jump replacement rather than branch destination...
fpizlo@apple.com [Tue, 13 Nov 2012 01:55:42 +0000 (01:55 +0000)]
Patching of jumps to stubs should use jump replacement rather than branch destination overwrite
https://bugs.webkit.org/show_bug.cgi?id=101909

Reviewed by Geoffrey Garen.

This saves a few instructions in inline cases, on those architectures where it is
easy to figure out where to put the jump replacement. Sub-1% speed-up across the
board.

* assembler/MacroAssemblerARMv7.h:
(MacroAssemblerARMv7):
(JSC::MacroAssemblerARMv7::canJumpReplacePatchableBranchPtrWithPatch):
(JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatch):
(JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranchPtrWithPatch):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::canJumpReplacePatchableBranchPtrWithPatch):
(MacroAssemblerX86):
(JSC::MacroAssemblerX86::startOfPatchableBranchPtrWithPatch):
(JSC::MacroAssemblerX86::revertJumpReplacementToPatchableBranchPtrWithPatch):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::canJumpReplacePatchableBranchPtrWithPatch):
(MacroAssemblerX86_64):
(JSC::MacroAssemblerX86_64::startOfPatchableBranchPtrWithPatch):
(JSC::MacroAssemblerX86_64::revertJumpReplacementToPatchableBranchPtrWithPatch):
* assembler/RepatchBuffer.h:
(JSC::RepatchBuffer::startOfPatchableBranchPtrWithPatch):
(RepatchBuffer):
(JSC::RepatchBuffer::replaceWithJump):
(JSC::RepatchBuffer::revertJumpReplacementToPatchableBranchPtrWithPatch):
* assembler/X86Assembler.h:
(X86Assembler):
(JSC::X86Assembler::revertJumpTo_movq_i64r):
(JSC::X86Assembler::revertJumpTo_cmpl_im_force32):
(X86InstructionFormatter):
* bytecode/StructureStubInfo.h:
* dfg/DFGRepatch.cpp:
(JSC::DFG::replaceWithJump):
(DFG):
(JSC::DFG::tryCacheGetByID):
(JSC::DFG::tryBuildGetByIDList):
(JSC::DFG::tryBuildGetByIDProtoList):
(JSC::DFG::tryCachePutByID):
(JSC::DFG::dfgResetGetByID):
(JSC::DFG::dfgResetPutByID):

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

6 years agoSend along the current remote layer tree transaction with the commit message
andersca@apple.com [Tue, 13 Nov 2012 01:26:17 +0000 (01:26 +0000)]
Send along the current remote layer tree transaction with the commit message
https://bugs.webkit.org/show_bug.cgi?id=102014

Reviewed by Tim Horton.

Add encode and decode member functions to RemoteLayerTreeTransaction and RemoteLayerTreeTransaction::LayerProperties.

* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.messages.in:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::commit):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::flushLayers):

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

6 years agoFix filter dirty rect regression from r134311
simon.fraser@apple.com [Tue, 13 Nov 2012 01:13:50 +0000 (01:13 +0000)]
Fix filter dirty rect regression from r134311
https://bugs.webkit.org/show_bug.cgi?id=102002

Reviewed by Beth Dakin.

When rendering with filters, the code can inflate the root-relative
paintDirtyRect in RenderLayer::paintLayerContents(), and my cleanup
broke this behavior.

Fix by making a local copy of LayerPaintingInfo, updating its paintDirtyRect,
and using it for the rest of the function.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):

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

6 years ago[V8] V8Event::valueAccessorGetter() in custom binding is not used
haraken@chromium.org [Tue, 13 Nov 2012 01:04:45 +0000 (01:04 +0000)]
[V8] V8Event::valueAccessorGetter() in custom binding is not used
https://bugs.webkit.org/show_bug.cgi?id=101893

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/v8/custom/V8EventCustom.cpp:

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

6 years agoGet rid of the CrossOriginRedirectReceived message to the NetworkProcess.
beidson@apple.com [Tue, 13 Nov 2012 01:03:56 +0000 (01:03 +0000)]
Get rid of the CrossOriginRedirectReceived message to the NetworkProcess.
https://bugs.webkit.org/show_bug.cgi?id=102010

Reviewed by Alexey Proskuryakov.

This message was a stop-gap measure for when the NetworkProcess did scheduling but not loading.
Now that the NetworkProcess does loading it doesn't need to be told when redirect is received.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in: Get rid of the message to the NetworkProcess.

* NetworkProcess/NetworkRequest.cpp:
(WebKit::NetworkRequest::willSendRequest): After willSendRequest is dispatched to the WebProcess, directly call
  "receivedRedirect" on the NetworkResourceLoadScheduler.

* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::receivedRedirect): Renamed from crossOriginRedirectReceived, as the
  function already checks to see if the redirect was actually cross-origin.
* NetworkProcess/NetworkResourceLoadScheduler.h:

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::crossOriginRedirectReceived): A no-op so the WebProcess doesn't
  do any host record accounting of its own.

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

6 years agoWeb Inspector: Fix docking behavior on Windows.
roger_fong@apple.com [Tue, 13 Nov 2012 00:36:17 +0000 (00:36 +0000)]
Web Inspector: Fix docking behavior on Windows.
https://bugs.webkit.org/show_bug.cgi?id=101978

Reviewed by Brian Weinstein.

There are a number of problems with docking behaviour on Windows.
For starters, it does not ever constrain the inspector's size properly while docked.
It also does not properly set the whether or not the inspector can be docked/undocked.
This patch fixes both issues.

* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::frontendLoaded):
Switch order of calling bringToFront and setDockingUnavailable.
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::frontendLoaded):
(WebInspectorFrontendClient::attachWindow):
Call restoreAttachedWindowHeight so that when first loading or reattaching the inspector,
we resize the inspector window properly.

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

6 years agoPDFPlugin should use PDFKit's context menu instead of the default WebKit one
timothy_horton@apple.com [Tue, 13 Nov 2012 00:25:58 +0000 (00:25 +0000)]
PDFPlugin should use PDFKit's context menu instead of the default WebKit one
https://bugs.webkit.org/show_bug.cgi?id=101896
<rdar://problem/12555173>

Reviewed by Anders Carlsson.

Show the context menu that PDFKit vends us instead of the default WebKit one
when PDFPlugin is told to show a context menu.

Also, react to the didChangeContentScaleFactor callback, so that when the context
menu (or HUD) is used to change the scale factor, we can inform PluginView.

* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
Add pdfLayerController:didChangeContentScaleFactor: delegate callback.
Rename tileScaleFactor to contentScaleFactor.
Add rightMouseDown: and menuForEvent: on PDFLayerController.
* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin):
Add notifyContentScaleFactorChanged, handleContextMenuEvent, and nsEventForWebMouseEvent.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFLayerControllerDelegate pdfLayerController:didChangeContentScaleFactor:]): Forward content scale factor changes to PDFPlugin.
(WebKit::PDFPlugin::pdfDocumentDidLoad): Rename tileScaleFactor to contentScaleFactor.
(WebKit::PDFPlugin::geometryDidChange): Rename tileScaleFactor to contentScaleFactor.
(WebKit::eventTypeFromWebEvent): It turns out we can infer whether the mouse is being dragged during a MouseMove event
by whether it has a mouse button associated with it or not, so we don't need to track this state manually.
(WebKit::PDFPlugin::nsEventForWebMouseEvent): Factor the part of handleMouseEvent that creates NSEvents* out into its own function.
(WebKit::PDFPlugin::handleMouseEvent):
Don't track mouseButtonIsDown manually, make use of the new nsEventForWebMouseEvent.
Hand rightMouseDown: to PDFLayerController instead of mouseDown: if necessary.
(WebKit::PDFPlugin::handleContextMenuEvent): Grab the relevant NSMenu from PDFKit and display it.
(WebKit::PDFPlugin::handleKeyboardEvent): Don't pass a bogus mouseButtonIsDown to eventTypeFromWebEvent.
(WebKit::PDFPlugin::notifyContentScaleFactorChanged): Update PluginView and co.'s notion of page scale when
PDFKit changes it (generally from the context menu/HUD). Also update page size and scrollbar size/position.
(WebKit::PDFPlugin::setScrollOffset): Don't call SimplePDFPlugin's implementation, as PDFKit handles invalidation itself.
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::updateGeometry): Rename tileScaleFactor to contentScaleFactor.
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::updateGeometry): Rename tileScaleFactor to contentScaleFactor.
* WebProcess/Plugins/PDF/SimplePDFPlugin.h: Make m_scrollOffset protected.

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

6 years ago[EFL] WebKit1 gardening.
rakuco@webkit.org [Tue, 13 Nov 2012 00:23:18 +0000 (00:23 +0000)]
[EFL] WebKit1 gardening.

Mark fast/repaint/block-selection-gap-stale-cache.html and
fast/repaint/block-selection-gap-stale-cache-2.html as image failures.

* platform/efl-wk1/TestExpectations:

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

6 years agoAdd a RemoteLayerTreeHost object in the UI process
andersca@apple.com [Tue, 13 Nov 2012 00:21:41 +0000 (00:21 +0000)]
Add a RemoteLayerTreeHost object in the UI process
https://bugs.webkit.org/show_bug.cgi?id=101999

Reviewed by Tim Horton.

Add a (mostly empty) RemoteLayerTreeHost class that will live in the UI process and host the layer tree.

* DerivedSources.make:
Add RemoteLayerTreeHost.messages.in.

* Platform/CoreIPC/MessageID.h:
Add a RemoteLayerTreeHost message class.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addMessageReceiver):
(WebKit::WebProcessProxy::removeMessageReceiver):
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
* UIProcess/WebProcessProxy.h:
Add a message receiver map to the web process proxy.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
Add a RemoteLayerTreeHost member variable.

* UIProcess/mac/RemoteLayerTreeHost.h:
Add new class.

* UIProcess/mac/RemoteLayerTreeHost.messages.in:
Add new messages file with a single Commit message.

* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
Add the layer tree host as a message receiver.

(WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
Remote the layer tree host as a message receiver.

(WebKit::RemoteLayerTreeHost::didReceiveMessage):
Call the generated member function.

(WebKit::RemoteLayerTreeHost::commit):
Add an empty stub for now.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::flushLayers):
Send a commit message to the remote layer tree host.

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

6 years ago[V8] Update callers to use the aligned pointer API rather than the deprecated unalign...
abarth@webkit.org [Mon, 12 Nov 2012 23:55:00 +0000 (23:55 +0000)]
[V8] Update callers to use the aligned pointer API rather than the deprecated unaligned pointer API
https://bugs.webkit.org/show_bug.cgi?id=101519

Reviewed by Ojan Vafai.

There should be no change in behavior.  The new API is slightly faster
than the old API (and apparently works correctly internally in V8).

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/scripts/test/V8/V8Float64Array.h:
(WebCore::V8Float64Array::toNative):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(WebCore::V8TestActiveDOMObject::toNative):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(WebCore::V8TestCustomNamedGetter::toNative):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(WebCore::V8TestEventConstructor::toNative):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(WebCore::V8TestEventTarget::toNative):
* bindings/scripts/test/V8/V8TestException.h:
(WebCore::V8TestException::toNative):
* bindings/scripts/test/V8/V8TestInterface.h:
(WebCore::V8TestInterface::toNative):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(WebCore::V8TestMediaQueryListListener::toNative):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(WebCore::V8TestNamedConstructor::toNative):
* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::V8TestNode::toNative):
* bindings/scripts/test/V8/V8TestObj.h:
(WebCore::V8TestObj::toNative):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(WebCore::V8TestSerializedScriptValueInterface::toNative):
* bindings/v8/NPV8Object.cpp:
(WebCore::v8ObjectToNPObject):
(WebCore::npCreateV8ScriptObject):
* bindings/v8/V8Collection.h:
(WebCore::toNativeCollection):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::setIsolatedWorldField):
(WebCore::V8DOMWindowShell::enteredIsolatedWorldContext):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::isWrapperOfType):
* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::setDOMWrapper):
(WebCore::V8DOMWrapper::clearDOMWrapper):
* bindings/v8/WrapperTypeInfo.h:
(WebCore::toNative):
(WebCore::toWrapperTypeInfo):

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

6 years agoRename AttributeStyle => PresentationAttributeStyle across WebCore.
kling@webkit.org [Mon, 12 Nov 2012 23:52:12 +0000 (23:52 +0000)]
Rename AttributeStyle => PresentationAttributeStyle across WebCore.
<http://webkit.org/b/101975>

Rubber-stamped by Antti Koivisto.

The completely separate concepts of "attribute style" and "style attribute" were a bit too
easy to confuse in variable and method names. Reconfigure our terminology to call it
"presentation attribute style" instead of "attribute style".

* css/StyleResolver.cpp:
(WebCore::StyleResolver::sweepMatchedPropertiesCache):
(WebCore::StyleResolver::matchAllRules):
(WebCore::StyleResolver::canShareStyleWithElement):
* dom/Attr.cpp:
(WebCore::Attr::style):
* dom/ElementAttributeData.cpp:
(WebCore::MutableElementAttributeData::MutableElementAttributeData):
(WebCore::ElementAttributeData::reportMemoryUsage):
* dom/ElementAttributeData.h:
(WebCore::ElementAttributeData::presentationAttributeStyle):
(WebCore::ElementAttributeData::setPresentationAttributeStyle):
(ElementAttributeData):
* dom/Node.h:
(WebCore::Node::attributeStyleDirty):
(WebCore::Node::setPresentationAttributeStyleDirty):
(WebCore::Node::clearPresentationAttributeStyleDirty):
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
(WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
* dom/StyledElement.h:
(WebCore::StyledElement::additionalPresentationAttributeStyle):
(StyledElement):
(WebCore::StyledElement::collectStyleForPresentationAttribute):
(WebCore::StyledElement::presentationAttributeStyle):
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::collectStyleForPresentationAttribute):
* html/HTMLBRElement.h:
(HTMLBRElement):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
* html/HTMLBodyElement.h:
(HTMLBodyElement):
* html/HTMLDivElement.cpp:
(WebCore::HTMLDivElement::collectStyleForPresentationAttribute):
* html/HTMLDivElement.h:
(HTMLDivElement):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::applyBorderAttributeToStyle):
(WebCore::HTMLElement::mapLanguageAttributeToLocale):
(WebCore::HTMLElement::collectStyleForPresentationAttribute):
(WebCore::HTMLElement::applyAlignmentAttributeToStyle):
(WebCore::HTMLElement::addHTMLLengthToStyle):
* html/HTMLElement.h:
(HTMLElement):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::collectStyleForPresentationAttribute):
* html/HTMLEmbedElement.h:
(HTMLEmbedElement):
* html/HTMLFontElement.cpp:
(WebCore::HTMLFontElement::collectStyleForPresentationAttribute):
* html/HTMLFontElement.h:
(HTMLFontElement):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::collectStyleForPresentationAttribute):
* html/HTMLFrameSetElement.h:
(HTMLFrameSetElement):
* html/HTMLHRElement.cpp:
(WebCore::HTMLHRElement::collectStyleForPresentationAttribute):
* html/HTMLHRElement.h:
(HTMLHRElement):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::collectStyleForPresentationAttribute):
* html/HTMLIFrameElement.h:
(HTMLIFrameElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::collectStyleForPresentationAttribute):
* html/HTMLImageElement.h:
(HTMLImageElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::collectStyleForPresentationAttribute):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::collectStyleForPresentationAttribute):
* html/HTMLLIElement.h:
(HTMLLIElement):
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::collectStyleForPresentationAttribute):
* html/HTMLMarqueeElement.h:
(HTMLMarqueeElement):
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::collectStyleForPresentationAttribute):
* html/HTMLOListElement.h:
(HTMLOListElement):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::collectStyleForPresentationAttribute):
* html/HTMLObjectElement.h:
(HTMLObjectElement):
* html/HTMLParagraphElement.cpp:
(WebCore::HTMLParagraphElement::collectStyleForPresentationAttribute):
* html/HTMLParagraphElement.h:
(HTMLParagraphElement):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::collectStyleForPresentationAttribute):
* html/HTMLPlugInElement.h:
(HTMLPlugInElement):
* html/HTMLPreElement.cpp:
(WebCore::HTMLPreElement::collectStyleForPresentationAttribute):
* html/HTMLPreElement.h:
(HTMLPreElement):
* html/HTMLTableCaptionElement.cpp:
(WebCore::HTMLTableCaptionElement::collectStyleForPresentationAttribute):
* html/HTMLTableCaptionElement.h:
(HTMLTableCaptionElement):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::collectStyleForPresentationAttribute):
(WebCore::HTMLTableCellElement::additionalPresentationAttributeStyle):
* html/HTMLTableCellElement.h:
(HTMLTableCellElement):
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::collectStyleForPresentationAttribute):
(WebCore::HTMLTableColElement::additionalPresentationAttributeStyle):
* html/HTMLTableColElement.h:
(HTMLTableColElement):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::collectStyleForPresentationAttribute):
(WebCore::HTMLTableElement::additionalPresentationAttributeStyle):
* html/HTMLTableElement.h:
(HTMLTableElement):
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute):
* html/HTMLTablePartElement.h:
(HTMLTablePartElement):
* html/HTMLTableSectionElement.cpp:
(WebCore::HTMLTableSectionElement::additionalPresentationAttributeStyle):
* html/HTMLTableSectionElement.h:
(HTMLTableSectionElement):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::collectStyleForPresentationAttribute):
* html/HTMLTextAreaElement.h:
(HTMLTextAreaElement):
* html/HTMLUListElement.cpp:
(WebCore::HTMLUListElement::collectStyleForPresentationAttribute):
* html/HTMLUListElement.h:
(HTMLUListElement):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::collectStyleForPresentationAttribute):
* html/HTMLVideoElement.h:
(HTMLVideoElement):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::collectStyleForPresentationAttribute):
* mathml/MathMLElement.h:
(MathMLElement):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::collectStyleForPresentationAttribute):
* svg/SVGImageElement.h:
(SVGImageElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::collectStyleForPresentationAttribute):
* svg/SVGStyledElement.h:
(SVGStyledElement):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::collectStyleForPresentationAttribute):
* svg/SVGTextContentElement.h:
(SVGTextContentElement):

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

6 years agoUnreviewed. Roll Chromium DEPS.
abarth@webkit.org [Mon, 12 Nov 2012 23:47:48 +0000 (23:47 +0000)]
Unreviewed. Roll Chromium DEPS.

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

6 years ago[Chromium] Added more Hi-DPI wont-fixes.
dglazkov@chromium.org [Mon, 12 Nov 2012 23:32:56 +0000 (23:32 +0000)]
[Chromium] Added more Hi-DPI wont-fixes.

* platform/chromium/TestExpectations: Added wont-fixes.

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

6 years ago[V8] Many things crash when switching to V8's new aligned pointer API
abarth@webkit.org [Mon, 12 Nov 2012 23:30:38 +0000 (23:30 +0000)]
[V8] Many things crash when switching to V8's new aligned pointer API
https://bugs.webkit.org/show_bug.cgi?id=101994

Reviewed by Eric Seidel.

When using the aligned pointer API, we need to make sure to initialize
every internal field that we later read because the new API has better
error checks than the old API. This patch explicitly initializes the
enteredIsolatedWorldIndex internal field to zero for main worlds,
fixing the LayoutTest crashes from our previous attempt to move the
aligned pointer API.

* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initializeIfNeeded):

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

6 years agoPDFPlugin should support non-1 device scale factor
timothy_horton@apple.com [Mon, 12 Nov 2012 22:57:54 +0000 (22:57 +0000)]
PDFPlugin should support non-1 device scale factor
https://bugs.webkit.org/show_bug.cgi?id=101923

Reviewed by Alexey Proskuryakov.

Do the appropriate plumbing to ensure that PDFPlugin handles device scale factor > 1
(it's called contentsScaleFactor in plugins), both for normal drawing and for snapshotting.

* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add deviceScaleFactor setter/getter to PDFLayerController.
* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin): Override contentsScaleFactorChanged.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pdfDocumentDidLoad): Plumb device scale factor through to PDFLayerController.
(WebKit::PDFPlugin::contentsScaleFactorChanged): Plumb device scale factor through to PDFLayerController
when we're notified that it has changed.
(WebKit::PDFPlugin::snapshot): Create snapshots with the device scale factor applied.

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

6 years agoDFG ArithMul overflow check elimination is too aggressive
fpizlo@apple.com [Mon, 12 Nov 2012 22:54:42 +0000 (22:54 +0000)]
DFG ArithMul overflow check elimination is too aggressive
https://bugs.webkit.org/show_bug.cgi?id=101871

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

The code was ignoring the fact that ((a * b) | 0) == (((a | 0) * (b | 0)) | 0)
only holds if a * b < 2^53. So, I changed it to only enable the optimization
when a < 2^22 and b is an int32 (and vice versa), using a super trivial peephole
analysis to prove the inequality. I considered writing an epic forward flow
formulation that tracks the ranges of integer values but then I thought better
of it.

This also rewires the ArithMul integer speculation logic. Previously, we would
assume that an ArithMul was only UsedAsNumber if it escaped, and separately we
would decide whether to speculate integer based on a proof of the <2^22
inequality. Now, we treat the double rounding behavior of ArithMul as if the
result was UsedAsNumber even if it did not escape. Then we try to prove that
double rounding cannot happen by attemping to prove that a < 2^22. This then
feeds back into the decision of whether or not to speculate integer (if we fail
to prove a < 2^22 then we're UsedAsNumber, and if we're also MayOverflow then
that forces double speculation).

No performance impact. It just fixes a bug.

* dfg/DFGGraph.h:
(JSC::DFG::Graph::mulShouldSpeculateInteger):
* dfg/DFGPredictionPropagationPhase.cpp:
(PredictionPropagationPhase):
(JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant):
(JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive):
(JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo):
(JSC::DFG::PredictionPropagationPhase::propagate):

LayoutTests:

* fast/js/dfg-mul-big-integer-with-small-integer-and-bitor-expected.txt: Added.
* fast/js/dfg-mul-big-integer-with-small-integer-and-bitor.html: Added.
* fast/js/dfg-mul-big-integer-with-small-integer-and-detect-overflow-expected.txt: Added.
* fast/js/dfg-mul-big-integer-with-small-integer-and-detect-overflow.html: Added.
* fast/js/dfg-mul-big-integer-with-small-integer-expected.txt: Added.
* fast/js/dfg-mul-big-integer-with-small-integer.html: Added.
* fast/js/dfg-mul-big-integers-expected.txt: Added.
* fast/js/dfg-mul-big-integers.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-mul-big-integer-with-small-integer-and-bitor.js: Added.
(foo):
* fast/js/script-tests/dfg-mul-big-integer-with-small-integer-and-detect-overflow.js: Added.
(foo):
* fast/js/script-tests/dfg-mul-big-integer-with-small-integer.js: Added.
(foo):
* fast/js/script-tests/dfg-mul-big-integers.js: Added.
(foo):

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

6 years agoDFG should not emit function checks if we've already proved that the operand is that...
fpizlo@apple.com [Mon, 12 Nov 2012 22:52:32 +0000 (22:52 +0000)]
DFG should not emit function checks if we've already proved that the operand is that exact function
https://bugs.webkit.org/show_bug.cgi?id=101885

Reviewed by Oliver Hunt.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::filterByValue):
(AbstractValue):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):

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

6 years agoRename RemoteLayerTreeController to RemoteLayerTreeContext
andersca@apple.com [Mon, 12 Nov 2012 22:45:05 +0000 (22:45 +0000)]
Rename RemoteLayerTreeController to RemoteLayerTreeContext
https://bugs.webkit.org/show_bug.cgi?id=101993

Reviewed by Andreas Kling.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
(RemoteGraphicsLayer):
* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
(WebKit::RemoteGraphicsLayer::create):
(WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
(WebKit::RemoteGraphicsLayer::flushCompositingStateForThisLayerOnly):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.h.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.mm.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
(RemoteLayerTreeDrawingArea):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::graphicsLayerFactory):
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):

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

6 years agoReduce the crazy number of parameters to RenderLayer painting member functions
simon.fraser@apple.com [Mon, 12 Nov 2012 22:42:22 +0000 (22:42 +0000)]
Reduce the crazy number of parameters to RenderLayer painting member functions
https://bugs.webkit.org/show_bug.cgi?id=101895

Reviewed by Beth Dakin.

The various RenderLayer::paintLayer* functions took a lot of arguments, most
of which were passed down directly to descendants.

Gather these arguments into a LayerPaintingInfo struct.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint): Create a LayerPaintingInfo struct to pass
to descendant paint calls.
(WebCore::RenderLayer::paintOverlayScrollbars): Ditto.
(WebCore::RenderLayer::paintLayer): When painting transformed layers, we
make a new LayerPaintingInfo because the root layer is shifted.
(WebCore::RenderLayer::paintLayerContentsAndReflection):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::paintPaginatedChildLayer):
(WebCore::RenderLayer::paintChildLayerIntoColumns): Create a new LayerPaintingInfo
struct for column painting.
* rendering/RenderLayer.h:
(WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
(LayerPaintingInfo):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer): Build a LayerPaintingInfo
to enter layer painting.
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::paint): Ditto.

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

6 years agowebkitpy: integrate pylint into check-webkit-style, part I
dpranke@chromium.org [Mon, 12 Nov 2012 22:36:01 +0000 (22:36 +0000)]
webkitpy: integrate pylint into check-webkit-style, part I
https://bugs.webkit.org/show_bug.cgi?id=101285

Reviewed by Ojan Vafai.

This patch re-works lint-webkitpy so that the logic is pushed
into check-webkit-style (mostly); we don't yet control which
messages are displayed using the rules in webkitpy/style/checker.py
(we're still using the pylintrc to suppress messages instead),
but otherwise things work. For now we will only report pylint
"errors", not warnings.

* Scripts/lint-webkitpy:
* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checkers/python.py:
(PythonChecker):
(PythonChecker.check):
(PythonChecker._check_pep8):
(PythonChecker._check_pylint):
(Pylinter):
(Pylinter.__init__):
(Pylinter.run):
(_FilteredStringIO):
(_FilteredStringIO.__init__):
(_FilteredStringIO.write):
(_FilteredStringIO._filter):
* Scripts/webkitpy/style/checkers/python_unittest.py:
(PythonCheckerTest.test_check):
* Scripts/webkitpy/style/checkers/python_unittest_input.py:

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

6 years agonrwt: remove a bunch of broken chromium-specific flags
dpranke@chromium.org [Mon, 12 Nov 2012 22:33:40 +0000 (22:33 +0000)]
nrwt: remove a bunch of broken chromium-specific flags
https://bugs.webkit.org/show_bug.cgi?id=101979

Reviewed by Tony Chang.

There were a bunch of chromium-specific flags that used to be
supported by NRWT (and handled and passed on to DRT) but have
probably been broken for a long time and are currently ignored.

This patch removes all of those flags; the rule of thumb going forward
is that we should only add flags that affect how the python code functions.
If a flag is just passed verbatim to DRT, the user can use --additional-drt-flag
for that.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.setUp):

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

6 years agoAdd debug only code to dump the contents of a transaction
andersca@apple.com [Mon, 12 Nov 2012 22:30:01 +0000 (22:30 +0000)]
Add debug only code to dump the contents of a transaction
https://bugs.webkit.org/show_bug.cgi?id=101991

Reviewed by Andreas Kling.

* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::writeIndent):
(WebKit::dumpChangedLayers):
(WebKit::RemoteLayerTreeTransaction::dump):

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

6 years ago[Chromium] Updated expectations for calendar-picker.
dglazkov@chromium.org [Mon, 12 Nov 2012 22:26:28 +0000 (22:26 +0000)]
[Chromium] Updated expectations for calendar-picker.

* platform/chromium/TestExpectations: Updated expectations.

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

6 years ago[BlackBerry] When opening an image it does not scale to fit our window
zhajiang@rim.com [Mon, 12 Nov 2012 22:22:13 +0000 (22:22 +0000)]
[BlackBerry] When opening an image it does not scale to fit our window
https://bugs.webkit.org/show_bug.cgi?id=101778

Jacky Jiang  <zhajiang@rim.com>.
Reviewed by Rob Buis.
Internally reviewed by Konrad Piascik.

PR: 230935
For image document, the actual image size can be different with the
contents size. Zoom the document based on the image width so that
images can fit the screen horizontally. Set 2.0 as the maximum zoom to
fit scale for image document so that very small images won't get
ridiculous large scales during the initial load.

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

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

6 years agoMarked transforms/3d/point-mapping tests as flakey.
dglazkov@chromium.org [Mon, 12 Nov 2012 22:21:18 +0000 (22:21 +0000)]
Marked transforms/3d/point-mapping tests as flakey.
https://bugs.webkit.org/show_bug.cgi?id=101988

* platform/chromium/TestExpectations: Added Expectations.

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

6 years ago[Chromium] Added expectations for platform/chromium/compositing/force-compositing...
dglazkov@chromium.org [Mon, 12 Nov 2012 22:13:10 +0000 (22:13 +0000)]
[Chromium] Added expectations for platform/chromium/compositing/force-compositing-mode/overflow-iframe-layer.html
https://bugs.webkit.org/show_bug.cgi?id=101986

* platform/chromium/TestExpectations: Added expectations.

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

6 years agoStore name changes in the layer transaction
andersca@apple.com [Mon, 12 Nov 2012 21:59:39 +0000 (21:59 +0000)]
Store name changes in the layer transaction
https://bugs.webkit.org/show_bug.cgi?id=101981

Reviewed by Andreas Kling.

* Shared/mac/RemoteLayerTreeTransaction.h:
(LayerProperties):
Add new LayerProperties class.

(RemoteLayerTreeTransaction):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
Find the changed layer properties for the given layer and apply the changed properties.

* WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
(WebKit::RemoteGraphicsLayer::layerID):
Add new getter.

* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
(WebKit::generateLayerID):
(WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
Give each remote graphics layer a unique ID.

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

6 years agoNetworkProcess: Use an accurate shouldContentSniff value when creating ResourceHandles
beidson@apple.com [Mon, 12 Nov 2012 21:56:33 +0000 (21:56 +0000)]
NetworkProcess: Use an accurate shouldContentSniff value when creating ResourceHandles
https://bugs.webkit.org/show_bug.cgi?id=101872

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Expose shouldSniffContent to pass it along to the NetworkProcess.

* loader/ResourceLoader.h:
(WebCore::ResourceLoader::shouldSniffContent):

Source/WebKit2:

The WebProcess now passes "shouldContentSniff" over to the NetworkProcess with the requests so it can be respected.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::scheduleNetworkRequest): Update to pass through "shouldContentSniff"
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

* NetworkProcess/NetworkRequest.cpp:
(WebKit::NetworkRequest::NetworkRequest):
(WebKit::NetworkRequest::start):
* NetworkProcess/NetworkRequest.h:
(WebKit::NetworkRequest::create):

* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::scheduleNetworkRequest): Update to pass through "shouldContentSniff"
* NetworkProcess/NetworkResourceLoadScheduler.h:
* WebProcess/Network/NetworkProcessConnection.h:

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad): Update to pass through "shouldContentSniff"

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

6 years ago[Chromium] WonFixed hi-DPI related tests.
dglazkov@chromium.org [Mon, 12 Nov 2012 21:54:35 +0000 (21:54 +0000)]
[Chromium] WonFixed hi-DPI related tests.
https://bugs.webkit.org/show_bug.cgi?id=90022

* platform/chromium/TestExpectations: Added expectations.

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

6 years agoUnreviewed, update chromium-mac baselines.
vollick@chromium.org [Mon, 12 Nov 2012 21:45:49 +0000 (21:45 +0000)]
Unreviewed, update chromium-mac baselines.

* platform/chromium-mac-lion/compositing/repaint/invalidations-on-composited-layers-expected.txt: Removed.
* platform/chromium-mac-snowleopard/compositing/repaint/invalidations-on-composited-layers-expected.txt: Removed.
* platform/chromium-mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:

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

6 years ago[chromium] Supressing a Skia change to prevent layout test breakage.
schenney@chromium.org [Mon, 12 Nov 2012 21:45:18 +0000 (21:45 +0000)]
[chromium] Supressing a Skia change to prevent layout test breakage.

Unreviewed expectations management.

* skia_webkit.gyp: Added supression 'SK_IGNORE_FAST_BLURRECT=1'

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

6 years ago[EFL][WK2] Add --device-pixel-ratio command line option to EFL MiniBrowser
commit-queue@webkit.org [Mon, 12 Nov 2012 21:36:23 +0000 (21:36 +0000)]
[EFL][WK2] Add --device-pixel-ratio command line option to EFL MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=101930

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

Added --device-pixel-ratio command line option to EFL MiniBrowser which sets
the ratio between the CSS units and device pixels when the content is unscaled.
Option is applied for all the views created by mini browser.

* MiniBrowser/efl/main.c:
(window_create):
(elm_main):

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

6 years ago[BlackBerry] Use keyevents instead of editor commands for backspace
commit-queue@webkit.org [Mon, 12 Nov 2012 21:26:22 +0000 (21:26 +0000)]
[BlackBerry] Use keyevents instead of editor commands for backspace
https://bugs.webkit.org/show_bug.cgi?id=101663

Patch by Nima Ghanavatian <nghanavatian@rim.com> on 2012-11-12
Reviewed by Rob Buis.

PR229395
Sending keyEvents for backspace and switching from KeyChar
to KeyDown since we are still receiving an unadultered KeyUp
from the input service. This was causing us to get two keyUps
for regular keys and no key downs for backspace since it was
triggering an editor command and bypassing JS listeners.

Reviewed internally by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::handleKeyboardInput):
(BlackBerry::WebKit::relativeRightOffset):
(WebKit):
(BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
(BlackBerry::WebKit::InputHandler::setText):

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

6 years agoMore work towards packaging layer changes up into a transaction object
andersca@apple.com [Mon, 12 Nov 2012 21:16:39 +0000 (21:16 +0000)]
More work towards packaging layer changes up into a transaction object
https://bugs.webkit.org/show_bug.cgi?id=101969

Reviewed by Andreas Kling.

* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
(WebKit::RemoteLayerTreeTransaction::~RemoteLayerTreeTransaction):
(WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
Add empty stubs.

* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
(WebKit::RemoteGraphicsLayer::flushCompositingStateForThisLayerOnly):
Call layerPropertiesChanged on the current transaction.

* WebProcess/WebPage/mac/RemoteLayerTreeController.h:
* WebProcess/WebPage/mac/RemoteLayerTreeController.mm:
(WebKit::RemoteLayerTreeController::RemoteLayerTreeController):
Initialize m_currentTransaction till 0.

(WebKit::RemoteLayerTreeController::currentTransaction):
Add getter. This may only be called from beneath flushLayers.

(WebKit::RemoteLayerTreeController::flushLayers):
Create a transaction before flusing the compositing state.

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

6 years agoUnreviewed, update chromium-mac-lion baselines after r134279.
dpranke@chromium.org [Mon, 12 Nov 2012 21:14:48 +0000 (21:14 +0000)]
Unreviewed, update chromium-mac-lion baselines after r134279.

* platform/chromium-mac-lion/fast/repaint/delete-into-nested-block-expected.png: Added.
* platform/chromium-mac-lion/fast/repaint/inline-outline-repaint-expected.png: Added.
* platform/chromium-mac-lion/fast/repaint/no-caret-repaint-in-non-content-editable-element-expected.png: Added.
* platform/chromium-mac-lion/fast/repaint/selection-after-delete-expected.png: Added.
* platform/chromium-mac-lion/svg/custom/foreignObject-crash-on-hover-expected.png: Added.
* platform/chromium-mac-lion/svg/custom/hit-test-unclosed-subpaths-expected.png: Added.
* platform/chromium-mac-lion/svg/custom/hit-test-with-br-expected.png: Added.

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

6 years ago[Chromium] Update expectations for calendar-picker tests..
dglazkov@chromium.org [Mon, 12 Nov 2012 21:10:17 +0000 (21:10 +0000)]
[Chromium] Update expectations for calendar-picker tests..
https://bugs.webkit.org/show_bug.cgi?id=101561

* platform/chromium/TestExpectations: Updated expectations.

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

6 years ago[chromium] Delete WebCompositor.h
aelias@chromium.org [Mon, 12 Nov 2012 21:02:11 +0000 (21:02 +0000)]
[chromium] Delete WebCompositor.h
https://bugs.webkit.org/show_bug.cgi?id=101137

Reviewed by James Robinson.

The implementation of this class is getting deleted and all
WebKit-side users are already going via WebCompositorSupport instead.

Source/Platform:

* Platform.gypi:
* chromium/public/WebCompositor.h: Removed.

Source/WebKit/chromium:

* tests/WebCompositorInputHandlerImplTest.cpp:

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

6 years agoUnreviewd, update chromium-mac-mountainlion expectations for a few tests.
dpranke@chromium.org [Mon, 12 Nov 2012 20:58:20 +0000 (20:58 +0000)]
Unreviewd, update chromium-mac-mountainlion expectations for a few tests.

* platform/chromium/TestExpectations:

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

6 years agoLayout Test compositing/repaint/invalidations-on-composited-layers.html is failing...
vollick@chromium.org [Mon, 12 Nov 2012 20:51:27 +0000 (20:51 +0000)]
Layout Test compositing/repaint/invalidations-on-composited-layers.html is failing/flaky
https://bugs.webkit.org/show_bug.cgi?id=101219

Reviewed by James Robinson.

Force a style recalc before starting repaint tracking.

* compositing/repaint/invalidations-on-composited-layers-expected.txt:
* compositing/repaint/invalidations-on-composited-layers.html:
* platform/chromium/TestExpectations:
* platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:

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

6 years agoFix memory leak in createSurfaceForBackingStore()
commit-queue@webkit.org [Mon, 12 Nov 2012 20:37:52 +0000 (20:37 +0000)]
Fix memory leak in createSurfaceForBackingStore()
https://bugs.webkit.org/show_bug.cgi?id=101941

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-11-12
Reviewed by Kenneth Rohde Christiansen.

Fix memory leak in createSurfaceForBackingStore(),
the RefPtr<cairo_surface_t> should be released
when returned since we pass ownership to the
caller.

No new tests, no behavior change for layout tests.

* platform/graphics/efl/CairoUtilitiesEfl.cpp:
(WebCore::createSurfaceForBackingStore):

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

6 years agoFix Chromium DEPS version after accidentally checking in HEAD a couple days ago.
dpranke@chromium.org [Mon, 12 Nov 2012 20:32:56 +0000 (20:32 +0000)]
Fix Chromium DEPS version after accidentally checking in HEAD a couple days ago.

Unreviewed, build fix.

* DEPS:

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

6 years ago[BlackBerry] Update to new proxyInfo API
commit-queue@webkit.org [Mon, 12 Nov 2012 20:32:55 +0000 (20:32 +0000)]
[BlackBerry] Update to new proxyInfo API
https://bugs.webkit.org/show_bug.cgi?id=101945

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

Internal PR: 234680
Reviewed internally by: Leo Yang

The proxyAddress, proxyUsername and proxyPassword methods in BlackBerry::Platform::Settings
have been replaced with a single, more efficient proxyInfo method.

No new tests because this is an API update with no behaviour change.

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

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

6 years agoUnreviewed, update chromium-mac-mountainlion baselines.
dpranke@chromium.org [Mon, 12 Nov 2012 20:15:52 +0000 (20:15 +0000)]
Unreviewed, update chromium-mac-mountainlion baselines.

* platform/chromium-mac/fast/repaint/delete-into-nested-block-expected.png:
* platform/chromium-mac/fast/repaint/inline-outline-repaint-expected.png:
* platform/chromium-mac/fast/repaint/no-caret-repaint-in-non-content-editable-element-expected.png:
* platform/chromium-mac/fast/repaint/selection-after-delete-expected.png:
* platform/chromium-mac/svg/custom/foreignObject-crash-on-hover-expected.png:
* platform/chromium-mac/svg/custom/hit-test-unclosed-subpaths-expected.png:
* platform/chromium-mac/svg/custom/hit-test-with-br-expected.png:

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

6 years agoMore work on remote layer flushing
andersca@apple.com [Mon, 12 Nov 2012 20:14:48 +0000 (20:14 +0000)]
More work on remote layer flushing
https://bugs.webkit.org/show_bug.cgi?id=101960

Reviewed by Andreas Kling.

* WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
(WebKit::RemoteGraphicsLayer::flushCompositingState):
Call recursiveCommitChanges.

(WebKit::RemoteGraphicsLayer::flushCompositingStateForThisLayerOnly):
Add stub function for now.

(WebKit::RemoteGraphicsLayer::recursiveCommitChanges):
Call flushCompositingStateForThisLayerOnly and then call recursiveCommitChanges recursively on all the child layers.

* WebProcess/WebPage/mac/RemoteLayerTreeController.h:
* WebProcess/WebPage/mac/RemoteLayerTreeController.mm:
(WebKit::RemoteLayerTreeController::create):
(WebKit::RemoteLayerTreeController::RemoteLayerTreeController):
This now takes a web page.

(WebKit::RemoteLayerTreeController::setRootLayer):
Add empty function.

(WebKit::RemoteLayerTreeController::layerFlushTimerFired):
Call flushLayers explicitly.

(WebKit::RemoteLayerTreeController::flushLayers):
Force a layout and then sync all the compositing layers.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
RemoteLayerTreeController::create now takes a web page.

(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
Call the remote layer tree controller.

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

6 years agoremove the chromium-mac-mountainlion TestExpectations file
dpranke@chromium.org [Mon, 12 Nov 2012 20:08:27 +0000 (20:08 +0000)]
remove the chromium-mac-mountainlion TestExpectations file
https://bugs.webkit.org/show_bug.cgi?id=101789

Reviewed by Ojan Vafai.

Nearly all of the tests have been updated for 10.8 and the remaining
failures have been merged into the main TestExpectations file. We
don't need this hook any more.

Tools:

* Scripts/webkitpy/layout_tests/port/chromium_mac.py:
(ChromiumMacPort.operating_system):
* Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
(ChromiumMacPortTest.test_path_to_image_diff):

LayoutTests:

* platform/chromium-mac-mountainlion/TestExpectations: Removed.

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

6 years agoUnreviewed, rolling out r126157.
commit-queue@webkit.org [Mon, 12 Nov 2012 19:28:03 +0000 (19:28 +0000)]
Unreviewed, rolling out r126157.
http://trac.webkit.org/changeset/126157
https://bugs.webkit.org/show_bug.cgi?id=101954

This patch caused (untestable) regression of the volume
property on Mac, Win, and Blackberry ports. (Requested by
jernoble on #webkit).

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

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::setVolume):
(WebCore::MediaPlayer::setMuted):
(WebCore::MediaPlayer::setPreservesPitch):
(WebCore::MediaPlayer::setSize):
(WebCore::MediaPlayer::setVisible):
(WebCore::MediaPlayer::setPreload):

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

6 years agoSource/WebCore: Specified width CSS tables should not include border and padding...
commit-queue@webkit.org [Mon, 12 Nov 2012 19:20:26 +0000 (19:20 +0000)]
Source/WebCore: Specified width CSS tables should not include border and padding as part of that width.
https://bugs.webkit.org/show_bug.cgi?id=77028

Patch by Arpita Bahuguna <arpitabahuguna@gmail.com> on 2012-11-12
Reviewed by Julien Chaffraix.

CSS table width should not include border and padding even though HTML
tables size as though their width includes border/padding.

This is applicable for all CSS tables with specified widths.

The change would also make our rendering of CSS tables with specified
width similar to that of Opera, IE and FF.

Test: fast/table/css-table-width-with-border-padding.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
Added check for all (positive) specified widths for CSS tables to
consider border and padding outside of the specified width.

LayoutTests: Specified width CSS tables should not include border and padding as part of that width.
https://bugs.webkit.org/show_bug.cgi?id=77028

Patch by Arpita Bahuguna <arpitabahuguna@gmail.com> on 2012-11-12
Reviewed by Julien Chaffraix.

* fast/table/css-table-width-with-border-padding-expected.html: Added.
* fast/table/css-table-width-with-border-padding.html: Added.
Test added for verifying that for specified width css tables, border
and padding are not considered as part of the specified table width.

The test also verifies the width values for the different box-sizing
properties viz, content-box, border-box and padding-box.

Out of these padding-box is currently not supported even though
the test verifies against this property as well.
The expected width values added for padding-box are thus incorrect
and should be lesser by 100px (padding value).

* fast/table/min-width-css-block-table-expected.txt:
* fast/table/min-width-css-inline-table-expected.txt:
* fast/table/script-tests/min-width-helpers.js:
Existing test values changed for CSS tables that have percent width
specified since for both these tests, border and padding has been
specified for all the tables.

As a result of this fix, the specified table width shall no longer
include the border and padding values thereby increasing our table
width size by exactly 30px (the value of border and padding in these
tests).
The new values for percent width css tables now match those for FF
and Opera.

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

6 years agoMove resolving blob references to FormData.
allan.jensen@digia.com [Mon, 12 Nov 2012 19:13:08 +0000 (19:13 +0000)]
Move resolving blob references to FormData.
https://bugs.webkit.org/show_bug.cgi?id=101754

Reviewed by Simon Hausmann.

Resolving Blob-references to a set of just File and Data is done similar by several platforms.
This patch adds a generic implementation in FormData and uses that from CFNetwork, Qt and
BlackBerry network implementation.

* platform/network/FormData.cpp:
(WebCore::appendBlobResolved):
(WebCore::FormData::resolveBlobReferences):
* platform/network/FormData.h:
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::setHTTPBody):
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::FormDataIODevice::prepareFormElements):

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

6 years ago[Chromium-Android] Restart the device's shell in root before pushing data
peter@chromium.org [Mon, 12 Nov 2012 19:12:12 +0000 (19:12 +0000)]
[Chromium-Android] Restart the device's shell in root before pushing data
https://bugs.webkit.org/show_bug.cgi?id=101944

Reviewed by Adam Barth.

Setting up md5sum and pushing the executable, fonts and test resources was
unintentionally being done prior to executing the "adb root" command,
which restarts the device's shell to be root. Since test data is still
being pushed to /data/local/tmp, writing to which requires root access,
devices not running as root would throw a ScriptError.

* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidDriver._setup_test):

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

6 years agoLayer property changes should schedule a remote layer flush
andersca@apple.com [Mon, 12 Nov 2012 19:04:43 +0000 (19:04 +0000)]
Layer property changes should schedule a remote layer flush
https://bugs.webkit.org/show_bug.cgi?id=101951

Reviewed by Andreas Kling.

* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
New class. For now this just contains the changed layer properties flags but this will be extended
to cover changed layers as well.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
(WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
Initialize m_uncommittedLayerChanges.

(WebKit::RemoteGraphicsLayer::setName):
Set the name and call noteLayerPropertiesChanged.

(WebKit::RemoteGraphicsLayer::noteLayerPropertiesChanged):
Notify that a flush is required (if required).

* WebProcess/WebPage/mac/RemoteLayerTreeController.h:
Add a layer flush timer.

* WebProcess/WebPage/mac/RemoteLayerTreeController.mm:
(WebKit::RemoteLayerTreeController::RemoteLayerTreeController):
Initialize the layer flush timer.

(WebKit::RemoteLayerTreeController::scheduleLayerFlush):
Schedule the layer flush timer if needed.

(WebKit::RemoteLayerTreeController::layerFlushTimerFired):
Empty stub for now.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
Call the remote layer tree controller.

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

6 years ago[BlackBerry] Crash in InRegionScrollerPrivate.
rwlbuis@webkit.org [Mon, 12 Nov 2012 18:43:19 +0000 (18:43 +0000)]
[BlackBerry] Crash in InRegionScrollerPrivate.
https://bugs.webkit.org/show_bug.cgi?id=101399

Reviewed by Yong Li.

Fix warning caused by the previous patch for this bug (r133679).

* WebKitSupport/InRegionScrollableArea.cpp:
(BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):

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

6 years agoGraphicsSurfaceGLX does not handle transparency correctly.
zeno.albisser@digia.com [Mon, 12 Nov 2012 18:36:56 +0000 (18:36 +0000)]
GraphicsSurfaceGLX does not handle transparency correctly.
https://bugs.webkit.org/show_bug.cgi?id=101943

GraphicsSurfacGLX must consistently use RGBA texture format.
glXCreateWindow must be called after creating the XWindow
that serves as a temporary offscreen texture storage, in order
to allow for transparency.
When creating the offscreen XWindow we must make sure,
that we use a framebuffer configuration that supports
an alpha mask.

Reviewed by Noam Rosenthal.

* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore):
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createSurface):
(GraphicsSurfacePrivate):
(WebCore::GraphicsSurface::platformPaintToTextureMapper):

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

6 years agoUnreviewed, rolling out r134225.
commit-queue@webkit.org [Mon, 12 Nov 2012 18:19:51 +0000 (18:19 +0000)]
Unreviewed, rolling out r134225.
http://trac.webkit.org/changeset/134225
https://bugs.webkit.org/show_bug.cgi?id=101948

Appears to have broken the EFL and GTK builds (Requested by
abarth on #webkit).

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

* bindings/js/JSHTMLElementCustom.cpp:
(WebCore):
(WebCore::JSHTMLElement::itemValue):
(WebCore::JSHTMLElement::setItemValue):
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore):
(WebCore::V8HTMLElement::itemValueAccessorGetter):
(WebCore::V8HTMLElement::itemValueAccessorSetter):
* html/HTMLElement.idl:

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

6 years agohitTestResultAtPoint does two hit-tests if called on non main frame
allan.jensen@digia.com [Mon, 12 Nov 2012 18:13:09 +0000 (18:13 +0000)]
hitTestResultAtPoint does two hit-tests if called on non main frame
https://bugs.webkit.org/show_bug.cgi?id=101915

Reviewed by Antonio Gomes.

Always redirect hitTestResultAtPoint to the main-frame. This used to being
done on every result that hit anything, which caused running the expensive
hit-tests multiple times in almost all cases.

* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):

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

6 years agoIndexedDB: convert tests from setVersion to upgradeneeded
dgrogan@chromium.org [Mon, 12 Nov 2012 18:06:32 +0000 (18:06 +0000)]
IndexedDB: convert tests from setVersion to upgradeneeded
https://bugs.webkit.org/show_bug.cgi?id=101676

Reviewed by Tony Chang.

A la bug 92037, add a function to shared.js that sets up the database
for tests where opening and versioning isn't the focus.

* storage/indexeddb/create-object-store-options-expected.txt:
* storage/indexeddb/createObjectStore-name-argument-required-expected.txt:
* storage/indexeddb/createObjectStore-null-name-expected.txt:
  ...many tests and expected files...

* storage/indexeddb/resources/shared.js:
  The new utility function indexedDBTest lives here.

* storage/indexeddb/values-odd-types-expected.txt:

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

6 years ago[EFL] Add implementations of device - user conversion methods
kenneth@webkit.org [Mon, 12 Nov 2012 17:59:42 +0000 (17:59 +0000)]
[EFL] Add implementations of device - user conversion methods
https://bugs.webkit.org/show_bug.cgi?id=101938

Reviewed by Laszlo Gombos.

Consider the deviceScaleFactor when convertion to/from user
and device units.

This affects DOM API's such as window.moveTo, resizeTo etc.

* UIProcess/efl/PageClientBase.cpp:
* UIProcess/efl/PageClientBase.h:
(PageClientBase):
* UIProcess/efl/PageClientDefaultImpl.cpp:
(WebKit::PageClientDefaultImpl::convertToDeviceSpace):
(WebKit):
(WebKit::PageClientDefaultImpl::convertToUserSpace):
* UIProcess/efl/PageClientDefaultImpl.h:
(PageClientDefaultImpl):
* UIProcess/efl/PageClientLegacyImpl.cpp:
(WebKit::PageClientLegacyImpl::convertToDeviceSpace):
(WebKit):
(WebKit::PageClientLegacyImpl::convertToUserSpace):
* UIProcess/efl/PageClientLegacyImpl.h:
(PageClientLegacyImpl):

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

6 years ago[V8][JSC] ScriptProfileNode::callUID needs not to be [Custom]
haraken@chromium.org [Mon, 12 Nov 2012 17:57:43 +0000 (17:57 +0000)]
[V8][JSC] ScriptProfileNode::callUID needs not to be [Custom]
https://bugs.webkit.org/show_bug.cgi?id=101892

Reviewed by Adam Barth.

Source/JavaScriptCore:

Added callUID(), which enables us to kill custom bindings for ScriptProfileNode::callUID.

* profiler/ProfileNode.h:
(JSC::ProfileNode::callUID):

Source/WebCore:

We can remove [Custom] from callUID in ScriptProfileNode.idl.

No tests. No change in behavior.

* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSScriptProfileNodeCustom.cpp: Removed.
* bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
* inspector/ScriptProfileNode.idl:

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

6 years ago[V8] Performance::memory getter needs not to be [Custom]
haraken@chromium.org [Mon, 12 Nov 2012 17:50:23 +0000 (17:50 +0000)]
[V8] Performance::memory getter needs not to be [Custom]
https://bugs.webkit.org/show_bug.cgi?id=101890

Reviewed by Adam Barth.

No tests. No change in behavior.

* UseV8.cmake:
* WebCore.gypi:
* bindings/v8/custom/V8PerformanceCustom.cpp: Removed.
* page/Performance.idl:

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

6 years ago[V8][JSC] HTMLOptionsCollection::length needs not to be [Custom]
haraken@chromium.org [Mon, 12 Nov 2012 17:42:19 +0000 (17:42 +0000)]
[V8][JSC] HTMLOptionsCollection::length needs not to be [Custom]
https://bugs.webkit.org/show_bug.cgi?id=101888

Reviewed by Adam Barth.

We can remove [Custom] from getter. It is possible to remove [Custom]
from setter, but it changes the current behavior.
(I think the current implementation of the setter is wrong.
I'll fix it in another patch.)

No tests. No change in behavior.

* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
* html/HTMLOptionsCollection.idl:

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

6 years ago[EFL][WK2][AC] Black screen when applications use software backend.
commit-queue@webkit.org [Mon, 12 Nov 2012 17:34:46 +0000 (17:34 +0000)]
[EFL][WK2][AC] Black screen when applications use software backend.
https://bugs.webkit.org/show_bug.cgi?id=101659

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-11-12
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Add a utility method to create a cairo_surface_t from a given Evas_Object_Image.

No new tests. Will be covered when running existing tests without enabling openGL.

* platform/graphics/efl/CairoUtilitiesEfl.cpp:
(WebCore::createSurfaceForImage):
(WebCore):
* platform/graphics/efl/CairoUtilitiesEfl.h:
(WebCore):

Source/WebKit2:

If creating openGL context fails, automatically fallback to software rendering.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::EwkViewImpl):
(EwkViewImpl::displayTimerFired):
(EwkViewImpl::createGLSurface):
(EwkViewImpl::enterAcceleratedCompositingMode):
* UIProcess/API/efl/EwkViewImpl.h:
(EwkViewImpl::hardwareAccelerationEnabled):
(EwkViewImpl):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::LayerTreeRenderer):
(WebKit::LayerTreeRenderer::ensureRootLayer):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(WebKit::LayerTreeRenderer::setAccelerationMode):
(LayerTreeRenderer):
* UIProcess/efl/PageClientBase.cpp:
(WebKit::PageClientBase::createDrawingAreaProxy):

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

6 years agoUnreviewed. Fix make distcheck.
carlosgc@webkit.org [Mon, 12 Nov 2012 16:43:14 +0000 (16:43 +0000)]
Unreviewed. Fix make distcheck.

Source/JavaScriptCore:

* GNUmakefile.list.am: Add missing header.

Source/WebCore:

* GNUmakefile.am: Remove editing from IDL_PATH since it doesn't
contain idl files anymore.
* GNUmakefile.list.am: Add missing header files.

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

6 years agoMediaStream API: Make sure that MediaConstraints only has optional and mandatory...
tommyw@google.com [Mon, 12 Nov 2012 16:34:45 +0000 (16:34 +0000)]
MediaStream API: Make sure that MediaConstraints only has optional and mandatory at the top level
https://bugs.webkit.org/show_bug.cgi?id=101733

Reviewed by Jochen Eisinger.

Source/WebCore:

This patch adds better verification to MediaConstraintsImpl.

Existing tests expanded to cover this change.

* Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::initialize):

LayoutTests:

This patch adds more tests for MediaConstraints.

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

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

6 years agoUnreviewed, rolling out r134223.
commit-queue@webkit.org [Mon, 12 Nov 2012 16:20:49 +0000 (16:20 +0000)]
Unreviewed, rolling out r134223.
http://trac.webkit.org/changeset/134223
https://bugs.webkit.org/show_bug.cgi?id=101939

Breaks inspector tests (Requested by pfeldman on #webkit).

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

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
(WebInspector.TextEditorMainPanel.prototype.beginDomUpdates):
(WebInspector.TextEditorMainPanel.prototype.endDomUpdates):
(WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
(WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
(WebInspector.TextEditorMainPanel.prototype._paintLine):
(WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
(WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
(WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
* inspector/front-end/externs.js:
* inspector/front-end/textEditor.css:

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

6 years ago[Qt] Support ResourceRequest's setTimeoutInterval
allan.jensen@digia.com [Mon, 12 Nov 2012 16:13:01 +0000 (16:13 +0000)]
[Qt] Support ResourceRequest's setTimeoutInterval
https://bugs.webkit.org/show_bug.cgi?id=101731

Reviewed by Simon Hausmann.

Source/WebCore:

Establish a timeout and return the correct error when it is triggered.

Tested by existing http/tests/xmlhttprequest/timeout tests.

* platform/network/ResourceRequestBase.cpp:
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyHandler::release):
(WebCore::QNetworkReplyHandler::finish):
(WebCore::QNetworkReplyHandler::timeout):
(WebCore::QNetworkReplyHandler::timerEvent):
(WebCore::QNetworkReplyHandler::start):
* platform/network/qt/QNetworkReplyHandler.h:
(QNetworkReplyHandler):

Tools:

Enable XHR_TIMEOUT now that we support the necessary feature.

* qmake/mkspecs/features/features.pri:

LayoutTests:

Unskip now passing XHR timeout tests.

* platform/qt/TestExpectations:

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

6 years agoUnreviewed, rolling out r134224.
commit-queue@webkit.org [Mon, 12 Nov 2012 16:06:49 +0000 (16:06 +0000)]
Unreviewed, rolling out r134224.
http://trac.webkit.org/changeset/134224
https://bugs.webkit.org/show_bug.cgi?id=101937

asserting on bawts (Requested by kling on #webkit).

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

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
(WebCore::RenderStyle::setColor):
(WebCore::RenderStyle::setVisitedLinkColor):
* rendering/style/RenderStyle.h:
* rendering/style/StyleBackgroundData.cpp:
(WebCore::StyleBackgroundData::StyleBackgroundData):
* rendering/style/StyleBackgroundData.h:
(WebCore::StyleBackgroundData::color):
(StyleBackgroundData):
* rendering/style/StyleInheritedData.cpp:
(WebCore::StyleInheritedData::StyleInheritedData):
* rendering/style/StyleInheritedData.h:
(StyleInheritedData):
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
* rendering/style/StyleMultiColData.h:
(StyleMultiColData):
* rendering/style/StyleRareInheritedData.cpp:
(SameSizeAsStyleRareInheritedData):
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
(WebCore):
(StyleRareInheritedData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):

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

6 years agoLayout Test inspector/debugger/dynamic-scripts.html is flaky
vsevik@chromium.org [Mon, 12 Nov 2012 15:51:57 +0000 (15:51 +0000)]
Layout Test inspector/debugger/dynamic-scripts.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=99338

Unreviewed inspector tests flakiness fix.

* http/tests/inspector-enabled/dynamic-scripts.html:
* inspector/debugger/dynamic-scripts.html:
* platform/chromium/TestExpectations:

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

6 years ago[BlackBerry] Update BB10 form theme.
commit-queue@webkit.org [Mon, 12 Nov 2012 15:43:51 +0000 (15:43 +0000)]
[BlackBerry] Update BB10 form theme.
https://bugs.webkit.org/show_bug.cgi?id=100760

Patch by Tiancheng Jiang <tijiang@rim.com> on 2012-11-12
Reviewed by Rob Buis.

RIM PR 236993
Internally Reviewed by Jeff Rogers.
Use slide and paint method on slider range and media controls.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore):
(WebCore::drawThreeSliceHorizontal):
(WebCore::drawThreeSliceVertical):
(WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
(WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
(WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
(WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
* platform/blackberry/RenderThemeBlackBerry.h:
(RenderThemeBlackBerry):

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

6 years agoRefactoring: set read-only values on layout in DateTimeEditElement
tkent@chromium.org [Mon, 12 Nov 2012 15:38:31 +0000 (15:38 +0000)]
Refactoring: set read-only values on layout in DateTimeEditElement
https://bugs.webkit.org/show_bug.cgi?id=101916

Reviewed by Kentaro Hara.

We have always updated read-only values when we set an empty value or
DateTimeFieldsState. It has wasted CPU time because such read-only
values are never updated after layout() essentially. So, we set
read-only values in DateTimeEditBuilder used by layout(), and remove
dateForReadOnlyField arguments of setEmptyValue and
setValueAsDateTimeFieldsState.

No new tests. This should not make behavior changes.

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState):
We removed dateForReadOnlyField argument because read-only values are
already set in DateTimeFieldElement::layout().
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditBuilder::visitField):
Set a value to a read-only minute/second/millisecond field while
building UI elements.
Also, changed variable types for millisecond and second fields to
RefPtr<DateTimeNumericFieldElement> because we'd like to call
setValueAsDate, which is private in DateTimeMillisecondFieldElement and
DateTimeSecondFieldElement
(WebCore::DateTimeEditElement::setValueAsDateTimeFieldsState):
We removed dateForReadOnlyField argument because read-only values are
already set in DateTimeFieldElement::layout().
(WebCore::DateTimeEditElement::setEmptyValue): Ditto.
* html/shadow/DateTimeEditElement.h:
(DateTimeEditElement):
Removed dateForReadOnlyField argument for setValueAsDateTimeFieldsState.

* html/shadow/DateTimeFieldElement.cpp:
(WebCore::DateTimeFieldElement::defaultKeyboardEventHandler):
We removed dateForReadOnlyField argument because read-only values are
already set in DateTimeFieldElement::layout().
* html/shadow/DateTimeFieldElement.h:
(DateTimeFieldElement): Ditto.

* html/shadow/DateTimeFieldElements.cpp: Ditto.
* html/shadow/DateTimeFieldElements.h: Ditto.
* html/shadow/DateTimeNumericFieldElement.cpp:
(WebCore::DateTimeNumericFieldElement::setEmptyValue):
It should do nothing if it is read-only because a read-only value was
already set just after construction.
* html/shadow/DateTimeNumericFieldElement.h:
(DateTimeNumericFieldElement):
Removed dateForReadOnlyField argument of setEmptyValue.
* html/shadow/DateTimeSymbolicFieldElement.cpp:
(WebCore::DateTimeSymbolicFieldElement::setEmptyValue): Ditto.
* html/shadow/DateTimeSymbolicFieldElement.h:
(DateTimeSymbolicFieldElement): Ditto.

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

6 years ago[Qt] Fix tst_QWebPage::findText
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:27:24 +0000 (15:27 +0000)]
[Qt] Fix tst_QWebPage::findText

Reviewed by Simon Hausmann.

Details of the failure:
FAIL!  : tst_QWebPage::findText() Compared values are not the same
   Actual   (m_page->selectedHtml().trimmed().replace(regExp, "")): <span>foo</span>
   Expected (subString): foo
   Loc: [/home/joce/dev/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp(2964)]

The format returned by selectedHtml changed.
Make the test a bit more robust by just checking that the HTML
contains our search value.

* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::findText):

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

6 years ago[Qt] Fix tst_QWebPage::testLocalStorageVisibility
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:27:08 +0000 (15:27 +0000)]
[Qt] Fix tst_QWebPage::testLocalStorageVisibility

Reviewed by Simon Hausmann.

window.localStorage is expected to work for file URLs.
I'm not sure why it did work when this test was written,
but I believe that it had the wrong expected value.

* tests/qwebpage/tst_qwebpage.cpp:

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

6 years ago[Qt] Fix tst_QObjectBridge::callQtInvokable
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:26:51 +0000 (15:26 +0000)]
[Qt] Fix tst_QObjectBridge::callQtInvokable

Reviewed by Simon Hausmann.

Q_DECLARE_METATYPE now calls qRegisterMetaType so just prevent
the value from being wrapped by QVariant since this code shouldn't
be reached anyway.

* tests/qobjectbridge/tst_qobjectbridge.cpp:
(MyQObject::myInvokableWithBrushStyleArg):

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

6 years ago[Qt] Fix tst_QWebPage::inputMethods
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:26:34 +0000 (15:26 +0000)]
[Qt] Fix tst_QWebPage::inputMethods

Reviewed by Simon Hausmann.

Details of the failure:
FAIL!  : tst_QWebPage::inputMethods(QWebView) Compared values are not the same
   Actual (page->settings()->fontFamily(QWebSettings::SerifFont)): FooSerifFont
   Expected (font.family()): Helvetica
   Loc: [Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp(1691)]

The issue was that WebCore wouldn't find FooSerifFont and would have
RenderStyle::font() return the fallback font it used instead.

* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::inputMethods):

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

6 years ago[Qt] Fix tst_QWebPage::showModalDialog() API test
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:26:18 +0000 (15:26 +0000)]
[Qt] Fix tst_QWebPage::showModalDialog() API test
https://bugs.webkit.org/show_bug.cgi?id=63244

Reviewed by Simon Hausmann.

* tests/qwebpage/tst_qwebpage.cpp:

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

6 years ago[Qt] tst_QWebElement::style() fails because QWebElement::InlineStyle now works as...
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:26:02 +0000 (15:26 +0000)]
[Qt] tst_QWebElement::style() fails because QWebElement::InlineStyle now works as expected
https://bugs.webkit.org/show_bug.cgi?id=60372

Reviewed by Simon Hausmann.

Update the expected value to follow this comment in StylePropertySet::addParsedProperty:
"Only add properties that have no !important counterpart present"

* tests/qwebelement/tst_qwebelement.cpp:
(tst_QWebElement::style):

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

6 years ago[Qt] tst_QWebElement::style() fails because QWebElement::CascadedStyle doesn't work...
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:25:46 +0000 (15:25 +0000)]
[Qt] tst_QWebElement::style() fails because QWebElement::CascadedStyle doesn't work as expected
https://bugs.webkit.org/show_bug.cgi?id=65244

Reviewed by Kenneth Rohde Christiansen.

StyleResolver::styleRulesForElement now takes flags as parameter instead of a bool to specify
that we want to exclude UI and user style sheets.

* Api/qwebelement.cpp:
(QWebElement::styleProperty):
* tests/qwebelement/tst_qwebelement.cpp:
(tst_QWebElement::style):

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

6 years ago[Qt] Appending "!important" to the property value of QWebElement::setStyleProperty...
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:25:28 +0000 (15:25 +0000)]
[Qt] Appending "!important" to the property value of QWebElement::setStyleProperty isn't working
https://bugs.webkit.org/show_bug.cgi?id=101763

Reviewed by Kenneth Rohde Christiansen.

In the pastWebCore have been considering the important token of a CSS
property value if it was followed by !important as well as the
important parameter of setInlineStyleProperty, but not anymore.

Since we need to keep the behavior compatible, do the parsing of the
value and extract the token if present. Ideally this would be passed
as a parameter to the function but I think it's not worth deprecating
the old mechanism.
The parsing is pretty dumb, so this will break applications that
passed a value with spaces between the "!" and "important".

This fixes part of tst_QWebElement::style

* Api/qwebelement.cpp:
(QWebElement::setStyleProperty):

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

6 years ago[Qt] Fix URL issues in tst_qwebframe
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:25:13 +0000 (15:25 +0000)]
[Qt] Fix URL issues in tst_qwebframe
https://bugs.webkit.org/show_bug.cgi?id=101741

Reviewed by Simon Hausmann.

* tests/qwebframe/tst_qwebframe.cpp:
(FakeReply::FakeReply):
Properly forward the request URL to our custom reply.
This would cause redirections not to occur. The requestedUrl and setUrlSameUrl tests
would fail because of this.

(tst_QWebFrame::setUrlToInvalid):
- http:/example.com is a valid URL, but not a valid HTTP URL, so remove this check.
- QCOMPARE uses testlib's toString on the QUrls to compare them and it now
also output the error description. Since we want to compare the resulting
URL instead, compare their toEncoded() value.

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

6 years ago[Qt] Fix a crash in tst_QWebInspector::attachAndDestroy
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:24:56 +0000 (15:24 +0000)]
[Qt] Fix a crash in tst_QWebInspector::attachAndDestroy
https://bugs.webkit.org/show_bug.cgi?id=101575

Reviewed by Simon Hausmann.

It can now happen that destroyInspectorView is called when the Page
is destroyed. This would call getOrCreateInspector and re-create a
QWebInspector.

Since the new instance is created after our setInspector(0) cleanup
in ~QWebPagePrivate, this runs into the same crash that this line was
protecting us against.

* WebCoreSupport/InspectorClientQt.cpp:
(WebCore::InspectorFrontendClientQt::destroyInspectorView):

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

6 years ago[Qt] Fix tst_QWebPage::inputMethods on Qt5
jocelyn.turcotte@digia.com [Mon, 12 Nov 2012 15:24:41 +0000 (15:24 +0000)]
[Qt] Fix tst_QWebPage::inputMethods on Qt5
https://bugs.webkit.org/show_bug.cgi?id=101571

Reviewed by Simon Hausmann.

QEvent::RequestSoftwareInputPanel isn't passed through event filters anymore.
Use QInputMethodPrivate::testContext instead to capture input method events,
the same way as qtbase tests like tst_QTextEdit are doing.

* tests/qwebpage/tst_qwebpage.cpp:
(TestInputContext::TestInputContext):
(TestInputContext::~TestInputContext):
(TestInputContext):
(TestInputContext::showInputPanel):
(TestInputContext::hideInputPanel):
(TestInputContext::isInputPanelVisible):
(tst_QWebPage::inputMethods):

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

6 years ago[BlackBerry] Update BB10 form theme.
commit-queue@webkit.org [Mon, 12 Nov 2012 15:20:11 +0000 (15:20 +0000)]
[BlackBerry] Update BB10 form theme.
https://bugs.webkit.org/show_bug.cgi?id=100760

Patch by Tiancheng Jiang <tijiang@rim.com> on 2012-11-12
Reviewed by Rob Buis.

RIM PR 236993
Internally Reviewed by Jeff Rogers.
Enable GL slider.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::drawThreeSlice):
(WebCore):
(WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
(WebCore::RenderThemeBlackBerry::paintSliderThumb):

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

6 years ago[Qt] REGRESSION(r134205): gardening. Skipped 2 failing reftests.
ossy@webkit.org [Mon, 12 Nov 2012 15:02:21 +0000 (15:02 +0000)]
[Qt] REGRESSION(r134205): gardening. Skipped 2 failing reftests.
https://bugs.webkit.org/show_bug.cgi?id=101933

Patch by János Badics <jbadics@inf.u-szeged.hu> on 2012-11-12
Reviewed by Csaba Osztrogonác.

* platform/qt/TestExpectations:

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

6 years ago[V8][JSC] HTMLElement::itemValue() needs not to be custom
haraken@chromium.org [Mon, 12 Nov 2012 14:57:30 +0000 (14:57 +0000)]
[V8][JSC] HTMLElement::itemValue() needs not to be custom
https://bugs.webkit.org/show_bug.cgi?id=101882

Reviewed by Adam Barth.

We can remove a [Custom] IDL attribute.

No tests. No change in behavior.

* bindings/js/JSHTMLElementCustom.cpp:
* bindings/v8/custom/V8HTMLElementCustom.cpp:
* html/HTMLElement.idl:

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

6 years agoRenderStyle: Pack Color members tighter in substructures.
kling@webkit.org [Mon, 12 Nov 2012 14:42:24 +0000 (14:42 +0000)]
RenderStyle: Pack Color members tighter in substructures.
<http://webkit.org/b/101860>

Patch by Andreas Kling <kling@webkit.org> on 2012-11-12
Reviewed by Antti Koivisto.

For RenderStyle substructures (StyleInheritedData, et al.), unfold all WebCore::Color
members into RGBA32/bool variables OR just an RGBA32 if the color can never be invalid.

Memory saved per instance:

    - StyleMultiColData:          4 bytes
    - StyleBackgroundData:        8 bytes
    - StyleInheritedData:         8 bytes
    - StyleRareInheritedData:    24 bytes
    - StyleRareNonInheritedData: 24 bytes

323kB progression on Membuster3.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
(WebCore::RenderStyle::setColor):
(WebCore::RenderStyle::setVisitedLinkColor):
(WebCore::RenderStyle::setVisitedLinkColumnRuleColor):
(WebCore::RenderStyle::setBackgroundColor):
* rendering/style/RenderStyle.h:
* rendering/style/StyleBackgroundData.cpp:
(WebCore::StyleBackgroundData::StyleBackgroundData):
* rendering/style/StyleBackgroundData.h:
(WebCore::StyleBackgroundData::color):
(StyleBackgroundData):
* rendering/style/StyleInheritedData.cpp:
(WebCore::StyleInheritedData::StyleInheritedData):
* rendering/style/StyleInheritedData.h:
(StyleInheritedData):
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
(WebCore::StyleMultiColData::setVisitedLinkColumnRuleColor):
* rendering/style/StyleMultiColData.h:
(StyleMultiColData):
(WebCore::StyleMultiColData::visitedLinkColumnRuleColor):
* rendering/style/StyleRareInheritedData.cpp:
(SameSizeAsStyleRareInheritedData):
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
(WebCore::StyleRareInheritedData::setTextStrokeColor):
(WebCore::StyleRareInheritedData::setTextFillColor):
(WebCore::StyleRareInheritedData::setTextEmphasisColor):
(WebCore::StyleRareInheritedData::setVisitedLinkTextStrokeColor):
(WebCore::StyleRareInheritedData::setVisitedLinkTextFillColor):
(WebCore::StyleRareInheritedData::setVisitedLinkTextEmphasisColor):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):
(WebCore::StyleRareInheritedData::textStrokeColor):
(WebCore::StyleRareInheritedData::textFillColor):
(WebCore::StyleRareInheritedData::textEmphasisColor):
(WebCore::StyleRareInheritedData::visitedLinkTextStrokeColor):
(WebCore::StyleRareInheritedData::visitedLinkTextFillColor):
(WebCore::StyleRareInheritedData::visitedLinkTextEmphasisColor):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::setVisitedLinkBorderLeftColor):
(WebCore::StyleRareNonInheritedData::setVisitedLinkBorderRightColor):
(WebCore::StyleRareNonInheritedData::setVisitedLinkBorderTopColor):
(WebCore::StyleRareNonInheritedData::setVisitedLinkBorderBottomColor):
(WebCore::StyleRareNonInheritedData::setVisitedLinkOutlineColor):
(WebCore::StyleRareNonInheritedData::setVisitedLinkBackgroundColor):
* rendering/style/StyleRareNonInheritedData.h:
(WebCore::StyleRareNonInheritedData::visitedLinkBackgroundColor):
(WebCore::StyleRareNonInheritedData::visitedLinkOutlineColor):
(WebCore::StyleRareNonInheritedData::visitedLinkBorderLeftColor):
(WebCore::StyleRareNonInheritedData::visitedLinkBorderRightColor):
(WebCore::StyleRareNonInheritedData::visitedLinkBorderTopColor):
(WebCore::StyleRareNonInheritedData::visitedLinkBorderBottomColor):
(StyleRareNonInheritedData):

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

6 years agoWeb Inspector: migrate text editor to mutation observers
pfeldman@chromium.org [Mon, 12 Nov 2012 14:34:54 +0000 (14:34 +0000)]
Web Inspector: migrate text editor to mutation observers
https://bugs.webkit.org/show_bug.cgi?id=101841

Reviewed by Vsevolod Vlasov.

Otherwise, we miss notifications on the removed lines.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype.beginDomUpdates):
(WebInspector.TextEditorMainPanel.prototype.endDomUpdates):
(WebInspector.TextEditorMainPanel.prototype._handleMutations):
(WebInspector.TextEditorMainPanel.prototype._handleMutation):
* inspector/front-end/externs.js:
(WebKitMutation):
(WebKitMutationObserver.prototype.observe):
(WebKitMutationObserver.prototype.disconnect):

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

6 years ago[Qt] Flash-plugin starts with wrong width
commit-queue@webkit.org [Mon, 12 Nov 2012 14:33:23 +0000 (14:33 +0000)]
[Qt] Flash-plugin starts with wrong width
https://bugs.webkit.org/show_bug.cgi?id=101836

Patch by Allan Sandfeld Jensen <sandfeld@kde.org> on 2012-11-12
Reviewed by Simon Hausmann.

Defer the setWindow call, so that the one time it is called it will have its final size.

* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::determineQuirks):

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

6 years agoRemove the V8 custom code for WebSockets constructor
tommyw@google.com [Mon, 12 Nov 2012 14:18:45 +0000 (14:18 +0000)]
Remove the V8 custom code for WebSockets constructor
https://bugs.webkit.org/show_bug.cgi?id=100801

Reviewed by Kentaro Hara.

Source/WebCore:

This patch does the following:

1) Modifies the V8 code generator to support overloaded constructors,
   the JS generator is fixed to work as before. Proper support for JS will come later.

2) Modifies WebSocket.h/.cpp for the new constructors.

Tested by running WebSockets layout tests.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::create):
(WebCore):
* Modules/websockets/WebSocket.h:
(WebSocket):
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateOverloadedConstructorCallback):
(GenerateSingleConstructorCallback):
(GenerateConstructorCallback):
(GenerateImplementation):
* bindings/scripts/IDLParser.pm:
(copyAttributes):
(parseExtendedAttributeList):
(parseExtendedAttributes):
(applyExtendedAttributeList):
* bindings/scripts/IDLStructure.pm:
* bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.cpp: Added.
(WebDOMTestOverloadedConstructors::WebDOMTestOverloadedConstructorsPrivate::WebDOMTestOverloadedConstructorsPrivate):
(WebDOMTestOverloadedConstructors::WebDOMTestOverloadedConstructorsPrivate):
(WebDOMTestOverloadedConstructors::WebDOMTestOverloadedConstructors):
(WebDOMTestOverloadedConstructors::operator=):
(WebDOMTestOverloadedConstructors::impl):
(WebDOMTestOverloadedConstructors::~WebDOMTestOverloadedConstructors):
(toWebCore):
(toWebKit):
* bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.h: Added.
(WebCore):
(WebDOMTestOverloadedConstructors):
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp: Added.
(WebKit):
(WebKit::kit):
(WebKit::core):
(WebKit::wrapTestOverloadedConstructors):
(webkit_dom_test_overloaded_constructors_finalize):
(webkit_dom_test_overloaded_constructors_set_property):
(webkit_dom_test_overloaded_constructors_get_property):
(webkit_dom_test_overloaded_constructors_constructed):
(webkit_dom_test_overloaded_constructors_class_init):
(webkit_dom_test_overloaded_constructors_init):
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h: Added.
(_WebKitDOMTestOverloadedConstructors):
(_WebKitDOMTestOverloadedConstructorsClass):
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructorsPrivate.h: Added.
(WebKit):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Added.
(WebCore):
(WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
(WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
(WebCore::JSTestOverloadedConstructorsConstructor::getOwnPropertySlot):
(WebCore::JSTestOverloadedConstructorsConstructor::getOwnPropertyDescriptor):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
(WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
(WebCore::JSTestOverloadedConstructorsPrototype::self):
(WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
(WebCore::JSTestOverloadedConstructors::finishCreation):
(WebCore::JSTestOverloadedConstructors::createPrototype):
(WebCore::JSTestOverloadedConstructors::destroy):
(WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
(WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
(WebCore::JSTestOverloadedConstructors::getOwnPropertyDescriptor):
(WebCore::jsTestOverloadedConstructorsConstructor):
(WebCore::JSTestOverloadedConstructors::getConstructor):
(WebCore::isObservable):
(WebCore::JSTestOverloadedConstructorsOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestOverloadedConstructorsOwner::finalize):
(WebCore::toJS):
(WebCore::toTestOverloadedConstructors):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h: Added.
(WebCore):
(JSTestOverloadedConstructors):
(WebCore::JSTestOverloadedConstructors::create):
(WebCore::JSTestOverloadedConstructors::createStructure):
(WebCore::JSTestOverloadedConstructors::impl):
(WebCore::JSTestOverloadedConstructors::releaseImpl):
(WebCore::JSTestOverloadedConstructors::releaseImplIfNotNull):
(JSTestOverloadedConstructorsOwner):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(JSTestOverloadedConstructorsPrototype):
(WebCore::JSTestOverloadedConstructorsPrototype::create):
(WebCore::JSTestOverloadedConstructorsPrototype::createStructure):
(WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
(JSTestOverloadedConstructorsConstructor):
(WebCore::JSTestOverloadedConstructorsConstructor::create):
(WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h: Added.
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm: Added.
(-[DOMTestOverloadedConstructors dealloc]):
(-[DOMTestOverloadedConstructors finalize]):
(core):
(kit):
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h: Added.
(WebCore):
* bindings/scripts/test/TestOverloadedConstructors.idl: Copied from Source/WebCore/bindings/scripts/test/TestSerializedScriptValueInterface.idl.
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: Added.
(WebCore):
(TestOverloadedConstructorsV8Internal):
(WebCore::TestOverloadedConstructorsV8Internal::V8_USE):
(WebCore::V8TestOverloadedConstructors::constructor1Callback):
(WebCore::V8TestOverloadedConstructors::constructor2Callback):
(WebCore::V8TestOverloadedConstructors::constructor3Callback):
(WebCore::V8TestOverloadedConstructors::constructor4Callback):
(WebCore::V8TestOverloadedConstructors::constructorCallback):
(WebCore::ConfigureV8TestOverloadedConstructorsTemplate):
(WebCore::V8TestOverloadedConstructors::GetRawTemplate):
(WebCore::V8TestOverloadedConstructors::GetTemplate):
(WebCore::V8TestOverloadedConstructors::HasInstance):
(WebCore::V8TestOverloadedConstructors::wrapSlow):
(WebCore::V8TestOverloadedConstructors::derefObject):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.h: Added.
(WebCore):
(V8TestOverloadedConstructors):
(WebCore::V8TestOverloadedConstructors::toNative):
(WebCore::V8TestOverloadedConstructors::installPerContextProperties):
(WebCore::V8TestOverloadedConstructors::installPerContextPrototypeProperties):
(WebCore::V8TestOverloadedConstructors::wrap):
(WebCore::toV8):
* bindings/v8/custom/V8WebSocketCustom.cpp:

LayoutTests:

Added test for null argument to WebSocket(url).

* http/tests/websocket/tests/hybi/url-parsing-expected.txt:
* http/tests/websocket/tests/hybi/url-parsing.html:
* platform/chromium-win/websocket/tests/url-parsing-expected.txt:
* platform/chromium/http/tests/websocket/tests/hixie76/url-parsing-expected.txt:
* platform/chromium/http/tests/websocket/tests/hybi/url-parsing-expected.txt:

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

6 years ago[WK2] Indentation nit on WebPage
commit-queue@webkit.org [Mon, 12 Nov 2012 14:04:04 +0000 (14:04 +0000)]
[WK2] Indentation nit on WebPage
https://bugs.webkit.org/show_bug.cgi?id=101928

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-11-12
Reviewed by Kenneth Rohde Christiansen.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setViewportSize):

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

6 years ago[Refactoring] Create SelectRuleFeatureSet for collecting RuleFeatureSet for select...
shinyak@chromium.org [Mon, 12 Nov 2012 13:54:53 +0000 (13:54 +0000)]
[Refactoring] Create SelectRuleFeatureSet for collecting RuleFeatureSet for select attribute
https://bugs.webkit.org/show_bug.cgi?id=101891

Reviewed by Hajime Morita.

We would like to have another class for RuleFeatureSet to collect 'select' attribute features,
since it will have more features than the original RuleFeatureSet has.

Also, some methods of ElementShadow are removed and we provide a method to get SelectRuleFeatureSet itself.

No new tests, no change in behavior.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ElementShadow.h:
(ElementShadow):
(WebCore::ElementShadow::selectRuleFeatureSet):
(WebCore):
* html/shadow/SelectRuleFeatureSet.cpp: Added.
(WebCore):
(WebCore::SelectRuleFeatureSet::SelectRuleFeatureSet):
(WebCore::SelectRuleFeatureSet::add):
(WebCore::SelectRuleFeatureSet::clear):
(WebCore::SelectRuleFeatureSet::collectFeaturesFromSelector):
* html/shadow/SelectRuleFeatureSet.h: Added.
(WebCore):
(SelectRuleFeatureSet):
(WebCore::SelectRuleFeatureSet::hasSelectorForId):
(WebCore::SelectRuleFeatureSet::hasSelectorForClass):
(WebCore::SelectRuleFeatureSet::hasSelectorForAttribute):
* testing/Internals.cpp:
(WebCore::Internals::hasSelectorForIdInShadow):
(WebCore::Internals::hasSelectorForClassInShadow):
(WebCore::Internals::hasSelectorForAttributeInShadow):

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