WebKit-https.git
7 years ago[EFL][DRT] Remove extra layoutFrame() call when preparing to send an event via EventS...
rakuco@webkit.org [Tue, 13 Nov 2012 14:06:03 +0000 (14:06 +0000)]
[EFL][DRT] Remove extra layoutFrame() call when preparing to send an event via EventSender.
https://bugs.webkit.org/show_bug.cgi?id=102074

Reviewed by Kenneth Rohde Christiansen.

* DumpRenderTree/efl/EventSender.cpp:
(feedMouseEvent): Do not call DumpRenderTreeSupportEfl::layoutFrame()
when sending an event, as it causes additional repaints that create
wrong pixel results for tests such as
fast/repaint/overflow-auto-in-overflow-auto-scrolled.html.

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

7 years agoWeb Inspector: [Canvas] UI: make the Grid save scrolling position, show wait spinner...
commit-queue@webkit.org [Tue, 13 Nov 2012 14:05:30 +0000 (14:05 +0000)]
Web Inspector: [Canvas] UI: make the Grid save scrolling position, show wait spinner icon
https://bugs.webkit.org/show_bug.cgi?id=102071

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

* inspector/front-end/CanvasProfileView.js:
(WebInspector.CanvasProfileView):
(WebInspector.CanvasProfileView.prototype.dispose):
(WebInspector.CanvasProfileView.prototype.elementsToRestoreScrollPositionsFor):
(WebInspector.CanvasProfileView.prototype._enableWaitIcon):
(WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
(WebInspector.CanvasProfileView.prototype._replayTraceLog):
(WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
(WebInspector.CanvasProfileView.prototype._createCallNode):
* inspector/front-end/canvasProfiler.css:
(#canvas-replay-image.wait):

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

7 years agoWeb Inspector: Settings screen: some panel shortcuts are missing
commit-queue@webkit.org [Tue, 13 Nov 2012 13:50:58 +0000 (13:50 +0000)]
Web Inspector: Settings screen: some panel shortcuts are missing
https://bugs.webkit.org/show_bug.cgi?id=101026

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-11-13
Reviewed by Pavel Feldman.

Panels, that have not been loaded by the time shortcuts view was
initialized, had no chance to register shortcuts.

Solution: move shortcut registration (for shortcuts screen) to panel
descriptors.

More changes: add JsDoc annotations to ShortcutScreen and change "key"
parameter type for raw string to key descriptor object.

* WebCore.gypi: Added TimelinePanelDescriptor.js file.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* inspector/compile-front-end.py: Ditto.
* inspector/front-end/WebKit.qrc: Ditto.
* inspector/front-end/inspector.html: Ditto.
* inspector/front-end/AdvancedSearchController.js: Add JsDoc annotation.
* inspector/front-end/GoToLineDialog.js: Ditto.
* inspector/front-end/CallStackSidebarPane.js: Removed shortcut-screen
shortcuts registration.
* inspector/front-end/ElementsPanel.js: Ditto.
* inspector/front-end/ScriptsPanel.js: Ditto.
* inspector/front-end/StylesSidebarPane.js: Ditto.
* inspector/front-end/TimelinePanel.js: Ditto.
* inspector/front-end/ConsoleView.js: Changes order of lines to increase
readability.
* inspector/front-end/ElementsPanelDescriptor.js: Add shortcut-screen
shortcuts registration and key descriptor constants.
* inspector/front-end/ScriptsPanelDescriptor.js: Ditto.
* inspector/front-end/TimelinePanelDescriptor.js: Ditto.
* inspector/front-end/Panel.js: Removed unused "uregisterShortcut"; made
"registerShortcuts" method accept array of key descriptors.
(WebInspector.PanelDescriptor.prototype.registerShortcuts): Added.
* inspector/front-end/ShortcutsScreen.js: Added JsDoc; changed parameter
type from string to key descriptor.
* inspector/front-end/inspector.js: Register shortcuts using
panel descriptors.
(WebInspector._panelDescriptors): Removed duplicate line.

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

7 years agoOptimize RGB565 and RGBA5551 packing/unpacking functions with NEON intrinsics
rgabor@webkit.org [Tue, 13 Nov 2012 13:44:31 +0000 (13:44 +0000)]
Optimize RGB565 and RGBA5551 packing/unpacking functions with NEON intrinsics
https://bugs.webkit.org/show_bug.cgi?id=102060

Reviewed by Zoltan Herczeg.

Adding more NEONized packing functions to GraphicsContext3DNEON.h.
These functions are three times faster with this intrinsics optimizations.

* platform/graphics/GraphicsContext3D.cpp:
(WebCore):
* platform/graphics/cpu/arm/GraphicsContext3DNEON.h:
(WebCore::ARM::unpackOneRowOfRGBA5551ToRGBA8NEON):
(ARM):
(WebCore::ARM::packOneRowOfRGBA8ToUnsignedShort5551NEON):
(WebCore::ARM::unpackOneRowOfRGB565ToRGBA8NEON):
(WebCore::ARM::packOneRowOfRGBA8ToUnsignedShort565NEON):

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

7 years agoUnreviewed: temporary disable failing test.
loislo@chromium.org [Tue, 13 Nov 2012 13:26:44 +0000 (13:26 +0000)]
Unreviewed: temporary disable failing test.

* tests/MemoryInstrumentationTest.cpp:

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

7 years ago[Qt] Enable Mutation observer
ossy@webkit.org [Tue, 13 Nov 2012 13:20:25 +0000 (13:20 +0000)]
[Qt] Enable Mutation observer
https://bugs.webkit.org/show_bug.cgi?id=102066

Reviewed by Pavel Feldman.

Source/WebCore:

* DerivedSources.pri: Add missing IDL files.

Tools:

* qmake/mkspecs/features/features.pri:

LayoutTests:

* platform/qt/TestExpectations: Unskip now passing tests.

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

7 years agoupdate expectations in advance of skia change for blurred rects
reed@google.com [Tue, 13 Nov 2012 13:15:51 +0000 (13:15 +0000)]
update expectations in advance of skia change for blurred rects
https://bugs.webkit.org/show_bug.cgi?id=101982

Reviewed by NOBODY.

Unreviewed. Expectations change only

* platform/chromium/TestExpectations:

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

7 years ago[Qt] Unreviewed gardening, skip failing tests.
ossy@webkit.org [Tue, 13 Nov 2012 13:03:11 +0000 (13:03 +0000)]
[Qt] Unreviewed gardening, skip failing tests.

* platform/qt/TestExpectations:

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

7 years ago[BlackBerry] DRT - platform/blackberry/editing/text-iterator/findString-markers.html...
commit-queue@webkit.org [Tue, 13 Nov 2012 12:49:42 +0000 (12:49 +0000)]
[BlackBerry] DRT - platform/blackberry/editing/text-iterator/findString-markers.html failed
https://bugs.webkit.org/show_bug.cgi?id=102056

Patch by Xiaobo Wang <xbwang@torchmobile.com.cn> on 2012-11-13
Reviewed by Rob Buis.

RIM PR 235836

TestRunner::findString() was changed to call Page::findString() instead
of WebPage::findNextString(). Page::findString() doesn't update
TextMatch markers.
Work-around by calling both Page::findString() and WebPage::findNextString().

* DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
(TestRunner::findString):

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

7 years agoUnreviewed Qt gardening.
kbalazs@webkit.org [Tue, 13 Nov 2012 12:48:11 +0000 (12:48 +0000)]
Unreviewed Qt gardening.

Skip and rebase some tests, remove png's for reftests.

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt-5.0-wk2/css2.1/20110323/margin-collapse-clear-016-expected.png: Added.
* platform/qt-5.0-wk2/css3/filters/custom/custom-filter-composite-source-atop-expected.png: Added.
* platform/qt-5.0-wk2/css3/filters/custom/missing-custom-filter-shader-expected.png: Added.
* platform/qt-5.0-wk2/svg/animations/animateMotion-additive-2c-expected.png: Removed.
* platform/qt-5.0-wk2/svg/repaint/inner-svg-change-viewBox-expected.png: Added.
* platform/qt/svg/animations/animateMotion-additive-2d-expected.png: Removed.

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

7 years ago[V8] Make isValidDOMObject() static
haraken@chromium.org [Tue, 13 Nov 2012 11:44:57 +0000 (11:44 +0000)]
[V8] Make isValidDOMObject() static
https://bugs.webkit.org/show_bug.cgi?id=101914

Reviewed by Adam Barth.

isValidDOMObject() is used by DOMWrapper.cpp only.

No tests. No change in behavior.

* bindings/v8/V8DOMWrapper.cpp:
(WebCore::isValidDOMObject):
(WebCore):
(WebCore::V8DOMWrapper::maybeDOMWrapper):
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper):

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

7 years ago[CSSRegions] Incorrect computed height for content with region-break-before
mihnea@adobe.com [Tue, 13 Nov 2012 11:39:12 +0000 (11:39 +0000)]
[CSSRegions] Incorrect computed height for content with region-break-before
https://bugs.webkit.org/show_bug.cgi?id=101862

Reviewed by Julien Chaffraix.

Source/WebCore:

When processing the region breaks for auto-height regions, we skipped the case
when the region-break-before occurred in the first region in the chain which was
an auto-height region. Because of that, the region computed height was not 0
as it was supposed to be, but rather LayoutUnit::max() / 2.

Test: fast/regions/autoheight-breakbefore-wrongheight.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addForcedRegionBreak):
Make sure we process also the case when the region-break occurs at offset 0 in the flow thread
and the first region in chain is an auto-height region.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::updateLogicalHeight):
Add an assert to make sure that the computed height for auto-height regions is always less than LayoutUnit::max() / 2.

LayoutTests:

Add a test showing that when content having -webkit-region-break-before:always is flowed
into a region chain with the first region being an auto-height region, the auto-height region
has a computed height of 0 and the content is flowed into the second region in the chain.

* fast/regions/autoheight-breakbefore-wrongheight-expected.txt: Added.
* fast/regions/autoheight-breakbefore-wrongheight.html: Added.

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

7 years agoAdd the TestRunner public API to the ChromiumPublicApi watchlist, and introduce an...
jochen@chromium.org [Tue, 13 Nov 2012 11:31:25 +0000 (11:31 +0000)]
Add the TestRunner public API to the ChromiumPublicApi watchlist, and introduce an entry for ChromiumTestRunner
https://bugs.webkit.org/show_bug.cgi?id=101957

Reviewed by Adam Barth.

Chromium now also depends on the TestRunner public API, and as such, similar rules as for the Chromium WebKit API should apply.

* Scripts/webkitpy/common/config/watchlist:

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

7 years agoMemory instrumentation: remove reportMemoryUsage method from ImageObserver
yurys@chromium.org [Tue, 13 Nov 2012 11:21:33 +0000 (11:21 +0000)]
Memory instrumentation: remove reportMemoryUsage method from ImageObserver
https://bugs.webkit.org/show_bug.cgi?id=102058

Reviewed by Pavel Feldman.

* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::reportMemoryUsage): drive-by fix, no need to report
each element of the vector as generic vector instrumentation will take care of it.
* platform/graphics/Image.cpp: the client is reported as weak pointer to make sure
we don't count its by the pointer to the base class which may differ from the actual
object address.
(WebCore::Image::reportMemoryUsage):
* platform/graphics/ImageObserver.h: removed reportMemoryUsage method from the interface.
(ImageObserver):

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

7 years ago[chromium] move tracking of damaged regions from WebViewHost to WebTestProxy
jochen@chromium.org [Tue, 13 Nov 2012 10:53:50 +0000 (10:53 +0000)]
[chromium] move tracking of damaged regions from WebViewHost to WebTestProxy
https://bugs.webkit.org/show_bug.cgi?id=101927

Reviewed by Adam Barth.

This will allow for sharing the code with content_shell

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::display):
* DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
(WebKit):
(WebTestProxyBase):
(WebTestRunner::WebTestProxy::didInvalidateRect):
(WebTestRunner::WebTestProxy::didScrollRect):
(WebTestRunner::WebTestProxy::scheduleComposite):
(WebTestRunner::WebTestProxy::scheduleAnimation):
(WebTestRunner::WebTestProxy::setWindowRect):
(WebTestRunner::WebTestProxy::show):
(WebTestRunner::WebTestProxy::didAutoResize):
(WebTestRunner::WebTestProxy::postAccessibilityNotification):
* DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
(WebTestRunner::WebTestProxyBase::setPaintRect):
(WebTestRunner):
(WebTestRunner::WebTestProxyBase::paintRect):
(WebTestRunner::WebTestProxyBase::didInvalidateRect):
(WebTestRunner::WebTestProxyBase::didScrollRect):
(WebTestRunner::WebTestProxyBase::scheduleComposite):
(WebTestRunner::WebTestProxyBase::scheduleAnimation):
(WebTestRunner::WebTestProxyBase::show):
(WebTestRunner::WebTestProxyBase::setWindowRect):
(WebTestRunner::WebTestProxyBase::didAutoResize):
(WebTestRunner::WebTestProxyBase::postAccessibilityNotification):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::createNewWindow):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::scheduleAnimation):
(WebViewHost::show):
(WebViewHost::setWindowRect):
(WebViewHost::WebViewHost):
(WebViewHost::proxy):
(WebViewHost::setProxy):
(WebViewHost::reset):
(WebViewHost::paintInvalidatedRegion):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

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

7 years agocheckbox to toggle FPS counter in the inspector's settings
commit-queue@webkit.org [Tue, 13 Nov 2012 10:25:21 +0000 (10:25 +0000)]
checkbox to toggle FPS counter in the inspector's settings
https://bugs.webkit.org/show_bug.cgi?id=99660

Patch by Eberhard Graether <egraether@google.com> on 2012-11-13
Reviewed by Pavel Feldman.

Added a checkbox to the inspector's settings to toggle a FPS counter. The checkbox appears when InspectorClient::canShowFPSCounter() returns true.

Source/Platform:

* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):
(WebKit::WebLayerTreeView::setShowFPSCounter):

Source/WebCore:

No new tests.

* English.lproj/localizedStrings.js:
* inspector/Inspector.json:
* inspector/InspectorClient.h:
(WebCore::InspectorClient::canShowFPSCounter):
(WebCore::InspectorClient::setShowFPSCounter):
(InspectorClient):
* inspector/InspectorPageAgent.cpp:
(PageAgentState):
(WebCore::InspectorPageAgent::enable):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::canShowFPSCounter):
(WebCore):
(WebCore::InspectorPageAgent::setShowFPSCounter):
* inspector/InspectorPageAgent.h:
* inspector/front-end/Settings.js:
* inspector/front-end/SettingsScreen.js:
(WebInspector.GenericSettingsTab):
(WebInspector.GenericSettingsTab.prototype.get _showFPSCounterChanged):
* inspector/front-end/inspector.js:
(WebInspector.doLoadedDone):

Source/WebKit/chromium:

* public/WebView.h:
(WebView):
* src/InspectorClientImpl.cpp:
(WebKit::InspectorClientImpl::canShowFPSCounter):
(WebKit):
(WebKit::InspectorClientImpl::setShowFPSCounter):
* src/InspectorClientImpl.h:
(InspectorClientImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::setShowFPSCounter):
(WebKit):
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
(WebKit::WebViewImpl::loadFontAtlasIfNecessary):
* src/WebViewImpl.h:
(WebViewImpl):

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

7 years agoUnable to set valid time value to input[type=time] with user interaction in some...
tkent@chromium.org [Tue, 13 Nov 2012 10:18:33 +0000 (10:18 +0000)]
Unable to set valid time value to input[type=time] with user interaction in some cases
https://bugs.webkit.org/show_bug.cgi?id=102048

Reviewed by Kentaro Hara.

Source/WebCore:

The implementations of shouldMillisecondFieldReadOnly,
shouldMinuteFieldReadOnly, and shouldSecondFieldReadOnly were
incorrect. We need to check if a part of the minimum value matches to
the corresponding part of the current value.

Also, we had better check hour field editability.

Test: fast/forms/time-multiple-fields/time-multiple-fields-readonly-subfield.html

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldHaveSecondField):
Fix a problem that hh:mm:00.sss didn't create a seconds field.
* html/shadow/DateTimeEditElement.cpp:
(DateTimeEditBuilder): Add shouldHourFieldReadOnly declaration.
(WebCore::DateTimeEditBuilder::visitField):
Add shouldHourFieldReadOnly check to Hour11/Hour12/Hour23/Hour24/Period fields.
(WebCore::DateTimeEditBuilder::shouldHourFieldReadOnly):
Added. An hour field should be read-only if the step value is a multiple
of a day and the hour part of the minimum value matches to the hour part
of the value.
(WebCore::DateTimeEditBuilder::shouldMillisecondFieldReadOnly):
A millisecond field should be read-only if the step value is a multiple
of one second and the millisecond part of the minimum value matches to
the millisecond part of the value.
(WebCore::DateTimeEditBuilder::shouldMinuteFieldReadOnly):
A minute field should be read-only if the step value is a multiple of
one hour and the minute part of the minimum value matches to the minute
part of the value.
(WebCore::DateTimeEditBuilder::shouldSecondFieldReadOnly):
A second field should be read-only if the step value is a multiple of
one minute and the second part of the minimum value matches to the second
part of the value.
* platform/Decimal.cpp:
(WebCore::Decimal::remainder):
Fix a bug in case that the fractional part of quotient is >= 0.5. Also
make this matches to C99, C++11, ECMAScript behavior.

Source/WebKit/chromium:

* tests/DecimalTest.cpp:
(TEST_F): Update and add tests.
2.1 % 3 should be 2.1
10 % -3 should be 1
-10 % -3 should be -1
3.6 % 1.3 should be 1
500 % 1000 should be 500
-500 % 1000 should be -500

LayoutTests:

* fast/forms/time-multiple-fields/time-multiple-fields-readonly-subfield-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-readonly-subfield.html: Added.

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

7 years agoMemory instrumentation: MemoryBlock name should not include full path to the block
yurys@chromium.org [Tue, 13 Nov 2012 10:13:54 +0000 (10:13 +0000)]
Memory instrumentation: MemoryBlock name should not include full path to the block
https://bugs.webkit.org/show_bug.cgi?id=102055

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/InspectorMemoryAgent.cpp: pass only last path component as MemoryBlock name
intead of fully qualified name.

LayoutTests:

Use Image instead of Page.Image as block identifier.

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

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

7 years ago[Qt] Unreviewed Qt gardening.
kadam@inf.u-szeged.hu [Tue, 13 Nov 2012 10:11:57 +0000 (10:11 +0000)]
[Qt] Unreviewed Qt gardening.

Update TestExpectations after r134345.

Patch by Szilard Ledan <szledan@inf.u-szeged.hu> on 2012-11-13

* platform/qt/fast/dynamic/insertAdjacentElement-expected.txt:

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

7 years agoWeb Inspector: get rid of enter/exitTextChangeMode in the editor
pfeldman@chromium.org [Tue, 13 Nov 2012 09:29:17 +0000 (09:29 +0000)]
Web Inspector: get rid of enter/exitTextChangeMode in the editor
https://bugs.webkit.org/show_bug.cgi?id=101845

Reviewed by Vsevolod Vlasov.

They seem to do nothing.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype._textChanged):
(WebInspector.DefaultTextEditor.prototype.editRange):
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
(WebInspector.TextEditorMainPanel.prototype.handleEnterKey.get var):
(WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
(WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
* inspector/front-end/TextEditorModel.js:
(WebInspector.TextEditorModel.endsWithBracketRegex.):

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

7 years agoRemove the custom WebSocket::send for both V8 and JSC
tommyw@google.com [Tue, 13 Nov 2012 09:15:35 +0000 (09:15 +0000)]
Remove the custom WebSocket::send for both V8 and JSC
https://bugs.webkit.org/show_bug.cgi?id=101936

Reviewed by Kentaro Hara.

This patch removes the custom WebSocket::send since it isn't needed anymore.

Patch covered by existing tests.

* Modules/websockets/WebSocket.idl:
* UseV8.cmake:
* WebCore.gypi:
* bindings/js/JSWebSocketCustom.cpp:
* bindings/v8/custom/V8WebSocketCustom.cpp: Removed.

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

7 years agoUnreviewed Qt gardening.
kbalazs@webkit.org [Tue, 13 Nov 2012 09:08:54 +0000 (09:08 +0000)]
Unreviewed Qt gardening.

Amend my last commit, Ossy suggested we should not forget about
past failures because of needed rebaseline.

* platform/qt/TestExpectations:

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

7 years agoUnreviewed Qt gardening.
kbalazs@webkit.org [Tue, 13 Nov 2012 08:55:33 +0000 (08:55 +0000)]
Unreviewed Qt gardening.

Cleanup TestExpectations to pass --lint-test-files.
Removed some duplicated entries.

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt/TestExpectations:

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

7 years agoFix the ARM traditional build after r134332
ossy@webkit.org [Tue, 13 Nov 2012 08:53:09 +0000 (08:53 +0000)]
Fix the ARM traditional build after r134332
https://bugs.webkit.org/show_bug.cgi?id=102044

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2012-11-13
Reviewed by Zoltan Herczeg.

Added missing methods for the MacroAssemblerARM, based on the MacroAssemblerARMv7.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::canJumpReplacePatchableBranchPtrWithPatch):
(MacroAssemblerARM):
(JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatch):
(JSC::MacroAssemblerARM::revertJumpReplacementToPatchableBranchPtrWithPatch):

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

7 years agoWeb Inspector: move indentation logic into TextEditorModel
pfeldman@chromium.org [Tue, 13 Nov 2012 08:48:42 +0000 (08:48 +0000)]
Web Inspector: move indentation logic into TextEditorModel
https://bugs.webkit.org/show_bug.cgi?id=101842

Reviewed by Vsevolod Vlasov.

Source/WebCore:

I'd like to move as much headless logic into the TextEditorModel as possible.
Drive by: removed some dead code, converted getter into function and moved undo
mark state into the model as well.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype.editRange):
(WebInspector.DefaultTextEditor.prototype._syncDecorationsForLine):
(WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
(WebInspector.TextEditorMainPanel.prototype.handleEnterKey.get var):
(WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
(WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
(WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
(WebInspector.TextEditorMainChunk):
(WebInspector.TextEditorMainChunk.prototype.isDecorated):
(WebInspector.TextEditorMainChunk.prototype.set expanded):
* inspector/front-end/TextEditorModel.js:
(WebInspector.TextEditorModel.endsWithBracketRegex.):

LayoutTests:

* inspector/editor/indentation.html:

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

7 years agoop_get_callee should have value profiling
fpizlo@apple.com [Tue, 13 Nov 2012 08:42:47 +0000 (08:42 +0000)]
op_get_callee should have value profiling
https://bugs.webkit.org/show_bug.cgi?id=102047

Reviewed by Sam Weinig.

This will allow us to detect if the callee is always the same, which is probably
the common case for a lot of constructors.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/Opcode.h:
(JSC):
(JSC::padOpcodeName):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_callee):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_callee):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

7 years agoUnreviewed attempt to fix the chromium mac-build after r134348.
hayato@chromium.org [Tue, 13 Nov 2012 08:39:00 +0000 (08:39 +0000)]
Unreviewed attempt to fix the chromium mac-build after r134348.

* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

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

7 years agoWeb Inspector: migrate text editor to mutation observers
pfeldman@chromium.org [Tue, 13 Nov 2012 08:34:35 +0000 (08:34 +0000)]
Web Inspector: migrate text editor to mutation observers
https://bugs.webkit.org/show_bug.cgi?id=101841

Reviewed by Vsevolod Vlasov.

Otherwise, we miss notifications on the removed lines.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype.wasShown):
(WebInspector.DefaultTextEditor.prototype.willHide):
(WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype._wasShown):
(WebInspector.TextEditorMainPanel.prototype._willHide):
(WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
(WebInspector.TextEditorMainPanel.prototype.beginDomUpdates):
(WebInspector.TextEditorMainPanel.prototype.endDomUpdates):
(WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
(WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
(WebInspector.TextEditorMainPanel.prototype._paintLine):
(WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
(WebInspector.TextEditorMainPanel.prototype._handleMutations.else.get if):
(WebInspector.TextEditorMainPanel.prototype._handleMutations):
(WebInspector.TextEditorMainPanel.prototype._collectDirtyLines):
(WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
* inspector/front-end/externs.js:
(WebKitMutation):
(WebKitMutationObserver.prototype.observe):
(WebKitMutationObserver.prototype.disconnect):
* inspector/front-end/textEditor.css:
(.debug-fadeout):
(@-webkit-keyframes debug-fadeout):
(to):

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

7 years agoOptimize RGBA4444ToRGBA8 packing/unpacking functions with NEON intrinsics in Graphics...
rgabor@webkit.org [Tue, 13 Nov 2012 08:33:08 +0000 (08:33 +0000)]
Optimize RGBA4444ToRGBA8 packing/unpacking functions with NEON intrinsics in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=101473

Reviewed by Zoltan Herczeg.

With NEON intrinsics the packing/unpacking functions can be optimized well.
This particular function is about 3 times faster with ARM NEON. On top level tests
the speed up was 1.18x.

* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.pri:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GraphicsContext3D.cpp:
(WebCore):
* platform/graphics/cpu/arm/GraphicsContext3DNEON.h: Added.
(WebCore):
(ARM):
(WebCore::ARM::unpackOneRowOfRGBA4444ToRGBA8NEON):
(WebCore::ARM::packOneRowOfRGBA8ToUnsignedShort4444NEON):

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

7 years agoCrash when replacing parts of text inputs with content: url(...)
tasak@google.com [Tue, 13 Nov 2012 08:23:48 +0000 (08:23 +0000)]
Crash when replacing parts of text inputs with content: url(...)
https://bugs.webkit.org/show_bug.cgi?id=101133

Reviewed by Kent Tamura.

Source/WebCore:

Disable directly setting content of elements in an input element's
shadow dom tree, because the setting breaks input element's behavior.

Tests: fast/forms/number/number-content-url-crash.html
       fast/forms/search/search-content-url-crash.html

* css/html.css:
(input::-webkit-textfield-decoration-container):
Use important to disable overriding an input element's content
property.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::attach):
Added ASSERTION. No content should be applied to
input::-webkit-textfield-decoration-container.

LayoutTests:

* fast/forms/number/number-content-url-crash-expected.txt: Added.
* fast/forms/number/number-content-url-crash.html: Added.
* fast/forms/search/search-content-url-crash-expected.txt: Added.
* fast/forms/search/search-content-url-crash.html: Added.

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

7 years agoCoordinated Graphics: Directly composited animated GIFs only render the first image.
commit-queue@webkit.org [Tue, 13 Nov 2012 08:11:18 +0000 (08:11 +0000)]
Coordinated Graphics: Directly composited animated GIFs only render the first image.
https://bugs.webkit.org/show_bug.cgi?id=102043

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-13
Reviewed by Noam Rosenthal.

.:

Add a test to check that a gif animation can run on a compositing layer.

* ManualTests/animated-gif-on-compositing-layer.html: Added.

Source/WebKit2:

CoordinatedGraphicsLayer::setContentsToImage() checks the pointer to the image,
not nativeImagePtr, so Coordinated Graphics currently draws only the first frame
of gif animations. This patch makes Coordinated Graphics draw gif animations.

In addition, this patch modifies the style of direct image compositing
code to match other parts of CoordinatedGraphicsLayer.

Test: ManualTests/animated-gif-on-compositing-layer.html

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::didChangeImageBacking):
(WebCore):
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::setContentsToImage):
(WebCore::CoordinatedGraphicsLayer::syncImageBacking):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
(WebCore::CoordinatedGraphicsLayer::hasPendingVisibleChanges):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):

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

7 years ago[Qt] REGRESSION(134142): overscaled tiles in pixel test results and MiniBrowser
commit-queue@webkit.org [Tue, 13 Nov 2012 07:49:22 +0000 (07:49 +0000)]
[Qt] REGRESSION(134142): overscaled tiles in pixel test results and MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=101918

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-12
Reviewed by Noam Rosenthal.

Source/WebCore:

Remove TiledBackingStore::rect(), because it is not used anymore.

* platform/graphics/TiledBackingStore.h:
(TiledBackingStore):

Source/WebKit2:

Currently, CoordinatedBackingStore can keep out-dated contents size, because the
size of CoordinatedBackingStore is set by only LayerTreeRenderer::createTile().
Although the size of GraphicsLayer is changed, LayerTreeRenderer::createTile()
is not called. However, LayerTreeRenderer::createTile() is always called, when
the contents scale of GraphicsLayer is changed.

This patch makes sure that we reset the backing store's size to the
layer size when UpdateTile or RemoveTile are called.

* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStore::setSize):
(WebKit::CoordinatedBackingStore::paintToTextureMapper):
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
(CoordinatedBackingStore):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::getBackingStore):
(WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
(WebKit::LayerTreeRenderer::resetBackingStoreSizeToLayerSize):
(WebKit):
(WebKit::LayerTreeRenderer::createTile):
(WebKit::LayerTreeRenderer::removeTile):
(WebKit::LayerTreeRenderer::updateTile):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::createTile):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp:
(WebKit::CoordinatedTile::updateBackBuffer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h:
(CoordinatedTileClient):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::createTile):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

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

7 years agowebkitpy: clean up lint errors, part 1
dpranke@chromium.org [Tue, 13 Nov 2012 07:37:30 +0000 (07:37 +0000)]
webkitpy: clean up lint errors, part 1
https://bugs.webkit.org/show_bug.cgi?id=102024

Reviewed by Adam Barth.

This patch cleans up a lot of miscellaneous minor lint errors that
apparently aren't caught by unit tests, and suppresses a few
false positives.

Also, this patch removes the garden-o-matic "rollout" entry point
since it's no longer being used by the frontend (rather than
fix it to not generate lint errors).

* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive2.run_command):
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.copyfile):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._http_tests):
* Scripts/webkitpy/layout_tests/port/apple.py:
(ApplePort):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.reference_files):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort):
* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidDriver._teardown_performance):
* Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
(ChromiumPortTestCase.TestAndroidPort.__init__):
(ChromiumPortTestCase.test_default_configuration):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(PortTestCase):
(PortTestCase.test_driver_cmd_line):
(PortTestCase.test_expectations_ordering):
* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase._check_that_all_ports_are_available):
* Scripts/webkitpy/style/checkers/python.py:
(Pylinter):
* Scripts/webkitpy/tool/commands/gardenomatic.py:
(GardenOMatic.__init__):
* Scripts/webkitpy/tool/commands/queues.py:
(CommitQueue):
* Scripts/webkitpy/tool/servers/gardeningserver.py:
(GardeningHTTPRequestHandler):
(GardeningHTTPRequestHandler.localresult):

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

7 years ago<rdar://problem/12445176>
weinig@apple.com [Tue, 13 Nov 2012 07:35:18 +0000 (07:35 +0000)]
<rdar://problem/12445176>
WebProcess needs permission to open AppleUpstreamUserClient

Rubber-stamped by Dan Bernstein.

* WebProcess/com.apple.WebProcess.sb.in:

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

7 years ago[V8] We should be able to recover the V8DOMWindowShell more quickly
abarth@webkit.org [Tue, 13 Nov 2012 07:32:07 +0000 (07:32 +0000)]
[V8] We should be able to recover the V8DOMWindowShell more quickly
https://bugs.webkit.org/show_bug.cgi?id=102020

Reviewed by Kentaro Hara.

For isolated worlds, we used to store the V8DOMWindowShell as an
internal field of the inner DOM window. This patch moves the pointer to
an internal field of the v8::Context, which saves us the work of
looking up the inner DOM window.

Unfortunately, we cannot store the V8DOMWindowShell in V8PerContextData
because the V8DOMWindowShell outlives the V8PerContextData. (We destroy
the V8PerContextData when we detach the V8DOMWindowShell from the
frame.)

* bindings/scripts/CodeGeneratorV8.pm:
(GetInternalFields):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initializeIfNeeded):
* bindings/v8/V8DOMWindowShell.h:
(WebCore::V8DOMWindowShell::getEntered):
* bindings/v8/V8PerContextData.h:

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

7 years agowebkitpy: clean up lint errors, part 2
dpranke@chromium.org [Tue, 13 Nov 2012 07:29:59 +0000 (07:29 +0000)]
webkitpy: clean up lint errors, part 2
https://bugs.webkit.org/show_bug.cgi?id=102029

Reviewed by Adam Barth.

This cleans up the remaining lint errors in webkitpy with four exceptions:
1) we don't lint thirdparty/ autoinstalled code, obviously
2) there's an intentional error in the unit tests for pylint itself
3) the implementation of webkit-patch optimize-expectations has
an error but I think we can and should just remove that command as well.
4) I have not yet linted the test code

* Scripts/webkitpy/common/newstringio.py:
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.find_checkout_root):
(SCM.will.remote_merge_base):
* Scripts/webkitpy/common/checkout/scm/scm_mock.py:
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVNRepository.has_authorization_for_realm):
(SVN.__init__):
* Scripts/webkitpy/common/config/contributionareas.py:
(ContributionAreas.names):
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort):
* Scripts/webkitpy/common/net/buildbot/buildbot.py:
(Builder.force_build):
* Scripts/webkitpy/common/net/buildbot/buildbot_mock.py:
* Scripts/webkitpy/style/checkers/cpp.py:
(check_posix_threading):
(check_spacing):
* Scripts/webkitpy/style/optparser.py:
(ArgumentParser._create_option_parser):
* Scripts/webkitpy/tool/commands/abstractlocalservercommand.py:
(AbstractLocalServerCommand.execute):
* Scripts/webkitpy/tool/commands/download.py:
(AbstractPatchProcessingCommand):
(AbstractPatchProcessingCommand._process_patch):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem):

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

7 years ago[V8] Add ASSERT() to guarantee that we don't store NULL pointers to V8 internal fields
haraken@chromium.org [Tue, 13 Nov 2012 06:59:25 +0000 (06:59 +0000)]
[V8] Add ASSERT() to guarantee that we don't store NULL pointers to V8 internal fields
https://bugs.webkit.org/show_bug.cgi?id=101054

Reviewed by Adam Barth.

I'm investigating a Chromium crash bug:
http://code.google.com/p/chromium/issues/detail?id=155942

I've not yet identified the root cause (because I can't reproduce
the crash), but it looks like we are storing NULL pointers to
V8 internal fields. Just in case, we can add an ASSERT() to
guarantee that NULL pointers are never stored. (Also I'm hoping
that this ASSERT() will give me more debug information.)

No tests. No change in behavior.

* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::setDOMWrapper):

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

7 years ago[EFL] Turn on errors on warnings for WebKit1 and WebKit2 libraries
commit-queue@webkit.org [Tue, 13 Nov 2012 06:55:08 +0000 (06:55 +0000)]
[EFL] Turn on errors on warnings for WebKit1 and WebKit2 libraries
https://bugs.webkit.org/show_bug.cgi?id=101762

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2012-11-12
Reviewed by Gyuyoung Kim.

In case of EFL, add ENABLE_WERROR to EXTRA_COMPILER_FLAGS for WEBKIT and WEBKIT2

* Source/CMakeLists.txt:

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

7 years agoChanging id, className, or attribute should invalidate distribution
shinyak@chromium.org [Tue, 13 Nov 2012 06:50:15 +0000 (06:50 +0000)]
Changing id, className, or attribute should invalidate distribution
https://bugs.webkit.org/show_bug.cgi?id=100738

Reviewed by Dimitri Glazkov.

PerformanceTests:

Added test code to modify id/class/attribute.

* DOM/ModifyAttribute.html: Added.
* DOM/resources/dom-perf/modify-attribute.js: Added.
(ModifyAttribute.CreateElementToSetUp):
(ModifyAttribute.ModifyId):
(ModifyAttribute.ModifyClass):
(ModifyAttribute.ModifyTitle):

Source/WebCore:

When id, className, or attribute is changed, we might have to invalidate distribution.
However, we don't want to do useless invalidation. So we consult with the RuleFeatureSet of ElementShadow,
and invalidate distribution only if necessary.

When className is changed, we can share a lot of code between invalidating distribution and invalidating style.
So we made checkNeedsStyleInvalidationForClassChange a template method, and share it.

Also we've measured how this patch makes changing attribute slow. By converting checkNeedsStyleInvalidationForClassChange
to template, actually this improves the performance of changing attribute code. I've measured each code 3 times.

DOM/ModifyAttribute.html
Before this patch:
        median  stdev  min      max    [ms]
  1st   115.62   0.67  114.75   117.00
  2nd   115.08   1.13  113.25   117.58
  3rd   114.75   1.16  113.42   117.83

After this patch:
        median  stdev  min      max    [ms]
  1st   102.55   0.95  101.25   104.50
  2nd   103.10   0.86  102.20   100.95
  3rd   103.30   1.05  102.10   106.65

Tests: fast/dom/shadow/distribution-attribute-modified.html
       fast/dom/shadow/distribution-className-modified.html
       fast/dom/shadow/distribution-id-modified.html
       fast/dom/shadow/reprojection-attribute-modified.html
       fast/dom/shadow/reprojection-className-modified.html
       fast/dom/shadow/reprojection-id-modified.html

* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::HasSelectorForClassStyleFunctor::HasSelectorForClassStyleFunctor):
(HasSelectorForClassStyleFunctor):
(WebCore::HasSelectorForClassStyleFunctor::operator()): Returns true if StyleResolver::hasSelectorForClass returns true.
(WebCore):
(WebCore::HasSelectorForClassDistributionFunctor::HasSelectorForClassDistributionFunctor):
(HasSelectorForClassDistributionFunctor):
(WebCore::HasSelectorForClassDistributionFunctor::operator()): Returns true if ElementShadow::hasSelectorForClass returns true.
(WebCore::checkFunctorForClassChange):
(WebCore::checkNeedsStyleInvalidationForClassChange): Extacted the implementation to checkFunctorForClassChange.
(WebCore::checkNeedsDistributionInvalidationForClassChange):
(WebCore::Element::classAttributeChanged):

LayoutTests:

We have test cases that id/class/attribute is changed, and thier reprojection cases.

* fast/dom/shadow/distribution-attribute-modified-expected.html: Added.
* fast/dom/shadow/distribution-attribute-modified.html: Added.
* fast/dom/shadow/distribution-className-modified-expected.html: Added.
* fast/dom/shadow/distribution-className-modified.html: Added.
* fast/dom/shadow/distribution-id-modified-expected.html: Added.
* fast/dom/shadow/distribution-id-modified.html: Added.
* fast/dom/shadow/reprojection-attribute-modified-expected.html: Added.
* fast/dom/shadow/reprojection-attribute-modified.html: Added.
* fast/dom/shadow/reprojection-className-modified-expected.html: Added.
* fast/dom/shadow/reprojection-className-modified.html: Added.
* fast/dom/shadow/reprojection-id-modified-expected.html: Added.
* fast/dom/shadow/reprojection-id-modified.html: Added.

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

7 years ago[EFL] In ewk_tiled_backing_store_pre_render_region, the 'slicer' may be uninitialized
commit-queue@webkit.org [Tue, 13 Nov 2012 06:36:05 +0000 (06:36 +0000)]
[EFL] In ewk_tiled_backing_store_pre_render_region, the 'slicer' may be uninitialized
https://bugs.webkit.org/show_bug.cgi?id=102038

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2012-11-12
Reviewed by Gyuyoung Kim.

To fix build warning -Wuninitialized,
initialize the 'slicer' in ewk_tiled_backing_store_pre_render_region.

* ewk/ewk_tiled_backing_store.cpp:
(ewk_tiled_backing_store_pre_render_region):

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

7 years ago[BlackBerry] NetworkJob should not check if data is received with HEAD
commit-queue@webkit.org [Tue, 13 Nov 2012 06:28:49 +0000 (06:28 +0000)]
[BlackBerry] NetworkJob should not check if data is received with HEAD
https://bugs.webkit.org/show_bug.cgi?id=102034

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

Internal PR: 241391

.:

Add test that HEAD XMLHttpRequests return status 404 instead of calling onerror.

* ManualTests/blackberry/head-xhr-nonexistant-file.html: Added.

Source/WebCore:

Make HEAD requests call didFinish instead of didFail on a 404 response, even though they
have no data.

Tests: ManualTests/blackberry/head-xhr-nonexistant-file.html

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::NetworkJob):
(WebCore::NetworkJob::initialize):
(WebCore::NetworkJob::shouldNotifyClientFailed):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):

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

7 years agoremove 'webkit-patch optimize-expectations'
dpranke@chromium.org [Tue, 13 Nov 2012 06:12:55 +0000 (06:12 +0000)]
remove 'webkit-patch optimize-expectations'
https://bugs.webkit.org/show_bug.cgi?id=102032

Reviewed by Adam Barth.

Removing this command because it is totally broken (probably
broke when I added support for multiple files in a cascade)
and doesn't seem to do anything much useful. It certainly
didn't actually optimize things.

* Scripts/webkitpy/tool/commands/expectations.py: Removed.

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

7 years agoThe act of getting the callee during 'this' construction should be explicit in bytecode
fpizlo@apple.com [Tue, 13 Nov 2012 06:04:51 +0000 (06:04 +0000)]
The act of getting the callee during 'this' construction should be explicit in bytecode
https://bugs.webkit.org/show_bug.cgi?id=102016

Reviewed by Michael Saboff.

This is mostly a rollout of http://trac.webkit.org/changeset/116673, but also includes
changes to have create_this use the result of get_callee.

No performance or behavioral impact. This is just meant to allow us to profile
get_callee in the future.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
(JSC):
(JSC::padOpcodeName):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.h:
(JSC::DFG::canCompileOpcode):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
(JIT):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_callee):
(JSC):
(JSC::JIT::emit_op_create_this):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_callee):
(JSC):
(JSC::JIT::emit_op_create_this):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

7 years ago[V8] V8DOMWrapper::instantiateV8Object shouldn't use deprecatedDocument
abarth@webkit.org [Tue, 13 Nov 2012 06:04:36 +0000 (06:04 +0000)]
[V8] V8DOMWrapper::instantiateV8Object shouldn't use deprecatedDocument
https://bugs.webkit.org/show_bug.cgi?id=102015

Reviewed by Kentaro Hara.

Previously, Nodes had a special path through
V8DOMWrapper::instantiateV8Object using deprecatedDocument so that we
could find the V8PerContextData quickly. Now that we can get the
V8PerContextData from the v8::Context quickly, we can move Nodes to the
general case. The net consequence is that creation of all DOM objects
should be as fast as Nodes are.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateToV8Converters):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::V8Float64Array::wrapSlow):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::wrapSlow):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::wrapSlow):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::V8TestEventTarget::wrapSlow):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore::V8TestException::wrapSlow):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::wrapSlow):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::wrapSlow):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::wrapSlow):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
(WebCore::V8TestOverloadedConstructors::wrapSlow):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
* bindings/v8/V8Binding.cpp:
* bindings/v8/V8Binding.h:
(WebCore):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::instantiateV8Object):
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper):

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

7 years ago[BlackBerry] DRT - Update Pixel Dump Support for OpenGL renderer
commit-queue@webkit.org [Tue, 13 Nov 2012 05:53:43 +0000 (05:53 +0000)]
[BlackBerry] DRT - Update Pixel Dump Support for OpenGL renderer
https://bugs.webkit.org/show_bug.cgi?id=101894

Patch by Xiaobo Wang <xbwang@torchmobile.com.cn> on 2012-11-12
Reviewed by Rob Buis.

RIM PR 241686
Also remove an un-needed pixel lock, and fix a klocwork error in SKIA
code path.

* DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
(readPixelsUserInterfaceThread):
(createBitmapContextFromWebView):

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

7 years agoUnreviewed, fix ARMv7 build.
fpizlo@apple.com [Tue, 13 Nov 2012 05:51:48 +0000 (05:51 +0000)]
Unreviewed, fix ARMv7 build.

* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatch):
(JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranchPtrWithPatch):

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

7 years agoSome CSS properties are not handled on StyleResolver::applyProperty
commit-queue@webkit.org [Tue, 13 Nov 2012 05:32:59 +0000 (05:32 +0000)]
Some CSS properties are not handled on StyleResolver::applyProperty
https://bugs.webkit.org/show_bug.cgi?id=102027

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2012-11-12
Reviewed by Gyuyoung Kim.

The CSSPropertyMaxZoom, CSSPropertyMinZoom, CSSPropertyOrientation and CSSPropertyUserZoom
need to be handled on StyleResolver::applyProperty.

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

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

7 years agoAvoid calling calculateLayerBounds() and convertToLayerCoords() more than once per...
simon.fraser@apple.com [Tue, 13 Nov 2012 05:24:49 +0000 (05:24 +0000)]
Avoid calling calculateLayerBounds() and convertToLayerCoords() more than once per layer paint
https://bugs.webkit.org/show_bug.cgi?id=102031

Reviewed by Beth Dakin.

RenderLayer::paintLayerContents() and callees could end up calling convertToLayerCoords()
and calculateLayerBounds() multiple times for painting a single layer.

Keep track of whether we've computed the root-relative bounds and do it on demand.
Compute the offset relative to rootLayer once, and pass it around as an optional parameter
to functions that need it.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateRects):
(WebCore::RenderLayer::intersectsDamageRect):
(WebCore::RenderLayer::boundingBox):
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):

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

7 years agoChange calculateLayerBounds() from a static function to a member function
simon.fraser@apple.com [Tue, 13 Nov 2012 05:24:31 +0000 (05:24 +0000)]
Change calculateLayerBounds() from a static function to a member function
https://bugs.webkit.org/show_bug.cgi?id=102022

Reviewed by Beth Dakin.

calculateLayerBounds() has grown into a substantial function after
starting live as a little utility function, so make it a member function
of RenderLayer, and adjust callers accordingly.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):

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

7 years agoWeb Inspector: Add an option to switch display of "Other" memory on/off in NMI
commit-queue@webkit.org [Tue, 13 Nov 2012 04:58:58 +0000 (04:58 +0000)]
Web Inspector: Add an option to switch display of "Other" memory on/off in NMI
https://bugs.webkit.org/show_bug.cgi?id=101601

Patch by Alexei Filippov <alph@chromium.org> on 2012-11-12
Reviewed by Yury Semikhatsky.

* English.lproj/localizedStrings.js:
* inspector/front-end/NativeMemorySnapshotView.js:
* inspector/front-end/Settings.js:
* inspector/front-end/SettingsScreen.js:
(WebInspector.GenericSettingsTab):

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

7 years agoBuild fix after r134346 and 134347.
simon.fraser@apple.com [Tue, 13 Nov 2012 04:55:49 +0000 (04:55 +0000)]
Build fix after r134346 and 134347.

Use frameView.isFlipped, not frameView.flipped in the assertion.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController window]):

Source/WebKit2:

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow):

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

7 years agoBasicShapes 'circle', 'rectangle', 'ellipse' should be animatable with themselves
krit@webkit.org [Tue, 13 Nov 2012 04:51:53 +0000 (04:51 +0000)]
BasicShapes 'circle', 'rectangle', 'ellipse' should be animatable with themselves
https://bugs.webkit.org/show_bug.cgi?id=101854

Reviewed by Andreas Kling.

Source/WebCore:

The basic shapes BasicShapeCircle, BasicShapeEllipse and BasicShapeRectangle should
blend with themselves. This patch introduces simple interpolation of BasicShapes for
the -webkit-clip-path property.

Test: css3/masking/clip-path-animation.html

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc): Added a new function that blends between two BasicShape objects.
    It skips blending on <clipPath> references, polygons and if the shapes are not of
    the same type.
(WebCore):
(PropertyWrapperClipPath): Added new wrapper for ClipPathShapes.
(WebCore::PropertyWrapperClipPath::PropertyWrapperClipPath): Ditto.
(WebCore::CSSPropertyAnimation::ensurePropertyMap): Add -webkit-clip-path to animatable
    properties.
* rendering/style/BasicShapes.cpp:
    The blending is done by each shape itself. This is similar to FilterOperations or
    TransformOperations.
(WebCore::BasicShapeRectangle::blend):
(WebCore):
(WebCore::BasicShapeCircle::blend):
(WebCore::BasicShapeEllipse::blend):
(WebCore::BasicShapePolygon::blend):
* rendering/style/BasicShapes.h:
    Added new blending functions to header.
(BasicShape):
(BasicShapeRectangle):
(BasicShapeCircle):
(BasicShapeEllipse):
(BasicShapePolygon):

LayoutTests:

Added an animtation test for -webkit-clip-path and tested the basic shapes.

* animations/resources/animation-test-helpers.js:
(parseBasicShape):
(basicShapeParametersMatch):
(getPropertyValue):
(comparePropertyValue):
* css3/masking/clip-path-animation-expected.txt: Added.
* css3/masking/clip-path-animation.html: Added.

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

7 years ago[V8] We should be able to get V8PerContextData from a v8::Context more quickly
abarth@webkit.org [Tue, 13 Nov 2012 04:46:20 +0000 (04:46 +0000)]
[V8] We should be able to get V8PerContextData from a v8::Context more quickly
https://bugs.webkit.org/show_bug.cgi?id=102008

Reviewed by Ojan Vafai.

This patch uses the new v8::Context::GetAlignedPointerFromEmbedderData
API to get the V8PerContextData associated with a v8::Context much more
quickly. We no longer need to use a hidden property on the inner global
object. This patch will enable future optimizations.

* bindings/v8/V8HiddenPropertyName.h:
(WebCore):
* bindings/v8/V8PerContextData.cpp:
(WebCore::V8PerContextData::dispose):
(WebCore::V8PerContextData::init):
* bindings/v8/V8PerContextData.h:
(WebCore::V8PerContextData::from):

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

7 years agoMake Frames and HTMLFrameOwnerElement less friendly
commit-queue@webkit.org [Tue, 13 Nov 2012 04:44:20 +0000 (04:44 +0000)]
Make Frames and HTMLFrameOwnerElement less friendly
https://bugs.webkit.org/show_bug.cgi?id=102003

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-11-12
Reviewed by Ojan Vafai.

Frame used to assign HTMLFrameOwnerElement's m_contentFrame directly
this patch makes it go through a method to allow future hooks when frames
are associated with owners.

No new tests, this is just a refactor.

* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::setContentFrame):
* html/HTMLFrameOwnerElement.h:
(HTMLFrameOwnerElement):
(WebCore::HTMLFrameOwnerElement::clearContentFrame):
* page/Frame.cpp:
(WebCore::Frame::Frame): Use new methods.

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

7 years agoBuild fix. Forgot these bits last time.
bdakin@apple.com [Tue, 13 Nov 2012 04:40:53 +0000 (04:40 +0000)]
Build fix. Forgot these bits last time.

* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:

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

7 years agoZoomed-in scrolling is very slow when deviceScaleFactor > 1
bdakin@apple.com [Tue, 13 Nov 2012 04:26:35 +0000 (04:26 +0000)]
Zoomed-in scrolling is very slow when deviceScaleFactor > 1
https://bugs.webkit.org/show_bug.cgi?id=101787

Reviewed by Simon Fraser.

Source/WebCore:

This patch adds a new member to the GraphicsContextState that tracks
whether or not fonts should be subpixel-quantized. We want to default
to sibpixel-quantizing, but we'll turn it off if we're scrolling
content that cannot be scrolled on the scrolling thread.

State has a new bool shouldSubpixelQuantizeFonts. It defaults to true
since normally we do want to quantize.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContext::shouldSubpixelQuantizeFonts):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContextState::GraphicsContextState):
(GraphicsContextState):
(GraphicsContext):

wkSetCGFontRenderingMode now takes a BOOL parameter which indicates
whether or not it should try to subpixel-quantize the fonts.
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Disable subpixel-quantization for overflow areas, subframes, and
content that is scrolling on the main thread.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):

WebKitLibraries:

wkSetCGFontRenderingMode now takes a BOOL parameter.
* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:

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

7 years agoAdd a dock button to the top right corner of the Web Inspector window (similar to...
timothy@apple.com [Tue, 13 Nov 2012 04:05:18 +0000 (04:05 +0000)]
Add a dock button to the top right corner of the Web Inspector window (similar to the full screen button).

https://bugs.webkit.org/show_bug.cgi?id=102025

Reviewed by Joseph Pecoraro.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj: Added Dock.pdf.

Source/WebKit/mac:

* Resources/Dock.pdf: Added.
* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindow _cursorForResizeDirection:]): Added.
(WebInspectorClient::didResizeMainFrame): Call attachAvailabilityChanged instead.
(WebInspectorFrontendClient::attachAvailabilityChanged): Added.
(-[WebInspectorWindowController window]): Create the dock button and add it.
(-[WebInspectorWindowController attachWindow:]): Added.
(-[WebInspectorWindowController attach]): Call setAttachedWindow.
(-[WebInspectorWindowController detach]): Ditto.
(-[WebInspectorWindowController setDockingUnavailable:]): Added. Update hidden state of the dock button.

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

7 years agoAdd a dock button to the top right corner of the Web Inspector window (similar to...
timothy@apple.com [Tue, 13 Nov 2012 04:05:09 +0000 (04:05 +0000)]
Add a dock button to the top right corner of the Web Inspector window (similar to the full screen button).

Source/WebCore: Expose InspectorFrontendClientLocal::setAttachedWindow as public.

This allows external actions to update the docked state in the frontend.

https://bugs.webkit.org/show_bug.cgi?id=102023

Reviewed by Anders Carlsson.

* inspector/InspectorFrontendClientLocal.h:
Moved InspectorFrontendClientLocal::setAttachedWindow to public section.

Source/WebKit2: Add a dock button to the top right corner of the Web Inspector window (similar to the full screen button).

https://bugs.webkit.org/show_bug.cgi?id=102023

Reviewed by Anders Carlsson.

* Resources/Dock.pdf: Added.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::attach): Set the SetAttachedWindow message.
(WebKit::WebInspectorProxy::detach): Ditto.
(WebKit::WebInspectorProxy::attachAvailabilityChanged): Added. Call platformAttachAvailabilityChanged.
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in: Added AttachAvailabilityChanged message.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter attach:]): Added. Call WebInspectorProxy::attach.
(-[WKWebInspectorWindow _cursorForResizeDirection:]): Added.
(WebKit::WebInspectorProxy::createInspectorWindow): Create the dock button and add it.
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Added. Update hidden state of the dock button.
* WebKit2.xcodeproj/project.pbxproj: Added Dock.pdf.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::setAttachedWindow): Added. Call through to the frontend client.
(WebKit::WebInspector::updateDockingAvailability): Send AttachAvailabilityChanged message.
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.messages.in: Added SetAttachedWindow message.

* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Added stub.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Ditto.
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Ditto.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Ditto.

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

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

Reviewed by Adam Barth.

Source/WebCore:

DOMException.TYPE_MISMATCH_ERR is deprecated in favor of using TypeError.

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

Updated existing tests.

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

LayoutTests:

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

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

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

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

Reviewed by Mark Rowe.

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

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

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

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

Reviewed by Tony Chang.

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

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

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

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

Reviewed by Adam Barth.

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

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

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

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

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

Rebase after r134287.

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

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

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

Reviewed by Dan Bernstein.

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed by Andreas Kling.

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

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

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

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

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

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

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

Reviewed by Tony Chang.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Internally reviewed by Mike Fenton.

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

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

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

Reviewed by Geoffrey Garen.

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

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

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

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

Reviewed by Tim Horton.

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

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

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

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

Reviewed by Beth Dakin.

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

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

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

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

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

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/v8/custom/V8EventCustom.cpp:

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

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

Reviewed by Alexey Proskuryakov.

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

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

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

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

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

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

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

Reviewed by Brian Weinstein.

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

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

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

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

Reviewed by Anders Carlsson.

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

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

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

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

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

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

* platform/efl-wk1/TestExpectations:

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

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

Reviewed by Tim Horton.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed by Ojan Vafai.

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

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

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

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

Rubber-stamped by Antti Koivisto.

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

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

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

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

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

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

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

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

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

Reviewed by Eric Seidel.

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

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

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

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

Reviewed by Alexey Proskuryakov.

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

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

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

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

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

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

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

No performance impact. It just fixes a bug.

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

LayoutTests:

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

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

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

Reviewed by Oliver Hunt.

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

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

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

Reviewed by Andreas Kling.

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

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

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

Reviewed by Beth Dakin.

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

Gather these arguments into a LayerPaintingInfo struct.

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

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

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

Reviewed by Ojan Vafai.

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

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

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

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

Reviewed by Tony Chang.

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

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

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

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

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

Reviewed by Andreas Kling.

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

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

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

* platform/chromium/TestExpectations: Updated expectations.

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

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

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

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

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

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

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

* platform/chromium/TestExpectations: Added Expectations.

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

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

* platform/chromium/TestExpectations: Added expectations.

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

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

Reviewed by Andreas Kling.

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

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

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

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

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

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

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Expose shouldSniffContent to pass it along to the NetworkProcess.

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

Source/WebKit2:

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

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

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

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

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

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

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

* platform/chromium/TestExpectations: Added expectations.

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

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

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

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