WebKit-https.git
8 years agoDRT/WTR python interface handles about:blank incorrectly
zoltan@webkit.org [Thu, 21 Jun 2012 23:32:04 +0000 (23:32 +0000)]
DRT/WTR python interface handles about:blank incorrectly
https://bugs.webkit.org/show_bug.cgi?id=89563

Reviewed by Dirk Pranke.

Currently DRT/WTR python interface's _command_from_driver_input function
puts the test directory path before about:blank. Remove this incorrect behavior.

* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitDriver._command_from_driver_input):

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

8 years agoIndexedDB: Fix layout tests to clear previous database structures
jsbell@chromium.org [Thu, 21 Jun 2012 23:28:43 +0000 (23:28 +0000)]
IndexedDB: Fix layout tests to clear previous database structures
https://bugs.webkit.org/show_bug.cgi?id=89609

Reviewed by Tony Chang.

A handful of tests weren't deleting previously created stores (or the whole
database), which made them fail if trivially re-run in Chromium or under
NRWT with --iterations=2.

* storage/indexeddb/cursor-key-order-expected.txt:
* storage/indexeddb/cursor-primary-key-order-expected.txt:
* storage/indexeddb/open-during-transaction-expected.txt:
* storage/indexeddb/resources/cursor-key-order.js:
(prepareDatabase.deleteRequest.onsuccess.openreq.onsuccess.verreq.onsuccess):
(prepareDatabase.deleteRequest.onsuccess.openreq.onsuccess):
(prepareDatabase.deleteRequest.onsuccess):
(prepareDatabase):
* storage/indexeddb/resources/cursor-primary-key-order.js:
(prepareDatabase.deleteRequest.onsuccess.openRequest.onsuccess.versionChangeRequest.onsuccess):
(prepareDatabase.deleteRequest.onsuccess.openRequest.onsuccess):
(prepareDatabase.deleteRequest.onsuccess):
(prepareDatabase):
* storage/indexeddb/resources/factory-deletedatabase-interactions.js:
* storage/indexeddb/resources/open-close-version.js:
(test6):
(test6.halfDone):
* storage/indexeddb/resources/open-during-transaction.js:
(prepareDatabase.deleteRequest.onsuccess.openreq1.onsuccess.setverreq.onsuccess.setverreq.result.oncomplete):
(prepareDatabase.deleteRequest.onsuccess.openreq1.onsuccess.setverreq.onsuccess):
(prepareDatabase.deleteRequest.onsuccess.openreq1.onsuccess):
(prepareDatabase.deleteRequest.onsuccess):
(prepareDatabase):
* storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt:
* storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html:

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

8 years ago[GStreamer] Use setGstElementClassMetadata.
philn@webkit.org [Thu, 21 Jun 2012 22:56:56 +0000 (22:56 +0000)]
[GStreamer] Use setGstElementClassMetadata.

Rubber/stamped by Martin Robinson.

This function was introduced in r120790 but I forgot to actually
use it in that patch.

* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkit_video_sink_class_init):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

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

8 years agoDFG should inline 'new Array()'
fpizlo@apple.com [Thu, 21 Jun 2012 22:55:42 +0000 (22:55 +0000)]
DFG should inline 'new Array()'
https://bugs.webkit.org/show_bug.cgi?id=89632

Reviewed by Geoffrey Garen.

This adds support for treating InternalFunction like intrinsics. The code
to do so is actually quite clean, so I don't feel bad about perpetuating
the InternalFunction vs. JSFunction-with-NativeExecutable dichotomy.

Currently this newfound power is only used to inline 'new Array()'.

* dfg/DFGByteCodeParser.cpp:
(ByteCodeParser):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(DFG):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::isInternalFunctionConstant):
(JSC::DFG::Graph::valueOfInternalFunctionConstant):

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

8 years ago[Chromium] Enable CSP_NEXT on the Chromium port.
commit-queue@webkit.org [Thu, 21 Jun 2012 22:40:51 +0000 (22:40 +0000)]
[Chromium] Enable CSP_NEXT on the Chromium port.
https://bugs.webkit.org/show_bug.cgi?id=89683

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

Enable CSP 1.1 on the Chromium port. This has zero practical effect,
as no CSP 1.1 patches have landed yet. But it will. Oh it will.

* features.gypi: ENABLE_CSP_NEXT=1

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

8 years ago[Chromium] Rebaseline video tests after r120939
kbr@google.com [Thu, 21 Jun 2012 22:39:59 +0000 (22:39 +0000)]
[Chromium] Rebaseline video tests after r120939
https://bugs.webkit.org/show_bug.cgi?id=89696

Unreviewed test expectations update to adjust bug number and
silence failures on Windows platform. Rebaselines are still needed.

* platform/chromium/TestExpectations:

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

8 years agoAdding copyrights to new files.
mhahnenberg@apple.com [Thu, 21 Jun 2012 22:38:39 +0000 (22:38 +0000)]
Adding copyrights to new files.

* heap/HeapTimer.cpp:
* heap/HeapTimer.h:
* heap/IncrementalSweeper.cpp:
* heap/IncrementalSweeper.h:

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

8 years ago[V8] Use v8::V8::AddImplicitReferences instead of SetHiddenValue
arv@chromium.org [Thu, 21 Jun 2012 22:34:26 +0000 (22:34 +0000)]
[V8] Use v8::V8::AddImplicitReferences instead of SetHiddenValue
https://bugs.webkit.org/show_bug.cgi?id=80880

Reviewed by Adam Barth.

We used to add a hidden property in the getter to the returned wrapper.
With this patch we instead handle the liveness of the wrapper in the GC phase by
calling v8::V8::AddHiddenReference.

To reduce the amount of custom code we need, the V8 code generator now supports
GenerateIsReachable (as well as CustomIsReachable) which, even though different
from the JSC attribute, is used in the same cases and takes the same values (even though
at the moment not all JSC values are supported by V8). Interfaces that have *IsReachable
also have a dependent life time (just like if V8DependentLifetime was present).

No new tests. Covered by existing tests.

* Target.pri:
* UseV8.cmake:
* WebCore.gypi:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGenerateIsReachable): Abstracted GenerateIsReachable and JSGenerateIsReachable.
(GetCustomIsReachable): Ditto.
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(NeedsToVisitDOMWrapper):
(GetGenerateIsReachable):
(GetCustomIsReachable):
(GenerateVisitDOMWrapper):
(GenerateHeader):
(GenerateNamedConstructorCallback):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore):
* bindings/scripts/test/V8/V8Float64Array.h:
(V8Float64Array):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(V8TestActiveDOMObject):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(V8TestCustomNamedGetter):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(V8TestEventConstructor):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(V8TestEventTarget):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestException.h:
(V8TestException):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestInterface.h:
(V8TestInterface):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(V8TestMediaQueryListListener):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(V8TestNamedConstructor):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestNode.h:
(V8TestNode):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestObj.h:
(V8TestObj):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(V8TestSerializedScriptValueInterface):
* bindings/v8/NPV8Object.cpp:
(WebCore::npObjectTypeInfo):
* bindings/v8/V8GCController.cpp:
(WebCore::GrouperVisitor::visitDOMWrapper):
* bindings/v8/WrapperTypeInfo.h:
(WebCore):
(WrapperTypeInfo):
* bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed.
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
* bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed.
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
* bindings/v8/custom/V8StyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8TextTrackListCustom.cpp: Removed.
* css/CSSStyleSheet.idl:
* css/StyleSheet.idl:
* dom/DOMStringMap.idl:
* dom/NamedNodeMap.idl:
* html/DOMTokenList.idl:
* html/track/TextTrackList.idl:

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

8 years agoIndexedDB: Implement spec behavior for multiEntry indexes with invalid/duplicate...
commit-queue@webkit.org [Thu, 21 Jun 2012 22:28:40 +0000 (22:28 +0000)]
IndexedDB: Implement spec behavior for multiEntry indexes with invalid/duplicate subkeys
https://bugs.webkit.org/show_bug.cgi?id=86123

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

Source/WebCore:

Distinguish between an actual invalid IDBKey, and an array of
possibly-invalid subkeys by making IDBKey::isValid() check subkeys
if the type is an array.

Introduce a new way to transform an IDBKey into a
multiEntry-specific IDBKey, (IDBKey::createMultiEntryArray)
throwing out duplicates and invalid keys. Use it when storing
index entries for multiEntry indexes.

No new tests: existing tests have been altered to include new behavior.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::continueFunction):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::cmp):
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::getKey):
* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::isValid):
(WebCore):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::createMultiEntryArray):
(IDBKey):
* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
(WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::encodeIDBKey):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore):
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):

Source/WebKit/chromium:

Add matching isValid() to WebIDBKey to match the one in IDBKey.

* public/WebIDBKey.h:
* src/WebIDBKey.cpp:
(WebKit::WebIDBKey::isValid):
(WebKit):
* src/WebIDBKeyRange.cpp:
(WebKit::WebIDBKeyRange::assign):

LayoutTests:

* storage/indexeddb/index-multientry-expected.txt:
* storage/indexeddb/resources/index-multientry.js:
(addData):
(verifyIndexes.request.onsuccess):
(verifyIndexes):
(verifyUniqueConstraint.request.onsuccess.request.onsuccess.request.onerror):
(verifyUniqueConstraint.request.onsuccess.request.onsuccess):
(verifyUniqueConstraint.request.onsuccess):
(verifyUniqueConstraint):

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

8 years ago[chromium] Overlays when using the web inspector are blurry with device scale factor > 1
commit-queue@webkit.org [Thu, 21 Jun 2012 22:02:32 +0000 (22:02 +0000)]
[chromium] Overlays when using the web inspector are blurry with device scale factor > 1
https://bugs.webkit.org/show_bug.cgi?id=89676

Patch by Ian Vollick <vollick@chromium.org> on 2012-06-21
Reviewed by James Robinson.

Whenever we construct a GraphicsLayerChromium, make initialize the
device and page scale factors, if possible.

Source/WebCore:

Unit test: GraphicsLayerChromiumTest.shouldStartWithCorrectContentsScale

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::GraphicsLayerChromium):

Source/WebKit/chromium:

* tests/GraphicsLayerChromiumTest.cpp:
(WebKitTests::TEST_F):
(WebKitTests):

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

8 years agoreenable perf tests on win
dpranke@chromium.org [Thu, 21 Jun 2012 21:48:20 +0000 (21:48 +0000)]
reenable perf tests on win
https://bugs.webkit.org/show_bug.cgi?id=89690

Reviewed by Ryosuke Niwa.

Only the replay tests don't work, and those are disabled by
default. This change also fixes the undefined _log reference
that was causing a crash.

* Scripts/run-perf-tests:

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

8 years ago[Qt] REGRESSION(r120790): broke video rendering
philn@webkit.org [Thu, 21 Jun 2012 21:23:56 +0000 (21:23 +0000)]
[Qt] REGRESSION(r120790): broke video rendering
https://bugs.webkit.org/show_bug.cgi?id=89619

Reviewed by Alexis Menard.

Invert the pixel components of the Image on little endian architectures.

* platform/graphics/gstreamer/ImageGStreamerQt.cpp:
(ImageGStreamer::ImageGStreamer):

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

8 years ago[WK2] Add C API to inspect a Web Intent
commit-queue@webkit.org [Thu, 21 Jun 2012 21:23:28 +0000 (21:23 +0000)]
[WK2] Add C API to inspect a Web Intent
https://bugs.webkit.org/show_bug.cgi?id=89275

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-21
Reviewed by Anders Carlsson.

Add C API for Web Intent so that it can be queried
on client side.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/API/C/WKIntentData.cpp: Copied from Source/WebKit2/UIProcess/WebIntentData.cpp.
(WKIntentDataGetTypeID):
(WKIntentDataCopyAction):
(WKIntentDataCopyType):
(WKIntentDataCopyService):
(WKIntentDataCopySuggestions):
(WKIntentDataCopyExtra):
(WKIntentDataCopyExtras):
* UIProcess/API/C/WKIntentData.h: Copied from Source/WebKit2/UIProcess/WebIntentData.cpp.
* UIProcess/WebIntentData.cpp:
(WebKit::WebIntentData::suggestions):
(WebKit):
(WebKit::WebIntentData::extra):
(WebKit::WebIntentData::extras):
* UIProcess/WebIntentData.h:
(WebIntentData):

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

8 years ago[Resource Timing] Implement Resource Timing interface
simonjam@chromium.org [Thu, 21 Jun 2012 21:15:19 +0000 (21:15 +0000)]
[Resource Timing] Implement Resource Timing interface
https://bugs.webkit.org/show_bug.cgi?id=61152

This patch implements the Resource Timing interface. It doesn't do anything
useful, because nothing populates the timeline yet. There are also some gaps
in the implementation, which have been filed as bugs.

http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html

Reviewed by Tony Gentilcore.

No new tests. Feature is disabled on all platforms.

* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/v8/custom/V8PerformanceEntryCustom.cpp:
(WebCore):
(WebCore::toV8): Support PerformanceEntry polymorphism.
* dom/EventNames.h:
(WebCore):
* dom/EventTargetFactory.in:
* page/Performance.cpp:
(WebCore::Performance::~Performance):
(WebCore):
(WebCore::Performance::interfaceName): Reqired for EventTarget.
(WebCore::Performance::scriptExecutionContext): Ditto.
(WebCore::Performance::webkitGetEntries): Return "resource" entries.
(WebCore::Performance::webkitGetEntriesByType): Ditto.
(WebCore::Performance::webkitGetEntriesByName): Ditto.
(WebCore::Performance::webkitClearResourceTimings): New.
(WebCore::Performance::webkitSetResourceTimingBufferSize): New. Unimplemented.
(WebCore::Performance::addResourceTiming): This is how resources in WebCore will report to the timeline.
(WebCore::Performance::eventTargetData): Required for EventTarget.
(WebCore::Performance::ensureEventTargetData): Ditto.
* page/Performance.h:
(Performance):
(WebCore::Performance::refEventTarget):
(WebCore::Performance::derefEventTarget):
* page/Performance.idl:
* page/PerformanceEntry.cpp:
(WebCore::PerformanceEntry::~PerformanceEntry):
(WebCore):
* page/PerformanceEntry.h:
(PerformanceEntry):
(WebCore::PerformanceEntry::isResource):
* page/PerformanceEntry.idl:
* page/PerformanceResourceTiming.cpp: Added.
(WebCore):
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::initiatorType):
(WebCore::PerformanceResourceTiming::redirectStart):
(WebCore::PerformanceResourceTiming::redirectEnd):
(WebCore::PerformanceResourceTiming::fetchStart):
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::requestStart):
(WebCore::PerformanceResourceTiming::responseStart):
(WebCore::PerformanceResourceTiming::responseEnd):
(WebCore::PerformanceResourceTiming::monotonicTimeToDocumentMilliseconds):
(WebCore::PerformanceResourceTiming::resourceTimeToMilliseconds):
* page/PerformanceResourceTiming.h: Added.
(WebCore):
(PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::create):
(WebCore::PerformanceResourceTiming::isResource):
* page/PerformanceResourceTiming.idl: Added.

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

8 years agoSpeech JavaScript API: Remove FIXMEs about whether events bubble and are cancelable
hans@chromium.org [Thu, 21 Jun 2012 20:20:02 +0000 (20:20 +0000)]
Speech JavaScript API: Remove FIXMEs about whether events bubble and are cancelable
https://bugs.webkit.org/show_bug.cgi?id=89657

Reviewed by Adam Barth.

The spec has been updated to clarify that the events do not bubble and
are not cancelable.

No new tests, just removing comments.

* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::didStartAudio):
* Modules/speech/SpeechRecognitionError.cpp:
(WebCore::SpeechRecognitionError::SpeechRecognitionError):

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

8 years agoAdd a parameter to handletTouchPoint to bypass FatFingers
commit-queue@webkit.org [Thu, 21 Jun 2012 20:13:57 +0000 (20:13 +0000)]
Add a parameter to handletTouchPoint to bypass FatFingers
on touch up. There are some cases where the user may drag
their finger off the element and we want to use the actual
touch point instead of the FatFingers adjusted point.
https://bugs.webkit.org/show_bug.cgi?id=89677

Patch by Genevieve Mak <gmak@rim.com> on 2012-06-21
Reviewed by Antonio Gomes.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
* Api/WebPage.h:
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
* WebKitSupport/TouchEventHandler.h:
(TouchEventHandler):

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

8 years agoWeb Inspector: [WebGL] Rename InjectedWebGLScriptSource.js -> InjectedScriptWebGLModu...
commit-queue@webkit.org [Thu, 21 Jun 2012 19:26:37 +0000 (19:26 +0000)]
Web Inspector: [WebGL] Rename InjectedWebGLScriptSource.js -> InjectedScriptWebGLModuleSource.js
https://bugs.webkit.org/show_bug.cgi?id=89675

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-06-21
Reviewed by Pavel Feldman.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InjectedScriptWebGLModule.cpp:
(WebCore::InjectedScriptWebGLModule::source):
* inspector/InjectedScriptWebGLModuleSource.js: Renamed from Source/WebCore/inspector/InjectedWebGLScriptSource.js.
(.):

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

8 years ago[GTK] Fix NPAPI plugins on Windows
commit-queue@webkit.org [Thu, 21 Jun 2012 19:20:00 +0000 (19:20 +0000)]
[GTK] Fix NPAPI plugins on Windows
https://bugs.webkit.org/show_bug.cgi?id=54531

Patch by Kalev Lember <kalevlember@gmail.com> on 2012-06-21
Reviewed by Martin Robinson.

.:

Define XP_WIN on Windows for plugin support.

* GNUmakefile.am:

Source/WebCore:

Switch to using PluginPackageWin.cpp and PluginViewWin.cpp on Windows
platform, and leave plugins/gtk/ only for XP_UNIX platforms. With this
we can share a lot of code with other ports and don't have to
reimplement all the Windows-specific code in plugins/gtk/.

* GNUmakefile.am:
* GNUmakefile.list.am:
* platform/FileSystem.h:
(WebCore):
* platform/graphics/GraphicsContext.h:
(GraphicsContext):
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(GraphicsContextPlatformPrivate):
* platform/graphics/transforms/TransformationMatrix.h:
(TransformationMatrix):
* platform/graphics/win/GraphicsContextCairoWin.cpp:
(WebCore):
* platform/graphics/win/GraphicsContextWin.cpp:
(WebCore):
* platform/gtk/FileSystemGtk.cpp:
(WebCore::unloadModule):
* plugins/PluginView.h:
(PluginView):
* plugins/win/PluginViewWin.cpp:
(windowHandleForPageClient):
(WebCore::registerPluginView):
(WebCore::PluginView::paint):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::snapshot):

Source/WTF:

Define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for the GTK+ port, and
include OwnPtrWin.cpp in the list of files built on Windows.

* GNUmakefile.am:
* GNUmakefile.list.am:
* wtf/Platform.h:

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

8 years agoUnreviewed, rolling out r120937.
commit-queue@webkit.org [Thu, 21 Jun 2012 18:57:45 +0000 (18:57 +0000)]
Unreviewed, rolling out r120937.
http://trac.webkit.org/changeset/120937
https://bugs.webkit.org/show_bug.cgi?id=89679

This patch brought buildbot master down (Requested by svillar
on #webkit).

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

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

8 years ago<rdar://problem/11718988> and https://bugs.webkit.org/show_bug.cgi?id=89673
beidson@apple.com [Thu, 21 Jun 2012 18:54:21 +0000 (18:54 +0000)]
<rdar://problem/11718988> and https://bugs.webkit.org/show_bug.cgi?id=89673
showModalDialog fix creates risk of never returning from RunLoop::performWork, potentially blocking other event sources

In case handling a function on the queue places additional functions on the queue, we should
limit the number of functions each invocation of performWork() performs so it can return and
other event sources have a chance to spin.

The showModalDialog fix in question is http://trac.webkit.org/changeset/120879

Reviewed by Darin Adler and Anders Carlson.

* platform/RunLoop.cpp:
(WebCore::RunLoop::performWork): If there are only N functions in the queue when performWork is called,
  only handle up to N functions before returning. Any additional functions will be handled the next time
  the runloop spins.

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

8 years agoSVGImageCache isn't invalidated for <img> on dynamic page scale changes
timothy_horton@apple.com [Thu, 21 Jun 2012 18:37:19 +0000 (18:37 +0000)]
SVGImageCache isn't invalidated for <img> on dynamic page scale changes
https://bugs.webkit.org/show_bug.cgi?id=89621
<rdar://problem/11714677>

Reviewed by Simon Fraser.

Previously, device and page scale factors were being cached as a part of the SVGImageCache's
size request. However, an <img> never has a reason to update its size request when the page
scale is changed via gesture zooming, as no layout occurs.

Instead, look up the relevant scales when the image is requested (which will occur during every
repaint), allowing page scale changes to take effect without requiring an updated size request.

Test: svg/as-image/image-respects-pageScaleFactor-change.html

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::lookupOrCreateImageForRenderer):
(WebCore::CachedImage::setContainerSizeForRenderer):
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
* svg/graphics/SVGImageCache.h:
(WebCore::SVGImageCache::SizeAndScales::SizeAndScales):
(SizeAndScales):

Add a test that ensures that dynamic changes to pageScaleFactor are propagated through
to the SVGImageCache.

* platform/mac/svg/as-image/image-respects-pageScaleFactor-change-expected.png: Added.
* platform/mac/svg/as-image/image-respects-pageScaleFactor-change-expected.txt: Added.
* svg/as-image/image-respects-pageScaleFactor-change.html: Added.

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

8 years agoSkipping this failing test. Filed
bdakin@apple.com [Thu, 21 Jun 2012 18:35:20 +0000 (18:35 +0000)]
Skipping this failing test. Filed
https://bugs.webkit.org/show_bug.cgi?id=89680 to track fixing the
real issue.

* platform/mac/Skipped:

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

8 years agoAdd pending resource even if others are pending
pdr@google.com [Thu, 21 Jun 2012 18:24:01 +0000 (18:24 +0000)]
Add pending resource even if others are pending
https://bugs.webkit.org/show_bug.cgi?id=89633

Reviewed by Dirk Schulze.

Source/WebCore:

An element can have multiple simultaneous pending resources but some of
this code was legacy, before the hasPendingResource()->hasPendingResources()
change (r105573). This patch continues adding a pending resource even if
there are other pending resources. In some cases, this can lead to marking
a resource as pending twice but the performance impact of that is negligible.

Other than SVGUseElement, SVGTrefElement and SVGFEImageElement are also
changed. These elements are unaffected because they can only have
a single resource at the moment (href), with other Style url() references
being handled by their parent containers.

Tests: svg/custom/use-multiple-pending-resources-expected.svg
       svg/custom/use-multiple-pending-resources.svg

* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::buildPendingResource):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::detachTarget):
(WebCore::SVGTRefElement::buildPendingResource):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::buildPendingResource):

LayoutTests:

* svg/custom/use-multiple-pending-resources-expected.svg: Added.
* svg/custom/use-multiple-pending-resources.svg: Added.

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

8 years ago[GTK] Replace the use of "struct stat" with GStatBuf
commit-queue@webkit.org [Thu, 21 Jun 2012 18:21:45 +0000 (18:21 +0000)]
[GTK] Replace the use of "struct stat" with GStatBuf
https://bugs.webkit.org/show_bug.cgi?id=89488

Patch by Kalev Lember <kalevlember@gmail.com> on 2012-06-21
Reviewed by Martin Robinson.

Make sure we pass GStatBuf to g_stat(); depending on the platform, it
isn't always the same as "struct stat", e.g. on Windows.

* platform/gtk/FileSystemGtk.cpp:
(WebCore::getFileSize):
(WebCore::getFileModificationTime):

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

8 years agoremove ENABLE_FULLSCREEN_MEDIA_CONTROL flag
commit-queue@webkit.org [Thu, 21 Jun 2012 18:17:21 +0000 (18:17 +0000)]
remove ENABLE_FULLSCREEN_MEDIA_CONTROL flag
https://bugs.webkit.org/show_bug.cgi?id=89614

Patch by Min Qin <qinmin@chromium.org> on 2012-06-21
Reviewed by Eric Carlson.

Source/WebCore:

Desktop chromium also starts to use fullscreen button after https://bugs.webkit.org/show_bug.cgi?id=88818
we don't need this flag any more
No test needed as this change just removes a flag.

* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
(WebCore::MediaControlRootElementChromium::create):
(WebCore::MediaControlRootElementChromium::setMediaController):
(WebCore::MediaControlRootElementChromium::reset):
(WebCore::MediaControlRootElementChromium::reportedError):
* html/shadow/MediaControlRootElementChromium.h:
(MediaControlRootElementChromium):

Source/WebKit/chromium:

Since desktop chrome now has fullscreen button, we don't need this flag anymore

* features.gypi:

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

8 years ago[WK2] Properly encode/decode service in IntentData
commit-queue@webkit.org [Thu, 21 Jun 2012 18:14:44 +0000 (18:14 +0000)]
[WK2] Properly encode/decode service in IntentData
https://bugs.webkit.org/show_bug.cgi?id=89460

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-21
Reviewed by Gustavo Noronha Silva.

Update IntentData::encode() and IntentData::decode()
so that the "service" member is properly encoded
and decoded.

* Shared/IntentData.cpp:
(WebKit::IntentData::encode):
(WebKit::IntentData::decode):

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

8 years agoUnreviewed gardening. Removing pixel results for CSS computed style tests which are...
tony@chromium.org [Thu, 21 Jun 2012 18:09:36 +0000 (18:09 +0000)]
Unreviewed gardening. Removing pixel results for CSS computed style tests which are text only tests.

* platform/qt/fast/css/getComputedStyle/computed-style-expected.png: Removed.
* platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.png: Removed.

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

8 years agoUnreviewed gardening. The computed style tests should now pass on EFL after r120870.
tony@chromium.org [Thu, 21 Jun 2012 18:07:40 +0000 (18:07 +0000)]
Unreviewed gardening. The computed style tests should now pass on EFL after r120870.

* platform/efl/TestExpectations:

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

8 years agoModify event re-targeting algorithm so that we can tell which distributed node is...
hayato@chromium.org [Thu, 21 Jun 2012 18:05:26 +0000 (18:05 +0000)]
Modify event re-targeting algorithm so that we can tell which distributed node is clicked.
https://bugs.webkit.org/show_bug.cgi?id=89073

Reviewed by Dimitri Glazkov.

Source/WebCore:

Adopt a new event re-targeting algorithm in the latest Shadow DOM spec.
The corresponding bug in the shadow DOM spec is:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17090

This change is introduced to handle the following use case:
1. There is an insertion point, with zero or more nodes distributed into it.
2. User clicks on one of the items.
3. The event handler in shadow DOM subtree wants to know which item was clicked on.

The new re-targeting algorithm sets an event's target to a
distributed node where an event was originally fired, instead of
an insertion point to where the node is distributed.

The similar re-targeting algorithm also applies to an event's
relatedTarget.

Test: fast/dom/shadow/shadow-dom-event-dispatching.html

* dom/EventDispatcher.cpp:
(WebCore::EventRelatedTargetAdjuster::adjust):
(WebCore::EventDispatcher::ensureEventAncestors):

LayoutTests:

* fast/dom/shadow/shadow-dom-event-dispatching-expected.txt:

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

8 years ago[GTK] Combine WebKit API tests into fewer binaries
mrobinson@webkit.org [Thu, 21 Jun 2012 18:01:58 +0000 (18:01 +0000)]
[GTK] Combine WebKit API tests into fewer binaries
https://bugs.webkit.org/show_bug.cgi?id=88458

Reviewed by Carlos Garcia Campos.

Instead of creating one binary per-test file, create binaries for each
category of tests. Right now this includes WTF and the WebKit2 C API,
but later tests can be added for the GTK+ platform layer and the WebKit1
and WebKit2 API layers.

* TestWebKitAPI/GNUmakefile.am: Compile only two test binaries, one for the WebKit2
  C API and one for WTF. Refresh the source list to ensure that new test are active.
* gtk/run-api-tests: Change the way that tests are skipped by splitting out the
concept of skipping a test and skipping a suite (program) of tests. Test cases are
skipped because of legitimate failures, but entire programs are skipped because of
problems in the harness. As of right now a test program is only skipped if the
accessibility bus cannot be started.
(SkippedTest.__init__): Make the test case a required argument and have one skipped
test case per SkippedTest instance.
(SkippedTest.__str__): Ditto.
(TestRunner): Update the directory list. We only have two gtest binaries now and they are
in one directory. Reformat the test list to make it slightly easier to read.
(TestRunner.__init__): Add the _skipped_test_program member, which handles entire
test programs that are skipped.
(TestRunner._setup_testing_environment): Use the new member.
(TestRunner._test_cases_to_skip): Collect all skipped test cases now instead of just
the first SkippedTest that matches.
(TestRunner._should_run_test_program): Take a look at the new member to make this
decision.
(TestRunner._run_test_command): Use the name test_program instead of test
to disambiguate between test cases and test suites.
(TestRunner._run_test_glib): ditto.
(TestRunner._run_test_google): Ditto.
(TestRunner._run_test): Ditto.
(TestRunner.run_tests): Ditto.

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

8 years ago[CSSRegions]Change WEBKIT_REGION_RULE value to 16
commit-queue@webkit.org [Thu, 21 Jun 2012 17:53:54 +0000 (17:53 +0000)]
[CSSRegions]Change WEBKIT_REGION_RULE value to 16
https://bugs.webkit.org/show_bug.cgi?id=89421

Patch by Andrei Onea <onea@adobe.com> on 2012-06-21
Reviewed by Tony Chang.

Source/WebCore:

Modified WEBKIT_REGION_RULE where applicable to match CSS Regions spec.
The new value for WEBKIT_REGION_RULE is 16 (was 10).

* css/CSSRule.cpp:
(WebCore):
Added COMPILE_ASSERT to ensure StyleRule::Region and CSSRule::WEBKIT_REGION_RULE will
* css/CSSRule.h:
(CSSRule):
Modified m_type bitfield length to 5
* css/CSSRule.idl:
* css/StyleRule.cpp:
(SameSizeAsStyleRuleBase):
(WebCore):
Added COMPILE_ASSERT to ensure that StyleRuleBase will always have exactly 32bits.
* css/StyleRule.h:
(StyleRuleBase):
Modified m_type bitfield to 5 to accommodate the new value, and modified
m_sourceLine bitfield to 27 bits in order to keep StyleRule 32
bits long. Consequently, any css rule longer than 67,108,863 lines will
cause overflow - however, the value is large enough not to cause
problems.

LayoutTests:

Added check for exact value of WEBKIT_REGION_RULE which should be 16,
according to CSS Regions spec.

* fast/regions/webkit-region-rule-expected.txt:
* fast/regions/webkit-region-rule.html:

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

8 years agoUnreviewed. Moving myself from committer list to reviewer.
yong.li@torchmobile.com [Thu, 21 Jun 2012 17:50:34 +0000 (17:50 +0000)]
Unreviewed. Moving myself from committer list to reviewer.

* Scripts/webkitpy/common/config/committers.py:

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

8 years agomake sure headers are included only once per file
commit-queue@webkit.org [Thu, 21 Jun 2012 17:34:26 +0000 (17:34 +0000)]
make sure headers are included only once per file
https://bugs.webkit.org/show_bug.cgi?id=88922

Patch by Arnaud Renevier <arno@renevier.net> on 2012-06-21
Reviewed by Alexey Proskuryakov.

* bytecode/CodeBlock.h:
* heap/MachineStackMarker.cpp:
* runtime/JSVariableObject.h:

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

8 years agor120835: fast/box-decoration-break/box-decoration-break-rendering.html failing on...
jonlee@apple.com [Thu, 21 Jun 2012 17:34:23 +0000 (17:34 +0000)]
r120835: fast/box-decoration-break/box-decoration-break-rendering.html failing on mac bots
https://bugs.webkit.org/show_bug.cgi?id=89620

* platform/mac/Skipped:

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

8 years agoPaint played and buffered ranges differently in Chrome video controls.
commit-queue@webkit.org [Thu, 21 Jun 2012 17:32:05 +0000 (17:32 +0000)]
Paint played and buffered ranges differently in Chrome video controls.
https://bugs.webkit.org/show_bug.cgi?id=89284

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-06-21
Reviewed by Eric Carlson.

Source/WebCore:

No new tests; existing video control tests cover this case.

The Chrome video controls are receiving a visual update. This patch changes
the format in which the playback position slider displays the buffered range.
It is painted in a lighter color left of the position thumb and darker right
of the position thumb

* css/mediaControlsChromium.css:
(input[type="range"]::-webkit-media-slider-container):
Adjust the border color of the playback position slider.
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintRoundedSliderBackground):
Adjust the background color of the position slider.
(WebCore::paintSliderRangeHighlight):
Make the color of the range region a function parameter,
provide start and end position as pixel width instead of percentage,
and make sure the rounded corners at beginning and end don't turn into rectangles.
(WebCore):
Move the mediaSliderThumbWidth variable up to be used in paintMediaSlider().
(WebCore::paintMediaSlider):
Calculate start, current and end position instead of fractions,
adjust the current position by half the thumb's width for improved rendering,
and draw two highlight areas: one bright one before current position and
one grey one after current position.
(WebCore::paintMediaVolumeSlider):
Adjust the paintSliderRangeHighlight function call and add the colors.

LayoutTests:

Rebaseline tests for linux build; mark others in TestExpectations.

* platform/chromium/TestExpectations:
* platform/chromium-linux/fast/layers/video-layer-expected.png:
* platform/chromium-linux/fullscreen/full-screen-stacking-context-expected.png:
* platform/chromium-linux/http/tests/media/video-buffered-range-contains-currentTime-expected.png:
* platform/chromium-linux/media/audio-controls-rendering-expected.png:
* platform/chromium-linux/media/controls-after-reload-expected.png:
* platform/chromium-linux/media/controls-strict-expected.png:
* platform/chromium-linux/media/controls-styling-expected.png:
* platform/chromium-linux/media/controls-without-preload-expected.png:
* platform/chromium-linux/media/video-controls-rendering-expected.png:
* platform/chromium-linux/media/video-display-toggle-expected.png:
* platform/chromium-linux/media/video-playing-and-pause-expected.png:
* platform/chromium-linux/media/video-zoom-controls-expected.png:
* platform/chromium-linux/media/audio-repaint-expected.png:
* platform/chromium-linux/media/controls-layout-direction-expected.png:
* platform/chromium-linux/media/media-controls-clone-expected.png:
* platform/chromium-linux/media/media-document-audio-repaint-expected.png:
* platform/chromium-linux/media/video-no-audio-expected.png:
* platform/chromium-win/fast/layers/video-layer-expected.txt:
* platform/chromium-win/media/audio-controls-rendering-expected.txt:
* platform/chromium-win/media/audio-repaint-expected.txt:
* platform/chromium-win/media/controls-after-reload-expected.txt:
* platform/chromium-win/media/controls-strict-expected.txt:
* platform/chromium-win/media/controls-styling-expected.txt:
* platform/chromium-win/media/controls-without-preload-expected.txt:
* platform/chromium-win/media/media-controls-clone-expected.txt:
* platform/chromium-win/media/media-document-audio-repaint-expected.txt:
* platform/chromium-win/media/video-controls-rendering-expected.txt:
* platform/chromium-win/media/video-display-toggle-expected.txt:
* platform/chromium-win/media/video-no-audio-expected.txt:
* platform/chromium-win/media/video-playing-and-pause-expected.txt:
* platform/chromium-win/media/video-zoom-controls-expected.txt:

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

8 years agoRemove unused static variable uninitializedLineNumberValue.
commit-queue@webkit.org [Thu, 21 Jun 2012 17:28:10 +0000 (17:28 +0000)]
Remove unused static variable uninitializedLineNumberValue.
https://bugs.webkit.org/show_bug.cgi?id=89643

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-06-21
Reviewed by Alexey Proskuryakov.

No behavioral changes.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore):

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

8 years ago[GTK] Add a new webkit2 tests slave bot
sergio@webkit.org [Thu, 21 Jun 2012 17:25:59 +0000 (17:25 +0000)]
[GTK] Add a new webkit2 tests slave bot
https://bugs.webkit.org/show_bug.cgi?id=89336

Reviewed by Philippe Normand.

Slave configuration for a new GTK bot that will run WebKit2 tests.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

8 years agoRemove unused static function skipComment.
commit-queue@webkit.org [Thu, 21 Jun 2012 17:21:44 +0000 (17:21 +0000)]
Remove unused static function skipComment.
https://bugs.webkit.org/show_bug.cgi?id=89641

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-06-21
Reviewed by Alexey Proskuryakov.

No behavioral changes.

* loader/TextResourceDecoder.cpp:

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

8 years agoRemove two more member variables found by clang's Wunused-private-field
thakis@chromium.org [Thu, 21 Jun 2012 17:19:15 +0000 (17:19 +0000)]
Remove two more member variables found by clang's Wunused-private-field
https://bugs.webkit.org/show_bug.cgi?id=89672

Reviewed by Anders Carlsson.

* html/shadow/MediaControlRootElementChromium.h:
(MediaControlRootElementChromium):
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::FECustomFilter):
* platform/graphics/filters/FECustomFilter.h:
(FECustomFilter):

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

8 years agoNon-fixed length margins don't work with align=center
jchaffraix@webkit.org [Thu, 21 Jun 2012 17:15:18 +0000 (17:15 +0000)]
Non-fixed length margins don't work with align=center
https://bugs.webkit.org/show_bug.cgi?id=89626

Reviewed by Levi Weintraub.

Source/WebCore:

Tests: fast/block/negative-start-margin-align-center-percent.html
       fast/block/positive-margin-block-child-align-center-calc.html

Calling Length::value() is a bad idea as it returns the *raw* value of
the length. For percent and calculated length this is a bad idea as they
bear not relation to the actual computed length.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeInlineDirectionMargins):
Fixed the code to use minimumValueForLength as this nicely takes care of the 'auto' case.

LayoutTests:

* fast/block/negative-start-margin-align-center-percent-expected.html: Added.
* fast/block/negative-start-margin-align-center-percent.html: Added.
* fast/block/positive-margin-block-child-align-center-calc-expected.html: Added.
* fast/block/positive-margin-block-child-align-center-calc.html: Added.

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

8 years ago[chromium] style improvement for setDeviceScaleFactor code
rjkroege@chromium.org [Thu, 21 Jun 2012 17:13:01 +0000 (17:13 +0000)]
[chromium] style improvement for setDeviceScaleFactor code
https://bugs.webkit.org/show_bug.cgi?id=89665

Correct a coding style error committed in https://bugs.webkit.org/show_bug.cgi?id=88916

Reviewed by Adrienne Walker.

Purely code hygiene: existing tests suffice.

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::setDeviceScaleFactor):

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

8 years ago[GTK] Update TestExpectations
commit-queue@webkit.org [Thu, 21 Jun 2012 17:07:51 +0000 (17:07 +0000)]
[GTK] Update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=89664

Unreviewed gardening. Mark editing/deleting/delete-3800834-fix.html
as flaky.

Patch by Simon Pena <spena@igalia.com> on 2012-06-21

* platform/gtk/TestExpectations:

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

8 years ago[Crash][Editing] Pressing enter on LI element triggers assertion in Shadow DOM.
shinyak@chromium.org [Thu, 21 Jun 2012 17:05:12 +0000 (17:05 +0000)]
[Crash][Editing] Pressing enter on LI element triggers assertion in Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=89171

Reviewed by Ryosuke Niwa.

Source/WebCore:

Since modidying Shadow DOM removes renderer of elements in Shadow DOM and shadow host,
assertion to check the existence of renderer was triggered.

We should update layout here to create renderer again.

Test: editing/shadow/pressing-enter-on-list.html

* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::appendBlockPlaceholder):

LayoutTests:

* editing/shadow/pressing-enter-on-list-expected.txt: Added.
* editing/shadow/pressing-enter-on-list.html: Added.

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

8 years agoDeviceOrientation and DeviceMotion Test Cleanup
commit-queue@webkit.org [Thu, 21 Jun 2012 17:03:28 +0000 (17:03 +0000)]
DeviceOrientation and DeviceMotion Test Cleanup
https://bugs.webkit.org/show_bug.cgi?id=89662

Patch by Amy Ousterhout <aousterh@chromium.org> on 2012-06-21
Reviewed by Ryosuke Niwa.

Replaces 'LayoutTestController' with 'TestRunner' in debug messages.
This makes it consistent with testRunner, which replaced layoutTestController.

* fast/dom/DeviceMotion/script-tests/no-page-cache.js:
* fast/dom/DeviceOrientation/script-tests/add-listener-from-callback.js:
* fast/dom/DeviceOrientation/script-tests/basic-operation.js:
* fast/dom/DeviceOrientation/script-tests/event-after-navigation.js:
* fast/dom/DeviceOrientation/script-tests/multiple-frames.js:
* fast/dom/DeviceOrientation/script-tests/no-page-cache.js:
* fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js:
* fast/dom/DeviceOrientation/script-tests/null-values.js:
(setMockOrientation):
* fast/dom/DeviceOrientation/script-tests/updates.js:
(setMockOrientation):

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

8 years agoWeb Inspector: [WebGL] Add injected WebGL module class
commit-queue@webkit.org [Thu, 21 Jun 2012 16:53:57 +0000 (16:53 +0000)]
Web Inspector: [WebGL] Add injected WebGL module class
https://bugs.webkit.org/show_bug.cgi?id=89592

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-06-21
Reviewed by Pavel Feldman.

Adding a new InjectedScriptWebGLModule class and moving WebGL-related
stuff out of InjectedScriptManager class.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InjectedScriptManager.cpp:
* inspector/InjectedScriptManager.h:
(InjectedScriptManager):
* inspector/InjectedScriptModule.cpp:
(WebCore::InjectedScriptModule::ensureInjected):
* inspector/InjectedScriptModule.h:
(InjectedScriptModule):
* inspector/InjectedScriptWebGLModule.cpp: Copied from Source/WebCore/inspector/InjectedScriptModule.cpp.
(WebCore):
(WebCore::InjectedScriptWebGLModule::InjectedScriptWebGLModule):
(WebCore::InjectedScriptWebGLModule::moduleForState):
(WebCore::InjectedScriptWebGLModule::source):
(WebCore::InjectedScriptWebGLModule::wrapWebGLContext):
(WebCore::InjectedScriptWebGLModule::captureFrame):
* inspector/InjectedScriptWebGLModule.h: Copied from Source/WebCore/inspector/InjectedScriptModule.h.
(WebCore):
(InjectedScriptWebGLModule):
* inspector/InspectorWebGLAgent.cpp:
(WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):

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

8 years agoWeb Inspector: do not add separator to the end of the context menu.
pfeldman@chromium.org [Thu, 21 Jun 2012 16:34:36 +0000 (16:34 +0000)]
Web Inspector: do not add separator to the end of the context menu.
https://bugs.webkit.org/show_bug.cgi?id=89634

Reviewed by Vsevolod Vlasov.

Attaching separators only before menu items now.

* inspector/front-end/ContextMenu.js:
(WebInspector.ContextSubMenuItem.prototype.appendItem):
(WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
(WebInspector.ContextSubMenuItem.prototype.appendSeparator):
(WebInspector.ContextSubMenuItem.prototype._pushItem):

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

8 years ago[EFL][WK2] Make WebKit2/Efl headers and resources installable.
commit-queue@webkit.org [Thu, 21 Jun 2012 15:46:40 +0000 (15:46 +0000)]
[EFL][WK2] Make WebKit2/Efl headers and resources installable.
https://bugs.webkit.org/show_bug.cgi?id=88207

Patch by Ryuan Choi <ryuan.choi@gmail.com> on 2012-06-21
Reviewed by Chang Shu.

.:

* Source/cmake/OptionsCommon.cmake:
Provide new variable, EXEC_INSTALL_DIR to determine where to install
executables.

Source/JavaScriptCore:

* shell/CMakeLists.txt: Use ${EXEC_INSTALL_DIR} instead of hardcoding "bin"

Source/WebKit2:

* CMakeLists.txt: Install WebProcess.
* PlatformEfl.cmake: Generate ewebkit2.pc and install it.
* efl/ewebkit2.pc.in: Added.

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

8 years agoWeb Inspector: Unify FileSystem callbacks
commit-queue@webkit.org [Thu, 21 Jun 2012 15:28:10 +0000 (15:28 +0000)]
Web Inspector: Unify FileSystem callbacks
https://bugs.webkit.org/show_bug.cgi?id=89420

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-06-21
Reviewed by Vsevolod Vlasov.

* inspector/InspectorFileSystemAgent.cpp:
(WebCore):

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

8 years ago[EFL[WK2] Add WKViewEfl and WebKit2 API Object to represent Evas_Object.
ryuan.choi@samsung.com [Thu, 21 Jun 2012 15:11:48 +0000 (15:11 +0000)]
[EFL[WK2] Add WKViewEfl and WebKit2 API Object to represent Evas_Object.
https://bugs.webkit.org/show_bug.cgi?id=88935

Reviewed by Chang Shu.

.:

* Source/cmake/OptionsEfl.cmake: Defines BUILDING_EFL__.

Source/WebKit2:

Add WKViewEfl to support WTR/Efl.

* PlatformEfl.cmake:
* Shared/API/c/WKBase.h:
* Shared/API/c/efl/WKBaseEfl.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/efl/WKAPICastEfl.h: Added.
(WebKit):
* UIProcess/API/C/efl/WKView.cpp: Added.
(WKViewCreate):
(WKViewGetPage):
* UIProcess/API/C/efl/WKView.h: Added.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_page_get):
* UIProcess/API/efl/ewk_view_private.h:

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

8 years ago[Qt] Unreviewed gardening, unskip now passing tests.
ossy@webkit.org [Thu, 21 Jun 2012 14:45:13 +0000 (14:45 +0000)]
[Qt] Unreviewed gardening, unskip now passing tests.

* platform/qt/Skipped:
* platform/qt/editing/inserting/4960120-1-expected.png: Added.
* platform/qt/editing/inserting/4960120-1-expected.txt:
* platform/qt/editing/inserting/before-after-input-element-expected.png: Added.
* platform/qt/editing/inserting/before-after-input-element-expected.txt:
* platform/qt/editing/inserting/insert-text-with-newlines-expected.png: Added.
* platform/qt/editing/inserting/insert-text-with-newlines-expected.txt:
* platform/qt/http/tests/misc/favicon-as-image-expected.png: Added.
* platform/qt/http/tests/misc/favicon-as-image-expected.txt: Added.

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

8 years ago[BlackBerry] Input mode should adapt automatically to settings changes
mifenton@rim.com [Thu, 21 Jun 2012 13:39:45 +0000 (13:39 +0000)]
[BlackBerry] Input mode should adapt automatically to settings changes
https://bugs.webkit.org/show_bug.cgi?id=89595

Reviewed by Antonio Gomes.

PR 167540.

Add helper function to check if input is enabled so that
the override settings can be applied at any time.

Reviewed Internally by Gen Mak.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setLoadState):
(BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::isInputModeEnabled):
(BlackBerry::WebKit::InputHandler::setInputModeEnabled):
(BlackBerry::WebKit::InputHandler::setElementFocused):
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
(BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
(BlackBerry::WebKit::InputHandler::handleKeyboardInput):
(BlackBerry::WebKit::InputHandler::setComposingText):
* WebKitSupport/InputHandler.h:
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):

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

8 years agoCompile error: 'bool std::isinf(float)' is not 'constexpr' with GCC 4.6 in C++11...
kbalazs@webkit.org [Thu, 21 Jun 2012 13:26:42 +0000 (13:26 +0000)]
Compile error: 'bool std::isinf(float)' is not 'constexpr' with GCC 4.6 in C++11 mode
https://bugs.webkit.org/show_bug.cgi?id=88721

Reviewed by Csaba Osztrogon√°c.

Don't define these as consexpr because with gcc 4.6
they call non constexpr functions.
* wtf/MathExtras.h:
(std::wtf_isinf):
(std::wtf_isnan):

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

8 years ago[Qt] Add a custom Color Chooser widget to MiniBrowser
commit-queue@webkit.org [Thu, 21 Jun 2012 13:12:43 +0000 (13:12 +0000)]
[Qt] Add a custom Color Chooser widget to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=87988

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-06-21
Reviewed by Alexis Menard.

Added custom color chooser example for the MiniBrowser.

* MiniBrowser/qt/MiniBrowser.qrc:
* MiniBrowser/qt/qml/BrowserWindow.qml:
* MiniBrowser/qt/qml/ColorChooser.qml: Added.

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

8 years agoRemove the warning "File not found" in MiniBrowser post-build event
commit-queue@webkit.org [Thu, 21 Jun 2012 12:27:54 +0000 (12:27 +0000)]
Remove the warning "File not found" in MiniBrowser post-build event
https://bugs.webkit.org/show_bug.cgi?id=89601

Patch by Vivek Galatage <vivekgalatage@gmail.com> on 2012-06-21
Reviewed by Adam Roben.

* MiniBrowser/MiniBrowserPostBuild.cmd:

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

8 years ago[GTK] Add new baseline and update TestExpectations
commit-queue@webkit.org [Thu, 21 Jun 2012 12:14:34 +0000 (12:14 +0000)]
[GTK] Add new baseline and update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=89651

Unreviewed gardening.

Patch by Simon Pena <spena@igalia.com> on 2012-06-21

* platform/gtk/TestExpectations: marked
svg/W3C-SVG-1.1/animate-elem-{32,33,40,41,46}-t.svg as flaky, and
fast/canvas/canvas-createImageData.html as crashing on DEBUG
* platform/gtk/fast/hidpi/device-scale-factor-paint-expected.png: Added.
* platform/gtk/fast/hidpi/device-scale-factor-paint-expected.txt: Added.

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

8 years ago[GTK] Backport run-file-chooser to WebKit1
commit-queue@webkit.org [Thu, 21 Jun 2012 12:08:36 +0000 (12:08 +0000)]
[GTK] Backport run-file-chooser to WebKit1
https://bugs.webkit.org/show_bug.cgi?id=87283

Patch by Daniel Drake <dsd@laptop.org> on 2012-06-21
Reviewed by Gustavo Noronha Silva.

This is a relatively straightforward backport of Mario Sanchez
Prada's WebKit2 run-file-chooser signal work, intended for use by
OLPC and others who are not quite ready to move to WebKit2.

Add a new public class to the API, WebKitFileChooserRequest, to be
emitted along with a new WebKitWebView::run-file-chooser signal to
let client applications to provide their own file chooser dialog
when the use interacts with HTML Input elements of type 'file'.

* GNUmakefile.am: Added new source files and headers.
* webkit/webkitfilechooserrequest.cpp: Added.
(_WebKitFileChooserRequestPrivate):
(webkit_file_chooser_request_init):
(webkit_file_chooser_request_finalize):
(webkit_file_chooser_request_get_property):
(webkit_file_chooser_request_class_init):
(webkit_file_chooser_request_create):
(webkit_file_chooser_request_get_mime_types):
(webkit_file_chooser_request_get_mime_types_filter):
(webkit_file_chooser_request_get_select_multiple):
(webkit_file_chooser_request_select_files):
(webkit_file_chooser_request_get_selected_files):
* webkit/webkitfilechooserrequest.h: Added.
(_WebKitFileChooserRequest):
(_WebKitFileChooserRequestClass):
* webkit/webkitfilechooserrequestprivate.h: Added,
containing the prototype of webkit_file_chooser_request_create.

Provide private API to make a file chooser request from the
WebView, and provide a default handler for it.

* webkit/webkitwebview.cpp:
(fileChooserDialogResponseCallback): Handler for the 'response'
signal for the GtkFileChooserDialog used in the default
handler. It will call to webkit_file_chooser_request_select_files
or webkit_file_chooser_request_cancel as needed.
(webkitWebViewRealRunFileChooser): Default handler for the new
'run-file-chooser' signal. It will create a GtkFileChooserDialog,
connect to the 'response' signal and show it.
(webkit_web_view_class_init): Connect the 'run-file-chooser'
signal to the default handler, webkitWebViewRunFileChooser.
(webkit_web_view_new):
(webkitWebViewRunFileChooserRequest):
* webkit/webkitwebview.h:
(_WebKitWebViewClass): Added prototype for the handler of the new
'run-file-chooser' signal.
* webkit/webkitwebviewprivate.h: Added prototype for
private new function webkitWebViewRunFileChooserRequest.

Update runOpenPanel to use the new API, including a default handler
with similar behaviour to before.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::runOpenPanel): Now creates an instance of
WebKitFileChooserRequest and asks the WebView to emit the
new 'run-file-chooser' signal with it.

Added the new public header to the main header.

* webkit/webkit.h: Added webkitfilechooserrequest.h

New unit tests for the new WebKitFileChooserRequest API.

* tests/testwebview.c: Various WebKitFileChooserRequest tests,
including MIME type filtering and selection handling.

Updated documentation related files with the new API.

* docs/webkitgtk-docs.sgml: Added new section.
* docs/webkitgtk-sections.txt: Added new API.
* docs/webkitgtk.types: Added get_type function.

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

8 years ago[Qt] DRT in standalone mode hangs after the first test
kbalazs@webkit.org [Thu, 21 Jun 2012 12:01:39 +0000 (12:01 +0000)]
[Qt] DRT in standalone mode hangs after the first test
https://bugs.webkit.org/show_bug.cgi?id=89613

Reviewed by Csaba Osztrogon√°c.

Break an inline signal slot chain that ends up in setting
LayoutTestController::m_hasDumped too early. In LayoutTestController::maybeDump()
we emit done() which starts the chain that finishes in DumpRenderTree::open().
The next line in maybeDump sets m_hasDumped to true. We could simply reorder
these two lines but it seems to be wrong in general to start the next load
from this call chain. The server mode (when DRT is runned by the test harness)
also uses a queued connection to read the next test from stdin.

* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::processArgsLine):

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

8 years ago[Qt] API tests for ColorChooser
commit-queue@webkit.org [Thu, 21 Jun 2012 11:38:06 +0000 (11:38 +0000)]
[Qt] API tests for ColorChooser
https://bugs.webkit.org/show_bug.cgi?id=88101

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

The test uses the value sanitization to detect if the feature is
enabled or disabled and will just pass when disabled.

* UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/colorChooser.html: Added.

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

8 years ago[WK2][Qt] Color chooser API missing
commit-queue@webkit.org [Thu, 21 Jun 2012 10:58:53 +0000 (10:58 +0000)]
[WK2][Qt] Color chooser API missing
https://bugs.webkit.org/show_bug.cgi?id=87749

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

Source/WebKit/qt:

Added ColorChooser API stub to WebKit. Otherwise
it will break the build for Qt WebKit2 (that now has
complete support for color chooser) when INPUT_TYPE_COLOR is set.

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore):
(WebCore::ChromeClientQt::createColorChooser):
* WebCoreSupport/ChromeClientQt.h:
(ChromeClientQt):

Source/WebKit2:

Added public experimental API for ColorChooser. This will
allow the browser to define a custom dialog for selecting
color when a input field of type "color" get focus.

The current implementation gives a model to the QML Component
that has methods for canceling a request, selecting a color
and fetching what is the current value of the HTML input.

* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewExperimental::colorChooser):
(QQuickWebViewExperimental::setColorChooser):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/qt/QtPageClient.cpp:
(WebKit::QtPageClient::createColorChooserProxy):
* UIProcess/qt/WebColorChooserProxyQt.cpp: Added.
(WebKit):
(ColorChooserContextObject):
(WebKit::ColorChooserContextObject::ColorChooserContextObject):
(WebKit::ColorChooserContextObject::currentColor):
(WebKit::ColorChooserContextObject::accept):
(WebKit::ColorChooserContextObject::reject):
(WebKit::WebColorChooserProxyQt::WebColorChooserProxyQt):
(WebKit::WebColorChooserProxyQt::~WebColorChooserProxyQt):
(WebKit::WebColorChooserProxyQt::createItem):
(WebKit::WebColorChooserProxyQt::createContext):
(WebKit::WebColorChooserProxyQt::setSelectedColor):
(WebKit::WebColorChooserProxyQt::notifyColorSelected):
(WebKit::WebColorChooserProxyQt::endChooser):
* UIProcess/qt/WebColorChooserProxyQt.h: Added.
(WebCore):
(WebKit):
(WebColorChooserProxyQt):
(WebKit::WebColorChooserProxyQt::create):

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

8 years ago[Qt] Unreviewed gardening, skip a new failing test.
ossy@webkit.org [Thu, 21 Jun 2012 10:24:32 +0000 (10:24 +0000)]
[Qt] Unreviewed gardening, skip a new failing test.

* platform/qt-5.0-wk2/Skipped:

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

8 years agoSpeech JavaScript API: SpeechRecognition should hook up with ActiveDOMObject more
hans@chromium.org [Thu, 21 Jun 2012 10:23:15 +0000 (10:23 +0000)]
Speech JavaScript API: SpeechRecognition should hook up with ActiveDOMObject more
https://bugs.webkit.org/show_bug.cgi?id=89217

Reviewed by Adam Barth.

Source/WebCore:

Previously, the SpeechRecognition was kept alive while waiting for
pending events by making the embedder hold a reference to the object.
We should do this by using ActiveDOMObject's setPendingActivity() instead.

Also, override ActiveDOMObject::stop() to get notified when the user
leaves the page.

Test: fast/speech/scripted/navigate-away.html

* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::start):
(WebCore::SpeechRecognition::didEnd):
(WebCore::SpeechRecognition::stop):
(WebCore):
* Modules/speech/SpeechRecognition.h:
(SpeechRecognition):

Tools:

Add a method for checking whether the mock speech
recognition was aborted.

Also redo the way the mock posts tasks. Instead of posting them all at once,
maintain an internal queue of task objects, and call postTask() for them
once at the time. This means that for example when the page is navigated
away and abort() is called, that call doesn't end up after a bunch
of previously posted events on the event loop.

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::wasMockSpeechRecognitionAborted):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
(WebKit::ClientCallTask::ClientCallTask):
(WebKit::ResultTask::ResultTask):
(WebKit::NoMatchTask::NoMatchTask):
(WebKit::ErrorTask::ErrorTask):
(MockWebSpeechRecognizer::start):
(MockWebSpeechRecognizer::abort):
(MockWebSpeechRecognizer::setError):
(MockWebSpeechRecognizer::MockWebSpeechRecognizer):
(MockWebSpeechRecognizer::startTaskQueue):
(MockWebSpeechRecognizer::StepTask::runIfValid):
* DumpRenderTree/chromium/MockWebSpeechRecognizer.h:
(MockWebSpeechRecognizer::hasBeenAborted):
(MockWebSpeechRecognizer):
(MockWebSpeechRecognizer::taskList):
(Task):
(MockWebSpeechRecognizer::Task::Task):
(MockWebSpeechRecognizer::Task::~Task):
(StepTask):
(MockWebSpeechRecognizer::StepTask::StepTask):

LayoutTests:

Add a layout test to check that speech recognition gets aborted when
navigating away from the page.

* fast/speech/scripted/navigate-away-expected.txt: Added.
* fast/speech/scripted/navigate-away-iframe-expected.txt: Added.
* fast/speech/scripted/navigate-away-iframe.html: Added.
* fast/speech/scripted/navigate-away.html: Added.

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

8 years ago[EFL] Gardening after r120847
commit-queue@webkit.org [Thu, 21 Jun 2012 10:06:23 +0000 (10:06 +0000)]
[EFL] Gardening after r120847
https://bugs.webkit.org/show_bug.cgi?id=89640

Unreviewed gardening. Newly added compositing/backface-visibility/backface-visibility-webgl.html
test does not pass on EFL port due to missing WebGL support.

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-06-21

* platform/efl/TestExpectations:

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

8 years ago[GTK] Add support for window.showModalDialog in WebKit2GTK+
mario@webkit.org [Thu, 21 Jun 2012 08:07:56 +0000 (08:07 +0000)]
[GTK] Add support for window.showModalDialog in WebKit2GTK+
https://bugs.webkit.org/show_bug.cgi?id=79500

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Implement runModal in WebKitUIClient to make the WebKitWebView
emit a 'run-as-modal' signal when requested, creating a new
mainloop there to block user interaction with the original window
while the modal dialog is showing.

* UIProcess/API/gtk/WebKitUIClient.cpp:
(runModal): Call to the new webkitWebViewRunAsModalPage function.
(attachUIClientToView): Add runModal.
* UIProcess/API/gtk/WebKitWebView.cpp:
(_WebKitWebViewPrivate): Add an atribute for a new main loop.
(webkitWebViewFinalize): Make sure the main loop for main dialogs,
if any, is stopped if it was still running.
(webkit_web_view_class_init): Declare new signal 'run-as-modal'.
(webkitWebViewRunAsModal): Emit the 'run-as-modal' signal and, if
handled, create and run a new main loop.
* UIProcess/API/gtk/WebKitWebView.h:
(_WebKitWebViewClass): New handler for the 'run-as-modal' signal.
* UIProcess/API/gtk/WebKitWebViewPrivate.h: Add webkitWebViewRunAsModalPage.

Allow setting and getting the value of WebPage's canRunModal
attribute in the WebProcess from the UIProcess after the creation
of a WebPage, to allow using it from WebKitWebView to allow the
client application to decide whether to allow create modal
dialogs, which would result in launching an additional nested
event loop in the web process, after creating the dialog.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize the new
m_canRunModal attribute, to cache the current status of the
WebPage in the WebProcess.
(WebKit::WebPageProxy::initializeUIClient): Call the new function
setCanRunModal, instead of manually sending the SetCanRunModal message.
(WebKit::WebPageProxy::creationParameters): Use m_canRunModal
instead of m_uiClient.canRunModal when preparing the parameters.
(WebKit::WebPageProxy::setCanRunModal): New public function, it
sets the value of m_canRunModal and sends a message to the Web
process for updating the WebPage, whenever possible.
(WebKit::WebPageProxy::canRunModal): New public function, returns
the value of the m_canRunModal attribute.
* UIProcess/WebPageProxy.h:
(WebPageProxy): Added new public functions and private attribute.

New property in WebKitSettings to be able to decide whether it is
allowed to create and run new child webviews as modal dialogs.

* UIProcess/API/gtk/WebKitSettings.cpp:
(_WebKitSettingsPrivate): New attribute allowModalDialogs.
(webKitSettingsSetProperty): Handle the new property.
(webKitSettingsGetProperty): Ditto.
(webkit_settings_class_init): Install the new property.
(webkitSettingsAttachSettingsToPage): Make sure the WebPage is
initialized with the value of the new property.
(webkit_settings_set_allow_modal_dialogs): New setter.
(webkit_settings_get_allow_modal_dialogs): New getter.
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new accessors.

Connect to the 'notify::allow-modal-dialogs' signal from
WebKitSettings to ensure that canRunModal property of the WebPage
is kept up to date. Ensure that signal handlers for monitoring
settings are disconnected when the webview is finalized.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewSetSettings): Connect to the new signal
'notify::allow-modal-dialogs', from WebKitSettings.
(allowModalDialogsChanged): Callback to update WebPage's
canRunModal property when updated through WebKitSettings.
(webkitWebViewDisconnectSettingsSignalHandlers): Disconnect signal
handlers for monitoring WebKitSettings properties.
(webkitWebViewFinalize): Ensure signal handlers are disconnected.
(webkit_web_view_set_settings): Ditto.
* UIProcess/API/gtk/WebKitWebView.h:

Add new unit tests to check the 'run-as-modal' signal is emitted
only when the new property in WebKitSettings is set to TRUE.

* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewAllowModalDialogs): New unit test to check that modal
dialogs are properly created from JavaScript when allowed.
(testWebViewDisallowModalDialogs): New unit test to check that
it's not possible to create modal dialogs when not allowed.
(beforeAll): Add the new unit test.

Tools:

Add support for modal dialogs in GTK's MiniBrowser.

* MiniBrowser/gtk/BrowserWindow.c:
(webViewRunAsModal):
(webViewCreate):
(webViewDecidePolicy):
(browser_window_new):
* MiniBrowser/gtk/BrowserWindow.h:
* MiniBrowser/gtk/main.c:
(createBrowserWindow):

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

8 years ago[GTK] accessibility/textbox-role-reports-line-number.html fails
mario@webkit.org [Thu, 21 Jun 2012 07:48:52 +0000 (07:48 +0000)]
[GTK] accessibility/textbox-role-reports-line-number.html fails
https://bugs.webkit.org/show_bug.cgi?id=75785

Reviewed by Chris Fleizach.

Move a Mac specific accessibility test to the platform directory.

* platform/gtk/TestExpectations: Removed test from gtk test expectations.
* platform/mac/accessibility/textbox-role-reports-line-number-expected.txt: Renamed from LayoutTests/accessibility/textbox-role-reports-line-number-expected.txt.
* platform/mac/accessibility/textbox-role-reports-line-number.html: Renamed from LayoutTests/accessibility/textbox-role-reports-line-number.html.
* platform/win/accessibility/textbox-role-reports-line-number-expected.txt: Removed.

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

8 years agoWeb Inspector: Move requestId allocation from FileSystem frontend to backend
commit-queue@webkit.org [Thu, 21 Jun 2012 07:23:48 +0000 (07:23 +0000)]
Web Inspector: Move requestId allocation from FileSystem frontend to backend
https://bugs.webkit.org/show_bug.cgi?id=89555

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-06-21
Reviewed by Vsevolod Vlasov.

Source/WebCore:

Test: http/tests/inspector/filesystem/get-filesystem-root.html:
      http/tests/inspector/filesystem/read-directory.html:

* inspector/Inspector.json:
* inspector/InspectorFileSystemAgent.cpp:
(WebCore):
(WebCore::InspectorFileSystemAgent::requestFileSystemRoot):
(WebCore::InspectorFileSystemAgent::requestDirectoryContent):
(WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
* inspector/InspectorFileSystemAgent.h:
(InspectorFileSystemAgent):
* inspector/front-end/FileSystemModel.js:
(WebInspector.FileSystemModel.prototype._originAdded):
(WebInspector.FileSystemModel.prototype._fileSystemRootReceived):
(WebInspector.FileSystemRequestManager):
(WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot.requestAccepted):
(WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot):
(WebInspector.FileSystemRequestManager.prototype._fileSystemRootReceived):
(WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent.requestAccepted):
(WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent):
(WebInspector.FileSystemRequestManager.prototype._directoryContentReceived):
(WebInspector.FileSystemDispatcher.prototype.fileSystemRootReceived):
(WebInspector.FileSystemDispatcher.prototype.directoryContentReceived):

LayoutTests:

* http/tests/inspector/filesystem/filesystem-test.js:
(initialize_FileSystemTest.InspectorTest.dumpReadDirectoryResult):
(initialize_FileSystemTest):
* http/tests/inspector/filesystem/get-filesystem-root.html:
* http/tests/inspector/filesystem/read-directory-expected.txt:
* http/tests/inspector/filesystem/read-directory.html:

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

8 years ago[cairo] improve putByteArray speed by avoiding max/min checks at Color construction.
commit-queue@webkit.org [Thu, 21 Jun 2012 06:08:47 +0000 (06:08 +0000)]
[cairo] improve putByteArray speed by avoiding max/min checks at Color construction.
https://bugs.webkit.org/show_bug.cgi?id=89138

Patch by Arnaud Renevier <arno@renevier.net> on 2012-06-20
Reviewed by Adam Barth.

Color constructor accepts integer arguments and checks if they are
between 0 and 255. In some cases, we already known those numbers to be
within those boundaries. For example when using unsigned chars. So
this patch introduces Color::createUnChecked which return a Color
object without checking for boundaries.

No new tests: no behaviour change

* platform/graphics/Color.cpp:
(WebCore::colorFromPremultipliedARGB):
* platform/graphics/Color.h:
(WebCore::Color::createUnCheked):
(Color):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::putByteArray):

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

8 years ago[Chromium] Damage tracker is not used without partial swap, causing valid render...
commit-queue@webkit.org [Thu, 21 Jun 2012 05:39:56 +0000 (05:39 +0000)]
[Chromium] Damage tracker is not used without partial swap, causing valid render passes to be removed
https://bugs.webkit.org/show_bug.cgi?id=89589

Patch by Zeev Lieber <zlieber@chromium.org> on 2012-06-20
Reviewed by Adrienne Walker.

Source/WebCore:

When not using partial swap, the CCDamageTracker was not used, and
its m_currentDamageRect was always empty. As a result,
CCLayerTreeHostImpl was thinking no content was changed and was
removing more textures than needed. Fixed this by turning on
CCDamageTracker usage even if not using partial swap, but
overwriting the rootScissorRect with viewport rect if required.

Added unit tests to exercise this scenario.

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):

Source/WebKit/chromium:

Added unit tests to check surface texture caching when partial
swap is not used.

* tests/CCLayerTreeHostImplTest.cpp:

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

8 years ago[Forms] Make step action of SpinButtonElement replaceable
yosin@chromium.org [Thu, 21 Jun 2012 05:11:25 +0000 (05:11 +0000)]
[Forms] Make step action of SpinButtonElement replaceable
https://bugs.webkit.org/show_bug.cgi?id=89439

Reviewed by Kent Tamura.

This patch introduces SpinButtonElement::Callback to specify step
action by control clients for using SpinButtonElement by
TextFieldInputType and future version of TimeInputField.

In addition to this improving flexibility of SpinButtonElement, we
free HTMLInputElement from SpinButtonElement dependency on
stepUpFromRenderer.

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

* html/HTMLInputElement.cpp: Removed stepUpFromRenderer().
* html/HTMLInputElement.h: Removed stepUpFromRenderer().
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::~TextFieldInputType): Added to call SpinButtonElement::removeStepActionHandler.
(WebCore::TextFieldInputType::handleKeydownEventForSpinButton): Changed to call spinButtonStep{Down,Up}
(WebCore::TextFieldInputType::handleWheelEventForSpinButton): Changed to call spinButtonStep{Down,Up}
(WebCore::TextFieldInputType::createShadowSubtree): Added SpinButtonElement::StepActionHandler parameter.
(WebCore::TextFieldInputType::destroyShadowSubtree): Added to call SpinButtonElement::removeStepActionHandler.
(WebCore::TextFieldInputType::spinButtonStepDown): Added for implementation of SpinButtonElement::StepActionHandler.
(WebCore::TextFieldInputType::spinButtonStepUp): Added for implementation of SpinButtonElement::StepActionHandler.
* html/TextFieldInputType.h:
(TextFieldInputType):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SpinButtonElement::SpinButtonElement): Added StepActionHandler parameter.
(WebCore::SpinButtonElement::defaultEventHandler): Changed to call doStepAction.
(WebCore::SpinButtonElement::doStepAction): Added to call StepActionHandler if possible.
(WebCore::SpinButtonElement::step): Changed to call doStepAction.
* html/shadow/TextControlInnerElements.h:
(StepActionHandler): Added.

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

8 years ago[chromium] Modify CCDamageTracker hash to allow for layer id 0
enne@google.com [Thu, 21 Jun 2012 04:46:05 +0000 (04:46 +0000)]
[chromium] Modify CCDamageTracker hash to allow for layer id 0
https://bugs.webkit.org/show_bug.cgi?id=89631

Reviewed by James Robinson.

HashMap has the bizarre property that 0 is the empty value for integer
keys. Modify the damage tracking HashMap to use negative values for
both the empty and the deleted key traits. Additionally, make sure we
never generate negative layer IDs in practice.

Test: passes webkit_unit_tests with the patch in bug 89589 applied.

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
* platform/graphics/chromium/cc/CCDamageTracker.h:
(RectMapKeyTraits):
(WebCore::CCDamageTracker::RectMapKeyTraits::emptyValue):
(WebCore::CCDamageTracker::RectMapKeyTraits::constructDeletedValue):
(WebCore::CCDamageTracker::RectMapKeyTraits::isDeletedValue):
(CCDamageTracker):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):

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

8 years ago[WinCairo] Unreviewed build fix.
bfulgham@webkit.org [Thu, 21 Jun 2012 04:27:18 +0000 (04:27 +0000)]
[WinCairo] Unreviewed build fix.
The wrapper script that launched new- and old-run-webkit-tests
was discarding the --wincairo argument needed to get the proper
test infrastructure to build under WinCairo.

* Scripts/run-webkit-tests: Emulate the Qt, Wx, Chromium, etc.,
behavior to chain the --wincairo flag through to the new build
and test scripts.

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

8 years agoUse Dictionary in MutationObserver.observe to kill custom code
adamk@chromium.org [Thu, 21 Jun 2012 04:18:51 +0000 (04:18 +0000)]
Use Dictionary in MutationObserver.observe to kill custom code
https://bugs.webkit.org/show_bug.cgi?id=89629

Reviewed by Ryosuke Niwa.

Move code for dictionary parsing in MutationObserver.observe
that used to be duplicated (with different implementations)
in JSC and V8 bindings into WebKitMutationObserver.cpp, using
the new Dictionary interface.

No new tests, no change in behavior.

* bindings/js/JSWebKitMutationObserverCustom.cpp:
* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
* dom/WebKitMutationObserver.cpp:
(WebCore::WebKitMutationObserver::observe):
* dom/WebKitMutationObserver.h:
(WebCore):
* dom/WebKitMutationObserver.idl:

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

8 years agoUnreviewed, rolling out r120889.
commit-queue@webkit.org [Thu, 21 Jun 2012 02:03:44 +0000 (02:03 +0000)]
Unreviewed, rolling out r120889.
http://trac.webkit.org/changeset/120889
https://bugs.webkit.org/show_bug.cgi?id=89630

[Chromium] webkit_unit_tests didDrawNotCalledOnHiddenLayer
start failing (Requested by ukai on #webkit).

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

Source/WebCore:

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:

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

8 years agoReduced (but did not eliminate) use of "berzerker GC"
ggaren@apple.com [Thu, 21 Jun 2012 02:00:08 +0000 (02:00 +0000)]
Reduced (but did not eliminate) use of "berzerker GC"
https://bugs.webkit.org/show_bug.cgi?id=89237

Reviewed by Gavin Barraclough.

(PART 1)

This patch turned out to be crashy, so I'm landing the non-crashy bits
first.

This part is pre-requisite refactoring. I didn't actually turn off
"berzerker GC" or turn on incremental shrinking.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::removeBlock): Make sure to clear the free list when
we throw away the block we're currently allocating out of. Otherwise, we'll
allocate out of a stale free list.

* heap/MarkedSpace.cpp:
(JSC::Free::Free):
(JSC::Free::operator()):
(JSC::Free::returnValue): Refactored this functor to use a shared helper
function, so we can share our implementation with the incremental sweeper.

Also changed to freeing individual blocks immediately instead of linking
them into a list for later freeing. This makes the programming interface
simpler, and it's slightly more efficient to boot.

(JSC::MarkedSpace::~MarkedSpace): Updated for rename.

(JSC::MarkedSpace::freeBlock):
(JSC::MarkedSpace::freeOrShrinkBlock): New helper functions to share behavior
with the incremental sweeper.

(JSC::MarkedSpace::shrink): Updated for new functor behavior.

* heap/MarkedSpace.h: Statically typed languages are awesome.

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

8 years agoDFG should optimize ResolveGlobal
fpizlo@apple.com [Thu, 21 Jun 2012 01:38:49 +0000 (01:38 +0000)]
DFG should optimize ResolveGlobal
https://bugs.webkit.org/show_bug.cgi?id=89617

Reviewed by Oliver Hunt.

This adds inlining of ResolveGlobal accesses that are known monomorphic. It also
adds the specific function optimization to ResolveGlobal, when it is inlined. And,
it makes internal functions act like specific functions, since that will be the
most common use-case of this optimization.

This is only a slighy speed-up (sub 1%), since we don't yet do the obvious thing
with this optimization, which is to completely inline common "globally resolved"
function and constructor calls, like "new Array()".

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::globalResolveInfoForBytecodeOffset):
* bytecode/CodeBlock.h:
(CodeBlock):
(JSC::CodeBlock::numberOfGlobalResolveInfos):
* bytecode/GlobalResolveInfo.h:
(JSC::getGlobalResolveInfoBytecodeOffset):
(JSC):
* bytecode/ResolveGlobalStatus.cpp: Added.
(JSC):
(JSC::computeForStructure):
(JSC::computeForLLInt):
(JSC::ResolveGlobalStatus::computeFor):
* bytecode/ResolveGlobalStatus.h: Added.
(JSC):
(ResolveGlobalStatus):
(JSC::ResolveGlobalStatus::ResolveGlobalStatus):
(JSC::ResolveGlobalStatus::state):
(JSC::ResolveGlobalStatus::isSet):
(JSC::ResolveGlobalStatus::operator!):
(JSC::ResolveGlobalStatus::isSimple):
(JSC::ResolveGlobalStatus::takesSlowPath):
(JSC::ResolveGlobalStatus::structure):
(JSC::ResolveGlobalStatus::offset):
(JSC::ResolveGlobalStatus::specificValue):
* dfg/DFGByteCodeParser.cpp:
(ByteCodeParser):
(JSC::DFG::ByteCodeParser::handleGetByOffset):
(DFG):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
* runtime/JSObject.cpp:
(JSC::getCallableObjectSlow):
(JSC):
(JSC::JSObject::put):
(JSC::JSObject::putDirectVirtual):
(JSC::JSObject::putDirectAccessor):
* runtime/JSObject.h:
(JSC):
(JSC::getCallableObject):
(JSC::JSObject::putOwnDataProperty):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectWithoutTransition):

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

8 years agoSource/WebCore: [Shadow][Editing] Deleting character in distributed element caused...
hayato@chromium.org [Thu, 21 Jun 2012 01:34:11 +0000 (01:34 +0000)]
Source/WebCore: [Shadow][Editing] Deleting character in distributed element caused a crash.
https://bugs.webkit.org/show_bug.cgi?id=88484

Reviewed by Ryosuke Niwa.

If we mutate nodes which are children of a shadow host, it causes
ElementShadow::invalidateDistribution().  As a result, shadow host
is detached (and lazyAttached()) and its renderer is gone.  That
causes assertion error since isEditablePosition() assumes
anchorNode's style was correctly calculated.

This patch makes isEditablePosition() call
document->updateLayoutIgnorePendingStylesheets() so that it does
not return a bogus result.

There is an exceptional caller of isEditablePosition,
RenderBlock::paintCaret(), from where we can not call
updateLayout() in isEditablePosition because it hits assertion,
ASSERT(!isPainting). So I've added the third parameter to
isEditablePosition to control updating the style.

Test: edition/shadow/delete-characters-in-distributed-node.html

* editing/FrameSelection.h:
(WebCore::FrameSelection::rendererIsEditable):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::rendererIsEditable):
(WebCore):
* editing/VisibleSelection.h:
(VisibleSelection):
* editing/htmlediting.cpp:
(WebCore::isEditablePosition):
* editing/htmlediting.h:
(WebCore):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):

LayoutTests: [Shadow][Editing] Deleting character in distributed element caused a crash
https://bugs.webkit.org/show_bug.cgi?id=88484

Reviewed by Ryosuke Niwa.

* editing/shadow/delete-characters-in-distributed-node-crash-expected.txt: Added.
* editing/shadow/delete-characters-in-distributed-node-crash.html: Added.

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

8 years agoUnmodified form control value are overwritten by another form
tkent@chromium.org [Thu, 21 Jun 2012 01:31:08 +0000 (01:31 +0000)]
Unmodified form control value are overwritten by another form
control value with the same name after navigating and going back
https://bugs.webkit.org/show_bug.cgi?id=89409

Reviewed by Hajime Morita.

Source/WebCore:

Detail of the bug:
If a page had multiple form controls of which names and types were
identical like the following:
  <input type=text name=name1 id=input1>
  <input type=text name=name1 id=input2>
and a user updated the value of the second control, then went to
another page and went back to the page again, we restored the updated
value to the first element, and didn't update the second element.

We didn't save unmodified control state, and the form state data
had no ways to represent "this control should be skipped".

How to resovle the bug:
We need to represent "this control should be skipped" in the
seriazlied form state vector.

- A serialized control state had three items:
        name, type, value.
  Now we change it to:
        name, type, flag, optional value

- It is definitely incompatible with serizlized state produced by
older WebCore. So, we need to add the signature string to
represent the version of serialized state format.

- Because the state for a form control is variable-length and we
can't deserialize it in reverse-order, we change the on-memory
representation from Vector<> to Deque<>.

Test: fast/forms/state-restore-to-non-edited-controls.html

* html/FormController.cpp:
(WebCore::FormControlState::serializeTo):
Added. Serialize a state for a form control to a string vector.
(WebCore::FormControlState::deserialize):
Added. Produce a FormControlState object from the specified string vector.
It can produce a FromControlState of the failure type.
(WebCore::formStateSignature): The signature string of the serialized state.
(WebCore::FormController::formElementsState):
 - Capacity:
  The size of seirlized data for one form control is typically 4.
  +1 for the signature.
 - We need to store a FormControlState with no values.
(WebCore::FormController::setStateForNewFormElements):
 - We can't iterate over the stateVector in reverse order any more
   because serialized control state is variable-length.
 - We put FormControlState objects to HashMap instead of String objects.
(WebCore::FormController::takeStateForFormElement):
 Updated for Deque<>.
* html/FormController.h:
(FormControlState): Declare deserialize() and serializeTo().
(WebCore::FormControlState::isFailure): Added.
(WebCore::FormControlState::FormControlState):
Added to create a FormControlState with failure type.
(FormController):
Change the value type of m_stateForNewFormElements from Vector<String>
to Deque<FormControlState>.

LayoutTests:

* fast/forms/resources/state-restore-broken-state-2.html:
Take care of the signature string at the beginning of the array.
* fast/forms/state-restore-broken-state-expected.txt:
Updated for the serialized format change.
* fast/forms/state-restore-to-non-edited-controls-expected.txt:
* fast/forms/state-restore-to-non-edited-controls.html:
Add a test for a case of duplicated names.

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

8 years agoUnskip fast/hidpi/device-scale-factor-paint.html
abarth@webkit.org [Thu, 21 Jun 2012 01:29:36 +0000 (01:29 +0000)]
Unskip fast/hidpi/device-scale-factor-paint.html
https://bugs.webkit.org/show_bug.cgi?id=89618

Reviewed by Beth Dakin.

Now that this test doesn't cause WebKit2 to crash, we can unskip it.

* fast/hidpi/device-scale-factor-paint-expected.html: Removed.
    - Previously, this test was a reftest, but the reference also tried
      to set the device scale factor, which seems problematic. This
      patch converts the test to a normal image test. There aren't any
      scrollbars or text, so many platforms should be able to use the
      same expected PNG file.
* fast/hidpi/device-scale-factor-paint.html:
    - Wrap the call to notifyDone in a thunk because it doesn't work otherwise.
* platform/mac/Skipped:
* platform/mac/fast/hidpi/device-scale-factor-paint-expected.png: Added.
* platform/mac/fast/hidpi/device-scale-factor-paint-expected.txt: Added.
* platform/wk2/Skipped:

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

8 years ago[CSS Shaders] Rename CustomFilterShader class name to CustomFilterCompiledProgram
achicu@adobe.com [Thu, 21 Jun 2012 01:13:56 +0000 (01:13 +0000)]
[CSS Shaders] Rename CustomFilterShader class name to CustomFilterCompiledProgram
https://bugs.webkit.org/show_bug.cgi?id=89578

Reviewed by Dean Jackson.

I've renamed CustomFilterShader to CustomFilterCompiledProgram to make it obvious that it is the result of
calling CustomFilterProgram::compileProgramWithContext.

No new tests, just renamed an existing class.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/filters/CustomFilterCompiledProgram.cpp: Renamed from Source/WebCore/platform/graphics/filters/CustomFilterShader.cpp.
(WebCore):
(WebCore::CustomFilterCompiledProgram::defaultVertexShaderString):
(WebCore::CustomFilterCompiledProgram::defaultFragmentShaderString):
(WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
(WebCore::CustomFilterCompiledProgram::compileShader):
(WebCore::CustomFilterCompiledProgram::linkProgram):
(WebCore::CustomFilterCompiledProgram::initializeParameterLocations):
(WebCore::CustomFilterCompiledProgram::uniformLocationByName):
(WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram):
* platform/graphics/filters/CustomFilterCompiledProgram.h: Renamed from Source/WebCore/platform/graphics/filters/CustomFilterShader.h.
(WebCore):
* platform/graphics/filters/CustomFilterProgram.cpp:
(WebCore::CustomFilterProgram::compileProgramWithContext): Renamed method from createShaderWithContext to compileProgramWithContext.
* platform/graphics/filters/CustomFilterProgram.h:
(WebCore):
* platform/graphics/filters/FECustomFilter.cpp: Renamed m_shader to m_compiledProgram.
(WebCore::FECustomFilter::platformApplySoftware):
(WebCore::FECustomFilter::initializeContext):
(WebCore::FECustomFilter::bindProgramParameters):
(WebCore::FECustomFilter::bindProgramAndBuffers):
* platform/graphics/filters/FECustomFilter.h:
(WebCore):
(FECustomFilter):

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

8 years agoAdd a performance test for paths in SVG
pdr@google.com [Thu, 21 Jun 2012 01:03:59 +0000 (01:03 +0000)]
Add a performance test for paths in SVG
https://bugs.webkit.org/show_bug.cgi?id=89547

Reviewed by Ryosuke Niwa.

This change adds the first performance test for SVG paths.
In the test we modify complex cubic paths in several ways, testing:
transformations, clipping, d attribute changes, stroke properties,
text on a path, and opacity.

Sample test results on my Linux desktop:
    RESULT SVG: SvgCubics= 68.85 ms
    median= 69.5 ms, stdev= 4.70398767005 ms, min= 56.0 ms, max= 75.0 ms

    RESULT SVG: SvgCubics= 68.4 ms
    median= 69.0 ms, stdev= 3.51283361405 ms, min= 59.0 ms, max= 74.0 ms

    RESULT SVG: SvgCubics= 66.95 ms
    median= 67.0 ms, stdev= 3.4420197559 ms, min= 59.0 ms, max= 74.0 ms

    RESULT SVG: SvgCubics= 70.2 ms
    median= 71.5 ms, stdev= 3.23419232576 ms, min= 63.0 ms, max= 74.0 ms

* SVG: Added.
* SVG/SvgCubics.html: Added.

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

8 years agoWeb Inspector: reduce timeline refresh rate
caseq@chromium.org [Thu, 21 Jun 2012 00:53:25 +0000 (00:53 +0000)]
Web Inspector: reduce timeline refresh rate
https://bugs.webkit.org/show_bug.cgi?id=89548

Reviewed by Pavel Feldman.

Minimize resource contention with the inspected page during refresh:

- reduce refresh for both overview and main panes to 300ms
- automatically limit window size to approximately one pageful of events in the lower pane
- do not refresh lower pane for events that are outside of the window

* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane.prototype._update):
(WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
(WebInspector.TimelineOverviewPane.prototype.setWindowTimes): Set overview window by times.
(WebInspector.TimelineOverviewPane.prototype._updateWindow):
(WebInspector.TimelineOverviewPane.prototype._scheduleRefresh): Refresh once in 300ms (insted of once in 100ms).
(WebInspector.TimelineOverviewWindow.prototype._setWindow):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._onTimelineEventRecorded): Do not refresh if the new record is outside of window.
(WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
(WebInspector.TimelinePanel.prototype._resetPanel):
(WebInspector.TimelinePanel.prototype._scheduleRefresh): Refresh rate: 100ms -> 300ms.
(WebInspector.TimelinePanel.prototype._refreshRecords): Automatically set overview window.
* inspector/front-end/TimelinePresentationModel.js: Expose filterRecords
(WebInspector.TimelinePresentationModel.prototype.filteredRecords):
(WebInspector.TimelinePresentationModel.prototype.filterRecords):
(WebInspector.TimelinePresentationModel.prototype._innerFilterRecords):

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

8 years ago[WK2] Color chooser API missing
commit-queue@webkit.org [Thu, 21 Jun 2012 00:43:59 +0000 (00:43 +0000)]
[WK2] Color chooser API missing
https://bugs.webkit.org/show_bug.cgi?id=87495

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-06-20
Reviewed by Andreas Kling.

Added ColorChooser API to WebKit2. This API allows the
embedder to define a custom color picker for <input type="color">.

Only one ColorChooser can be active for a page at a time. Although
the implementation doesn't not assume a modal dialog, no other
color chooser will be created until the active one is closed.

Also added stubs for all platforms, so it wont break the build when
enabling color chooser, even though they don't have the backend
implemented yet.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit):
(WebKit::PageClientImpl::createColorChooserProxy):
* UIProcess/API/efl/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit):
(WebKit::PageClientImpl::createColorChooserProxy):
* UIProcess/API/gtk/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit):
(WebKit::PageClientImpl::createColorChooserProxy):
* UIProcess/PageClient.h:
(WebKit):
(PageClient):
* UIProcess/WebColorChooserProxy.h: Added.
(WebCore):
(WebKit):
(WebColorChooserProxy):
(Client):
(WebKit::WebColorChooserProxy::Client::~Client):
(WebKit::WebColorChooserProxy::~WebColorChooserProxy):
(WebKit::WebColorChooserProxy::invalidate):
(WebKit::WebColorChooserProxy::WebColorChooserProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit):
(WebKit::WebPageProxy::showColorChooser):
(WebKit::WebPageProxy::setColorChooserColor):
(WebKit::WebPageProxy::endColorChooser):
(WebKit::WebPageProxy::didChooseColor):
(WebKit::WebPageProxy::didEndColorChooser):
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtPageClient.cpp:
(WebKit):
(WebKit::QtPageClient::createColorChooserProxy):
* UIProcess/qt/QtPageClient.h:
(QtPageClient):
* UIProcess/win/WebView.cpp:
(WebKit):
(WebKit::WebView::createColorChooserProxy):
* UIProcess/win/WebView.h:
(WebView):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createColorChooser):
* WebProcess/WebCoreSupport/WebColorChooser.cpp: Added.
(WebKit):
(WebKit::WebColorChooser::WebColorChooser):
(WebKit::WebColorChooser::~WebColorChooser):
(WebKit::WebColorChooser::didChooseColor):
(WebKit::WebColorChooser::didEndChooser):
(WebKit::WebColorChooser::disconnectFromPage):
(WebKit::WebColorChooser::setSelectedColor):
(WebKit::WebColorChooser::endChooser):
* WebProcess/WebCoreSupport/WebColorChooser.h: Added.
(WebCore):
(WebKit):
(WebColorChooser):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::close):
(WebKit):
(WebKit::WebPage::setActiveColorChooser):
(WebKit::WebPage::didEndColorChooser):
(WebKit::WebPage::didChooseColor):
* WebProcess/WebPage/WebPage.h:
(WebKit):
(WebPage):
(WebKit::WebPage::activeColorChooser):
* WebProcess/WebPage/WebPage.messages.in:
* win/WebKit2.vcproj:

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

8 years ago[Chromium] Damage tracker is not used without partial swap, causing valid render...
commit-queue@webkit.org [Thu, 21 Jun 2012 00:43:08 +0000 (00:43 +0000)]
[Chromium] Damage tracker is not used without partial swap, causing valid render passes to be removed
https://bugs.webkit.org/show_bug.cgi?id=89589

Patch by Zeev Lieber <zlieber@chromium.org> on 2012-06-20
Reviewed by Adrienne Walker.

Source/WebCore:

When not using partial swap, the CCDamageTracker was not used, and
its m_currentDamageRect was always empty. As a result,
CCLayerTreeHostImpl was thinking no content was changed and was
removing more textures than needed. Fixed this by turning on
CCDamageTracker usage even if not using partial swap, but
overwriting the rootScissorRect with viewport rect if required.

Added unit tests to exercise this scenario.

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):

Source/WebKit/chromium:

Added unit tests to check surface texture caching when partial
swap is not used.

* tests/CCLayerTreeHostImplTest.cpp:

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

8 years agoIndexedDB: Remove redundant IDBObjectStore.delete() overloads
jsbell@chromium.org [Thu, 21 Jun 2012 00:31:41 +0000 (00:31 +0000)]
IndexedDB: Remove redundant IDBObjectStore.delete() overloads
https://bugs.webkit.org/show_bug.cgi?id=89587

Reviewed by Darin Fisher.

Source/WebCore:

The IDBObjectStore.delete(IDBKey) overload can delegate to the delete(IDBKeyRange)
overload. Also cleaned up redundant checks in related overloads.

Test: storage/indexeddb/deleted-objects.html

* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::deleteFunction): Call keyRange variant instead.
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::get): Remove redundant deleted/invalid IDBKey checks.
(WebCore::IDBIndex::getKey): Remove redundant deleted/invalid IDBKey checks.
* Modules/indexeddb/IDBKeyRange.cpp: Null IDBKeys are not acceptable; currently
not passed in by any callers.
(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get): Was missing deleted check in IDBKeyRange overload.
Removed redundant checks in IDBKey overload.
(WebCore::IDBObjectStore::deleteFunction): Delegate to IDBKeyRange overload.
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Remove IDBKey overload.
* Modules/indexeddb/IDBObjectStoreBackendImpl.h: Remove IDBKey overload.
(IDBObjectStoreBackendImpl):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove IDBKey overload.

Source/WebKit/chromium:

* public/WebIDBObjectStore.h: Add note to remove overload when Chromium is updated.
(WebIDBObjectStore):
* src/IDBObjectStoreBackendProxy.cpp: Delete IDBKey overload.
* src/IDBObjectStoreBackendProxy.h: Delete IDBKey overload.
(IDBObjectStoreBackendProxy):
* src/WebIDBObjectStoreImpl.cpp: Delete IDBKey overload.
* src/WebIDBObjectStoreImpl.h: Delete IDBKey overload.
(WebIDBObjectStoreImpl):

LayoutTests:

* storage/indexeddb/deleted-objects-expected.txt:
* storage/indexeddb/resources/deleted-objects.js: Test IDBKeyRange overloads.
(openDatabase.request.onsuccess.request.onsuccess):
(openDatabase.request.onsuccess):
(openDatabase):

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

8 years ago[Shadow][Editing] Selection will break editing boundaries in Shadow DOM.
shinyak@chromium.org [Thu, 21 Jun 2012 00:10:42 +0000 (00:10 +0000)]
[Shadow][Editing] Selection will break editing boundaries in Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=89075

Reviewed by Antti Koivisto.

Source/WebCore:

At the shadow boundary, some styles (e.g. user-modify, text-decoration) cannot be inherited
from the shadow host. However, when style property cache is used, such styles are wrongly
inherited from the cache.

So this patch makes not to use cache for inehrited styles at the shadow boundary.

Tests: editing/shadow/breaking-editing-boundary-with-table.html
       editing/shadow/contenteditable-propagation-at-shadow-boundary.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

LayoutTests:

Test cases to confirm that (1) selection does not break editing boundary,
and (2) content-editable is not propagated from shadow host to shadow DOM.

Actually a patch for Bug 88514 contains a test for (2), but it is not enough.

* editing/shadow/breaking-editing-boundary-with-table.html: Added.
* editing/shadow/contenteditable-propagation-at-shadow-boundary.html: Added.

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

8 years agoFunctions on global objects should be specializable
fpizlo@apple.com [Wed, 20 Jun 2012 23:55:18 +0000 (23:55 +0000)]
Functions on global objects should be specializable
https://bugs.webkit.org/show_bug.cgi?id=89615

Reviewed by Oliver Hunt.

I tested to see if this brought back the bug in https://bugs.webkit.org/show_bug.cgi?id=33343,
and it didn't. Bug 33343 was the reason why we disabled global object function specialization
to begin with. So I'm guessing this is safe.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):

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

8 years agoSource/WebCore: Moving cookieEnabled/setCookieEnabled from Page to Settings.
commit-queue@webkit.org [Wed, 20 Jun 2012 23:49:53 +0000 (23:49 +0000)]
Source/WebCore: Moving cookieEnabled/setCookieEnabled from Page to Settings.
https://bugs.webkit.org/show_bug.cgi?id=89545

Patch by Garret Kelly <gdk@chromium.org> on 2012-06-20
Reviewed by Adam Barth.

* dom/Document.cpp:
(WebCore::Document::cookie):
(WebCore::Document::setCookie):
* page/Navigator.cpp:
(WebCore::Navigator::cookieEnabled):
* page/Page.h:
(Page):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setCookieEnabled):
(WebCore::Settings::cookieEnabled):
(Settings):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):

Source/WebKit/chromium: Moving cookieEnabled/setCookieEnabled from Page to Settings, and
exposing through WebSettings.
https://bugs.webkit.org/show_bug.cgi?id=89545

Patch by Garret Kelly <gdk@chromium.org> on 2012-06-20
Reviewed by Adam Barth.

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setCookieEnabled):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

Source/WebKit/mac: Moving cookieEnabled/setCookieEnabled from Page to Settings.
https://bugs.webkit.org/show_bug.cgi?id=89545

Patch by Garret Kelly <gdk@chromium.org> on 2012-06-20
Reviewed by Adam Barth.

* WebView/WebView.mm:
(-[WebView _cookieEnabled]):
(-[WebView _setCookieEnabled:]):

Source/WebKit/win: Moving cookieEnabled/setCookieEnabled from Page to Settings.
https://bugs.webkit.org/show_bug.cgi?id=89545

Patch by Garret Kelly <gdk@chromium.org> on 2012-06-20
Reviewed by Adam Barth.

* WebView.cpp:
(WebView::setCookieEnabled):
(WebView::cookieEnabled):

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

8 years agointernals.settings.setDeviceScaleFactor doesn't work for WebKit2 and must be removed
abarth@webkit.org [Wed, 20 Jun 2012 23:37:47 +0000 (23:37 +0000)]
internals.settings.setDeviceScaleFactor doesn't work for WebKit2 and must be removed
https://bugs.webkit.org/show_bug.cgi?id=89274

Reviewed by James Robinson.

Source/WebCore:

Using this window.internals API causes the apple-mac port to ASSERT in
WebKit2 because WebKit2 keeps a copy of this state in the UI process.
When a test uses this internals API, the WebCore state gets out of sync
with the state in the UI process.

Tests should use setBackingScaleFactor instead.

* testing/InternalSettings.cpp:
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

LayoutTests:

* fast/hidpi/device-scale-factor-paint.html:

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

8 years agoWeb Inspector: persist timeline panel overview mode
caseq@chromium.org [Wed, 20 Jun 2012 23:36:06 +0000 (23:36 +0000)]
Web Inspector: persist timeline panel overview mode
https://bugs.webkit.org/show_bug.cgi?id=88711

Reviewed by Pavel Feldman.

- replace all internal methods of switching to a new mode of TimelineOverviewPane with setMode();
- make current mode a persistent setting;

* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane):
(WebInspector.TimelineOverviewPane.prototype.setMode):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):

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

8 years agoPerform hit-test from correct frame in isRectTopmost()
commit-queue@webkit.org [Wed, 20 Jun 2012 23:31:17 +0000 (23:31 +0000)]
Perform hit-test from correct frame in isRectTopmost()
https://bugs.webkit.org/show_bug.cgi?id=89492

Patch by Raymes Khoury <raymes@chromium.org> on 2012-06-20
Reviewed by Levi Weintraub.

Hit-testing was being performed from the main frame, which gave the
incorrect result if the plugin was in a different frame.

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

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

8 years ago<rdar://problem/11653784> and https://bugs.webkit.org/show_bug.cgi?id=89590
beidson@apple.com [Wed, 20 Jun 2012 23:05:04 +0000 (23:05 +0000)]
<rdar://problem/11653784> and https://bugs.webkit.org/show_bug.cgi?id=89590
showModalDialog message handling is flaky in WebKit2

Because RunLoop::performWork() swaps the function queue to a temporary Vector before calling
the functions an inner run-loop - such as we see with running a modal dialog - does not have
a change to handle any of the functions that were queued after the WebPageProxy::RunModal message.

By servicing the functions in the queue one at a time we can give the RunLoop a chance to pick up
where it left off if RunLoop::performWork is re-entered.

To guarantee RunLoop::performWork is re-entered to handle those functions we also need to signal
its source before entering the modal run loop so our RunLoop is woken up.

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.exp.in:
* platform/RunLoop.cpp:
(WebCore::RunLoop::performWork): Take the first function off the queue one at a time so subsequent
  functions remain in the queue and can be handled by an inner modal run loop.
* platform/RunLoop.h:
(RunLoop): Change the function queue to be a Deque to efficiently support "takeFirst"

Source/WebKit2:

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::wakeUpRunLoop): Added so the WebPageProxy can signal the runloop to be woken up
  before it enters the modal dialog run loop.
* Platform/CoreIPC/Connection.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runModal): Call wakeUpRunLoop() before entering the modal dialog run loop.

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

8 years ago<http://webkit.org/b/89606> Teach run-safari and debug-safari to work with a Safari...
mrowe@apple.com [Wed, 20 Jun 2012 23:01:14 +0000 (23:01 +0000)]
<webkit.org/b/89606> Teach run-safari and debug-safari to work with a Safari.app that has entitlements

Reviewed by Dan Bernstein.

* Scripts/webkitdirs.pm:
(executableHasEntitlements):
(safariPathFromSafariBundle):

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

8 years ago[chromium] Support mobile device rotation resizing
commit-queue@webkit.org [Wed, 20 Jun 2012 22:57:58 +0000 (22:57 +0000)]
[chromium] Support mobile device rotation resizing
https://bugs.webkit.org/show_bug.cgi?id=86819

Patch by Alexandre Elias <aelias@google.com> on 2012-06-20
Reviewed by Adam Barth.

Resizes on a mobile device are caused either by rotation or
on-screen-keyboard bringup, and need different treatment to remain
naturally laid out, scaled and scrolled without disorienting the user.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::resize):

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

8 years agoAccount for device scale factor when creating image for dragging.
commit-queue@webkit.org [Wed, 20 Jun 2012 22:49:13 +0000 (22:49 +0000)]
Account for device scale factor when creating image for dragging.
https://bugs.webkit.org/show_bug.cgi?id=89489

Patch by Varun Jain <varunjain@chromium.org> on 2012-06-20
Reviewed by Adam Barth.

.:

* ManualTests/chromium/drag-image-accounts-for-device-scale.html: Added.

Source/WebCore:

Manual Test: ManualTests/chromium/drag-image-accounts-for-device-scale.html

* page/Frame.cpp:
(WebCore::Frame::nodeImage):
(WebCore::Frame::dragImageForSelection):

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

8 years agoFixed typos in the change log.
mitz@apple.com [Wed, 20 Jun 2012 22:36:50 +0000 (22:36 +0000)]
Fixed typos in the change log.

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

8 years agoAdd a != operator to ViewportArguments
zhajiang@rim.com [Wed, 20 Jun 2012 22:35:33 +0000 (22:35 +0000)]
Add a != operator to ViewportArguments
https://bugs.webkit.org/show_bug.cgi?id=87505

Reviewed by Antonio Gomes.
Patch by Jacky Jiang  <zhajiang@rim.com>

Source/WebCore:

Add a != operator to ViewportArguments for convenience.

* dom/ViewportArguments.h:
(ViewportArguments):
(WebCore::ViewportArguments::operator!=):

Source/WebKit/blackberry:

Use != operator of ViewportArguments.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setLoadState):
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
* Api/WebViewportArguments.cpp:
(BlackBerry::WebKit::WebViewportArguments::operator!=):

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

8 years ago[Qt] Unreviewed gardening, skip new failing tests.
ossy@webkit.org [Wed, 20 Jun 2012 22:25:12 +0000 (22:25 +0000)]
[Qt] Unreviewed gardening, skip new failing tests.

* platform/qt/Skipped:

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

8 years agoComputed style tests are a maintenance burden on the project
tony@chromium.org [Wed, 20 Jun 2012 22:15:10 +0000 (22:15 +0000)]
Computed style tests are a maintenance burden on the project
https://bugs.webkit.org/show_bug.cgi?id=87991

Reviewed by Eric Seidel.

Convert computed-style.html, computed-style-without-renderer.html and getComputedStyle-basic.xhtml
to use a whitelist of properties rather than a blacklist. The whitelist includes all properties
that are supported based on the checked in results so all ports can share the same values. Adding
new properties won't cause these tests to be rebaselined.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer.html: Remove indenting and use a fixed
width for the middle div so we don't get fractional pixel values for ports with fractional pixel
values enabled.
* fast/css/getComputedStyle/computed-style.html:
* fast/css/getComputedStyle/resources/property-names.js: Whitelist of common CSS properties.
* platform/chromium-linux-x86/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/chromium-linux/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/chromium-mac-leopard/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/chromium-mac-leopard/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/chromium-mac-snowleopard/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/chromium-mac/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/chromium-mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* platform/chromium-mac/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/chromium-win-vista/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/chromium-win-xp/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/gtk/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/gtk/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* platform/mac/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* platform/qt/svg/css/getComputedStyle-basic-expected.png: Removed.
* platform/qt/svg/css/getComputedStyle-basic-expected.txt: Removed.
* platform/win/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
* platform/win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* svg/css/getComputedStyle-basic-expected.txt:
* svg/css/getComputedStyle-basic.xhtml:

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

8 years agoLet XCode have its own way.
rniwa@webkit.org [Wed, 20 Jun 2012 22:08:15 +0000 (22:08 +0000)]
Let XCode have its own way.

* WebCore.xcodeproj/project.pbxproj:

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

8 years agoMove m_listsInvalidatedAtDocument from NodeListsNodeData to Document
rniwa@webkit.org [Wed, 20 Jun 2012 22:05:12 +0000 (22:05 +0000)]
Move m_listsInvalidatedAtDocument from NodeListsNodeData to Document
https://bugs.webkit.org/show_bug.cgi?id=89603

Reviewed by Andreas Kling.

Moved the variable. m_listsInvalidatedAtDocument is never used in non-Document nodes
so it was just wasting memory space.

* dom/Document.cpp:
(WebCore::Document::registerDynamicSubtreeNodeList):
(WebCore::Document::unregisterDynamicSubtreeNodeList):
(WebCore):
(WebCore::Document::clearNodeListCaches):
* dom/Document.h:
(Document):
* dom/DynamicNodeList.h:
(DynamicSubtreeNodeList):
* dom/Node.cpp:
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
(WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
(WebCore):
(WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): RadioNodeList
is invalidated at document level. No need to invalidate it again here.
(WebCore::NodeListsNodeData::isEmpty):
* dom/NodeRareData.h:
(NodeListsNodeData):

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

8 years agoUnreviewed, rolling out r120821.
commit-queue@webkit.org [Wed, 20 Jun 2012 22:02:41 +0000 (22:02 +0000)]
Unreviewed, rolling out r120821.
http://trac.webkit.org/changeset/120821
https://bugs.webkit.org/show_bug.cgi?id=89605

It made duplicated reviewer entries (Requested by Ossy on
#webkit).

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

* Scripts/webkitpy/common/checkout/changelog.py:
(ChangeLog.set_reviewer):
* Scripts/webkitpy/common/checkout/changelog_unittest.py:
(test_set_reviewer):
(test_set_short_description_and_bug_url):

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