WebKit-https.git
8 years agoMerge MainResourceLoader's SubstituteData loading + others into DocumentLoader
japhet@chromium.org [Tue, 19 Mar 2013 19:39:44 +0000 (19:39 +0000)]
Merge MainResourceLoader's SubstituteData loading + others into DocumentLoader
https://bugs.webkit.org/show_bug.cgi?id=112722

Part of the ongoing effort to merge MainResourceLoader entirely
into DocumentLoader.

Reviewed by Antti Koivisto.

No new tests, refactor only.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainReceivedError): Moved from MainResourceLoader::receivedError
    and the failure case in MainResourceLoader::notifyFinished.
(WebCore::DocumentLoader::stopLoading):
(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::handleSubstituteDataLoadNow): Moved from MainResourceLoader.
(WebCore::DocumentLoader::startDataLoadTimer): Moved from MainResourceLoader.
(WebCore::DocumentLoader::handleSubstituteDataLoadSoon): Moved from MainResourceLoader.
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::continueAfterNavigationPolicy):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::receivedData):
(WebCore::DocumentLoader::startLoadingMainResource): Most of MainResourceLoader::load
    moved here.
(WebCore::DocumentLoader::cancelMainResourceLoad): MainResourceLoader::cancel
    moved here.
* loader/DocumentLoader.h:
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::notifyFinished):
(WebCore::MainResourceLoader::reportMemoryUsage):
(WebCore::MainResourceLoader::load):
(WebCore::MainResourceLoader::identifier):
* loader/MainResourceLoader.h:

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

8 years agoUnreviewed build fix after r146220. Add the missing ]'s.
rniwa@webkit.org [Tue, 19 Mar 2013 19:36:49 +0000 (19:36 +0000)]
Unreviewed build fix after r146220. Add the missing ]'s.

* English.lproj/localizedStrings.js:

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

8 years agoGIFImageReader to count frames and decode in one pass
hclam@chromium.org [Tue, 19 Mar 2013 19:29:06 +0000 (19:29 +0000)]
GIFImageReader to count frames and decode in one pass
https://bugs.webkit.org/show_bug.cgi?id=111144

Reviewed by Stephen White.

Source/WebCore:

OBJECTIVE

This change has the objective of improving performance reading GIF
files. This implementation can parse the entire GIF file in one pass
and saves information about each frame, such that decoding in a later
pass does not need to parse the file again.

This change fixes the performance problem of decoding GIF files when
they are received very slowly. Existing implementation creates a new
GIFImageReader for counting frames for every time it is notified that
new data has been received, this has O(n^2) behavior when data is
received very slowly.

ALGORITHM

This implementation divides the decoding process into two separate
steps: parse and LZW decoding.

In the parse step, the state machine is similar to the existing
implementation. However this algorithm does not perform any decoding
while scanning through the file. Intead it creates a new data structure
for caching all frame information and the corresponding LZW blocks.

If a full decode is requested then LZW decoding is performed. This
implementation looks through all frame information saved and decodes
each frame sequentially until the target frame is reached.

Because of the separation of parse and decode, each frame can be
decoded separately. This paves the way to support seeking in GIF files.

TESTING

Added a new unit test to cover progressively decoding a GIF image.
There are already GIF unit tests for functional testing.
Exhaustive testing was done locally with a corpus of 60k images.
I mixed the corpus with some generated bad data and truncated files.
The results was bit-identical when compared to the previous
implementation.

These was also no crashing when decoding the entire corpus.

* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::GIFImageDecoder):
(WebCore::GIFImageDecoder::setData):
(WebCore::GIFImageDecoder::frameCount):
(WebCore::GIFImageDecoder::repetitionCount):
(WebCore::GIFImageDecoder::decode):
* platform/image-decoders/gif/GIFImageDecoder.h:
(GIFImageDecoder):
* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFLZWContext::outputRow):
(GIFLZWContext::doLZW):
(GIFFrameContext::decode):
(GIFImageReader::decode):
(GIFImageReader::parse):
(GIFImageReader::addFrameIfNecessary):
(GIFLZWContext::prepareToDecode):
* platform/image-decoders/gif/GIFImageReader.h:
There is a lot of reshuffling in GIFLZWContext and GIFFrameContext.
These changes has the goal of having GIFLZWContext be a pure decoding
state machine. GIFFrameContext is mostly a read-only container for
frame information. With all these changes we can decode each
GIFFrameContext independently.

The ownership pattern is:
GIFImageReader owns GIFFrameContext owns GIFLZWContext.

(GIFLZWContext::GIFLZWContext):
(GIFLZWContext):
(GIFLZWContext::hasRemainingRows):
GIFLZWContext is moved to the top of file.
(GIFLZWBlock):
(GIFLZWBlock::GIFLZWBlock):
New data structure to save block position and size.
(GIFFrameContext):
(GIFFrameContext::GIFFrameContext):
(GIFFrameContext::~GIFFrameContext):
(GIFFrameContext::addLzwBlock):
(GIFFrameContext::isComplete):
(GIFFrameContext::isHeaderDefined):
(GIFFrameContext::isDataSizeDefined):
(GIFFrameContext::setComplete):
(GIFFrameContext::setHeaderDefined):
(GIFFrameContext::setDataSize):
Now owns GIFLZWContext for decoding.
(GIFImageReader::GIFImageReader):
(GIFImageReader::~GIFImageReader):
(GIFImageReader::imagesCount):
(GIFImageReader::frameContext):
(GIFImageReader):
(GIFImageReader::parseFailed):
(GIFImageReader::isFirstFrame):
Owns a list of GIFFrameContxt.

Source/WebKit/chromium:

Added a new GIF unit test for progressive decoding. The test is to verify
that continually re-decoding an image one additional byte at a time produces
the same outputs as repeatedly decoding (with brand new decoders) truncated
versions of the image that are one byte longer each time.

* tests/GIFImageDecoderTest.cpp:
(WebKit::TEST):

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

8 years agoUnreviewed gardening of AppleWin port.
roger_fong@apple.com [Tue, 19 Mar 2013 19:25:17 +0000 (19:25 +0000)]
Unreviewed gardening of AppleWin port.

* platform/win/fast/dom/icon-url-property-expected.txt: Added.
* platform/win/fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt: Added.

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

8 years agoUnreviewed. Rolled Chromium DEPS to r189038. Requested by
commit-queue@webkit.org [Tue, 19 Mar 2013 19:19:31 +0000 (19:19 +0000)]
Unreviewed.  Rolled Chromium DEPS to r189038.  Requested by
"Mark Pilgrim" <pilgrim@chromium.org> via sheriffbot.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-19

* DEPS:

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

8 years agoUnreviewed, rolling out r146101.
dpranke@chromium.org [Tue, 19 Mar 2013 19:18:18 +0000 (19:18 +0000)]
Unreviewed, rolling out r146101.
https://bugs.webkit.org/show_bug.cgi?id=111884

re-enable custom freetype on asan; this needs to be on
now that the bot is running lucid.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:

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

8 years ago[BlackBerry] Don't handle keyboard scrolling shortcuts in webkit
commit-queue@webkit.org [Tue, 19 Mar 2013 19:14:23 +0000 (19:14 +0000)]
[BlackBerry] Don't handle keyboard scrolling shortcuts in webkit
https://bugs.webkit.org/show_bug.cgi?id=112716

Informally Reviewed by Mike Fenton (mifenton@rim.com)
Patch by Chris Hutten-Czapski <chutten@blackberry.com> on 2013-03-19
Reviewed by Rob Buis.

The comment is right, this isn't the correct place to handle keyboard
scrolling shortcuts. That's what we have clients for.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::keyEvent):

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

8 years ago[Chromium] IndexedDB: index-duplicate-keypaths test is flaky under content_shell
jsbell@chromium.org [Tue, 19 Mar 2013 19:03:07 +0000 (19:03 +0000)]
[Chromium] IndexedDB: index-duplicate-keypaths test is flaky under content_shell
https://bugs.webkit.org/show_bug.cgi?id=112723

Reviewed by Tony Chang.

Root cause is a race between the "versionchange" transaction's "complete" event
being dispatched to script and the "success" call arriving from the back-end
which updates the metadata. Tracked as https://bugs.webkit.org/show_bug.cgi?id=111642

* storage/indexeddb/resources/index-duplicate-keypaths.js:
(testCollideAutoIncrementSetup): Trigger test from open's onsuccess...
(testCollideAutoIncrement): ... rather than transaction's oncomplete.

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

8 years ago[WinCairo] Unreviewed build correction for WebCore library.
bfulgham@webkit.org [Tue, 19 Mar 2013 18:59:49 +0000 (18:59 +0000)]
[WinCairo] Unreviewed build correction for WebCore library.

* WebCore.vcxproj/WebCore.vcxproj: Exclude CG-specific frame source
from WinCairo build.
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Pass correct
parameter to build-generated-files.sh for WinCairo build.

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

8 years agoFix the WTF gyp build for GTK+.
mrobinson@webkit.org [Tue, 19 Mar 2013 18:50:22 +0000 (18:50 +0000)]
Fix the WTF gyp build for GTK+.

* WTF.gyp/WTFGTK.gyp: Skip files with CF in the name.

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

8 years ago[chromium] Remove deprecated/unused bits of WebLayerTreeView
commit-queue@webkit.org [Tue, 19 Mar 2013 18:47:25 +0000 (18:47 +0000)]
[chromium] Remove deprecated/unused bits of WebLayerTreeView
https://bugs.webkit.org/show_bug.cgi?id=112714

Patch by James Robinson <jamesr@chromium.org> on 2013-03-19
Reviewed by Adam Barth.

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

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

8 years agoImplement onRefEncodedData for lazy pixel refs.
commit-queue@webkit.org [Tue, 19 Mar 2013 18:45:23 +0000 (18:45 +0000)]
Implement onRefEncodedData for lazy pixel refs.
This allows printToSkPicture to write the original
encoded data to the stream.
Add a method to ImageFrameGenerator to copy its
data, which is used by onRefEncodedData.
https://bugs.webkit.org/show_bug.cgi?id=110759

Patch by Leon Scroggins <scroggo@chromium.org> on 2013-03-19
Reviewed by Stephen White.

No new tests. New functionality is for testing purposes
(creating SKP files).

* platform/graphics/chromium/ImageFrameGenerator.cpp:
(WebCore::ImageFrameGenerator::data):
(WebCore):
* platform/graphics/chromium/ImageFrameGenerator.h:
(ImageFrameGenerator):
* platform/graphics/chromium/LazyDecodingPixelRef.cpp:
(WebCore::LazyDecodingPixelRef::isClipped):
(WebCore):
(WebCore::LazyDecodingPixelRef::onRefEncodedData):
* platform/graphics/chromium/LazyDecodingPixelRef.h:
(LazyDecodingPixelRef):

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

8 years agoSeparate SVG image size and container size
pdr@google.com [Tue, 19 Mar 2013 18:39:18 +0000 (18:39 +0000)]
Separate SVG image size and container size
https://bugs.webkit.org/show_bug.cgi?id=112651

Reviewed by Stephen Chenney.

Source/WebCore:

Previously, SVG images could retain their cached size between reloads due to a bug where an
old container size would be re-used if the image's new container size was not available yet.

This patch changes SVGImage::size() to return the intrinsic size of the image before a
container size has been set. SVGImageCache::imageSizeForRenderer will now return the
image's intrinsic size instead of a cached value if the container size cannot be looked up.
In javascript, querying [SVGImage].width will now return either the image's intrinsic size
or the size of 'imageForContainer'.

Test: svg/as-image/svg-container-size-after-reload.html

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::setContainerSize):
(WebCore::SVGImage::containerSize):
(WebCore::SVGImage::draw):
(WebCore::SVGImage::dataChanged):
* svg/graphics/SVGImage.h:

    The member variable 'm_intrinsicSize' has been added to track the image's intrinsic
    size. This term can be found in: http://www.w3.org/TR/css3-images/#default-sizing

* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::imageSizeForRenderer):
(WebCore::SVGImageCache::imageForRenderer):

    In both of these functions, image has been renamed to imageForContainer here to clarify
    that the cached container size is being returned, not the image's intrinsic size.

LayoutTests:

* svg/as-image/svg-container-size-after-reload-expected.txt: Added.
* svg/as-image/svg-container-size-after-reload.html: Added.

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

8 years ago[BlackBerry] When selecting an object, assign focus to new node instead of clearing...
commit-queue@webkit.org [Tue, 19 Mar 2013 18:31:05 +0000 (18:31 +0000)]
[BlackBerry] When selecting an object, assign focus to new node instead of clearing previous focused node
https://bugs.webkit.org/show_bug.cgi?id=112707

Patch by Andy Chen <andchen@blackberry.com> on 2013-03-19
Reviewed by Rob Buis.

In SelectionHandler, when selecting a new object, we should set focus
to the anchor node of selection instead of removing it from the old input.
In InputHandler, when focusedNodeChanged is called, if the new node is
not an Element node, we need to set focus to its Element parent node,
instead of removing focus from the old node.
PR 304631
Internally reviewed by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::focusedNodeChanged):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectObject):

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

8 years agoIndexedDB: Use integer plumbing for deleteDatabase onVersionChange calls
jsbell@chromium.org [Tue, 19 Mar 2013 18:23:51 +0000 (18:23 +0000)]
IndexedDB: Use integer plumbing for deleteDatabase onVersionChange calls
https://bugs.webkit.org/show_bug.cgi?id=112715

Reviewed by Tony Chang.

When deleteDatabase on the back-end needs to send the front-end an
onVersionChange notification it does so using the string overload. That's
the only remaining use of that overload and we'd like to delete it. Switch
to using the integer overload, with an already defined special value.
This will unblock http://wkbug.com/112712 to delete the dead code.

No new tests - no functional change.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::onVersionChange): Map NoIntVersion to null.
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::deleteDatabase): Call integer overload.

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

8 years agoHover effects from a GestureTapDown are dismissed by a GestureTap on the hover element
tdanderson@chromium.org [Tue, 19 Mar 2013 18:20:35 +0000 (18:20 +0000)]
Hover effects from a GestureTapDown are dismissed by a GestureTap on the hover element
https://bugs.webkit.org/show_bug.cgi?id=103283

Reviewed by Antonio Gomes.

Source/WebCore:

On a GestureTap event over an element that was made visible as a hover effect, the
GestureTap should be applied to that element and the hover effects should not be dismissed.
A GestureTap or a mouse move to a location outside of the element should still dismiss the
hover effects.

Tests: fast/events/touch/gesture/gesture-tap-hover-clear.html
       fast/events/touch/gesture/gesture-tap-on-hover-element.html

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

LayoutTests:

Two layout tests added. See descriptions inline.

* fast/events/touch/gesture/gesture-tap-hover-clear-expected.txt: Added.
* fast/events/touch/gesture/gesture-tap-hover-clear.html: Added.
      Tests that a GestureTap or a mouse move outside of the hovered element
      clears its hover effects.
* fast/events/touch/gesture/gesture-tap-on-hover-element-expected.txt: Added.
* fast/events/touch/gesture/gesture-tap-on-hover-element.html: Added.
      Tests that a GestureTap on an element which has been made visible as
      a hover effect is dispatched to the element and does not dismiss the
      hover effect.
* platform/chromium/fast/events/touch/gesture/gesture-tap-hover-clear-expected.txt: Added.
* platform/chromium/fast/events/touch/gesture/gesture-tap-on-hover-element-expected.txt: Added.

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

8 years ago[BlackBerry] Enable USE_SYSTEM_MALLOC by default
commit-queue@webkit.org [Tue, 19 Mar 2013 17:52:35 +0000 (17:52 +0000)]
[BlackBerry] Enable USE_SYSTEM_MALLOC by default
https://bugs.webkit.org/show_bug.cgi?id=112365

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-19
Reviewed by Benjamin Poulain.

Enable USE_SYSTEM_MALLOC by default via FeatureList.pm instead of
harcoding it in wtf/Platform.h

Source/WTF:

* wtf/Platform.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

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

8 years agoAssertion in LegacyWebArchive::create() in editing tests
simon.fraser@apple.com [Tue, 19 Mar 2013 17:47:38 +0000 (17:47 +0000)]
Assertion in LegacyWebArchive::create() in editing tests
https://bugs.webkit.org/show_bug.cgi?id=112642

editing/pasteboard/5780697-1.html is also a flakey assertion.

Move to mac-wk2 beacuse these only seem to happen in WK2.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

8 years agoWeb Inspector: Fix menu items capitalization.
commit-queue@webkit.org [Tue, 19 Mar 2013 17:43:32 +0000 (17:43 +0000)]
Web Inspector: Fix menu items capitalization.
https://bugs.webkit.org/show_bug.cgi?id=112553

The context menu items should be correctly capitalized.

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-19
Reviewed by Pavel Feldman.

* English.lproj/localizedStrings.js:
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._emptyElementContextMenu):
(WebInspector.XHRBreakpointsSidebarPane.prototype._emptyElementContextMenu):
(WebInspector.XHRBreakpointsSidebarPane.prototype._contextMenu):
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.Placard.prototype._placardContextMenu):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._handleContextMenuEvent.get var):
(WebInspector.ConsoleView.prototype._handleContextMenuEvent.set get contextMenu):
* inspector/front-end/DOMBreakpointsSidebarPane.js:
(WebInspector.DOMBreakpointsSidebarPane.prototype._contextMenu):
* inspector/front-end/DataGrid.js:
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
(WebInspector.ElementsPanel.prototype.appendApplicableItems):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
(WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
* inspector/front-end/HeapSnapshotDataGrids.js:
(WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype.appendApplicableItems):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
(WebInspector.ProfilesPanel.prototype.appendApplicableItems):
(WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FileSystemListTreeElement.prototype._handleContextMenuEvent):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._appendUISourceCodeMappingItems):
(WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
(WebInspector.ScriptsPanel.prototype._appendFunctionItems):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPaneTab.prototype._tabContextMenu):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._contextMenu):
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype._emptyElementContextMenu):
(WebInspector.WatchExpressionTreeElement.prototype.populateContextMenu):

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

8 years agoASSERTION FAILED: m_scheduledTasksAreSuspended
simon.fraser@apple.com [Tue, 19 Mar 2013 17:31:11 +0000 (17:31 +0000)]
ASSERTION FAILED: m_scheduledTasksAreSuspended
https://bugs.webkit.org/show_bug.cgi?id=97124

Mark fast/loader/dynamic-iframe-extra-back-forward-item.html as sometimes crashing in debug.

* platform/mac-wk2/TestExpectations:

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

8 years agoInspector: IndexedDB clear button and menu item
alecflett@chromium.org [Tue, 19 Mar 2013 17:29:15 +0000 (17:29 +0000)]
Inspector: IndexedDB clear button and menu item
https://bugs.webkit.org/show_bug.cgi?id=112066

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Adds a button that can clear the contents of an objectStore from
the IDBDataView, and a context menu from the ResourcesPanel that
can do the same.

This also disables the Refresh button from the IDBDataView, so there
is at least some visual feedback that the refresh button is working.

Tests: http/tests/inspector/indexeddb/database-data.html

* inspector/Inspector.json: New API clearObjectStore.
* inspector/InspectorIndexedDBAgent.cpp: Implementation of clearObjectStore
(WebCore):
(ClearObjectStoreListener): Calls the original closure after the objectStore is cleared.
(ClearObjectStore): Initiates the clear operation after the DB opens.
* inspector/front-end/IndexedDBModel.js: Exposes clearObjectStore to the Model API.
(WebInspector.IDBDataView): Add clear button and enable/disable clear and refresh buttons appropriately.
* inspector/front-end/ResourcesPanel.js: Add a menu item and refresh the displayed data after the clear.
* inspector/front-end/inspector.css: Add a style to show the right button for clear.

LayoutTests:

Add extra methods to test clearing the database after populating it.

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

8 years ago[Mac] Flaky crash in SliderThumbElement::defaultEventHandler on fast/forms/range...
simon.fraser@apple.com [Tue, 19 Mar 2013 17:26:57 +0000 (17:26 +0000)]
[Mac] Flaky crash in SliderThumbElement::defaultEventHandler on fast/forms/range/slider-delete-while-dragging-thumb.html
https://bugs.webkit.org/show_bug.cgi?id=108223

* platform/mac/TestExpectations:

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

8 years agoMerge MainResourceLoader::responseReceived into DocumentLoader
japhet@chromium.org [Tue, 19 Mar 2013 17:08:17 +0000 (17:08 +0000)]
Merge MainResourceLoader::responseReceived into DocumentLoader
https://bugs.webkit.org/show_bug.cgi?id=112593

Part of the ongoing effort to merge MainResourceLoader entirely
into DocumentLoader.

Reviewed by Adam Barth.

No new tests, refactor only.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::stopLoading):
(WebCore::DocumentLoader::finishedLoading): The only thing left in
    MainResourceLoader related to this function was a RefPtr which indirectly
    protected DocumentLoader. Move the RefPtr here and protect DocumentLoader directly.
(WebCore::DocumentLoader::responseReceived): Moved from MainResourceLoader.
(WebCore::DocumentLoader::callContinueAfterContentPolicy): Moved from MainResourceLoader.
(WebCore::DocumentLoader::continueAfterContentPolicy): Moved from MainResourceLoader.
(WebCore::DocumentLoader::interruptedForPolicyChangeError): Moved from MainResourceLoader.
(WebCore::DocumentLoader::stopLoadingForPolicyChange): Moved from MainResourceLoader.
(WebCore::DocumentLoader::receivedData):
(WebCore::DocumentLoader::cancelMainResourceLoad):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::isLoadingMultipartContent): Store multipart bit here.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::MainResourceLoader):
(WebCore::MainResourceLoader::cancel):
(WebCore::MainResourceLoader::responseReceived):
(WebCore::MainResourceLoader::notifyFinished):
* loader/MainResourceLoader.h:

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

8 years agoCleanup defaultUnifiedTextCheckerEnabled type
tony@chromium.org [Tue, 19 Mar 2013 17:06:10 +0000 (17:06 +0000)]
Cleanup defaultUnifiedTextCheckerEnabled type
https://bugs.webkit.org/show_bug.cgi?id=112640

Reviewed by Adam Barth.

It's a bool setting. I accidentally declared the default value as a double
in r139202.

No new tests, this is a refactor/code cleanup.

* page/Settings.cpp:
(WebCore): Switch from double to a bool.

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

8 years agoWeb Inspector: Increase DataGrid default font size.
commit-queue@webkit.org [Tue, 19 Mar 2013 16:56:46 +0000 (16:56 +0000)]
Web Inspector: Increase DataGrid default font size.
https://bugs.webkit.org/show_bug.cgi?id=112692

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-19
Reviewed by Pavel Feldman.

The default font of 10px is too small. Most instances of DataGrid set
font to 11px.

* inspector/front-end/dataGrid.css:
(.data-grid table):

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

8 years agoRefactor conditions for setCompositingLayersNeedRebuild in RenderLayer::styleChanged
mvujovic@adobe.com [Tue, 19 Mar 2013 16:49:01 +0000 (16:49 +0000)]
Refactor conditions for setCompositingLayersNeedRebuild in RenderLayer::styleChanged
https://bugs.webkit.org/show_bug.cgi?id=112606

Reviewed by Simon Fraser.

To fix bug 109098 [1], we will need to add more conditions for calling
RenderLayerCompositor::setCompositingLayersNeedRebuild in RenderLayer::styleChanged.
Adding more non-trivial conditions will make this block of code even harder to follow.
This patch refactors the current conditions into functions:
    needsCompositingLayersRebuiltForClip
    needsCompositingLayersRebuiltForOverflow

In bug 109098 [1], I'm planning to add:
    needsCompositingLayersRebuiltForFilters

[1]: https://bugs.webkit.org/show_bug.cgi?id=109098

No new tests. Just refactoring.

* rendering/RenderLayer.cpp:
(WebCore):
(WebCore::RenderLayer::needsCompositingLayersRebuiltForClip):
(WebCore::RenderLayer::needsCompositingLayersRebuiltForOverflow):
    This is a method and not a file static function because it needs to look at the
    RenderLayer's stackingContainer(), which is a private method.
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
(RenderLayer):

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

8 years agoWeb Inspector: Remove flaky part of testRendererProcessNativeMemorySize test.
commit-queue@webkit.org [Tue, 19 Mar 2013 16:20:55 +0000 (16:20 +0000)]
Web Inspector: Remove flaky part of testRendererProcessNativeMemorySize test.
https://bugs.webkit.org/show_bug.cgi?id=112703

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-19
Reviewed by Yury Semikhatsky.

The memory increase size check happened to be flaky. Remove it.

* src/js/Tests.js:
(.TestSuite.prototype.testRendererProcessNativeMemorySize.step1):
(.TestSuite.prototype.testRendererProcessNativeMemorySize):

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

8 years agoUnreviewed GTK gardening,
zandobersek@gmail.com [Tue, 19 Mar 2013 16:17:58 +0000 (16:17 +0000)]
Unreviewed GTK gardening,

* platform/gtk/TestExpectations: Adding failure expectation for fast/dom/icon-url-property.html after r146173.
* platform/gtk/http/tests/security/contentSecurityPolicy/source-list-parsing-10-expected.txt: Rebaselining after r146141.

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

8 years agoWeb Inspector: Fix heap profiler performance tests.
commit-queue@webkit.org [Tue, 19 Mar 2013 16:06:42 +0000 (16:06 +0000)]
Web Inspector: Fix heap profiler performance tests.
https://bugs.webkit.org/show_bug.cgi?id=112701

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-19
Reviewed by Yury Semikhatsky.

The tests were broken by profile types refactoring.

* inspector/heap-snapshot-performance-test.js:
(test.performanceTest.step0):
(test.performanceTest.step1):

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

8 years ago[Qt] Support kerning in fast path font rendering
allan.jensen@digia.com [Tue, 19 Mar 2013 16:00:47 +0000 (16:00 +0000)]
[Qt] Support kerning in fast path font rendering
https://bugs.webkit.org/show_bug.cgi?id=106013

Reviewed by Jocelyn Turcotte.

To support kerning in the fast font path we need to implement SimpleFontData::applyTransforms.

This patch changes the types used by the fast path GlyphBuffer to match those used by Qt,
and implements SimpleFontData::applyTransforms using QRawFont::advancesForGlyphIndexes.

* platform/graphics/GlyphBuffer.h:
(GlyphBufferAdvance):
(WebCore::GlyphBufferAdvance::GlyphBufferAdvance):
(WebCore::GlyphBufferAdvance::setWidth):
(WebCore::GlyphBufferAdvance::width):
(WebCore::GlyphBufferAdvance::height):
(WebCore::GlyphBuffer::add):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::applyTransforms):
* platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::supportsTypesettingFeatures):

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

8 years agoWeb Inspector: split Console into two entities, a web-facing bound object and page...
commit-queue@webkit.org [Tue, 19 Mar 2013 15:54:14 +0000 (15:54 +0000)]
Web Inspector: split Console into two entities, a web-facing bound object and page console.
https://bugs.webkit.org/show_bug.cgi?id=111578

Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-19
Reviewed by Vsevolod Vlasov.

Otherwise, a lot of logging in WebCore needs to go through the DOMWindow which is unnecessary.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::muteConsole):
(WebCore::PageDebuggerAgent::unmuteConsole):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::muteConsole):
(WebCore::PageRuntimeAgent::unmuteConsole):
* page/Console.cpp:
(WebCore::internalAddMessage):
* page/Console.h:
(WebCore):
(Console):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::pageConsole):
(WebCore):
(WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
(WebCore::DOMWindow::printErrorMessage):
* page/DOMWindow.h:
(WebCore):
(DOMWindow):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore):
(WebCore::Page::console):
(Page):
* page/PageConsole.cpp: Added.
(WebCore::PageConsole::PageConsole):
(WebCore):
(WebCore::PageConsole::~PageConsole):
(WebCore::PageConsole::printSourceURLAndLine):
(WebCore::PageConsole::printMessageSourceAndLevelPrefix):
(WebCore::PageConsole::addMessage):
(WebCore::PageConsole::mute):
(WebCore::PageConsole::unmute):
(WebCore::PageConsole::shouldPrintExceptions):
(WebCore::PageConsole::setShouldPrintExceptions):
* page/PageConsole.h: Copied from Source/WebCore/page/Console.h.
(WebCore):
(PageConsole):
(WebCore::PageConsole::create):
(WebCore::PageConsole::page):
* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::parseString):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
(WebCore::docLoaderFunc):

Source/WebKit/mac:

* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics shouldPrintExceptions]):
(+[WebCoreStatistics setShouldPrintExceptions:]):

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

8 years ago[GTK] Fix WebKit2 builds after r146193
zandobersek@gmail.com [Tue, 19 Mar 2013 15:47:17 +0000 (15:47 +0000)]
[GTK] Fix WebKit2 builds after r146193
https://bugs.webkit.org/show_bug.cgi?id=112700

Reviewed by Martin Robinson.

Apply changes to the LayerTreeHostGtk class that are analogous to changes made in r146193
to the LayerTreeHostMac class, namely introducing a PageOverlayLayersMap and using that as
the source of GraphicsLayer objects that should be operated on, making it possible to
support multiple page overlays.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::invalidate):
(WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect):
(WebKit::LayerTreeHostGtk::sizeDidChange):
(WebKit::LayerTreeHostGtk::didInstallPageOverlay):
(WebKit::LayerTreeHostGtk::didUninstallPageOverlay):
(WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay):
(WebKit::LayerTreeHostGtk::paintContents):
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
(WebKit::LayerTreeHostGtk::createPageOverlayLayer):
(WebKit::LayerTreeHostGtk::destroyPageOverlayLayer):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
(LayerTreeHostGtk):

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

8 years ago[Qt] Make ImageDiff similar to Chromium's ImageDiff
allan.jensen@digia.com [Tue, 19 Mar 2013 15:39:46 +0000 (15:39 +0000)]
[Qt] Make ImageDiff similar to Chromium's ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=94782

Based on patch by Csaba Osztrogon√°c.
Reviewed by Jocelyn Turcotte.

The diff image is generated with bright red indicating errors, but letting the base image
shine through so the context of the error-pixel can be identified.

* DumpRenderTree/qt/ImageDiff.cpp:
(main):

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

8 years ago[Qt] QStyle: Set State_Enabled by default when painting style widgets.
commit-queue@webkit.org [Tue, 19 Mar 2013 15:18:47 +0000 (15:18 +0000)]
[Qt] QStyle: Set State_Enabled by default when painting style widgets.
https://bugs.webkit.org/show_bug.cgi?id=112688

Patch by David Rosca <nowrep@gmail.com> on 2013-03-19
Reviewed by Jocelyn Turcotte.

All Qt style widgets were painted with a disabled state, even when
they actually were enabled.
This change fixes it by setting State_Enabled as a default state,
which is then correctly removed when element is disabled.

* Source/WebCore/platform/qt/RenderThemeQStyle.cpp:

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

8 years agoWeb Inspector: move OverviewGrid and OverviewWindow into separate file.
loislo@chromium.org [Tue, 19 Mar 2013 14:47:15 +0000 (14:47 +0000)]
Web Inspector: move OverviewGrid and OverviewWindow into separate file.
https://bugs.webkit.org/show_bug.cgi?id=112693

Reviewed by Yury Semikhatsky.

It is the third patch for the meta bug "Web Inspector: meta bug: extract OverviewGrid from TimelineOverviewPane"
It just moves the OverviewGrid and the related classes into its own file.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* inspector/compile-front-end.py:
* inspector/front-end/OverviewGrid.js: Added.
(WebInspector.OverviewGrid):
(WebInspector.OverviewGrid.prototype.itemsGraphsElement):
(WebInspector.OverviewGrid.prototype.insertBeforeItemsGraphsElement):
(WebInspector.OverviewGrid.prototype.clientWidth):
(WebInspector.OverviewGrid.prototype.showItemsGraphsElement):
(WebInspector.OverviewGrid.prototype.hideItemsGraphsElement):
(WebInspector.OverviewGrid.prototype.updateDividers):
(WebInspector.OverviewGrid.prototype.addEventDividers):
(WebInspector.OverviewGrid.prototype.removeEventDividers):
(WebInspector.OverviewGrid.prototype.setWindowPosition):
(WebInspector.OverviewGrid.prototype.reset):
(WebInspector.OverviewGrid.prototype.windowLeft):
(WebInspector.OverviewGrid.prototype.windowRight):
(WebInspector.OverviewGrid.prototype.setWindow):
(WebInspector.OverviewGrid.prototype.addEventListener):
(WebInspector.OverviewGrid.Window):
(WebInspector.OverviewGrid.Window.prototype.reset):
(WebInspector.OverviewGrid.Window.prototype._leftResizeElementDragging):
(WebInspector.OverviewGrid.Window.prototype._rightResizeElementDragging):
(WebInspector.OverviewGrid.Window.prototype._startWindowSelectorDragging):
(WebInspector.OverviewGrid.Window.prototype._windowSelectorDragging):
(WebInspector.OverviewGrid.Window.prototype._endWindowSelectorDragging):
(WebInspector.OverviewGrid.Window.prototype._startWindowDragging):
(WebInspector.OverviewGrid.Window.prototype._windowDragging):
(WebInspector.OverviewGrid.Window.prototype._endWindowDragging):
(WebInspector.OverviewGrid.Window.prototype._moveWindow):
(WebInspector.OverviewGrid.Window.prototype._resizeWindowLeft):
(WebInspector.OverviewGrid.Window.prototype._resizeWindowRight):
(WebInspector.OverviewGrid.Window.prototype._resizeWindowMaximum):
(WebInspector.OverviewGrid.Window.prototype._setWindow):
(WebInspector.OverviewGrid.Window.prototype._setWindowPosition):
(WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
(WebInspector.OverviewGrid.Window.prototype._zoom):
(WebInspector.OverviewGrid.WindowSelector):
(WebInspector.OverviewGrid.WindowSelector.prototype._createSelectorElement):
(WebInspector.OverviewGrid.WindowSelector.prototype._close):
(WebInspector.OverviewGrid.WindowSelector.prototype._updatePosition):
* inspector/front-end/TimelineOverviewPane.js:
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

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

8 years ago[Qt] Monospace font does not render in proper sizes
allan.jensen@digia.com [Tue, 19 Mar 2013 14:28:39 +0000 (14:28 +0000)]
[Qt] Monospace font does not render in proper sizes
https://bugs.webkit.org/show_bug.cgi?id=93263

Reviewed by Jocelyn Turcotte.

Do not force fonts to use integer metrics. This was necessary when the fast font path
only worked in integer but is now hindering accurate metrics. This is also required to
make kerning in the fast-path look acceptable

Only enabled for Qt 5.1+ to avoid changing all the baselines for 5.0.

* platform/graphics/qt/FontPlatformDataQt.cpp:
(WebCore::FontPlatformData::FontPlatformData):

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

8 years agoWeb Inspector: Add iframe option to inspectedWindow.eval() extension API
commit-queue@webkit.org [Tue, 19 Mar 2013 14:13:05 +0000 (14:13 +0000)]
Web Inspector: Add iframe option to inspectedWindow.eval() extension API
https://bugs.webkit.org/show_bug.cgi?id=106811

Patch by John J. Barton <johnjbarton@chromium.org> on 2013-03-19
Reviewed by Vsevolod Vlasov.

Source/WebCore:

Add a new case to the options processing in inspectedWindow.eval(), look
for option.frameURL <string> and/or option.scriptExecutionContext: <string>, find the
matching JS context in the runtimeModel, and call evaluate() in that
context; or error if the context is not found.

Test: http/tests/inspector/extensions-iframe-eval.html

* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype.evaluate):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype.frames):
   Added read access to _frames
       * inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.contextListByFrame):
   Added access to a frame's contextList, removed contextByFrameAndSecurityOrigin()
(WebInspector.FrameExecutionContextList.prototype.mainWorldContext):
   Added access to frame's mainWorldContext, rather than implicit first context.
   Now we can go from ResourceTreeModel -> frame -> contextList then either
   mainWorldContext() or contextBySecurityOrigin() to access contexts.

* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
(WebInspector.ExtensionServer.prototype.evaluate):
* inspector/front-end/ResourceTreeModel.js:
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.contextListByFrame):
(WebInspector.FrameExecutionContextList.prototype.mainWorldContext):

* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onReload):
(WebInspector.ExtensionServer.prototype.resolveURLToFrame.hasMatchingURL):
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype.evaluate):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype.frames):
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.contextListByFrame):
(WebInspector.FrameExecutionContextList.prototype.mainWorldContext):

* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype.resolveURLToFrame.hasMatchingURL):
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype.evaluate):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype.frames):
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.contextListByFrame):
(WebInspector.FrameExecutionContextList.prototype.mainWorldContext):

LayoutTests:

New tests for evaluate in iframe options in extension API

* http/tests/inspector/extensions-iframe-eval-expected.txt: Added.
* http/tests/inspector/extensions-iframe-eval.html: Added.
* http/tests/inspector/resources/extensions-frame-eval.html: Added.

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

8 years ago[Qt] Unreviewed gardening. Skip a failing tests after r146174 and r146178.
kadam@inf.u-szeged.hu [Tue, 19 Mar 2013 13:22:59 +0000 (13:22 +0000)]
[Qt] Unreviewed gardening. Skip a failing tests after r146174 and r146178.

* platform/qt/TestExpectations:

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

8 years agoWeb Inspector: rename TimelineOverviewWindow to OverviewGrid.Window and fix names...
loislo@chromium.org [Tue, 19 Mar 2013 12:54:56 +0000 (12:54 +0000)]
Web Inspector: rename TimelineOverviewWindow to OverviewGrid.Window and fix names for constants.
https://bugs.webkit.org/show_bug.cgi?id=112685

Reviewed by Yury Semikhatsky.

It is the second patch which extracts OverviewGrid from TimelineOverviewPane.
It renames internal components of OverviewGrid.
WebInspector.TimelineOverviewWindow -> WebInspector.OverviewGrid.Window
WebInspector.TimelineOverviewWindow.WindowSelector -> WebInspector.OverviewGrid.WindowSelector

and moves constants from WebInspector.TimelineOverviewWindow namespace to WebInspector.OverviewGrid namespace

* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane):
(WebInspector.OverviewGrid):
(WebInspector.OverviewGrid.Window):
(WebInspector.OverviewGrid.Window.prototype._startWindowSelectorDragging):
(WebInspector.OverviewGrid.Window.prototype._endWindowSelectorDragging):
(WebInspector.OverviewGrid.Window.prototype._startWindowDragging):
(WebInspector.OverviewGrid.Window.prototype._windowDragging):
(WebInspector.OverviewGrid.Window.prototype._moveWindow):
(WebInspector.OverviewGrid.Window.prototype._resizeWindowRight):
(WebInspector.OverviewGrid.Window.prototype._setWindowPosition):
(WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
(WebInspector.OverviewGrid.Window.prototype._zoom):
(WebInspector.OverviewGrid.WindowSelector):
(WebInspector.OverviewGrid.WindowSelector.prototype._createSelectorElement):

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

8 years agoWeb Inspector: move _timelineGrid && _timelineOverviewWindow from TimelineOverviewPan...
loislo@chromium.org [Tue, 19 Mar 2013 11:46:26 +0000 (11:46 +0000)]
Web Inspector: move _timelineGrid && _timelineOverviewWindow from TimelineOverviewPane into a new class OverviewGrid.
https://bugs.webkit.org/show_bug.cgi?id=112584

Reviewed by Pavel Feldman.

It is the first path in the set.
The end goal is to extract OverviewGrid with window selectors
into a separate class in separate file and reuse it in CPU FlameChart.

* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane):
(WebInspector.OverviewGrid):
(WebInspector.OverviewGrid.prototype.get grid):
(WebInspector.OverviewGrid.prototype.get clientWidth):
(WebInspector.OverviewGrid.prototype.showItemsGraphsElement):
(WebInspector.OverviewGrid.prototype.hideItemsGraphsElement):
(WebInspector.OverviewGrid.prototype.updateDividers):
(WebInspector.OverviewGrid.prototype.addEventDividers):
(WebInspector.OverviewGrid.prototype.removeEventDividers):
(WebInspector.OverviewGrid.prototype.setWindowPosition):
(WebInspector.OverviewGrid.prototype.reset):
(WebInspector.OverviewGrid.prototype.get windowLeft):
(WebInspector.OverviewGrid.prototype.get windowRight):
(WebInspector.OverviewGrid.prototype.setWindow):
(WebInspector.OverviewGrid.prototype.addEventListener):
(WebInspector.TimelineOverviewPane.prototype.setMode):
(WebInspector.TimelineOverviewPane.prototype._setFrameMode):
(WebInspector.TimelineOverviewPane.prototype._update):
(WebInspector.TimelineOverviewPane.prototype.sidebarResized):
(WebInspector.TimelineOverviewPane.prototype.zoomToFrame):
(WebInspector.TimelineOverviewPane.prototype._reset):
(WebInspector.TimelineOverviewPane.prototype.windowLeft):
(WebInspector.TimelineOverviewPane.prototype.windowRight):
(WebInspector.TimelineOverviewPane.prototype._updateWindow):

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

8 years agoWeb Inspector: Add Inspector.targetCrashed event to Inspector protocol.
commit-queue@webkit.org [Tue, 19 Mar 2013 11:43:23 +0000 (11:43 +0000)]
Web Inspector: Add Inspector.targetCrashed event to Inspector protocol.
https://bugs.webkit.org/show_bug.cgi?id=112669

Added Inspector.targetCrashed event and handled it on the front end.
Showing a modal dialog similar to the one displayed when the remote
debugging target is disconnected.

Patch by Vladislav Kaznacheev <kaznacheev@chromium.org> on 2013-03-19
Reviewed by Pavel Feldman.

* English.lproj/localizedStrings.js:
* inspector/Inspector.json:
* inspector/front-end/HelpScreen.js:
(WebInspector.HelpScreenUntilReload):
(WebInspector.HelpScreenUntilReload.prototype.willHide):
* inspector/front-end/inspector.js:
(WebInspector.targetCrashed):

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

8 years ago[Qt] Fix the build of QtTestBrowser if the print preview dialog is disabled in Qt
abecsi@webkit.org [Tue, 19 Mar 2013 11:05:28 +0000 (11:05 +0000)]
[Qt] Fix the build of QtTestBrowser if the print preview dialog is disabled in Qt

Rubber-stamped by Csaba Osztrogon√°c.

Check for QT_NO_PRINTPREVIEWDIALOG instead of QT_NO_PRINTER
since the latter might not cover the former.

* QtTestBrowser/launcherwindow.cpp:
(LauncherWindow::print):

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

8 years ago[GTK] Wrong guard USE(GLX) in RedirectedXCompositeWindow
mario@webkit.org [Tue, 19 Mar 2013 10:05:41 +0000 (10:05 +0000)]
[GTK] Wrong guard USE(GLX) in RedirectedXCompositeWindow
https://bugs.webkit.org/show_bug.cgi?id=112600

Reviewed by Martin Robinson.

Replace USE(GLX) condition with USE(OPENGL) && PLATFORM(X11).

* platform/gtk/RedirectedXCompositeWindow.cpp: Updated guard.
* platform/gtk/RedirectedXCompositeWindow.h: Ditto.

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

8 years agoImplement and32 on ARMv7 and ARM traditional platforms
rgabor@webkit.org [Tue, 19 Mar 2013 09:32:54 +0000 (09:32 +0000)]
Implement and32 on ARMv7 and ARM traditional platforms
https://bugs.webkit.org/show_bug.cgi?id=112663

Reviewed by Zoltan Herczeg.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::and32): Add missing method.
(MacroAssemblerARM):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::and32): Add missing method.
(MacroAssemblerARMv7):

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

8 years ago[Qt] Unreviewed gardening. Skip some failing tests.
kadam@inf.u-szeged.hu [Tue, 19 Mar 2013 09:30:09 +0000 (09:30 +0000)]
[Qt] Unreviewed gardening. Skip some failing tests.

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

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

8 years ago[wk2] Should support multiple page overlays, like the API suggests
timothy_horton@apple.com [Tue, 19 Mar 2013 09:27:07 +0000 (09:27 +0000)]
[wk2] Should support multiple page overlays, like the API suggests
https://bugs.webkit.org/show_bug.cgi?id=112505
<rdar://problem/13424796>

Reviewed by Simon Fraser.

* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::didInstallPageOverlay):
(WebKit::DrawingArea::didUninstallPageOverlay):
(WebKit::DrawingArea::setPageOverlayNeedsDisplay):
(WebKit::DrawingArea::setPageOverlayOpacity):
Add PageOverlay argument.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didInstallPageOverlay):
(WebKit::DrawingAreaImpl::didUninstallPageOverlay):
(WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
(WebKit::DrawingAreaImpl::setPageOverlayOpacity):
Add PageOverlay argument, forward it to LayerTreeHost.
(WebKit::DrawingAreaImpl::display):
Paint all of the PageOverlays that WebPage knows about.

* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setNeedsDisplay):
(WebKit::PageOverlay::fadeAnimationTimerFired):
Pass the relevant PageOverlay into the DrawingArea methods that now take it.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawPageOverlay):
Take the PageOverlay to draw as an argument.
(WebKit::WebPage::installPageOverlay):
(WebKit::WebPage::uninstallPageOverlay):
Allow (un)installation of multiple PageOverlays.
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
Hit-test PageOverlays in reverse order of installation (most recently installed should be topmost).

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument.
(WebKit::WebPage::hasPageOverlay): Return true if we have any number of overlays.
(WebKit::WebPage::pageOverlays): Return the whole vector of overlays.

* WebProcess/WebPage/mac/LayerTreeHostMac.h:
Add PageOverlay argument to a few methods.
Add storage for a map of PageOverlay->GraphicsLayers.

* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
(WebKit::LayerTreeHostMac::sizeDidChange):
(WebKit::LayerTreeHostMac::flushPendingLayerChanges):
Operate on all installed PageOverlays, not just the most recently installed one.

(WebKit::LayerTreeHostMac::didInstallPageOverlay):
(WebKit::LayerTreeHostMac::didUninstallPageOverlay):
Forward the passed-in PageOverlay on to createPageOverlayLayer/destroyPageOverlayLayer.

(WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.

(WebKit::LayerTreeHostMac::paintContents):
Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
While not ideal (crawling the map), the vast majority of the time there will only be one entry.

(WebKit::LayerTreeHostMac::initialize):
Create layers for all of WebPage's active PageOverlays.

(WebKit::LayerTreeHostMac::createPageOverlayLayer):
Stick the newly-created GraphicsLayer into the m_pageOverlays map.
Also, drive-by add support for accelerated overlays and debug borders/repaint counters in overlays.

(WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
Remove the relevant overlay from the m_pageOverlays map and tear it down.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
Add PageOverlay argument to a few methods.
Add storage for a map of PageOverlay->GraphicsLayers.
Add storage for a map of GraphicsLayer->CALayers.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
Pass PageOverlay argument on to createPageOverlayLayer.

(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
Pass PageOverlay argument on to destroyPageOverlayLayer.
Refrain from re-enabling threaded scrolling if there are still more overlays installed.

(WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.

(WebKit::TiledCoreAnimationDrawingArea::paintContents):
Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
While not ideal (crawling the map), the vast majority of the time there will only be one entry.

(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
Operate on all installed PageOverlays, not just the most recently installed one.

(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
Stick the newly-created GraphicsLayer into the m_pageOverlays map.
Also, add its platformLayer to our m_pageOverlayPlatformLayers map.

(WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
Remove the relevant overlay from the m_pageOverlays and m_pageOverlayPlatformLayers maps and tear it down.

(WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
When we commit changes for the layer, if the GraphicsLayer's backing platform CALayer
has changed out from under us (we have a reference to the previous one in the m_pageOverlayPlatformLayers map),
the GraphicsLayer has probably switched to/from a tiled layer, and we need to swap out the
layer we have inserted into the root layer. We need to keep the layer ordering consistent with
installation order, as well.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
Assert if we try to install more than one page overlay into a CoordinatedLayerTreeHost,
as this patch does not implement multiple overlay support for Coordinated Graphics.
Keep track of the current PageOverlay so that paintContents can hand WebPage the right one.
(WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Remove our reference to the PageOverlay.
(WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Add unused PageOverlay argument.
(WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Add unused PageOverlay argument.
(WebKit::CoordinatedLayerTreeHost::paintContents): Hand WebPage the PageOverlay we're currently displaying.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
(CoordinatedLayerTreeHost): Add PageOverlay* argument to relevant functions, and storage for m_pageOverlay.

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

8 years ago[CSSRegions] Crash reflowing content in variable width regions
mihnea@adobe.com [Tue, 19 Mar 2013 09:09:04 +0000 (09:09 +0000)]
[CSSRegions] Crash reflowing content in variable width regions
https://bugs.webkit.org/show_bug.cgi?id=112515

Reviewed by David Hyatt.

Source/WebCore:

When removing floats during relayout of a line in a paginated context,
we have to make sure that the floats collection actually has elements before
accessing the last float from the collection.
This situation arises when a block had floats in a previous layout and after
they were removed, m_floatingObjects is not destroyed, only emptied.

Test: fast/regions/crash-reflow-inline-content-in-variable-width-regions.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeFloatingObjectsBelow):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloats):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):

LayoutTests:

* fast/regions/crash-reflow-inline-content-in-variable-width-regions-expected.txt: Added.
* fast/regions/crash-reflow-inline-content-in-variable-width-regions.html: Added.

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

8 years agoWeb Inspector: Debugger scripts should visually differ from network/filesystem files...
vsevik@chromium.org [Tue, 19 Mar 2013 09:06:05 +0000 (09:06 +0000)]
Web Inspector: Debugger scripts should visually differ from network/filesystem files in workspace.
https://bugs.webkit.org/show_bug.cgi?id=112552

Reviewed by Pavel Feldman.

Source/WebCore:

Extracted ContentProviderBasedProjectDelegate from SimpleProjectDelegate.
Implemented DebuggerProjectDelegate for DefaultScriptMapping.
Debugger scripts are now added to workspace with a name starting with [VM] and ending with scriptId.
Added yellow background to debugger scripts editor.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/ContentProviderBasedProjectDelegate.js: Added.
* inspector/front-end/DefaultScriptMapping.js:
(WebInspector.DefaultScriptMapping):
(WebInspector.DefaultScriptMapping.prototype.addScript):
(WebInspector.DefaultScriptMapping.prototype._debuggerReset):
(WebInspector.DebuggerProjectDelegate):
(WebInspector.DebuggerProjectDelegate.prototype.id):
(WebInspector.DebuggerProjectDelegate.prototype.type):
(WebInspector.DebuggerProjectDelegate.prototype.displayName):
(WebInspector.DebuggerProjectDelegate.prototype.addScript):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame):
* inspector/front-end/ParsedURL.js:
(WebInspector.ParsedURL.splitURL):
* inspector/front-end/SimpleWorkspaceProvider.js:
(WebInspector.SimpleProjectDelegate):
(WebInspector.SimpleProjectDelegate.prototype.addFile):
(WebInspector.SimpleProjectDelegate.prototype._ensureUniquePath):
(WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/Workspace.js:
(WebInspector.Workspace.prototype.uiSourceCodeForURL):
* inspector/front-end/inspector.html:
* inspector/front-end/javaScriptSourceFrame.css: Added.
(.source-frame-debugger-script):

LayoutTests:

* inspector/debugger/live-edit-breakpoints-expected.txt:

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

8 years agoUnreviewed, rolling out r146183.
rniwa@webkit.org [Tue, 19 Mar 2013 08:58:19 +0000 (08:58 +0000)]
Unreviewed, rolling out r146183.
http://trac.webkit.org/changeset/146183
https://bugs.webkit.org/show_bug.cgi?id=112673

Caused a few dozens of editing tests to fail on Mac WK2
(Requested by rniwa on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-19

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
(WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay):
(WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay):
(WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity):
(WebKit::CoordinatedLayerTreeHost::paintContents):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
(CoordinatedLayerTreeHost):
* WebProcess/WebPage/DrawingArea.h:
(WebKit):
(WebKit::DrawingArea::didInstallPageOverlay):
(WebKit::DrawingArea::didUninstallPageOverlay):
(WebKit::DrawingArea::setPageOverlayNeedsDisplay):
(WebKit::DrawingArea::setPageOverlayOpacity):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didInstallPageOverlay):
(WebKit::DrawingAreaImpl::didUninstallPageOverlay):
(WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
(WebKit::DrawingAreaImpl::setPageOverlayOpacity):
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.h:
(LayerTreeHost):
(WebKit::LayerTreeHost::setPageOverlayOpacity):
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setNeedsDisplay):
(WebKit::PageOverlay::fadeAnimationTimerFired):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawPageOverlay):
(WebKit::WebPage::installPageOverlay):
(WebKit::WebPage::uninstallPageOverlay):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
* WebProcess/WebPage/WebPage.h:
(WebKit):
(WebPage):
(WebKit::WebPage::hasPageOverlay):
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
(WebKit):
(LayerTreeHostMac):
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
(WebKit::LayerTreeHostMac::sizeDidChange):
(WebKit::LayerTreeHostMac::didInstallPageOverlay):
(WebKit::LayerTreeHostMac::didUninstallPageOverlay):
(WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
(WebKit::LayerTreeHostMac::paintContents):
(WebKit::LayerTreeHostMac::initialize):
(WebKit::LayerTreeHostMac::flushPendingLayerChanges):
(WebKit::LayerTreeHostMac::createPageOverlayLayer):
(WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
(WebKit::TiledCoreAnimationDrawingArea::paintContents):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
(WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
(WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):

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

8 years agoUnreviewed EFL gardening.
g.czajkowski@samsung.com [Tue, 19 Mar 2013 08:08:04 +0000 (08:08 +0000)]
Unreviewed EFL gardening.

spelling-changed-text.html passes after r145849.

* platform/efl/TestExpectations:

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

8 years agoWeb Inspector: [CodeMirror] add smart braces functionality
commit-queue@webkit.org [Tue, 19 Mar 2013 08:07:09 +0000 (08:07 +0000)]
Web Inspector: [CodeMirror] add smart braces functionality
https://bugs.webkit.org/show_bug.cgi?id=112138

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-19
Reviewed by Vsevolod Vlasov.

No new tests.

Add closebrackets add-on to codemirror which implements smart braces
functionality and guard this setting with the "Text Editor smart
braces" experiment.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* inspector/front-end/CodeMirrorTextEditor.js:
* inspector/front-end/WebKit.qrc:
* inspector/front-end/cm/closebrackets.js: Added.
(.):

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

8 years agoWeb Inspector: Avoid forcing text editor resize
commit-queue@webkit.org [Tue, 19 Mar 2013 08:04:41 +0000 (08:04 +0000)]
Web Inspector: Avoid forcing text editor resize
https://bugs.webkit.org/show_bug.cgi?id=112581

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-19
Reviewed by Vsevolod Vlasov.

No new tests.

Avoid unnecessary text editor resizing by removing line decoration
via removeDecoration method instead of DOM remove operation.

* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.clearMessages):
(WebInspector.SourceFrame.prototype._setTextEditorDecorations):

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

8 years agoWeb Inspector: [CodeMirror] fix cursor movements
commit-queue@webkit.org [Tue, 19 Mar 2013 08:03:39 +0000 (08:03 +0000)]
Web Inspector: [CodeMirror] fix cursor movements
https://bugs.webkit.org/show_bug.cgi?id=112555

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-19
Reviewed by Vsevolod Vlasov.

No new tests.

- Update CodeMirror to ToT to include its improved cursor movement
- Add a small keymap to force cursor stop on both line endings and line
starts.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor):
(WebInspector.CodeMirrorTextEditor.FixWordMovement):
(WebInspector.CodeMirrorTextEditor.FixWordMovement.moveRight):
* inspector/front-end/cm/codemirror.css:
(.CodeMirror div.CodeMirror-cursor):
(.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor):
(.CodeMirror):
* inspector/front-end/cm/codemirror.js:
(window.CodeMirror):
(window.CodeMirror.):

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

8 years ago[chromium] Regression(143825): select elements don't open when there is a marquee...
abarth@webkit.org [Tue, 19 Mar 2013 07:56:44 +0000 (07:56 +0000)]
[chromium] Regression(143825): select elements don't open when there is a marquee on the page
https://bugs.webkit.org/show_bug.cgi?id=111278

Unreviewed.

This patch is a rollout of http://trac.webkit.org/changeset/143825. The
original patch caused a regression in the Chromium port.

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

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

8 years agoWeb Inspector: [Styles] Matching @host rule children are not displayed
apavlov@chromium.org [Tue, 19 Mar 2013 07:50:24 +0000 (07:50 +0000)]
Web Inspector: [Styles] Matching @host rule children are not displayed
https://bugs.webkit.org/show_bug.cgi?id=112664

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Process host rules' contents akin to media rules' when handling the CSS model and source data.

Test: platform/chromium/inspector/styles/host-rules.html

* inspector/InspectorStyleSheet.cpp:
(flattenSourceData):
(WebCore::asCSSRuleList):

LayoutTests:

* platform/chromium/inspector/styles/host-rules-expected.txt: Added.
* platform/chromium/inspector/styles/host-rules.html: Added.

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

8 years ago[wk2] Should support multiple page overlays, like the API suggests
timothy_horton@apple.com [Tue, 19 Mar 2013 06:46:39 +0000 (06:46 +0000)]
[wk2] Should support multiple page overlays, like the API suggests
https://bugs.webkit.org/show_bug.cgi?id=112505
<rdar://problem/13424796>

Reviewed by Simon Fraser.

* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::didInstallPageOverlay):
(WebKit::DrawingArea::didUninstallPageOverlay):
(WebKit::DrawingArea::setPageOverlayNeedsDisplay):
(WebKit::DrawingArea::setPageOverlayOpacity):
Add PageOverlay argument.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didInstallPageOverlay):
(WebKit::DrawingAreaImpl::didUninstallPageOverlay):
(WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
(WebKit::DrawingAreaImpl::setPageOverlayOpacity):
Add PageOverlay argument, forward it to LayerTreeHost.
(WebKit::DrawingAreaImpl::display):
Paint all of the PageOverlays that WebPage knows about.

* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setNeedsDisplay):
(WebKit::PageOverlay::fadeAnimationTimerFired):
Pass the relevant PageOverlay into the DrawingArea methods that now take it.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawPageOverlay):
Take the PageOverlay to draw as an argument.
(WebKit::WebPage::installPageOverlay):
(WebKit::WebPage::uninstallPageOverlay):
Allow (un)installation of multiple PageOverlays.
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
Hit-test PageOverlays in reverse order of installation (most recently installed should be topmost).

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument.
(WebKit::WebPage::hasPageOverlay): Return true if we have any number of overlays.
(WebKit::WebPage::pageOverlays): Return the whole vector of overlays.

* WebProcess/WebPage/mac/LayerTreeHostMac.h:
Add PageOverlay argument to a few methods.
Add storage for a map of PageOverlay->GraphicsLayers.

* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
(WebKit::LayerTreeHostMac::sizeDidChange):
(WebKit::LayerTreeHostMac::flushPendingLayerChanges):
Operate on all installed PageOverlays, not just the most recently installed one.

(WebKit::LayerTreeHostMac::didInstallPageOverlay):
(WebKit::LayerTreeHostMac::didUninstallPageOverlay):
Forward the passed-in PageOverlay on to createPageOverlayLayer/destroyPageOverlayLayer.

(WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.

(WebKit::LayerTreeHostMac::paintContents):
Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
While not ideal (crawling the map), the vast majority of the time there will only be one entry.

(WebKit::LayerTreeHostMac::initialize):
Create layers for all of WebPage's active PageOverlays.

(WebKit::LayerTreeHostMac::createPageOverlayLayer):
Stick the newly-created GraphicsLayer into the m_pageOverlayLayers map.
Also, drive-by add support for accelerated overlays and debug borders/repaint counters in overlays.

(WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
Remove the relevant overlay from the m_pageOverlayLayers map and tear it down.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
Add PageOverlay argument to a few methods.
Add storage for a map of PageOverlay->GraphicsLayers.
Add storage for a map of GraphicsLayer->CALayers.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
Pass PageOverlay argument on to createPageOverlayLayer.

(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
Pass PageOverlay argument on to destroyPageOverlayLayer.
Refrain from re-enabling threaded scrolling if there are still more overlays installed.

(WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it.

(WebKit::TiledCoreAnimationDrawingArea::paintContents):
Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it.
While not ideal (crawling the map), the vast majority of the time there will only be one entry.

(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
Operate on all installed PageOverlays, not just the most recently installed one.

(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
Stick the newly-created GraphicsLayer into the m_pageOverlayLayers map.
Also, add its platformLayer to our m_pageOverlayPlatformLayers map.

(WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
Remove the relevant overlay from the m_pageOverlayLayers and m_pageOverlayPlatformLayers maps and tear it down.

(WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
When we commit changes for the layer, if the GraphicsLayer's backing platform CALayer
has changed out from under us (we have a reference to the previous one in the m_pageOverlayPlatformLayers map),
the GraphicsLayer has probably switched to/from a tiled layer, and we need to swap out the
layer we have inserted into the root layer. We need to keep the layer ordering consistent with
installation order, as well.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay):
Assert if we try to install more than one page overlay into a CoordinatedLayerTreeHost,
as this patch does not implement multiple overlay support for Coordinated Graphics.
Keep track of the current PageOverlay so that paintContents can hand WebPage the right one.
(WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Remove our reference to the PageOverlay.
(WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Add unused PageOverlay argument.
(WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Add unused PageOverlay argument.
(WebKit::CoordinatedLayerTreeHost::paintContents): Hand WebPage the PageOverlay we're currently displaying.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
(CoordinatedLayerTreeHost): Add PageOverlay* argument to relevant functions, and storage for m_pageOverlay.

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

8 years agoWeb Inspector: [Styles] The "inherit" property value should be suggested for all...
apavlov@chromium.org [Tue, 19 Mar 2013 06:17:19 +0000 (06:17 +0000)]
Web Inspector: [Styles] The "inherit" property value should be suggested for all properties
https://bugs.webkit.org/show_bug.cgi?id=112662

Reviewed by Vsevolod Vlasov.

* inspector/front-end/CSSMetadata.js:
(WebInspector.CSSMetadata.keywordsForProperty):

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

8 years agoChange icon-url-property test for platforms which don't support dumpIconChanges.
levin@chromium.org [Tue, 19 Mar 2013 06:17:07 +0000 (06:17 +0000)]
Change icon-url-property test for platforms which don't support dumpIconChanges.
https://bugs.webkit.org/show_bug.cgi?id=112660

Reviewed by Simon Fraser.

Add the baseline for mac and remove the test failure.

* fast/dom/icon-url-property.html:
* platform/mac/TestExpectations:
* platform/mac/fast/dom/icon-url-property-expected.txt: Added.

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

8 years agoMedia playhead button is sometimes 1px wider: media/video-playing-and-pause.html...
simon.fraser@apple.com [Tue, 19 Mar 2013 05:41:07 +0000 (05:41 +0000)]
Media playhead button is sometimes 1px wider: media/video-playing-and-pause.html flakey
https://bugs.webkit.org/show_bug.cgi?id=112659

* platform/mac/TestExpectations:

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

8 years agoDFG ToString generic cases should work correctly
fpizlo@apple.com [Tue, 19 Mar 2013 05:23:55 +0000 (05:23 +0000)]
DFG ToString generic cases should work correctly
https://bugs.webkit.org/show_bug.cgi?id=112654
<rdar://problem/13447250>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileToStringOnCell):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

LayoutTests:

* fast/js/dfg-to-string-on-cell-expected.txt: Added.
* fast/js/dfg-to-string-on-cell.html: Added.
* fast/js/dfg-to-string-on-value-expected.txt: Added.
* fast/js/dfg-to-string-on-value.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-to-string-on-cell.js: Added.
(foo):
* fast/js/script-tests/dfg-to-string-on-value.js: Added.
(foo):

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

8 years agoUnreviewed build fix for 32 bit builds.
msaboff@apple.com [Tue, 19 Mar 2013 04:42:10 +0000 (04:42 +0000)]
Unreviewed build fix for 32 bit builds.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

8 years agoBUILD FIX (r146088): ResourceRequest::cfURLRequest() is defined twice on iOS
ddkilzer@apple.com [Tue, 19 Mar 2013 04:15:53 +0000 (04:15 +0000)]
BUILD FIX (r146088): ResourceRequest::cfURLRequest() is defined twice on iOS
<http://webkit.org/b/112387>

* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::cfURLRequest): Move method into
!USE(CFNETWORK) section since it's also defined in
cf/ResourceRequestCFNet.cpp on iOS.

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

8 years agofast/dom/icon-url-property.html fails on Mac after r146173
simon.fraser@apple.com [Tue, 19 Mar 2013 04:00:57 +0000 (04:00 +0000)]
fast/dom/icon-url-property.html fails on Mac after r146173

* platform/mac/TestExpectations:

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

8 years ago[chromium] More tracing in deferred image decoding
hclam@chromium.org [Tue, 19 Mar 2013 03:50:55 +0000 (03:50 +0000)]
[chromium] More tracing in deferred image decoding
https://bugs.webkit.org/show_bug.cgi?id=112648

Reviewed by James Robinson.

Adding more trace events for a couple things in deferred image decoding path:
- Time span for each lock pixels of SkPixelRef.
- Time spent on decoding, scaling and pruning. Also the stack trace for these events.
- Memory usage and number of cached entries.
- Number of decode & scale operations done per image.

No test as this just add tracing information and no behavior change.

* platform/graphics/chromium/ImageDecodingStore.cpp:
(WebCore::ImageDecodingStore::prune):
(WebCore::ImageDecodingStore::insertCacheInternal):
(WebCore::ImageDecodingStore::removeFromCacheInternal):
* platform/graphics/chromium/ImageFrameGenerator.cpp:
(WebCore::ImageFrameGenerator::ImageFrameGenerator):
(WebCore::ImageFrameGenerator::decodeAndScale):
(WebCore::ImageFrameGenerator::tryToScale):
(WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale):
(WebCore::ImageFrameGenerator::tryToDecodeAndScale):
(WebCore::ImageFrameGenerator::decode):
* platform/graphics/chromium/ImageFrameGenerator.h:
(ImageFrameGenerator):
* platform/graphics/chromium/LazyDecodingPixelRef.cpp:
(WebCore::LazyDecodingPixelRef::onLockPixels):
(WebCore::LazyDecodingPixelRef::onUnlockPixels):
(WebCore::LazyDecodingPixelRef::PrepareToDecode):

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

8 years agoEFL: Unsafe branch detected in compilePutByValForFloatTypedArray()
msaboff@apple.com [Tue, 19 Mar 2013 03:22:53 +0000 (03:22 +0000)]
EFL: Unsafe branch detected in compilePutByValForFloatTypedArray()
https://bugs.webkit.org/show_bug.cgi?id=112609

Reviewed by Geoffrey Garen.

Created local valueFPR and scratchFPR and filled them with valueOp.fpr() and scratch.fpr()
respectively so that if valueOp.fpr() causes a spill during allocation, it occurs before the
branch and also to follow convention.  Added register allocation checks to FPRTemporary.
Cleaned up a couple of other places to follow the "AllocatVirtualRegType foo, get machine
reg from foo" pattern.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::fprAllocate):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::convertToDouble):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

8 years agoDump icon change events in the icon-url-property test.
levin@chromium.org [Tue, 19 Mar 2013 03:00:29 +0000 (03:00 +0000)]
Dump icon change events in the icon-url-property test.
https://bugs.webkit.org/show_bug.cgi?id=112647

Reviewed by Jochen Eisinger.

This allows us to check that the didChangeIcon callback
is being done when it should be done. This test stopped
testing that in r122806 but it did before that.

* fast/dom/icon-url-property-expected.txt:
* fast/dom/icon-url-property.html:

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

8 years agoUnreviewed. Generalized suppression for flaky
kbr@google.com [Tue, 19 Mar 2013 02:38:04 +0000 (02:38 +0000)]
Unreviewed. Generalized suppression for flaky
fast/js/repeat-cached-vm-reentry.html .

* platform/chromium/TestExpectations:

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

8 years agoUnreviewed rebaselining after r146167.
kbr@google.com [Tue, 19 Mar 2013 02:26:45 +0000 (02:26 +0000)]
Unreviewed rebaselining after r146167.

* platform/chromium-win/css3/flexbox/flexbox-baseline-margins-expected.png:
* platform/chromium-win/fast/layers/scroll-rect-to-visible-expected.png:

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

8 years ago[iOS] Make a UChar string equal() based on the LChar version
benjamin@webkit.org [Tue, 19 Mar 2013 02:12:45 +0000 (02:12 +0000)]
[iOS] Make a UChar string equal() based on the LChar version
https://bugs.webkit.org/show_bug.cgi?id=112495

Reviewed by David Kilzer.

* wtf/text/StringImpl.h:
(WTF::equal):
Create a equal() function for UChar based on the work done for LChar.

On A6, this is a speed up of about 40% for any string of 2 or more characters.
It is slower by 8% on a single UChar comparison.

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

8 years agoUnreviewed. Rebaselined run-bindings-tests after r146161.
haraken@chromium.org [Tue, 19 Mar 2013 01:28:02 +0000 (01:28 +0000)]
Unreviewed. Rebaselined run-bindings-tests after r146161.

* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjEnumAttr):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::ConfigureV8TestObjTemplate):

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

8 years ago[chromium] Small pixel differences in scroll bars after r145844
commit-queue@webkit.org [Tue, 19 Mar 2013 01:07:30 +0000 (01:07 +0000)]
[chromium] Small pixel differences in scroll bars after r145844
https://bugs.webkit.org/show_bug.cgi?id=112384

Patch by Robert Flack <flackr@chromium.org> on 2013-03-18
Reviewed by Kenneth Russell.

Source/WebCore:

Tests: fast/forms/basic-textareas-quirks.html
       fast/forms/basic-textareas.html
       fast/overflow/overflow-x-y.html
       fast/parser/open-comment-in-textarea.html
       fast/replaced/width100percent-textarea.html

* platform/chromium/ScrollbarThemeChromium.cpp:
(WebCore::ScrollbarThemeChromium::trackRect):

LayoutTests:

* platform/chromium-linux/fast/forms/basic-textareas-expected.png:
* platform/chromium-linux/fast/forms/basic-textareas-quirks-expected.png:
* platform/chromium-linux/fast/overflow/overflow-x-y-expected.png:
* platform/chromium-linux/fast/parser/open-comment-in-textarea-expected.png:
* platform/chromium-linux/fast/replaced/width100percent-textarea-expected.png:
* platform/chromium-win/fast/forms/basic-textareas-quirks-expected.png:

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

8 years agofast/css/lang-mapped-to-webkit-locale-dynamic.xhtml is flakey
simon.fraser@apple.com [Tue, 19 Mar 2013 01:04:01 +0000 (01:04 +0000)]
fast/css/lang-mapped-to-webkit-locale-dynamic.xhtml is flakey

* platform/mac/TestExpectations:

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

8 years ago[WinCairo] Unreviewed build correction.
bfulgham@webkit.org [Tue, 19 Mar 2013 00:46:16 +0000 (00:46 +0000)]
[WinCairo] Unreviewed build correction.

The "ImageDecoder.h" file was improperly tagged as a source file to
build, causing a build failure on initial build attempts. Subsequent
or incremental builds would work.

* WebCore.vcxproj/WebCore.vcxproj: Exclude CG-specific font files.
Switch 'ImageDecoder.h' to proper source file type.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

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

8 years agoDFG should inline binary string concatenations (i.e. ValueAdd with string children)
fpizlo@apple.com [Tue, 19 Mar 2013 00:44:57 +0000 (00:44 +0000)]
DFG should inline binary string concatenations (i.e. ValueAdd with string children)
https://bugs.webkit.org/show_bug.cgi?id=112599

Reviewed by Oliver Hunt.

This does as advertised: if you do x + y where x and y are strings, you'll get
a fast inlined JSRopeString allocation (along with whatever checks are necessary).
It also does good things if either x or y (or both) are StringObjects, or some
other thing like StringOrStringObject. It also lays the groundwork for making this
fast if either x or y are numbers, or some other reasonably-cheap-to-convert
value.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::executeEffects):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(FixupPhase):
(JSC::DFG::FixupPhase::isStringObjectUse):
(JSC::DFG::FixupPhase::convertStringAddUse):
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileAdd):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
(SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::emitAllocateJSCell):
(JSC::DFG::SpeculativeJIT::emitAllocateJSObject):
* runtime/JSString.h:
(JSC::JSString::offsetOfFlags):
(JSString):
(JSRopeString):
(JSC::JSRopeString::offsetOfFibers):

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

8 years ago[chromium] Remove unused type WebTransformationMatrix
jamesr@google.com [Tue, 19 Mar 2013 00:37:23 +0000 (00:37 +0000)]
[chromium] Remove unused type WebTransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=112634

Reviewed by Adam Barth.

Source/Platform:

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

Source/WebCore:

* WebCore.gypi:
* platform/chromium/support/WebTransformationMatrix.cpp: Removed.

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

8 years agofast/events/pageshow-pagehide.html sometimes crashes.
simon.fraser@apple.com [Tue, 19 Mar 2013 00:34:35 +0000 (00:34 +0000)]
fast/events/pageshow-pagehide.html sometimes crashes.
https://bugs.webkit.org/show_bug.cgi?id=81291

* platform/mac-wk2/TestExpectations:

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

8 years agoAdd IDL 'enum' support to CodeGeneratorJS.pm
commit-queue@webkit.org [Tue, 19 Mar 2013 00:33:31 +0000 (00:33 +0000)]
Add IDL 'enum' support to CodeGeneratorJS.pm
https://bugs.webkit.org/show_bug.cgi?id=112475

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2013-03-18
Reviewed by Kentaro Hara.

This adds support for enumerations in JS, adding validation checking
to setters.
It also does validation checking to methods, and a new method
methodWithEnumArg in TestObj.idl

Test: bindings/scripts/test/TestObj.idl

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(NativeToJSValue):
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::methodWithEnumArg):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_method_with_enum_arg):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore):
(WebCore::jsTestObjEnumAttr):
(WebCore::setJSTestObjEnumAttr):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj methodWithEnumArg:]):
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::methodWithEnumArgMethod):
(TestObjV8Internal):
(WebCore::TestObjV8Internal::methodWithEnumArgMethodCallback):
(WebCore::ConfigureV8TestObjTemplate):

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

8 years agoplugins/private-browsing-mode.html is flakey
simon.fraser@apple.com [Tue, 19 Mar 2013 00:28:53 +0000 (00:28 +0000)]
plugins/private-browsing-mode.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=112646

* platform/mac/TestExpectations:

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

8 years agoUnreviewed suppression for flaky test.
kbr@google.com [Tue, 19 Mar 2013 00:27:28 +0000 (00:27 +0000)]
Unreviewed suppression for flaky test.
https://bugs.webkit.org/show_bug.cgi?id=112643

* platform/chromium/TestExpectations:

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

8 years agoediting/deleting/paste-with-transparent-background-color.html
simon.fraser@apple.com [Tue, 19 Mar 2013 00:24:00 +0000 (00:24 +0000)]
editing/deleting/paste-with-transparent-background-color.html
sometimes asserts.

* platform/mac/TestExpectations:

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

8 years agoJSC_NATIVE_FUNCTION() takes an identifier for the name and then uses #name, which...
fpizlo@apple.com [Tue, 19 Mar 2013 00:20:49 +0000 (00:20 +0000)]
JSC_NATIVE_FUNCTION() takes an identifier for the name and then uses #name, which is unsafe if name was already #define'd to something else
https://bugs.webkit.org/show_bug.cgi?id=112639

Reviewed by Michael Saboff.

Change it to take a string instead.

* runtime/JSObject.h:
(JSC):
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::finishCreation):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):

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

8 years agoOlder shadow root rendered in incorrect order when multiple shadow roots containing...
morrita@google.com [Tue, 19 Mar 2013 00:17:26 +0000 (00:17 +0000)]
Older shadow root rendered in incorrect order when multiple shadow roots containing style tags have been constructed
https://bugs.webkit.org/show_bug.cgi?id=93752

The bug was already fixed in some point. This change just adds a regression test to cover the reported problem.

Reviewed by Dimitri Glazkov.

* fast/dom/shadow/multiple-shadowroots-with-empty-styles-expected.html: Added.
* fast/dom/shadow/multiple-shadowroots-with-empty-styles.html: Added.

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

8 years agoStyle tweeks to default.css.
simon.fraser@apple.com [Tue, 19 Mar 2013 00:13:36 +0000 (00:13 +0000)]
Style tweeks to default.css.

Rubber-stamped by David Kilzer.

Give visited links a different color to other links, so you can
see which builds you've viewed.

Make the <small> text less tiny.

* BuildSlaveSupport/build.webkit.org-config/public_html/default.css:
(small):
(a:link,a:visited,a:active):
(a:visited):

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

8 years agoNeed a bundle SPI to generate a snapshot of a specific DOM node (like [DOMNode render...
weinig@apple.com [Tue, 19 Mar 2013 00:12:46 +0000 (00:12 +0000)]
Need a bundle SPI to generate a snapshot of a specific DOM node (like [DOMNode renderedImage])
<rdar://problem/13148631>
https://bugs.webkit.org/show_bug.cgi?id=110034

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.exp.in:
Add some necessary exports.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleCopySnapshotWithOptions):
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
Add WKBundleNodeHandleCopySnapshotWithOptions function.

* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h:
Fix conversion method between WKDOMNode and WKBundleNodeHandleRef to have the same
name in the header and implementation.

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
(WebKit):
(WebKit::InjectedBundleNodeHandle::renderedImage):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
Add implementation of WKBundleNodeHandleCopySnapshotWithOptions.

* Shared/ImageOptions.h:
(WebKit::snapshotOptionsToImageOptions):
* WebProcess/WebPage/WebPage.cpp:
Move snapshotOptionsToImageOptions conversion function to a location where
it can be shared.

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

8 years ago[WinCairo] Build WebCore under VS2010
bfulgham@webkit.org [Tue, 19 Mar 2013 00:10:05 +0000 (00:10 +0000)]
[WinCairo] Build WebCore under VS2010
https://bugs.webkit.org/show_bug.cgi?id=112637

Reviewed by Tim Horton.

* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Extend project
with WinCairo-specific build targets.
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props: Added.
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props: Added.
* WebCore.vcxproj/WebCore.vcxproj: Update to build WinCairo version
of code.
* WebCore.vcxproj/WebCoreCURL.props: Added.
* WebCore.vcxproj/WebCoreCairo.props: Added.
* WebCore.vcxproj/WebCoreDebugWinCairo.props: Added.
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props: Added.
* WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props: Added.
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Added.
* WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props: Added.
* WebCore.vcxproj/WebCoreReleaseWinCairo.props: Added.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCorePrefix.h: Update header to not include Apple-specific
headers during WinCairo build.

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

8 years agoIDB Cursor continue moves one item at a time
jsbell@chromium.org [Mon, 18 Mar 2013 23:54:06 +0000 (23:54 +0000)]
IDB Cursor continue moves one item at a time
https://bugs.webkit.org/show_bug.cgi?id=109972

Reviewed by Tony Chang.

IndexedDB: Use seek on the underlying levelDB iterator to implement the continue operation
on a cursor, instead of advancing one item at a time. On a simple test in Chrome - open a
key cursor on an index w/ 100 items, then do continue(50), rinse and repeat - this cuts the
time 50% (850c/s to 1700c/s). (Original patch c/o Pankaj Kakkar <pankaj@google.com>)

Covered by existing storage/indexeddb cursor tests; just a performance optimization.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::Cursor::continueFunction): Special case first iteration w/ key
to use leveldb seek (forward cursors only, since reverse seek isn't exposed).
(WebCore::ObjectStoreKeyCursorImpl::encodeKey): Helper for encoding key to seek to.
(WebCore::ObjectStoreCursorImpl::encodeKey): Ditto.
(WebCore::IndexKeyCursorImpl::encodeKey): Ditto.
(WebCore::IndexCursorImpl::encodeKey): Ditto.
(WebCore::objectStoreCursorOptions): Store IDs for encodeKey() to use.
(WebCore::indexCursorOptions): Ditto.
* Modules/indexeddb/IDBBackingStore.h:
(CursorOptions): Storage for IDs.
(Cursor): Add encodeKey() to interface.

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

8 years ago MessagePortChannel::EventData should not be exposed
ap@apple.com [Mon, 18 Mar 2013 23:52:25 +0000 (23:52 +0000)]
    MessagePortChannel::EventData should not be exposed
        https://bugs.webkit.org/show_bug.cgi?id=112635

        Reviewed by Geoff Garen.

        MessagePortChannel::EventData is an implementation detail that's only needed to
        store events in MessageQueue. Other existing code already gets away without it,
        just passing message and ports separately.

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::postMessage):
        (WebCore::MessagePort::dispatchMessages):
        * dom/MessagePortChannel.cpp:
        * dom/MessagePortChannel.h:
        * dom/default/PlatformMessagePortChannel.cpp:
        (WebCore::PlatformMessagePortChannel::EventData::create):
        (WebCore::PlatformMessagePortChannel::EventData::EventData):
        (WebCore::MessagePortChannel::postMessageToRemote):
        (WebCore::MessagePortChannel::tryGetMessageFromRemote):
        * dom/default/PlatformMessagePortChannel.h:
        (WebCore::PlatformMessagePortChannel::EventData::message):
        (WebCore::PlatformMessagePortChannel::EventData::channels):
        (PlatformMessagePortChannel):
        (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
        (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
        * dom/default/chromium/PlatformMessagePortChannelChromium.cpp:
        (WebCore::MessagePortChannel::postMessageToRemote):
        (WebCore::MessagePortChannel::tryGetMessageFromRemote):
        (WebCore::PlatformMessagePortChannel::postMessageToRemote):
        (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
        * dom/default/chromium/PlatformMessagePortChannelChromium.h:

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

8 years agoRemove the temporary hack for webkit-perf.appspot.com and cleanup the code
rniwa@webkit.org [Mon, 18 Mar 2013 23:42:30 +0000 (23:42 +0000)]
Remove the temporary hack for webkit-perf.appspot.com and cleanup the code
https://bugs.webkit.org/show_bug.cgi?id=112494

Reviewed by Dirk Pranke.

Removed the code to override webkit-perf.appspot.com by perf.webkit.org.
Also merged two pairs of methods to cleanup the code.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner.run): Merged _upload_and_show_results.
(PerfTestsRunner._generate_results): Merged _generate_output_files.

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

8 years ago[chromium] build xdisplaycheck when building DRT
dpranke@chromium.org [Mon, 18 Mar 2013 23:22:34 +0000 (23:22 +0000)]
[chromium] build xdisplaycheck when building DRT
https://bugs.webkit.org/show_bug.cgi?id=112636

Reviewed by Tony Chang.

It appears that we need xdisplaycheck to be built in order for
Xvfb to be started correctly on the bots, and DRT was missing
a dependency on it. This may be the cause of the ASAN bot not
starting up properly (it only builds DRT).

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:

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

8 years ago[v8] Suppress binding integrity check of HTMLContentElement.
tsepez@chromium.org [Mon, 18 Mar 2013 23:17:32 +0000 (23:17 +0000)]
[v8] Suppress binding integrity check of HTMLContentElement.
https://bugs.webkit.org/show_bug.cgi?id=112613

Reviewed by Adam Barth.

Patch is correct so long as fast/dom/shadow/content-element-user-agent-shadow.html
continues to pass.

* html/shadow/HTMLContentElement.idl:

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

8 years agoRemove failing Windows-specific result; this test passes now.
simon.fraser@apple.com [Mon, 18 Mar 2013 23:16:23 +0000 (23:16 +0000)]
Remove failing Windows-specific result; this test passes now.

* platform/win/media/nodesFromRect-shadowContent-expected.txt: Removed.

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

8 years agoSupport Windows HTMLSelectElement keystrokes on Chromium win
dmazzoni@google.com [Mon, 18 Mar 2013 23:10:50 +0000 (23:10 +0000)]
Support Windows HTMLSelectElement keystrokes on Chromium win
https://bugs.webkit.org/show_bug.cgi?id=112460

Reviewed by Kent Tamura.

Compile in the windows-specific variant of
HTMLSelectElement::platformHandleKeydownEvent
on Chromium win, in addition to PLATFORM(WIN).

* WebCore.gypi:
    Add html/HTMLSelectElementWin.cpp.
* html/HTMLSelectElement.cpp:
    Don't compile generic platformHandleKeydownEvent on
    Chromium win.
* html/HTMLSelectElementWin.cpp:
    Only compile platformHandleKeydownEvent on Windows.
    Fix compile error in assertion.
(WebCore):

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

8 years ago[WinCairo] Get build working under VS2010.
bfulgham@webkit.org [Mon, 18 Mar 2013 23:10:08 +0000 (23:10 +0000)]
[WinCairo] Get build working under VS2010.
https://bugs.webkit.org/show_bug.cgi?id=112604

Reviewed by Tim Horton.

* JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Use CFLite-specific
build target (standard version links against CoreFoundation.lib
instead of CFLite.lib).
* JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: Added.
* JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: Added.
* JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: Added.

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

8 years ago[WK2][Mac] Don't consider empty window frames cacheable.
akling@apple.com [Mon, 18 Mar 2013 23:08:32 +0000 (23:08 +0000)]
[WK2][Mac] Don't consider empty window frames cacheable.
<http://webkit.org/b/112631>
<rdar://problem/13384894>

Reviewed by Anders Carlsson.

If the UI client overrides getWindowFrame() and returns an empty rect, send that over
to the web process and mark it as uncached. This forces the next ChromeClient::windowRect()
call to synchronously retrieve the window frame from the other side.

Fixes an issue with the Mac Web Inspector which uses empty rects to signify that there is
no known window frame yet. In this case, we should not be falling back to the native frame.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowAndViewFramesChanged):

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

8 years agofast/loader/document-with-fragment-url-4.html sometimes asserts
simon.fraser@apple.com [Mon, 18 Mar 2013 23:05:17 +0000 (23:05 +0000)]
fast/loader/document-with-fragment-url-4.html sometimes asserts
https://bugs.webkit.org/show_bug.cgi?id=97124

* platform/mac-wk2/TestExpectations:

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

8 years agoCSP 1.1: Schemeless source expressions match HTTPS resources on HTTP sites.
mkwst@chromium.org [Mon, 18 Mar 2013 22:54:30 +0000 (22:54 +0000)]
CSP 1.1: Schemeless source expressions match HTTPS resources on HTTP sites.
https://bugs.webkit.org/show_bug.cgi?id=112573

Reviewed by Adam Barth.

Source/WebCore:

Currently, the directive 'script-src example.com' would match only
scripts served from 'http://example.com' when served on an HTTP site,
and only scripts served from 'https://example.com' when served on an
HTTPS site. This patch changes the matching behavior for ports that
have enabled CSP_NEXT in order to encourage use of HTTPS resources by
allow schemeless source expressions to match HTTPS origins when on
HTTP sites.

Thread: http://lists.w3.org/Archives/Public/public-webappsec/2013Mar/0013.html
Spec change: https://dvcs.w3.org/hg/content-security-policy/rev/a7dc8820946e

Test: http/tests/security/contentSecurityPolicy/source-list-parsing-10.html

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPSource::CSPSource):
    Pass the current policy into CSPSource so that we can check the
    protected resource's scheme inside schemeMatches, rather than
    overwriting the source expression's scheme before creating the
    CSPSource.
(WebCore::CSPSource::schemeMatches):
    If CSP_NEXT is enabled, ensure that HTTPS resources match the
    HTTP scheme when loaded on HTTP pages with schemaless source
    expressions.
(WebCore::CSPSource::portMatches):
    Check the port against the URL's scheme: if m_scheme isn't
    empty, this will match it. If m_scheme is empty, we can't
    do a strict match against it, nor can we do a strict match
    against the protected resource's port. Checking the URL's
    port against the default port for its scheme solves this
    problem elegantly.
(WebCore::CSPSourceList::parse):
(WebCore::CSPSourceList::addSourceSelf):
    Pass in the policy when creating a CSPSource object.

LayoutTests:

* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js:
    Add support for full URLs in this type of test, which enables loading
    scripts from hosts other than the current page's.
* http/tests/security/contentSecurityPolicy/source-list-parsing-01-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-01.html:
    Drops a test from the first parsing group, as it's better grouped
    with the new test added below.
* http/tests/security/contentSecurityPolicy/source-list-parsing-10-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/source-list-parsing-10.html: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-01.html.
    Adds a new test that checks HTTPS scripts loaded against a
    schemeless source expression.
* platform/chromium/http/tests/security/contentSecurityPolicy/source-list-parsing-10-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/source-list-parsing-10-expected.txt: Added.
    This patch has different behavior for ports that enable CSP_NEXT,
    currently Chromium and GTK.

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

8 years agoText track cues do not update sizes when entering or exiting full screen.
jer.noble@apple.com [Mon, 18 Mar 2013 22:51:31 +0000 (22:51 +0000)]
Text track cues do not update sizes when entering or exiting full screen.
https://bugs.webkit.org/show_bug.cgi?id=112472

Reviewed by Eric Carlson.

The style properties of the TextCueBoxes were not being updated after the size of the video bounds changed.
Because getDisplayTree() will not do it when the cue itself has not changed, explicitly call videoSizeDidChange()
from updateSizes().

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): call videoSizeDidChange() on every active cue.
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::hasDisplayTree): returns whether or not the cue has created a display tree without side effects.
(WebCore::TextTrackCue::videoSizeDidChange): Overridable empty method.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::videoSizeDidChange): Update the CSS height attribute of the cue box using the new video size.
* html/track/TextTrackCueGeneric.h:

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

8 years agoImplement icon change notification dump for Chromium's test shell.
levin@chromium.org [Mon, 18 Mar 2013 22:49:41 +0000 (22:49 +0000)]
Implement icon change notification dump for Chromium's test shell.
https://bugs.webkit.org/show_bug.cgi?id=112614

This was previously implemented for some other platforms in r58111
and r116547.

In r122806, fast/dom/icon-url-property.html stopped using it, but
it is useful for tests, so I plan to re-add it to that test again.

Reviewed by Jochen Eisinger.

* DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
(WebTestRunner::WebTestProxy::didChangeIcon): Add handler so that
 icon change notifications from WebKit may be logged in test output.
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
(WebTestRunner::TestRunner::TestRunner): Expose dumpIconChanges.
(WebTestRunner::TestRunner::reset): Clear the new dump variable.
(WebTestRunner::TestRunner::shouldDumpIconChanges): Expose the dump vairable.
(WebTestRunner):
(WebTestRunner::TestRunner::dumpIconChanges): Implement the test method.
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
(TestRunner):
* DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
(WebTestRunner::WebTestProxyBase::didChangeIcon):
(WebTestRunner):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::didChangeIcon): Add the output about changing the icon.
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

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

8 years agoCSP 1.1: Add 'effective-directive' to violation reports.
mkwst@chromium.org [Mon, 18 Mar 2013 22:47:00 +0000 (22:47 +0000)]
CSP 1.1: Add 'effective-directive' to violation reports.
https://bugs.webkit.org/show_bug.cgi?id=112568

Reviewed by Adam Barth.

Source/WebCore:

https://dvcs.w3.org/hg/content-security-policy/rev/bc2bb0e5072a
introduced an 'effective-directive' field on CSP violation reports,
which allows developers to distinguish between resource types when
'default-src' is the violated directive.

This patch implements the new field behind the CSP_NEXT flag.

Test: http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive.html

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):
(WebCore::CSPDirectiveList::reportViolation):
    These methods now accept an additional parameter to pipe the
    effective directive from the initial callsite down into
    ContentSecurityPolicy::reportViolation.
(WebCore::CSPDirectiveList::checkEvalAndReportViolation):
(WebCore::CSPDirectiveList::checkNonceAndReportViolation):
(WebCore::CSPDirectiveList::checkMediaTypeAndReportViolation):
(WebCore::CSPDirectiveList::checkInlineAndReportViolation):
(WebCore::CSPDirectiveList::allowScriptFromSource):
(WebCore::CSPDirectiveList::allowObjectFromSource):
(WebCore::CSPDirectiveList::allowChildFrameFromSource):
(WebCore::CSPDirectiveList::allowImageFromSource):
(WebCore::CSPDirectiveList::allowStyleFromSource):
(WebCore::CSPDirectiveList::allowFontFromSource):
(WebCore::CSPDirectiveList::allowMediaFromSource):
(WebCore::CSPDirectiveList::allowConnectToSource):
(WebCore::CSPDirectiveList::allowFormAction):
    These methods now pass the effective directive name down
    into checkSourceAndReportViolation or reportViolation.
(WebCore::ContentSecurityPolicy::reportViolation):
* page/ContentSecurityPolicy.h:
    This method now accepts a new parameter that carries
    the effective directive name. If CSP_NEXT is enabled,
    the field is added to the violation report before it's
    sent out into the world.

LayoutTests:

* http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive.html: Added.
    A new test that ensures that 'default-src' doesn't show up in the
    effective directive field, even if it's the directive that was
    actually violated.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-only-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-only-report-uri-missing-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-uri-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-only-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-only-report-uri-missing-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-uri-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt: Added.
    This patch changes the output of violation reports for ports that
    have enabled CSP_NEXT. At the moment, I think that's Chromium and
    GTK only.

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

8 years agoSource/Platform: [chromium] Remove code that relies on boundsContainsPageScale().
wjmaclean@chromium.org [Mon, 18 Mar 2013 22:43:18 +0000 (22:43 +0000)]
Source/Platform: [chromium] Remove code that relies on boundsContainsPageScale().
https://bugs.webkit.org/show_bug.cgi?id=112465

The boundsContainsPageScale() API is going away, remove code that
depends on it.

Reviewed by James Robinson.

* chromium/public/WebContentLayer.h:
(WebContentLayer):

Source/WebCore: [chromium] Remove NCCH code that relies on boundsContainsPageScale().
https://bugs.webkit.org/show_bug.cgi?id=112465

Reviewed by James Robinson.

The boundsContainsPageScale() API is going away, remove code that
depends on it. Uses existing tests as no behaviour change.

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

Source/WebKit/chromium: [chromium] Remove NCCH code that relies on boundsContainsPageScale().
https://bugs.webkit.org/show_bug.cgi?id=112465

Reviewed by James Robinson.

The boundContainsPageScale API is going away, remove code that relies
on it.

* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::NonCompositedContentHost):
(WebKit::NonCompositedContentHost::setViewport):

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