Web Inspector: damaging last chunk does not remove its garbage from DOM
https://bugs.webkit.org/show_bug.cgi?id=103132

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Removing everything between undamaged chunks, not registered chunk rows.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
(WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
(WebInspector.TextEditorMainChunk.prototype.updateCollapsedLineRow):
(WebInspector.TextEditorMainChunk.prototype.firstElement):
(WebInspector.TextEditorMainChunk.prototype.lastElement):

LayoutTests:

* inspector/editor/editor-test.js:
(initialize_EditorTests.InspectorTest.createTestEditor):
(initialize_EditorTests.InspectorTest.dumpEditorChunks):
(initialize_EditorTests.InspectorTest.dumpEditorModel):
(initialize_EditorTests.InspectorTest.dumpEditorDOM):
(initialize_EditorTests):
* inspector/editor/text-editor-remove-chunks-from-dom-expected.txt: Added.
* inspector/editor/text-editor-remove-chunks-from-dom.html: Added.
* inspector/editor/text-editor-selection-expected.txt:
* inspector/editor/text-editor-selection.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] GraphicsContext3DQt should not overwrite glClearColor of sharing context.
https://bugs.webkit.org/show_bug.cgi?id=103135

In case we use GraphicsContext3DQt to render into or
read from an existing context, we should not reset
the glClearColor on construction.
Otherwise we might overwrite an existing definition from
the sharing context.

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: remove total item from NMI snapshot grid
https://bugs.webkit.org/show_bug.cgi?id=101926

Patch by Alexei Filippov <alph@chromium.org> on 2012-11-23
Reviewed by Yury Semikhatsky.

* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeSnapshotDataGrid):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2][AC] EwkViewImpl::transformToScreen() does not retrieve the Ecore_X_Window properly
https://bugs.webkit.org/show_bug.cgi?id=103133

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-11-23
Reviewed by Kenneth Rohde Christiansen.

If accelerated compositing is enabled, EwkViewImpl::transformToScreen() should
attempt to retrieve the Ecore_X_Window using ecore_evas_gl_x11_window_get() first
and only fall back to ecore_evas_software_x11_window_get().

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::transformToScreen):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the ARM traditional build after r135330
https://bugs.webkit.org/show_bug.cgi?id=102871

Patch by Gabor Ballabas <gaborb@inf.u-szeged.hu> on 2012-11-23
Reviewed by Zoltan Herczeg.

Added missing functionality to traditional ARM architecture.

* assembler/ARMAssembler.h:
(JSC::ARMAssembler::revertJump):
(ARMAssembler):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatchOnAddress):
(JSC::MacroAssemblerARM::startOfBranchPtrWithPatchOnRegister):
(MacroAssemblerARM):
(JSC::MacroAssemblerARM::revertJumpReplacementToBranchPtrWithPatch):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] GraphicsContext3DQt makes wrong surface current.
https://bugs.webkit.org/show_bug.cgi?id=103136

blitMultisampleFramebufferAndRestoreContext restores
the wrong surface in case the currentContext is the same
as m_platformContext.
In this case we would reset the bound surface to NULL.
Instead we should just leave the context unchanged.

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Define WTF_PLATFORM_EFL in Platform.h
https://bugs.webkit.org/show_bug.cgi?id=101482

Patch by Laszlo Gombos <l.gombos@samsung.com> on 2012-11-23
Reviewed by Kenneth Rohde Christiansen.

.:

Remove the definition of WTF_PLATFORM_EFL from the build system to
make the EFL port consistent with other ports.

* Source/cmake/OptionsEfl.cmake:

Source/WTF:

Define WTF_PLATFORM_EFL in Platform.h to be consistent with
other ports.

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Drop Synchronous Mouse Events
https://bugs.webkit.org/show_bug.cgi?id=102980

Patch by Genevieve Mak <gmak@rim.com> on 2012-11-23
Reviewed by Rob Buis.

Reviewed Internally by George Staikos and Mike Lattanzio.
Don't send actual Touch Events to fullscreen plugins unless
its a Touch Cancel, DoubleTap or TouchHold.
Instead send mouse events as long as its a single finger.
PR #242781

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
(BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: update expectations for now crashing test
visibility-simple-canvas2d-layer.html
https://bugs.webkit.org/show_bug.cgi?id=98086

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Meta viewport can't be changed dynamically
https://bugs.webkit.org/show_bug.cgi?id=103098

Patch by Jacky Jiang  <zhajiang@rim.com>.
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.

PR: 237072
Reset m_userPerformedManualZoom and enable
m_shouldZoomToInitialScaleAfterLoadFinished so that we can relayout the
page and zoom it to fit the screen when we dynamically change the meta
viewport after the load is finished.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r135486): ASSERT(isMainThread()) hit in LayerTreeRenderer::setActive(bool)
https://bugs.webkit.org/show_bug.cgi?id=103077

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-23
Reviewed by Noam Rosenthal.

Currently, the painting thread uses purgeGLResources() and setActive().
QQuickWebPage::updatePaintNode() indirectly calls both methods after
locking the main thread.

This patch changes two points.
1. Remove ASSERT(isMainThread()) in methods that the painting thread can
call.
2. Make purgeGLResources() and setActive() call methods of
LayerTreeCoordinatorProxy via dispatchOnMainThread().

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::LayerTreeRenderer):
(WebKit::LayerTreeRenderer::renderNextFrame):
(WebKit::LayerTreeRenderer::purgeGLResources):
(WebKit):
(WebKit::LayerTreeRenderer::purgeBackingStores):
(WebKit::LayerTreeRenderer::setActive):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: test expectations failures.
https://bugs.webkit.org/show_bug.cgi?id=103148

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ENCHANT] Infinite loop when end word position is not found
https://bugs.webkit.org/show_bug.cgi?id=103139

Reviewed by Martin Robinson.

Covered by existing tests in editing/spelling.

* editing/visible_units.cpp:
(WebCore::isLogicalStartOfWord): Make it private again.
(WebCore::islogicalEndOfWord): Ditto.
* editing/visible_units.h:
* platform/text/enchant/TextCheckerEnchant.cpp:
(WebCore::TextCheckerEnchant::checkSpellingOfWord): Helper funtion
to check a word inside a string using the loaded dictionaries.
(WebCore::TextCheckerEnchant::checkSpellingOfString): Optimize and
simply the code by using the word iterator to iterate the
words.
* platform/text/enchant/TextCheckerEnchant.h:
(TextCheckerEnchant):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][GTK] Adapt accessibility feature to WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=100757

Patch by Mateusz Leszko <m.leszko@samsung.com> on 2012-11-23
Reviewed by Laszlo Gombos.

Tools:

Allow to build accessibility feature in WebkitTestRunner for EFL Platform.
Updating CMake files due to changes from Bug 99011.

* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::AccessibilityController):
(WTR):
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
(AccessibilityController):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: - Removed gtk/gtk.h dependency.
* WebKitTestRunner/PlatformEfl.cmake: - Adding atk includes.

LayoutTests:

Unskipping EFL Accessiblity tests for wk2.

* platform/efl-wk1/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[TexMap] Remove dependency of TextureMapperLayer on GraphicsLayerTextureMapper.
https://bugs.webkit.org/show_bug.cgi?id=103046

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-23
Reviewed by Noam Rosenthal.

Source/WebCore:

It is a preparation patch for Threaded Coordinated Graphics on WK1.

We want to make TextureMapperLayer into an actor model. After making an actor
model, GraphicsLayerTextureMapper and LayerTreeRenderer will communicate with
TextureMapperLayer using message passing. In the first step, we want to hide
GraphicsLayerTextureMapper from TextureMapperLayer.

There are 2 kinds of dependencies of TextureMapperLayer in GraphicsLayerTextureMapper.
1. To query layer states
2. To paint layer contents

In this patch, we removed the second dependency. Currently, TextureMapperLayer
requests painting contents to GraphicsLayerTextureMapper in WK1 while
Coordinated Graphics prepares the contents in LayerTreeRenderer. This patch
makes WK1 prepare the contents in GraphicsLayerTextureMapper like
LayerTreeRenderer.

We will remove the first dependency in a follow-up patch.

Covered by existing layout tests.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerTextureMapper::flushCompositingState):
(WebCore):
(WebCore::GraphicsLayerTextureMapper::didFlushCompositingState):
(WebCore::GraphicsLayerTextureMapper::didFlushCompositingStateRecursive):
(WebCore::GraphicsLayerTextureMapper::updateBackingStore):
(WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
(WebCore::GraphicsLayerTextureMapper::shouldHaveBackingStore):
(WebCore::GraphicsLayerTextureMapper::drawRepaintCounter):
(WebCore::GraphicsLayerTextureMapper::setDebugBorder):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::setHasOwnBackingStore):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::rootLayer):
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::textureMapper):
(WebCore):
(WebCore::TextureMapperLayer::flushCompositingState):
(WebCore::TextureMapperLayer::flushCompositingStateSelf):
* platform/graphics/texmap/TextureMapperLayer.h:
(WebCore):
(WebCore::TextureMapperLayer::TextureMapperLayer):
(TextureMapperLayer):
(WebCore::TextureMapperLayer::setBackingStore):
(State):
(WebCore::TextureMapperLayer::State::State):

Source/WebKit2:

This patch makes GraphicsLayerTextureMapper create its own backing
store. However, LayerTreeRenderer also creates its own backing store. So
when LayerTreeRenderer uses GraphicsLayerTextureMapper,
LayerTreeRenderer needs GraphicsLayerTextureMapper to not create its own
backing store.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::createLayer):
(WebKit::LayerTreeRenderer::getBackingStore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Add support for winflexbison distribution
https://bugs.webkit.org/show_bug.cgi?id=102551

Reviewed by Laszlo Gombos.

Since GnuWin32 does not provide recent versions of bision and flex supporting
the alternative winflexbison distribution is the prefered option.

* Source/cmake/WebKitMacros.cmake:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: LayerTreeRenderer::removeTile() does not remove tiles actually.
https://bugs.webkit.org/show_bug.cgi?id=103030

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-23
Reviewed by Noam Rosenthal.

LayerTreeRenderer::removeTile() must add a backing store into
m_backingStoresWithPendingBuffers. Otherwise, tiles are not removed.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::removeTile):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Gardening: update expectations for fast/events/stopPropagation-submit.html flaky
https://bugs.webkit.org/show_bug.cgi?id=103149

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Match the behavior of selfOrAncestorHaveNonAffineTransforms() to its name.
https://bugs.webkit.org/show_bug.cgi?id=103097

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-23
Reviewed by Noam Rosenthal.

CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms() does
not check its ancestor. This patch makes this method check its ancestor
to match its name.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Page background color bleeds through inner edge of div border with rounded edges
https://bugs.webkit.org/show_bug.cgi?id=103089

Reviewed by Stephen White.

Source/WebCore:

Test that verifies whether a RenderBoxEdge is more than 2 pixels wide
was applying the content scale factor backwards, so the
obscuresBackgroundEdge was falsely passing for downsized boxes.

Test: fast/backgrounds/gradient-background-leakage-2.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::BorderEdge::obscuresBackgroundEdge):

LayoutTests:

New layout test to verify that there is no color bleeding between
a div element's border and background when there are rounded corners
an a scale that reduces a thick border down to a width of less than
two pixels.

* fast/backgrounds/gradient-background-leakage-2-expected.txt: Added.
* fast/backgrounds/gradient-background-leakage-2.html: Added.
* platform/chromium/TestExpectations:


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