Fix disambiguation popup for new-style page scale
https://bugs.webkit.org/show_bug.cgi?id=107391

Patch by Tien-Ren Chen <trchen@chromium.org> on 2013-01-28
Reviewed by Adam Barth.

This patch corrects various coordinate conversion for disambiguation
popup for the new-style page scale mode.

Source/WebCore:

New unit test: WebFrameTest.DisambiguationPopupPageScale

* page/TouchDisambiguation.cpp:
(WebCore::findGoodTouchTargets):
* page/TouchDisambiguation.h:
(WebCore):

Source/WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
(WebKit::WebViewImpl::handleInputEvent):
* tests/WebFrameTest.cpp:
* tests/data/disambiguation_popup_page_scale.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLOutputElement::htmlFor should be readonly
https://bugs.webkit.org/show_bug.cgi?id=101898

Reviewed by Kentaro Hara.

Source/WebCore:

The spec says htmlFor should be readonly, but WebKit implements it as no-readonly.
Spec: http://dev.w3.org/html5/spec-preview/the-output-element.html

No new tests. Modified existing test fast/dom/HTMLOutputElement/dom-settable-token-list.html
to work as expected.

* GNUmakefile.list.am: Removed JSHTMLOutputElementCustom.cpp
* Target.pri: Ditto
* UseJSC.cmake: Ditto
* UseV8.cmake: Removed V8HTMLOutputElementCustom.cpp
* WebCore.gypi: Removed V8HTMLOutputElementCustom.cpp
* WebCore.vcproj/WebCore.vcproj: Removed JSHTMLOutputElementCustom.cpp
* WebCore.vcxproj/WebCore.vcxproj: Ditto
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
* WebCore.xcodeproj/project.pbxproj: Ditto
* bindings/js/JSBindingsAllInOne.cpp: Ditto
* bindings/js/JSHTMLOutputElementCustom.cpp: Removed.
* bindings/v8/custom/V8HTMLOutputElementCustom.cpp: Removed.
* html/HTMLOutputElement.idl: Made htmlFor attribute readonly.

LayoutTests:

The spec says htmlFor should be readonly, but WebKit implements it as no-readonly.
Spec: http://dev.w3.org/html5/spec-preview/the-output-element.html
Modified tests according to new behavior.

* fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
* fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js: Test for attribute htmlFor is readonly.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-enable WebFrameTest.DivScrollIntoEditableTest
https://bugs.webkit.org/show_bug.cgi?id=98558

Reviewed by Adam Barth.

* tests/WebFrameTest.cpp: Fixed several issues (onload script, the maximum scale factor, etc.) of WebFrameTest.DivScrollIntoEditableTest and enable it.
* tests/data/get_scale_for_zoom_into_editable_test.html: Moved the logic of onload script (which seems not to work) into WebFrameTest.cpp.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Refactor code related to debug border and repaint count.
https://bugs.webkit.org/show_bug.cgi?id=107910

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-28
Reviewed by Noam Rosenthal.

There are two big changes:
1. CoordinatedGraphicsLayer sends debugging visuals to UI Process.
2. When updating a backing store, increment a repaint count.

In addition, we don't use QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS
environment. EFL, GTK and QT will use WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS
after http://webkit.org/b/107198.

* Shared/CoordinatedGraphics/CoordinatedLayerInfo.h:
(WebKit::CoordinatedLayerInfo::CoordinatedLayerInfo):
(CoordinatedLayerInfo):
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStore::removeAllTiles):
(WebKit::CoordinatedBackingStore::updateTile):
(WebKit::CoordinatedBackingStore::texture):
(WebKit::CoordinatedBackingStore::paintTilesToTextureMapper):
(WebKit::CoordinatedBackingStore::adjustedTransformForRect):
(WebKit::CoordinatedBackingStore::paintToTextureMapper):
(WebKit):
(WebKit::CoordinatedBackingStore::drawBorder):
    Override TextureMapperPlatformLayer::drawBorder() to draw the border
    for each tile.
(WebKit::CoordinatedBackingStore::drawRepaintCounter):
(WebKit::CoordinatedBackingStore::commitTileOperations):
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
(WebKit::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile):
(CoordinatedBackingStoreTile):
(CoordinatedBackingStore):
(WebKit::CoordinatedBackingStore::rect):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::setLayerRepaintCount):
(WebKit):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
(CoordinatedLayerTreeHostProxy):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setLayerRepaintCount):
(WebKit):
(WebKit::LayerTreeRenderer::setLayerState):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
(WebCore):
(WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
(WebCore::CoordinatedGraphicsLayer::setDebugBorder):
(WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::setLayerRepaintCount):
(WebKit):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Handle createShadowSubtree inside of ensureUserAgentShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=108116

Reviewed by Dimitri Glazkov.

Instead of making everyone create the UserAgentShadowRoot manually all
over, centralize it in ensureUserAgentShadowRoot() and add a notification
Element::didAddUserAgentShadowRoot that lets elements fill in the subtree.
This lets us get rid of lots of code duplication.

No new tests, just refactoring.

* dom/Element.cpp:
(WebCore::Element::ensureUserAgentShadowRoot):
* dom/Element.h:
(WebCore::Element::didAddUserAgentShadowRoot):
(Element):
* html/HTMLDetailsElement.cpp:
(WebCore::DetailsSummaryElement::create):
(WebCore::HTMLDetailsElement::create):
(WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
* html/HTMLDetailsElement.h:
(HTMLDetailsElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::didAddUserAgentShadowRoot):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::willAddAuthorShadowRoot):
(WebCore::HTMLMediaElement::createMediaControls):
* html/HTMLMediaElement.h:
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::create):
(WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
* html/HTMLMeterElement.h:
(HTMLMeterElement):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::create):
(WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
* html/HTMLProgressElement.h:
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::create):
(WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
* html/HTMLSummaryElement.h:
(HTMLSummaryElement):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::create):
(WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):
* html/HTMLTextAreaElement.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelMuteButtonElement::create):
(WebCore::MediaControlVolumeSliderMuteButtonElement::create):
(WebCore::MediaControlPlayButtonElement::create):
(WebCore::MediaControlOverlayPlayButtonElement::create):
(WebCore::MediaControlSeekForwardButtonElement::create):
(WebCore::MediaControlSeekBackButtonElement::create):
(WebCore::MediaControlRewindButtonElement::create):
(WebCore::MediaControlReturnToRealtimeButtonElement::create):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
(WebCore::MediaControlTimelineElement::create):
(WebCore::MediaControlPanelVolumeSliderElement::create):
(WebCore::MediaControlFullscreenVolumeSliderElement::create):
(WebCore::MediaControlFullscreenButtonElement::create):
(WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
* html/shadow/MediaControlsBlackBerry.cpp:
(WebCore::MediaControlFullscreenPlayButtonElement::create):
(WebCore::MediaControlFullscreenFullscreenButtonElement::create):
(WebCore::MediaControlFullscreenTimelineElement::create):
(WebCore::MediaControlAudioMuteButtonElement::create):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::create):
* svg/SVGTRefElement.h:
(SVGTRefElement):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::create):
* svg/SVGUseElement.h:
(SVGUseElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Refactor code related to debug border and repaint count.
https://bugs.webkit.org/show_bug.cgi?id=105787

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-28
Reviewed by Noam Rosenthal.

It is a follow-up patch not to change layout test results.

The previous patch sets GraphicsLayer::m_usingTiledLayer to true when using a
backing store. When the variable is true, dumpLayer() adds (usingTiledLayer 1),
but most of ports don't set m_usingTiledLayer to true. So we don't use
m_usingTiledLayer to match the test results of other ports.

After this patch, Texture Mapper draws debug visuals for a tiled backing
with different color from safari.

No new tests. Debug feature, not covered in tests.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::updateDebugBorderAndRepaintCountIfNeeded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Build fix
https://bugs.webkit.org/show_bug.cgi?id=108142

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-01-28
Reviewed by Gyuyoung Kim.

Build fix. Though StorageManager was added to WK2 in r141024,
it is not added to Target.pri for qt port.

* Target.pri:

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