Source/WebCore: [chromium/mac] Fix an ODR violation.
https://bugs.webkit.org/show_bug.cgi?id=70753

Reviewed by Anders Carlsson.

Both ScrollAnimatorNone and ScrollAnimatorMac define ScrollAnimator::create() on OS X.
Remove the unused one.

* WebCore.gyp/WebCore.gyp:

Source/WebKit/chromium: [chromium] Try to fix mac build after r98294
https://bugs.webkit.org/show_bug.cgi?id=70753

Remove test for ScrollAnimatorNone on mac.

Unreviewed, build fix.


* WebKit.gypi:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: redesign workers sidebar pane
https://bugs.webkit.org/show_bug.cgi?id=70815

Source/WebCore:

Changed workers sidebar pane design.

Now there is a link to worker inspector for each dedicated worker created
by inspected page. The sidebar display a link to a page with list of all
shared workers if there one is supported by the WebKit port. Also there
is a checkbox that allows pause all new workers on first statements.

Reviewed by Pavel Feldman.

* inspector/front-end/Settings.js:
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
* inspector/front-end/WorkerManager.js:
(WebInspector.WorkerManager.prototype.openWorkerInspector):
(WebInspector.WorkerManager.prototype._workerInspectorClosing):
* inspector/front-end/WorkersSidebarPane.js:
(WebInspector.WorkerListSidebarPane):
(WebInspector.WorkerListSidebarPane.prototype._workerRemoved):
(WebInspector.WorkerListSidebarPane.prototype._workersCleared):
(WebInspector.WorkerListSidebarPane.prototype._addWorker):
(WebInspector.WorkerListSidebarPane.prototype._workerItemClicked):
(WebInspector.WorkerListSidebarPane.prototype._autoattachToWorkersClicked):
(WebInspector.WorkerListSidebarPane.prototype._createSharedWorkersLink.link.onclick):
(WebInspector.WorkerListSidebarPane.prototype._createSharedWorkersLink):
* inspector/front-end/elementsPanel.css:
* inspector/front-end/inspectorCommon.css:
(.sidebar-separator):
(.sidebar-label):
* inspector/front-end/scriptsPanel.css:
(.dedicated-worker-item):
(#shared-workers-list):
(#pause-workers-checkbox > input):

Source/WebKit/chromium:

Reviewed by Pavel Feldman.

* src/js/DevTools.js: Expose link to shared workers inspection page to WebCore.
():

LayoutTests:

Update tests in accord with change of class name from
styles-sidebar-pane to sidebar-pane.

Reviewed by Pavel Feldman.

* http/tests/inspector/elements-test.js:
(initialize_ElementTest.InspectorTest.dumpSelectedElementStyles):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: fourth chunk of baselines for Chromium-Skia
on Leopard.

[Omitting 728 of 734 files for brevity.]

* platform/chromium-mac-leopard/fast/lists/ordered-list-with-no-ol-tag-expected.png: Added.
* platform/chromium-mac-leopard/fast/lists/scrolled-marker-paint-expected.png: Added.
* platform/chromium-mac-leopard/fast/media: Added.
...
* platform/chromium-mac-leopard/svg/W3C-SVG-1.1/text-tref-01-b-expected.png: Added.
* platform/chromium-mac-leopard/svg/W3C-SVG-1.1/text-tselect-02-f-expected.png: Added.
* platform/chromium-mac-leopard/svg/W3C-SVG-1.1/text-tspan-01-b-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/10337033> DOMRangeOfString:relativeTo:options has problems with -webkit-user-select: none

Reviewed by Adam Roben.

Source/WebCore: 

Test: added to TestWebKitAPI/Tests/mac/DOMRangeOfString.mm

* page/Page.cpp:
(WebCore::Page::rangeOfString): This function was incorrectly adding the StartInSelection option to
the initial search.

Tools: 

* TestWebKitAPI/Tests/mac/DOMRangeOfString.mm:
(TestWebKitAPI::TEST):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2]Main window never gets focus using TAB key in WebKit2 GTK+.
https://bugs.webkit.org/show_bug.cgi?id=70603

Patch by Vamshikrishna Yellenki <vamshi@motorola.com> on 2011-10-25
Reviewed by Gustavo Noronha Silva.

* MiniBrowser/gtk/BrowserWindow.c:
(focus):
(unFocus):
(browserWindowUIClientInit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] GtkAdjustment watcher updates adjustments too lazily
https://bugs.webkit.org/show_bug.cgi?id=70180

Patch by Martin Robinson <mrobinson@igalia.com> on 2011-10-25
Reviewed by Gustavo Noronha Silva.

Increase the priority of the GtkAdjustments update in GtkAdjustmentWatcher. This
means that adjustments will more quickly represent the state of the WebKitWebView
when it scrolls. This fixes out-of-sync scrollbars and some visual artifacts.

* WebCoreSupport/GtkAdjustmentWatcher.cpp:
(WebKit::GtkAdjustmentWatcher::updateAdjustmentsFromScrollbarsLater): Use a timeout
with the default priority.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Microdata: itemtype attribute should be space-separated list to allow multiple types.
https://bugs.webkit.org/show_bug.cgi?id=70501

Patch by Arko Saha <arko@motorola.com> on 2011-10-25
Reviewed by Ryosuke Niwa.

Tests: fast/dom/MicroData/getitems-multiple-itemtypes.html
       fast/dom/MicroData/itemtype-add-remove-tokens.html
       fast/dom/MicroData/itemtype-attribute-test.html

* dom/MicroDataItemList.cpp:
(WebCore::MicroDataItemList::nodeMatches):
* html/DOMSettableTokenList.h:
(WebCore::DOMSettableTokenList::tokens):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute):
(WebCore::HTMLElement::setItemValueText):
(WebCore::HTMLElement::itemType):
(WebCore::HTMLElement::setItemType):
* html/HTMLElement.h:
* html/HTMLElement.idl:

LayoutTests: Microdata: itemtype attribute should be space-separated list to allow multiple types
https://bugs.webkit.org/show_bug.cgi?id=70501

Patch by Arko Saha <arko@motorola.com> on 2011-10-25
Reviewed by Ryosuke Niwa.

* fast/dom/MicroData/006.html:
* fast/dom/MicroData/007.html:
* fast/dom/MicroData/getitems-multiple-itemtypes-expected.txt: Added.
* fast/dom/MicroData/getitems-multiple-itemtypes.html: Added.
* fast/dom/MicroData/itemtype-add-remove-tokens-expected.txt: Added.
* fast/dom/MicroData/itemtype-add-remove-tokens.html: Added.
* fast/dom/MicroData/itemtype-attribute-test-expected.txt: Added.
* fast/dom/MicroData/itemtype-attribute-test.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable running of track layout tests for Chromium
https://bugs.webkit.org/show_bug.cgi?id=70803

Reviewed by Adam Barth.

Make DumpRenderTree/TestShell always run with track enabled
(equivalent of --enable-video-track).

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: fifth chunk of baselines for Chromium-Skia
on Leopard.

[Omitting 736 of 742 files for brevity.]

* platform/chromium-mac-leopard/tables/mozilla/bugs/bug2479-2-expected.png: Added.
* platform/chromium-mac-leopard/tables/mozilla/bugs/bug2479-3-expected.png: Added.
* platform/chromium-mac-leopard/tables/mozilla/bugs/bug2479-4-expected.png: Added.
...
* platform/chromium-mac-leopard/transitions: Added.
* platform/chromium-mac-leopard/transitions/default-timing-function-expected.png: Added.
* platform/chromium-mac-leopard/transitions/svg-text-shadow-transition-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Rolled DEPS.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-enable touch tests (from 66577)
https://bugs.webkit.org/show_bug.cgi?id=70351

Patch by Gene Girard <girard@chromium.org> on 2011-10-25
Reviewed by Adam Barth.

* tests/InnerGestureRecognizerTest.cpp:
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge endOfLine with logicalEndOfLine and startOfLine with logicalStartOfLine
https://bugs.webkit.org/show_bug.cgi?id=70755

Reviewed by Chang Shu.

Merged endOfLine with logicalEndOfLine, and startOfLine with logicalStartOfLine
to reduce the code duplication.

* editing/visible_units.cpp:
(WebCore::startPositionForLine):
(WebCore::startOfLine):
(WebCore::logicalStartOfLine):
(WebCore::endPositionForLine):
(WebCore::inSameLogicalLine):
(WebCore::endOfLine):
(WebCore::logicalEndOfLine):
* editing/visible_units.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
compositing/video tests time out on Lion
https://bugs.webkit.org/show_bug.cgi?id=70448

Reviewed by Simon Fraser.

Source/WebCore:

AVFoundation will not begin loading or decoding media until a consumer for that media is present.
For video-only media, this means that an AVPlayerLayer must be created and attached to the
AVPlayer before the load state will ever reach "canPlayThrough". Once the metadata for a media
is loaded, create a AVPlayerLayer if the media has a video track.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::updateStates):

LayoutTests:

* compositing/video/video-poster.html: Seek, instead of play, to trigger
    creation of a layer
* http/tests/media/video-load-twice.html: Use waitForEventOnce so that
    canPlayThrough listener is triggered only once.
* media/video-test.js: Add a new function, waitForEventOnce.
(waitForEventOnce):
(waitForEvent._eventCallback):
(waitForEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Batch up texture uploads so that they can be updated incrementally
https://bugs.webkit.org/show_bug.cgi?id=70454

Reviewed by James Robinson.

Because texture uploads can sometimes take more than a frame to
complete, collect all the uploads that need to occur in a
CCTextureUpdater so that we can easily incrementally upload some of
them, interleaving input and drawing so that the compositor thread
continues to appear responsive during a commit.

This change doesn't actually interleave the commits, it just pushes
the infrastructure for doing so up to the CCProxy level so that a
future scheduler can make this decision.

VideoLayerChromium is the only layer type to not use this system. It
needs to be converted to use a texture updater first and it is less of
a priority than the tiled layers.

* WebCore.gypi:
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::updateCompositorResources):
* platform/graphics/chromium/Canvas2DLayerChromium.h:
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::updateCompositorResources):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateCompositorResources):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::updateCompositorResources):
* platform/graphics/chromium/VideoLayerChromium.h:
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::updateCompositorResources):
* platform/graphics/chromium/WebGLLayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::beginCommitOnImplThread):
(WebCore::CCLayerTreeHost::finishCommitOnImplThread):
(WebCore::CCLayerTreeHost::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::setNeedsCommit):
(WebCore::CCSingleThreadProxy::doCommit):
(WebCore::CCSingleThreadProxy::commitIfNeeded):
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
* platform/graphics/chromium/cc/CCTextureUpdater.cpp: Added.
(WebCore::CCTextureUpdater::CCTextureUpdater):
(WebCore::CCTextureUpdater::~CCTextureUpdater):
(WebCore::CCTextureUpdater::append):
(WebCore::CCTextureUpdater::update):
(WebCore::CCTextureUpdater::clear):
* platform/graphics/chromium/cc/CCTextureUpdater.h: Added.
(WebCore::CCTextureUpdater::allocator):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::commitOnImplThread):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r88580): Cursor fails to change to pointer on embedded Google maps popups
https://bugs.webkit.org/show_bug.cgi?id=62797

Source/WebCore:

Reviewed by Chris Marrin.

When hit testing through transformed layers, RenderLayer would simply use
the composited bounds of the layer as the localHitTestRect for hit testing sublayers.
However, this broke hit testing on pages that have a composited, non-transformed layer
which falls outside the bounds of its parent, composited-transformed layer, like Google
Maps.

Fix by mapping the hitTestRect through transforms. However this is tricky, because
mapping a rect into the coordinate system of a layer can result in invalid rectangles
when point projection results in a negative w component. Fix TransformationMatrix::projectPoint()
to detect this case and replace X and Y with large values, and add boundsOfProjectedQuad(), which
maps rectangles with possibly-infinite location or bounds into rects which are representable
in an IntRect.

Tests: transforms/3d/hit-testing/composited-hit-test.html
       transforms/3d/hit-testing/rotated-hit-test-with-child.html
       transforms/3d/hit-testing/rotated-hit-test2.html

* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::projectPoint):
(WebCore::TransformationMatrix::projectQuad):
(WebCore::clampEdgeValue):
(WebCore::TransformationMatrix::boundsOfProjectedQuad):
* platform/graphics/transforms/TransformationMatrix.h:
* rendering/HitTestingTransformState.cpp:
(WebCore::HitTestingTransformState::boundsOfMappedQuad):
* rendering/HitTestingTransformState.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTestLayer):

LayoutTests:

Reviewed by Chris Marrin.

New tests for hit testing through various configurations of 3D transforms.

* platform/mac/transforms/3d/hit-testing/rotated-hit-test-expected.png: Removed.
* platform/mac/transforms/3d/hit-testing/rotated-hit-test-expected.txt: Removed.
* transforms/3d/hit-testing/composited-hit-test-expected.txt: Added.
* transforms/3d/hit-testing/composited-hit-test.html: Added.
* transforms/3d/hit-testing/resources/hit-test-utils.js: Added.
* transforms/3d/hit-testing/rotated-hit-test-expected.txt: Added.
* transforms/3d/hit-testing/rotated-hit-test-with-child-expected.txt: Added.
* transforms/3d/hit-testing/rotated-hit-test-with-child.html: Added.
* transforms/3d/hit-testing/rotated-hit-test.html:
* transforms/3d/hit-testing/rotated-hit-test2-expected.txt: Added.
* transforms/3d/hit-testing/rotated-hit-test2.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
"Open with" item missing from PDF context menu in some cases
https://bugs.webkit.org/show_bug.cgi?id=70828
<rdar://problem/10034302>

Reviewed by Anders Carlsson.

* UIProcess/API/mac/PDFViewController.mm:
(insertOpenWithDefaultPDFMenuItem):
New helper function, extracted from -menuForEvent:. Identical to original code except
that it inserts the item at a specified index, rather than always at the end.
(-[WKPDFView menuForEvent:]):
Now keeps track of whether the Open With item has been inserted while iterating through
the PDFKit-supplied menu items looking for a "Copy" item. If a "Copy" item is not found,
inserts the Open With item at the top of the context menu.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening.

Partial rebaselining of fast/css/focus-ring-multiline-writingmode-vertical.html as it looks like it progressed
on some platforms.

* platform/chromium-cg-mac-leopard/fast/css/focus-ring-multiline-writingmode-vertical-expected.txt: Removed.
* platform/chromium-cg-mac-snowleopard/fast/css/focus-ring-multiline-writingmode-vertical-expected.png: Added.
* platform/chromium-cg-mac-snowleopard/fast/css/focus-ring-multiline-writingmode-vertical-expected.txt: Removed.
* platform/chromium-cg-mac/fast/css/focus-ring-multiline-writingmode-vertical-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/css/focus-ring-multiline-writingmode-vertical-expected.txt: Removed.
* platform/chromium-mac/fast/css/focus-ring-multiline-writingmode-vertical-expected.png: Removed.
* platform/chromium/fast/css/focus-ring-multiline-writingmode-vertical-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening.

The old rebaseline looked wrong and did not match the other baselines. This is now corrected.

* platform/chromium-cg-mac-leopard/fast/backgrounds/background-leakage-transforms-expected.png: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need to support marking of multiple nested codeblocks when compiling
https://bugs.webkit.org/show_bug.cgi?id=70832

Reviewed by Gavin Barraclough.

When inlining a function we end up with multiple codeblocks being
compiled at the same time, so we need to support a list of live
codeblocks.

* heap/Heap.cpp:
(JSC::Heap::markRoots):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::startedCompiling):
(JSC::JSGlobalData::finishedCompiling):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add new uri tokenizer tests
https://bugs.webkit.org/show_bug.cgi?id=70807

Reviewed by Darin Adler.

Test more cases!

* fast/css/uri-token-parsing-expected.txt:
* fast/css/uri-token-parsing.html:


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