[chromium] Allow implicit conversion between gfx::Vector2d and WebSize
https://bugs.webkit.org/show_bug.cgi?id=100553

Reviewed by James Robinson.

The gfx::Vector2d class is used in chromium for defining distances. The
IntSize class is used equivalently inside WebCore. This lets us convert
between vectors and sizes along the API boundary.

* chromium/public/WebSize.h:
(WebKit::WebSize::WebSize):
(WebSize):
(WebKit::WebSize::operator=):
(WebKit::WebSize::operator gfx::Vector2d):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Web page view state should be preserved for pages loaded from page cache
https://bugs.webkit.org/show_bug.cgi?id=100694
Internal PR: 220488

Internally reviewed by Lianghui Chen, Joe Mason
Patch by Michael Matovsky <mmatovsky@rim.com> on 2012-11-01
Reviewed by Rob Buis.

The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward).
This requires web page view state to be saved in and restored from the corresponding page cache history item.

Source/WebCore:

No new tests for platform specific internal change.

* history/blackberry/HistoryItemViewState.h:
(HistoryItemViewState):

Source/WebKit/blackberry:

* Api/WebPageClient.h:
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Android] Apache doesn't properly clean up ipc semaphores after a layout test run
https://bugs.webkit.org/show_bug.cgi?id=100950

Reviewed by Dirk Pranke.

When a test run would fail to complete due to an exception in one of
the workers, the HTTP server wouldn't get a chance to gracefully shut
down. This caused too much IPC semaphores to be left on the server,
causing Apache to fail to start in subsequent runs.

By unifying the Android-specific code with other ports, we no longer
fail to call the ChromiumPort/Base setup_test_run() and clean_up_test_run()
methods either. Furthermore, the number_of_servers argument for starting
the HTTP server is now available as well.

Because not all tests require an HTTP server, it's not guaranteed that
it will be started. Android depends on this, so add a new method to Port
and override it for Android: requires_http_server().

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.run_tests):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._run_tests):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.to.requires_http_server):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_dont_require_http_server):
* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidPort.requires_http_server):
(ChromiumAndroidPort.start_http_server):
* Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
(ChromiumAndroidPortTest.test_must_require_http_server):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, marking tests as failing preemptively.
http://crbug.com/147395

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add RGB to supported destination formats of ImageBuffer::copyToPlatformTexture
https://bugs.webkit.org/show_bug.cgi?id=100971

Reviewed by Stephen White.

The ImageBuffer::copyToPlatformTexture restriction added in
r132965 was too restrictive. Allow RGB textures to prevent
performance regressions.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::texImage2D):
* platform/graphics/ImageBuffer.h:
(ImageBuffer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Provide WebKit API interface for platform gesture curves
https://bugs.webkit.org/show_bug.cgi?id=100675

Reviewed by James Robinson.

Define interfaces to permit the Chromium embedder to provide its own
implementation of a gesture animation curve and add an entry point
to Platform.h that permits WebKit to obtain an instance of an embedder-
provided gesture curve.

No tests needed in this CL: only interfaces are being added.

* Platform.gypi:
* chromium/public/Platform.h:
(WebKit):
(Platform):
(WebKit::Platform::createFlingAnimationCurve):
* chromium/public/WebGestureCurve.h: Added.
(WebKit):
(WebGestureCurve):
(WebKit::WebGestureCurve::~WebGestureCurve):
* chromium/public/WebGestureCurveTarget.h: Added.
(WebKit):
(WebGestureCurveTarget):
(WebKit::WebGestureCurveTarget::~WebGestureCurveTarget):
* chromium/src/WebActiveGestureAnimation.cpp: Added.
(WebKit):
(WebKit::WebActiveGestureAnimation::createAtAnimationStart):
(WebKit::WebActiveGestureAnimation::createWithTimeOffset):
(WebKit::WebActiveGestureAnimation::~WebActiveGestureAnimation):
(WebKit::WebActiveGestureAnimation::WebActiveGestureAnimation):
(WebKit::WebActiveGestureAnimation::animate):
* chromium/src/WebActiveGestureAnimation.h: Added.
(WebKit):
(WebActiveGestureAnimation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline after compositor migration to gfx types.
http://crbug.com/147395

Unreviewed rebaselines.

* platform/chromium-linux/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png:
* platform/chromium-linux/compositing/geometry/vertical-scroll-composited-expected.png:
* platform/chromium-linux/compositing/reflections/nested-reflection-anchor-point-expected.png:
* platform/chromium-linux/platform/chromium/compositing/huge-layer-rotated-expected.png:
* platform/chromium-linux/transforms/3d/point-mapping/3d-point-mapping-3-expected.png:
* platform/chromium-linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png:
* platform/chromium-mac-lion/compositing/geometry/vertical-scroll-composited-expected.png: Added.
* platform/chromium-mac-lion/compositing/reflections/nested-reflection-anchor-point-expected.png:
* platform/chromium-mac-lion/platform/chromium/compositing/huge-layer-rotated-expected.png: Added.
* platform/chromium-mac-lion/transforms/3d/point-mapping/3d-point-mapping-3-expected.png: Added.
* platform/chromium-mac-lion/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png: Added.
* platform/chromium-mac-lion/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png: Added.
* platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-anchor-point-expected.png:
* platform/chromium-mac-snowleopard/transforms/3d/point-mapping/3d-point-mapping-3-expected.png:
* platform/chromium-mac-snowleopard/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png:
* platform/chromium-mac-snowleopard/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png:
* platform/chromium-win-xp/compositing/reflections/nested-reflection-anchor-point-expected.png: Removed.
* platform/efl-wk1/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png: Renamed from LayoutTests/platform/efl/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png.
* platform/efl-wk1/compositing/reflections/nested-reflection-anchor-point-expected.png: Renamed from LayoutTests/platform/efl/compositing/reflections/nested-reflection-anchor-point-expected.png.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: https://bugs.webkit.org/show_bug.cgi?id=100917
There should be a way to dump the scrolling tree from the layout tests

Reviewed by Simon Fraser.

* Source/autotools/symbols.filter:

Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=100917
There should be a way to dump the scrolling tree from the layout tests

Reviewed by Simon Fraser.

New Internals call to dump the scrolling state tree as text. Calls through to the 
ScrollingCoordinator.
* testing/Internals.cpp:
(WebCore::Internals::scrollingStateTreeAsText):
(WebCore):
* testing/Internals.h:
* testing/Internals.idl:
* WebCore.exp.in:
* page/Page.cpp:
(WebCore::Page::scrollingStateTreeAsText):
(WebCore):
* page/Page.h:
(Page):

ScrollingCoordinator tells the rootStateNode to dump the tree as text.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText):
(WebCore):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::scrollingStateTreeAsText):
(WebCore):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):

dumpNode() dumps generic stuff for each node, and dumpProperties will dump the 
properties that are specific to different types of nodes.
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::writeIndent):
(WebCore):
(WebCore::ScrollingStateNode::dumpNode):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText):
* page/scrolling/ScrollingStateNode.h:
(WebCore):
(ScrollingStateNode):
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::dumpProperties):
(WebCore):
* page/scrolling/ScrollingStateScrollingNode.h:
(ScrollingStateScrollingNode):

Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=100917
There should be a way to dump the scrolling tree from the layout tests
        
Reviewed by Simon Fraser.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=100917
There should be a way to dump the scrolling tree from the layout tests

Reviewed by Simon Fraser.

* platform/mac/tiled-drawing/scrolling-tree-after-scroll-expected.txt: Added.
* platform/mac/tiled-drawing/scrolling-tree-after-scroll.html: Added.
* platform/mac/tiled-drawing/scrolling-tree-slow-scrolling-expected.txt: Added.
* platform/mac/tiled-drawing/scrolling-tree-slow-scrolling.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, remove failing expectations after rebaseline.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Crash in Range::editingStartPosition
https://bugs.webkit.org/show_bug.cgi?id=100972

Reviewed by Enrica Casucci.

Add a missing null pointer check. toNormalizedRange() can return null here, in which case the call to
pastLastNode() will crash.

No new tests since determining the exact condition under which we go through the said code path and
toNormalRange returns null is hard.

* editing/mac/EditorMac.mm:
(WebCore::Editor::fontForSelection):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add LLDB-Python scripts to support WebKit data types.
https://bugs.webkit.org/show_bug.cgi?id=100898

Reviewed by Anders Carlsson.

Add Summary providers for common WebKit string types.

* lldb/lldb_webkit.py: Added.
(__lldb_init_module): Register these providers with the debugger.
(WTFString_SummaryProvider): Wrapper around WTFStringProvider.
(WTFStringImpl_SummaryProvider): Wrapper around WTFStringImplProvider.
(WTFAtomicString_SummaryProvider): Ditto.
(guess_string_length): Walk through the string looking for a null-byte(s).
(ustring_to_string): Walk through the string, extracting two-byte values, and concatenate them.
(lstring_to_string): Walk through the string, extracting byte values, and concatenate them.
(WTFStringImplProvider):
(WTFStringImplProvider.__init__):
(WTFStringImplProvider.get_length): Extract the m_length variable.
(WTFStringImplProvider.get_data8): Extract the m_data8 variable.
(WTFStringImplProvider.get_data16): Extract the m_data16 variable.
(WTFStringImplProvider.to_string): Pass the appropriate data variable to {u,l}string_to_string.
(WTFStringImplProvider.is_8bit): Check the m_hashAndFlags variable.
(WTFStringProvider):
(WTFStringProvider.__init__):
(WTFStringProvider.stringimpl): Extract the m_impl variable.
(WTFStringProvider.get_length): Pass through to WTFStringImplProvider.
(WTFStringProvider.to_string): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed gardening.  Mark a test as flaky.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed gardening.  Mark yet another test as flaky.

* platform/chromium/TestExpectations:

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