CommitQueue is confused about what port it is using
https://bugs.webkit.org/show_bug.cgi?id=91040

Reviewed by Dirk Pranke.

On EC2, we explicitly pass --port to the commit-queue, but that
requires editing the start-queue.sh script locally on each bot. In
moving to Google Compute Engine, we're try to avoid any local edits to
the EWSTools.

Rather than passing --port to the commit-queue, this patch teaches the
CommitQueue which port its running, which is the approach we use for
the EWS bots.

Mutating tool._deprecated_port is a bit ugly, but it's what we're doing
currently for the EWS bots.

* Scripts/webkitpy/tool/commands/queues.py:
(CommitQueue):
(CommitQueue.begin_work_queue):
(CommitQueue.run_command):
* Scripts/webkitpy/tool/commands/queues_unittest.py:
(CommitQueueTest.test_commit_queue):
(mock_run_webkit_patch):
(test_rollout):
(test_rollout_lands):
(test_manual_reject_during_processing):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Simplify CodeGeneratorV8 since V8OnProto is only true for DOMWindow
https://bugs.webkit.org/show_bug.cgi?id=91165

Reviewed by Nate Chapin.

The old code was dead code since V8OnProto only ever gets set to 1 for DOMWindow.

No new tests. No change in functionality.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrSetter):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
test-webkitpy: rename test_finder to finder
https://bugs.webkit.org/show_bug.cgi?id=91175

Reviewed by Adam Barth.

Rename test_finder -> finder, TestFinder -> Finder to remove
some of the stutter in the names.

* Scripts/webkitpy/test/finder.py: Renamed from Tools/Scripts/webkitpy/test/test_finder.py.
* Scripts/webkitpy/test/finder_unittest.py: Renamed from Tools/Scripts/webkitpy/test/test_finder_unittest.py.
* Scripts/webkitpy/test/main.py:
(Tester.__init__):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Incorrect behaviour calling Range setStart or setEnd with boundary in different document
https://bugs.webkit.org/show_bug.cgi?id=42517

Reviewed by Ojan Vafai.

Source/WebCore:

Added a new static inline "checkForDifferentRootContainer" to share some code
and made setStart/setEnd do the right thing in the x-document case.  I removed
the bogus checks in set*After/set*Before functions, and since they just call
through to setStart/setEnd, they also now do the right thing.

Test: fast/dom/Range/set-wrong-document-err.html

* dom/Range.cpp:
(WebCore::checkForDifferentRootContainer):
(WebCore):
(WebCore::Range::setStart):
(WebCore::Range::setEnd):
(WebCore::Range::setStartAfter):
(WebCore::Range::setEndBefore):
(WebCore::Range::setEndAfter):
(WebCore::Range::setStartBefore):

LayoutTests:

Add a new test to cover this changed behavior, and correct a FIXME in an old test
which was documenting our incorrect behavior.

* fast/dom/Range/set-wrong-document-err-expected.txt: Added.
* fast/dom/Range/set-wrong-document-err.html: Added.
* fast/dom/move-nodes-across-documents.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not
terminate the search at the last word boundary before the given index.

Reviewed by Adele Peterson.

No test, because the current version of Core Foundation ignores the options parameter.

* platform/text/cf/HyphenationCF.cpp:
(WebCore::lastHyphenLocation): Changed the options parameter from 0 to 1.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crash in the commit-queue.  We need to initialize self.port during __init__.

* Scripts/webkitpy/tool/commands/queues.py:
(CommitQueue.__init__):
(CommitQueue.begin_work_queue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG CFA may get overzealous in loops that have code that must exit
https://bugs.webkit.org/show_bug.cgi?id=91188

Source/JavaScriptCore: 

Reviewed by Gavin Barraclough.

Ensure that if the CFA assumes that an operation must exit, then it will always exit
no matter what happens after. That's necessary to preserve soundness.
        
Remove a broken fixup done by the DFG simplifier, where it was trying to say that the
variable-at-head was the first access in the second block in the merge, if the first
block did not read the variable. That's totally wrong, if the first block was in fact
doing a phantom read. I removed that fixup and instead hardened the rest of the
compiler.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::endBasicBlock):
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::BasicBlock):
(BasicBlock):
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::performBlockCFA):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::mergeBlocks):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::ConstantFoldingPhase):
(JSC::DFG::ConstantFoldingPhase::run):
(ConstantFoldingPhase):
(JSC::DFG::ConstantFoldingPhase::foldConstants):
(JSC::DFG::ConstantFoldingPhase::paintUnreachableCode):
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::reconstruct):

LayoutTests: 

Reviewed by Gavin Baraclough.

* fast/js/dfg-force-exit-then-sparse-conditional-constant-prop-in-loop-expected.txt: Added.
* fast/js/dfg-force-exit-then-sparse-conditional-constant-prop-in-loop.html: Added.
* fast/js/script-tests/dfg-force-exit-then-sparse-conditional-constant-prop-in-loop.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][EFL] Facilitate debugging of the Web Process
https://bugs.webkit.org/show_bug.cgi?id=90768

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

Source/WebKit2:

The EFL port now checks if the WEB_PROCESS_CMD_PREFIX
environment variable is set and uses it as prefix
when spawning the Web process if it is. This is used
for debugging purposes with prefixes such as:
"xterm -title renderer -e gdb --args".

* UIProcess/Launcher/ProcessLauncher.h:
(LaunchOptions):
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connect):

Tools:

Add a new --webprocess-cmd-prefix argument to
run-webkit-tests script for EFL port. If provided,
the prefix will be prepended to the command used
to spawn the Web process. This can be used for
debugging purposes with prefixes such as:
"xterm -title renderer -e gdb --args".

* Scripts/webkitpy/layout_tests/port/efl.py:
(EflPort.__init__):
(EflPort.setup_environ_for_server):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::TestController::platformRunUntil): Implement support for
m_noTimeout timeout value.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
https://bugs.webkit.org/show_bug.cgi?id=91062

Reviewed by Kent Tamura.

This patch changes value of StepRange::acceptableError to zero for
integer restricted step value.

No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.

* html/StepRange.cpp:
(WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG property access stubs should use structure transition watchpoints
https://bugs.webkit.org/show_bug.cgi?id=91135

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

This adds a Watchpoint subclass that will clear a structure stub (i.e.
a property access stub) when fired. The DFG stub generation code now
uses this optimization.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::resetStub):
(JSC::CodeBlock::resetStubInternal):
* bytecode/CodeBlock.h:
(JSC):
(CodeBlock):
* bytecode/StructureStubClearingWatchpoint.cpp: Added.
(JSC):
(JSC::StructureStubClearingWatchpoint::~StructureStubClearingWatchpoint):
(JSC::StructureStubClearingWatchpoint::push):
(JSC::StructureStubClearingWatchpoint::fireInternal):
(JSC::WatchpointsOnStructureStubInfo::~WatchpointsOnStructureStubInfo):
(JSC::WatchpointsOnStructureStubInfo::addWatchpoint):
(JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint):
* bytecode/StructureStubClearingWatchpoint.h: Added.
(JSC):
(StructureStubClearingWatchpoint):
(JSC::StructureStubClearingWatchpoint::StructureStubClearingWatchpoint):
(WatchpointsOnStructureStubInfo):
(JSC::WatchpointsOnStructureStubInfo::WatchpointsOnStructureStubInfo):
(JSC::WatchpointsOnStructureStubInfo::codeBlock):
(JSC::WatchpointsOnStructureStubInfo::stubInfo):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::addWatchpoint):
(StructureStubInfo):
* dfg/DFGRepatch.cpp:
(JSC::DFG::addStructureTransitionCheck):
(DFG):
(JSC::DFG::generateProtoChainAccessStub):
(JSC::DFG::emitPutTransitionStub):
* jit/JumpReplacementWatchpoint.h:

LayoutTests: 

* fast/js/dfg-proto-stub-watchpoint-fire-expected.txt: Added.
* fast/js/dfg-proto-stub-watchpoint-fire.html: Added.
* fast/js/script-tests/dfg-proto-stub-watchpoint-fire.js: Added.
(A):
(B):
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option.
https://bugs.webkit.org/show_bug.cgi?id=91185

Patch by Dongwoo Im <dw.im@samsung.com> on 2012-07-12
Reviewed by Kentaro Hara.

When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter.

No new tests. Covered by existing tests.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RadioNodeList is not updated upon input type change
https://bugs.webkit.org/show_bug.cgi?id=91178

Reviewed by Alexey Proskuryakov.

Source/WebCore: 

Invalidate the radio node lists when type content attribute changes since it excludes
image type input elements.

Test: fast/forms/radionodelist-image-type.html

* dom/Document.cpp:
(WebCore::shouldInvalidateNodeListForType):
* dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
since listing all attribute name isn't useful at this point.
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):

LayoutTests: 

Add a regression test.

* fast/forms/radionodelist-image-type-expected.txt: Added.
* fast/forms/radionodelist-image-type.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add API to get HTTPS status to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=91100

Reviewed by Martin Robinson.

Source/WebCore:

* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::soupMessageCertificate): Return the
certificate.
(WebCore::ResourceResponse::setSoupMessageCertificate): Set a
certificate.
(WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS
errors.
(WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS
errors.
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::toSoupMessage): Set the certificate
and TLS errors to the newly created SoupMessage.
(WebCore::ResourceResponse::updateFromSoupMessage): Get the
certificate and TLS errors from the SoupMessage.

Source/WebKit2:

Add webkit_uri_response_get_https_status() to return
GTlsCertificate and GTlsCertificateFlags with information about
the SSL certificate and the possible errors with the certificate.

* GNUmakefile.list.am: Add new files to compilation.
* PlatformEfl.cmake: Ditto.
* Shared/efl/PlatformCertificateInfo.h: Removed.
* Shared/soup/PlatformCertificateInfo.cpp: Added.
(WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::~PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::encode): Encode the
GTlsCertificate and GTlsCertificateFlags.
(WebKit::PlatformCertificateInfo::decode): Decode
PlatformCertificateInfo into a GTlsCertificate and GTlsCertificateFlags.
* Shared/soup/PlatformCertificateInfo.h: Renamed from Source/WebKit2/Shared/gtk/PlatformCertificateInfo.h.
(WebKit::PlatformCertificateInfo::certificate): Return the certificate.
(WebKit::PlatformCertificateInfo::tlsErrors): Return the TLS errors
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didCommitLoadForFrame): Set the certificate of the current frame
to the response of the main resource.
* UIProcess/API/gtk/WebKitURIResponse.cpp:
(webkit_uri_response_get_https_status): Return GTlsCertificate and
GTlsCertificateFlags.
(webkitURIResponseSetCertificateInfo): Update the internal
ResourceResponse with the GTlsCertificate and GTlsCertificateFlags
of the given PlatformCertificateInfo.
* UIProcess/API/gtk/WebKitURIResponse.h:
* UIProcess/API/gtk/WebKitURIResponsePrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/TestMain.h:
(Test::getResourcesDir): Helper function to get the resources
directory of the WebKit2 API tests.
* UIProcess/API/gtk/tests/TestSSL.cpp: Added.
(testSSL):
(serverCallback):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/WebKitTestServer.cpp:
(WebKitTestServer::WebKitTestServer): Add support por SSL test
servers.
* UIProcess/API/gtk/tests/WebKitTestServer.h:
(WebKitTestServer): Add ssl parameter to create a HTTPS server.
* UIProcess/API/gtk/tests/resources/test-cert.pem: Added.
* UIProcess/API/gtk/tests/resources/test-key.pem: Added.

Source/WTF:

Add support for GByteArray.

* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr):
(WTF):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
test-webkitpy: more class renaming cleanup
https://bugs.webkit.org/show_bug.cgi?id=91182

Reviewed by Adam Barth.

More removing of the unnecessary "Test" prefix.

* Scripts/webkitpy/test/finder.py:
(_DirectoryTree):
(Finder.add_tree):
* Scripts/webkitpy/test/main.py:
(Tester._run_tests):
* Scripts/webkitpy/test/runner.py:
(Runner):
* Scripts/webkitpy/test/runner_unittest.py:
(RunnerTest.test_regular):
(RunnerTest.test_verbose):
(RunnerTest.test_timing):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed inspector test fix.

* http/tests/inspector/network/resources/style.css: Added.
(body):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Should be possible to focus elements within canvas fallback content
https://bugs.webkit.org/show_bug.cgi?id=87898

Reviewed by Chris Fleizach.

Source/WebCore:

Patches isFocusable in dom/Node.cpp and html/HTMLFormControlElement.cpp
to make elements focusable if they're a descendent of a canvas element
if they would otherwise have been focusable but just didn't have
a renderer. Adds a bit to ElementRareData to efficiently keep track
of elements in a canvas subtree.

Test: fast/canvas/fallback-content.html

* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):
(WebCore::Element::setIsInCanvasSubtree):
(WebCore):
(WebCore::Element::isInCanvasSubtree):
* dom/Element.h:
(Element):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::ElementRareData):
* dom/Node.cpp:
(WebCore::Node::isFocusable):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::attach):
(WebCore):
* html/HTMLCanvasElement.h:
(HTMLCanvasElement):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isFocusable):

LayoutTests:

* fast/canvas/fallback-content-expected.txt: Added.
* fast/canvas/fallback-content.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: don't choke when printing invalid utf-8 to stderr
https://bugs.webkit.org/show_bug.cgi?id=91181

Reviewed by Dirk Pranke.

* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.write_stderr):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched
https://bugs.webkit.org/show_bug.cgi?id=91197

Reviewed by Kent Tamura.

Source/WebCore:

This patch fixes implementation of Decimal::ceiling() and floor().
They return wrong value for small fractional numbers.

The bug is occurred when:
  - Step-able input type, e.g. number, date, datetime, and so on.
  - Current value is step mismatched
  - Current value is smaller than step
  - Step up/down by spin button
because spin button up/down actions are implemented in InputType::setpUpFromRenderer
which calls Decimal::ceiling() and floor() for step mismatched case.

Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases
       WebKit/chromium/tests/DecimalTest.cpp: Added test cases

* platform/Decimal.cpp:
(WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number.
(WebCore::Decimal::floor): Changed to return -1 for negative small fractional number.

Source/WebKit/chromium:

This patch adds test cases for Decimal::ceiling() and floor() of
positive/negative small fractional numbers.

* tests/DecimalTest.cpp:
(TEST_F):

LayoutTests:

This patch adds new test cases.

* fast/forms/number/number-stepup-stepdown-from-renderer-expected.txt: Updated for new test cases.
* fast/forms/number/number-stepup-stepdown-from-renderer.html: Added new test cases.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeGeneratorJS.pm : SetterExpression should use 'push' rather than 'unshift'
https://bugs.webkit.org/show_bug.cgi?id=91198

Patch by Dongwoo Im <dw.im@samsung.com> on 2012-07-13
Reviewed by Kentaro Hara.

'SetterExpression' should use 'push' to make arguments, rather than 'unshift'.

No new tests. Covered by existing tests.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Implement GraphicsSurface for Linux/GLX.
https://bugs.webkit.org/show_bug.cgi?id=90881

Source/WebCore:

Add a GLX based GraphicsSurface implementation for Linux.
Native X windows are being used for exchanging textures
with the UIProcess.

Reviewed by Noam Rosenthal.

* Target.pri:
* WebCore.pri:
* platform/graphics/surfaces/GraphicsSurface.cpp:
(WebCore::GraphicsSurface::create):
    Move creating GraphicsSurface instance into
    platformCreate/platformImport functions to allow
    platform specific creation based on the provided flags.
(WebCore::GraphicsSurface::GraphicsSurface):
(WebCore::GraphicsSurface::~GraphicsSurface):
    Call platformDestroy when destroying a GraphicsSurface.
(WebCore):
* platform/graphics/surfaces/GraphicsSurface.h:
    Make platformCreate/platformImport functions static
    to be able to call these from the static create function.
    Add Destructor prototype and add GraphicsSurfacePrivate member.
(WebCore):
(GraphicsSurface):
* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore):
(WebCore::GraphicsSurface::platformCreate):
(WebCore::GraphicsSurface::platformImport):
    Insert creation of GraphicsSurface instance.
    This allows having a platform specific creation mechanism
    for GLX.
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Added.
(WebCore):
(OffScreenRootWindow):
(WebCore::OffScreenRootWindow::OffScreenRootWindow):
(WebCore::OffScreenRootWindow::get):
(WebCore::OffScreenRootWindow::~OffScreenRootWindow):
    Add an OffScreenRootWindow singelton that is being used
    as a parent for all native offscreen windows.
(GraphicsSurfacePrivate):
    This class is used to manage all the X related resources
    such as opening a display or creating XPixmaps etc.
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
    Open a connection to the X server and create a
    QOpenGLContext that can be used to resolve GL functions.
(WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
    Properly cleanup and release all the X resources again.
(WebCore::GraphicsSurfacePrivate::createSurface):
    Create a surface that is placed off screen and can be
    used as a rendering target by the WebProcess.
(WebCore::GraphicsSurfacePrivate::createPixmap):
    Create a GLXPixmap from the XWindow that was previously
    redirected by the WebProcess. This GLXPixmap can then be
    bound to a texture and being painted on screen by the
    UIProcess.
(WebCore::GraphicsSurfacePrivate::makeCurrent):
(WebCore::GraphicsSurfacePrivate::swapBuffers):
(WebCore::GraphicsSurfacePrivate::display):
(WebCore::GraphicsSurfacePrivate::glxPixmap):
(WebCore::GraphicsSurfacePrivate::size):
(WebCore::GraphicsSurfacePrivate::glContext):
(WebCore::resolveGLMethods):
    Initialize all the function pointers for the GL functions used.
(WebCore::GraphicsSurface::platformExport):
(WebCore::GraphicsSurface::platformGetTextureID):
    Bind the GLXPixmap to a texture.
(WebCore::GraphicsSurface::platformCopyToGLTexture):
    Not beeing implemented for GLX.
(WebCore::GraphicsSurface::platformCopyFromFramebuffer):
    Blit origin fbo onto the GraphicsSurface's backing.
(WebCore::GraphicsSurface::platformCreate):
(WebCore::GraphicsSurface::platformImport):
(WebCore::GraphicsSurface::platformLock):
(WebCore::GraphicsSurface::platformUnlock):
(WebCore::GraphicsSurface::platformDestroy):

Source/WebKit2:

Add a GLX based GraphicsSurface implementation for Linux.

Reviewed by Noam Rosenthal.

* Shared/ShareableSurface.cpp:
(WebKit::ShareableSurface::create):
    Only create a GraphicsSurface from a ShareableSurface::Handle
    in case the Handle contains a valid GraphicsSurface token.
    Otherwise fall back to creating a ShareableBitmap.
* UIProcess/LayerTreeCoordinatorProxy.cpp:
(WebKit::createLayerTileUniqueKey):
    Create a unique key for a surface based on tileID and layerID.
(WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
    Even when GraphicsSurface is enabled, not all ShareableSurfaces
    will necessarily be backed by a GraphicsSurface. In case of
    a ShareableSurface being backed by a ShareableBitmap instead,
    the GraphicsSurface token will always be null.
    So instead of using the GraphicsSurface token as a key for
    storing surfaces in a map, we create a unique key from
    layerID and tileID.
* UIProcess/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):

Tools:

Enable GraphicsSurface for Linux based platforms
whenever the Xcomposite extension is available.

Reviewed by Noam Rosenthal.

* qmake/config.tests/libXcomposite/libXcomposite.cpp: Added.
(main):
* qmake/config.tests/libXcomposite/libXcomposite.pro: Added.
  Add a configure test to detect Xcomposite extension and
  activate GraphicsSurface on linux in case the extension is available.
* qmake/configure.pri:
* qmake/mkspecs/features/features.prf:

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