Source/WebCore: [GTK] Protect RedirectedXCompositeWindow with USE(GLX) when building the clutter AC backend
https://bugs.webkit.org/show_bug.cgi?id=96165

Patch by Siraj Razick <siraj.razick@collabora.co.uk> on 2012-09-12
Reviewed by Martin Robinson.

RedirectedXCompositeWindow.cpp and RedirectedXCompositeWindow.h files requies openGL specific
headers to compile so when we build webkit clutter AC backend these files failed to compile,
This patch protects these two files with USE(GLX) when building webkit with Clutter AC backend.

No new tests since this is a build fix

* platform/gtk/RedirectedXCompositeWindow.cpp:
* platform/gtk/RedirectedXCompositeWindow.h:
protects both the files with USE(GLX)

Source/WebKit/gtk: [GTK] Update AcceleratedCompositingContextClutter to match AcceleratedCompositingContext.h API update
https://bugs.webkit.org/show_bug.cgi?id=96165

Patch by Siraj Razick <siraj.razick@collabora.co.uk> on 2012-09-12
Reviewed by Martin Robinson.

Due to the refactoring done in bug #90085 AcceleratedCompositingContext API changed, as a result
AcceleratedCompositingContextClutter doesn't compile anymore. This patch is to update the
AcceleratedCompositingContextClutter implementations to match the API update, and Make webkit
AC backend compile again.

* WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
(WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
(WebKit::AcceleratedCompositingContext::~AcceleratedCompositingContext):
(WebKit::AcceleratedCompositingContext::setRootCompositingLayer):
(WebKit::AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay):
(WebKit::flushAndRenderLayersCallback):
(WebKit::AcceleratedCompositingContext::scheduleLayerFlush):
(WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
(WebKit::AcceleratedCompositingContext::flushAndRenderLayers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTML parser fails to propertly close 4 identical nested formatting elements
https://bugs.webkit.org/show_bug.cgi?id=96385

Reviewed by Adam Barth.

Add missing Adoption agency step 4.a to fix one of our two outlying Adoption Agency bugs.
This is the same step that Opera was missing (must have been recently added to the spec).

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[v8] document.getCSSCanvasContext doesn't need to be custom
https://bugs.webkit.org/show_bug.cgi?id=96560

Reviewed by Eric Seidel.

Source/WebCore:

Instead of having a special case for toV8(CanvasRenderingContext*)
inlined into this custom function, we should just make the toV8
function itself custom.

Test: fast/canvas/canvas-css-crazy.html

* UseV8.cmake:
* WebCore.gypi:
* bindings/v8/custom/V8DocumentCustom.cpp:
* dom/Document.idl:
* html/canvas/CanvasRenderingContext.idl:

LayoutTests:

Test that document.getCSSCanvasContext returns null for a bogus canvas type.

* fast/canvas/canvas-css-crazy-expected.txt: Added.
* fast/canvas/canvas-css-crazy.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
percentage widths rendered wrong in vertical writing mode with orthogonal parent
https://bugs.webkit.org/show_bug.cgi?id=96308

Reviewed by Tony Chang.

Source/WebCore:

When the containingBlock is in a perpendicular writing-mode, we need to use
it's logicalWidth as the availableHeight for computing percentage values.

Tests: fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html
       fast/writing-mode/percentage-height-orthogonal-writing-modes.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
Added some FIXMEs for perpendicular writing mode cases.

LayoutTests:

* fast/writing-mode/percentage-height-orthogonal-writing-modes-expected.txt: Added.
* fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt: Added.
* fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html: Added.
* fast/writing-mode/percentage-height-orthogonal-writing-modes.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: svg:image not accessible
https://bugs.webkit.org/show_bug.cgi?id=96341

Reviewed by Adele Peterson.

Source/WebCore: 

Test: accessibility/svg-image.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

LayoutTests: 

* accessibility/svg-image.html: Added.
* platform/mac/accessibility/svg-image-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r128351.
http://trac.webkit.org/changeset/128351
https://bugs.webkit.org/show_bug.cgi?id=96573

Broke FindInPage browser_tests (Requested by jamesr_ on
#webkit).

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

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):
(WebKit::WebFrameImpl::cancelPendingScopingEffort):
(WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):
(WebKit::WebFrameImpl::shouldScopeMatches):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove unused WebGestureEvent fields
https://bugs.webkit.org/show_bug.cgi?id=95496

Patch by Rick Byers <rbyers@chromium.org> on 2012-09-12
Reviewed by Adam Barth.

Remove the no-longer used fields from WebGestureEvent, now that
chromium has been updated to use the per-event-type fields instead.
This depends on crrev.com/156346 in chromium.

* public/WebInputEvent.h:
(WebKit::WebGestureEvent::WebGestureEvent):
* public/android/WebInputEventFactory.h:
* src/WebInputEvent.cpp:
(SameSizeAsWebGestureEvent):
* src/android/WebInputEventFactory.cpp:
(WebKit):
(WebKit::WebInputEventFactory::gestureEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Use ScriptValue instead of SerializedScriptValue when possible
https://bugs.webkit.org/show_bug.cgi?id=94023

Patch by Alec Flett <alecflett@chromium.org> on 2012-09-12
Reviewed by Kentaro Hara.

Transition the put/add/update methods to accept direct ScriptValue
objects rather than SerializedScriptValues, to eliminate lots of
redundant deserialization/serialization steps while storing
values.

Also see https://bugs.webkit.org/show_bug.cgi?id=95409 for
followup get/openCursor work, following this.

No new tests, this is a performance refactor of core IDB
functionality. Most existing tests cover correctness. Tests that
might fail include:

storage/indexeddb/objectstore-basics.html
storage/indexeddb/keypath-basics.html
storage/indexeddb/index-basics.html

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::update):
* Modules/indexeddb/IDBCursor.h:
(IDBCursor):
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::generateIndexKeysForValue):
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
(WebCore):
* Modules/indexeddb/IDBObjectStore.h:
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStore.idl:
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore):
(WebCore::createIDBKeyFromScriptValueAndKeyPath):
(WebCore::deserializeIDBValue):
(WebCore::canInjectIDBKeyIntoScriptValue):
* bindings/v8/IDBBindingUtilities.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Implement transform parameter animations for CSS Custom Filters
https://bugs.webkit.org/show_bug.cgi?id=94980

Reviewed by Dean Jackson.

Based on patch from Joshua Netterfield <jnetterfield@rim.com>.

Source/WebCore:

According to Section 39.2 of Filter Effects 1.0 Editor's draft
(https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html), animations
of transforms should be handled following the CSS3 transform interpolation
rules. This patch implements this functionality.

Test: css3/filters/custom/custom-filter-transforms-animation.html

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore):
* platform/graphics/filters/CustomFilterNumberParameter.h:
(WebCore::CustomFilterNumberParameter::blend):
* platform/graphics/filters/CustomFilterOperation.cpp:
(WebCore::blendCustomFilterParameters):
(WebCore::CustomFilterOperation::blend):
* platform/graphics/filters/CustomFilterOperation.h:
(WebCore):
(WebCore::CustomFilterOperation::blendingNeedsRendererSize): Some filters need the box size, so that they could compute
Transforms. Right now only the CustomFilterOperation needs that, but I've implemented using this generic function.
(CustomFilterOperation):
* platform/graphics/filters/CustomFilterParameter.h:
(CustomFilterParameter):
* platform/graphics/filters/CustomFilterTransformParameter.h:
(CustomFilterTransformParameter):
(WebCore::CustomFilterTransformParameter::blend):
* platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::FilterOperation::blend):
(FilterOperation):
(WebCore::FilterOperation::FilterOperation::blendingNeedsRendererSize):
* platform/graphics/transforms/TransformOperations.cpp: Extracted the blending functions from CSSPropertyAnimation.cpp
so that they could be reused from other classes.
(WebCore::TransformOperations::blendByMatchingOperations):
(WebCore):
(WebCore::TransformOperations::blendByUsingMatrixInterpolation): Used when the TransformOperations do not match.
(WebCore::TransformOperations::blend): Uses when the caller doesn't know whether the TransformOperations match or not.
* platform/graphics/transforms/TransformOperations.h:
(TransformOperations):

LayoutTests:

Added test transform animations in css3/filters/custom/custom-filter-transform-animation.html.

* animations/resources/animation-test-helpers.js:
(customFilterParameterMatch): Extracted the parameter matching from filterParametersMatch and added function parameters matching.
This should work for all functions that have number parameters, ie. arrays, mat4 functions.

(filterParametersMatch):
* css3/filters/custom/custom-filter-transforms-animation-expected.txt: Added.
* css3/filters/custom/custom-filter-transforms-animation.html: Added.
* css3/filters/resources/custom-filter-parser.js: Fixed function parsing.
(TokenStream.prototype.skip):

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