Rename 'KURL::elidedString' and inspector's 'String.prototype.trimMiddle' for clarity.
https://bugs.webkit.org/show_bug.cgi?id=111700

Reviewed by Darin Adler.

Darin suggested that 'KURL::elidedString' is inaccurately named[1], this
patch is an attempt to do better. It additionally brings the Inspector's
'String.prototype.trimMiddle' method into line, as the two methods do
more or less the same thing.

After a bit of discussion with Maciej and Daniel Bates on IRC, I've
settled on 'KURL::stringCenterEllipsizedToLength(unsigned)' and
'String.prototype.centerEllipsizedToLength(number)' respectively.

No new tests are added, as this patch shouldn't have any visible effect
on the web. It's strictly an internal refactoring.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
(WebCore::WebSocket::send):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::fail):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::canExecuteScripts):
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::executeScript):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::isSafeToLoadURL):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
(WebCore::createWindow):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::willSendRequest):
(WebCore::MainResourceLoader::responseReceived):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::logWarning):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didFail):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::printAccessDeniedMessage):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):
(WebCore::CSPDirectiveList::allowScriptNonce):
(WebCore::CSPDirectiveList::allowPluginType):
* platform/KURL.cpp:
(WebCore::KURL::stringCenterEllipsizedToLength):
* platform/KURL.h:
    Rename 'KURL::elidedString' to 'KURL::stringCenterEllipsizedToLength',
    and adjust callsites accordingly.
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.Placard.prototype._update):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
* inspector/front-end/HeapSnapshotGridNodes.js:
(WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
* inspector/front-end/Linkifier.js:
(WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
* inspector/front-end/ResourceUtils.js:
(WebInspector.linkifyURLAsNode):
* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer.prototype._titleForFile):
* inspector/front-end/utilities.js:
    Rename 'String.prototype.trimMiddle' to 'String.prototype.centerEllipsizedToLength'
    and adjust callsites accordingly.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][EGL] Implement TransportSurface client.
https://bugs.webkit.org/show_bug.cgi?id=114122

Reviewed by Kenneth Rohde Christiansen.

Covered by existing WebGL tests.

This patch implements the client support for Transport
Surface with EGL backend using GLES2.

* platform/graphics/surfaces/efl/GLTransportSurface.cpp:
(WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
(WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
* platform/graphics/surfaces/efl/GLTransportSurface.h:
(GLTransportSurfaceClient):
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurfacePrivate::initializeClient):
* platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
(WebCore):
(WebCore::EGLConfigSelector::surfaceClientConfig):
(WebCore::EGLConfigSelector::findMatchingConfigWithVisualId):
* platform/graphics/surfaces/egl/EGLConfigSelector.h:
(WebCore):
(EGLConfigSelector):

Support for retrieving valid EGLConfig on client side.

* platform/graphics/surfaces/egl/EGLHelper.cpp:
(WebCore):
(WebCore::resolveDisplay):
(WebCore::EGLHelper::resolveEGLBindings):
(WebCore::EGLHelper::createEGLImage):
(WebCore::EGLHelper::destroyEGLImage):
(WebCore::EGLHelper::imageTargetTexture2DOES):
* platform/graphics/surfaces/egl/EGLHelper.h:

Helper functions to create and destroy EGLImage.

* platform/graphics/surfaces/egl/EGLXSurface.cpp:
(WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
(WebCore):
(WebCore::EGLXTransportSurfaceClient::~EGLXTransportSurfaceClient):
(WebCore::EGLXTransportSurfaceClient::destroy):
(WebCore::EGLXTransportSurfaceClient::prepareTexture):
(WebCore::EGLTextureFromPixmap::EGLTextureFromPixmap):
(WebCore::EGLTextureFromPixmap::~EGLTextureFromPixmap):
(WebCore::EGLTextureFromPixmap::destroy):
(WebCore::EGLTextureFromPixmap::isValid):
(WebCore::EGLTextureFromPixmap::bindTexImage):
(WebCore::EGLTextureFromPixmap::reBindTexImage):
* platform/graphics/surfaces/egl/EGLXSurface.h:
(EGLXTransportSurfaceClient):

TransportSurfaceClient implementation.

(WebCore):
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
* platform/graphics/surfaces/glx/GLXSurface.h:
(GLXTransportSurfaceClient):
* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow):
(WebCore):
(WebCore::X11Helper::createPixmap):
* platform/graphics/surfaces/glx/X11Helper.h:
(X11Helper):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove "hidden"=true from Inspector.json
https://bugs.webkit.org/show_bug.cgi?id=114116

Patch by Roland Takacs <rtakacs@inf.u-szeged.hu> on 2013-05-30
Reviewed by Timothy Hatcher.

Remove "hidden"=true because it's a Chromium concept.
Patch created by Timothy Hatcher.

* inspector/Inspector.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid using CSSOM style declarations in HTML editing.
<http://webkit.org/b/117019>

Reviewed by Antti Koivisto.

Convert the editing code to use ComputedStyleExtractor instead of instantiating CSSOM wrappers.

* css/CSSComputedStyleDeclaration.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
(WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
(WebCore::ComputedStyleExtractor::propertyMatches):
(WebCore::ComputedStyleExtractor::copyProperties):
(WebCore::ComputedStyleExtractor::copyPropertiesInSet):

    Moved here from CSSComputedStyleDeclaration. These methods are used by HTML editing.

(WebCore::CSSComputedStyleDeclaration::copyProperties):

    Reimplemented to call ComputedStyleExtractor.

* css/CSSStyleDeclaration.h:
* css/PropertySetCSSStyleDeclaration.h:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::copyProperties):

    Removed CSSStyleDeclaration::cssPropertyMatches(), the remaining code lives in
    ComputedStyleExtractor::propertyMatches() and is only used by HTML editing.

* css/StylePropertySet.h:
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::removeEquivalentProperties):

    Added an overload that takes a ComputedStyleExtractor.
    This code should move into EditingStyle.cpp, material for a follow-up patch.

* editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier):

    Add a file-local helper for yanking the identifier value (if any) out of a CSSPrimitiveValue.

(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::highestEmbeddingAncestor):
* editing/EditingStyle.h:
* editing/EditingStyle.cpp:
(WebCore::editingStyleFromComputedStyle):
(WebCore::extractPropertyValue):
(WebCore::identifierForStyleProperty):
(WebCore::textColorFromStyle):
(WebCore::backgroundColorFromStyle):
(WebCore::EditingStyle::init):
(WebCore::EditingStyle::removeStyleAddedByNode):
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::EditingStyle::triStateOfStyle):
(WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
(WebCore::StyleChange::StyleChange):
(WebCore::fontWeightIsBold):
(WebCore::extractPropertiesNotIn):
(WebCore::getPropertiesNotIn):

    Use ComputedStyleExtractor instead of CSSComputedStyleDeclaration in all of this code.
    Templatized a bunch of the code so we don't have to repeat ourselves for both StylePropertySet
    and ComputedStyleExtractor inputs.

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