Do not dispatch modification events in SVG attribute synchronization
https://bugs.webkit.org/show_bug.cgi?id=92604

Reviewed by Ryosuke Niwa.

Source/WebCore:

Previously, calling hasAttribute() during layout could hit a
layout-during-layout bug because calling hasAttribute() could dispatch a
subtree modification event which could synchronously force a layout. hasAttribute()
exhibits this behavior because property synchronization is done lazily.

This patch skips dispatching subtree modification events during attribute
synchronization.

Additionally, this patch contains a refactoring of lazy attribute setting. We
now have a single place where lazy attributes are set (setSynchronizedLazyAttribute)
and lazy attribute flags have been moved to just Element and ElementAttributeData.

Test: svg/custom/path-domsubtreemodified-crash.html

* dom/Element.cpp:
(WebCore::Element::setAttribute):
(WebCore::Element::setSynchronizedLazyAttribute):
(WebCore):
(WebCore::Element::setAttributeInternal):
* dom/Element.h:
(Element):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::addAttribute):
(WebCore::ElementAttributeData::removeAttribute):
* dom/ElementAttributeData.h:
(ElementAttributeData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::updateStyleAttribute):
* svg/properties/SVGAnimatedPropertyMacros.h:
(WebCore::SVGSynchronizableAnimatedProperty::synchronize):

LayoutTests:

* svg/custom/path-domsubtreemodified-crash-expected.txt: Added.
* svg/custom/path-domsubtreemodified-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Rename 'User agent' to 'Overrides' in settings screen
https://bugs.webkit.org/show_bug.cgi?id=92990

Patch by Addy Osmani <addyo@chromium.org> on 2012-08-02
Reviewed by Pavel Feldman.

Simple setting rename of User agent -> Overrides

* English.lproj/localizedStrings.js:
* inspector/front-end/SettingsScreen.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Rounding error of destination rect of checkerboard
https://bugs.webkit.org/show_bug.cgi?id=93012

Patch by Leo Yang <leoyang@rim.com> on 2012-08-02
Reviewed by Rob Buis.

Reviewed internally by Jakob Petsovits.

Intersect with the destination rectangle to eliminate the rounding error.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::blitContents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed debug build fix (bug 92889)

Patch by Antonio Gomes <agomes@rim.com> on 2012-08-02

* WebKitSupport/InRegionScroller.cpp:
(BlackBerry::WebKit::pushBackInRegionScrollable):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=93020
REGRESSION (tiled scrolling): Full-screen video is broken if page is 
scrolled
-and corresponding-
<rdar://problem/11629778>

Reviewed by Anders Carlsson.

The bug here is that ScrollingTreeNodeMac::setScrollLayerPosition() 
uses the CALayer (PlatformLayer) directly to set the position. That 
means that the GraphicsLayer that owns that PlatformLayer does not 
have updated position information. That results in this bug when we 
switch from fast scrolling to main thread scrolling, because at that 
point, the GraphicsLayer needs to have the correct information. So 
make sure to update the main thread scroll position and layer 
position before transitioning to main thread scrolling.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Wrap shared context getters in WebKit API and avoid WebCore::GraphicsContext3D use in compositor internals
https://bugs.webkit.org/show_bug.cgi?id=92917

Reviewed by Adrienne Walker.

Source/Platform:

This adds Platform API for creating and accessing shared GraphicsContext3D and Ganesh contexts from the main or
compositor threads. These can be used for evaluating filters or doing accelerated painting. These contexts are
generally leaked until lost or process exit, the details are documented in WebSharedGraphicsContext3D.h

* Platform.gypi:
* chromium/public/WebSharedGraphicsContext3D.h: Added.
(WebKit):
(WebSharedGraphicsContext3D):

Source/WebCore:

This uses Platform API wrappers to access the shared WebGraphicsContext3D / Ganesh contexts from the compositor
to evaluate accelerated filters or do accelerated painting.

Filters changes covered by css3/filters/*-hw.html layout tests.

* WebCore.gypi:
* platform/chromium/support/WebSharedGraphicsContext3D.cpp:
(WebKit):
(WebKit::WebSharedGraphicsContext3D::mainThreadContext):
(WebKit::WebSharedGraphicsContext3D::mainThreadGrContext):
(WebKit::WebSharedGraphicsContext3D::compositorThreadContext):
(WebKit::WebSharedGraphicsContext3D::compositorThreadGrContext):
(WebKit::WebSharedGraphicsContext3D::haveCompositorThreadContext):
(WebKit::WebSharedGraphicsContext3D::createCompositorThreadContext):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::createAcceleratedCanvas):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
(WebKit):
(FrameBufferSkPictureCanvasLayerTextureUpdater):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::applyFilters):
* platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
(WebCore::CCRenderSurfaceFilters::apply):
* platform/graphics/chromium/cc/CCRenderSurfaceFilters.h:
(WebKit):
(CCRenderSurfaceFilters):

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