Move adjustLineToPixelBoundaries overlapping function to GraphicsContext.cpp
and remove from GraphicsContextCairo.cpp and GraphicsContextQt.cpp.

Patch by Mike Fenton <mike.fenton@torchmobile.com> on 2009-08-13
Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=28268

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::adjustLineToPixelBoundaries):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/qt/GraphicsContextQt.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Blind build fix for Leopard.

Patch by Adam Treat <adam.treat@torchmobile.com> on 2009-08-17
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::adjustLineToPixelBoundaries):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-13  Joseph Pecoraro  <joepeck02@gmail.com>

        Reviewed by Timothy Hatcher.

        Inspector: Improve Cookie DataGrid to Show Hidden Data
        https://bugs.webkit.org/show_bug.cgi?id=28269

        * English.lproj/localizedStrings.js: DataGrid Headers "Name", "Value", "Size", ...
        * WebCore.gypi: added missing files

          Implemented Bindings for InspectorController.deleteCookie(name)

        * inspector/InspectorBackend.idl:
        * bindings/js/JSInspectorBackendCustom.cpp:
        (WebCore::JSInspectorBackend::cookies):
        (WebCore::JSInspectorBackend::deleteCookie):

          v8 Bindings Stubs

        * bindings/v8/custom/V8CustomBinding.h:
        * bindings/v8/custom/V8InspectorBackendCustom.cpp:
        (WebCore::CALLBACK_FUNC_DECL):

          Removed WebInspector.Cookie

        * inspector/front-end/Cookie.js: Removed.
        * inspector/front-end/inspector.html:
        * inspector/front-end/WebKit.qrc:

          Improved DataGrid and Kept Fallback Behavior for Platforms that don't
          yet provide access to raw cookies.

        * inspector/front-end/CookieItemsView.js:
        (WebInspector.CookieItemsView):
        (WebInspector.CookieItemsView.prototype.get statusBarItems):
        (WebInspector.CookieItemsView.prototype.update):
        (WebInspector.CookieItemsView.prototype.buildCookies):
        (WebInspector.CookieItemsView.prototype.dataGridForCookies):
        (WebInspector.CookieItemsView.prototype.fallbackUpdate.callback):
        (WebInspector.CookieItemsView.prototype.fallbackUpdate):
        (WebInspector.CookieItemsView.prototype.fallbackBuildCookiesFromString):
        (WebInspector.CookieItemsView.prototype.fallbackDataGridForCookies):
        (WebInspector.CookieItemsView.prototype._deleteButtonClicked):

          Interaction with the page through Injected Script (for fallback behavior)

        * inspector/front-end/DOMAgent.js:
        (InspectorController.getCookies):
        * inspector/front-end/InjectedScript.js:
        (InjectedScript.setStyleProperty): style fix
        (InjectedScript.getCookies):

          Allow alignment of text inside DataGrids.

        * inspector/front-end/DataGrid.js:
        (WebInspector.DataGrid):
        (WebInspector.DataGridNode.prototype.createCell):
        * inspector/front-end/DatabasesPanel.js:
        (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
        * inspector/front-end/inspector.css:

          Added deleteCookie(., ., String name)
          Modified getRawCookies to return a bool to know if its implemented

        * platform/CookieJar.h:

          Implemented deleteCookie for Macs

        * platform/mac/CookieJar.mm:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):

          Stub Implementations for Other Platforms

        * platform/haiku/CookieJarHaiku.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/chromium/CookieJarChromium.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/curl/CookieJarCurl.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/soup/CookieJarSoup.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/win/CookieJarCFNetWin.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/win/CookieJarWin.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/qt/CookieJarQt.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        WebInspector: Discard DOM Node bindings on any document change.

        https://bugs.webkit.org/show_bug.cgi?id=28389

        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::setDocument):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* dom/Document.cpp:
(WebCore::Document::setFocusedNode): Removed unneeded calls
to RefPtr::get.

Reviewed by Sam Weinig.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use a HashMap instead of a list of if statements for the command
name exception map.

Patch by Darin Adler <darin@apple.com> on 2009-08-17
Reviewed by Sam Weinig.

* WebView/WebHTMLView.mm:
(createSelectorExceptionMap): Added.
(commandNameForSelector): Use createSelectorExceptionMap.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed functions now unneeded due to use of Reflect to create
language bindings.

Patch by Darin Adler <darin@apple.com> on 2009-08-17
Reviewed by Sam Weinig.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
Get at usemap attribute directly.

* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
Get at id attribute directly.
* editing/EditorCommand.cpp:
(WebCore::executeInsertHorizontalRule): Ditto.

* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::dir): Get at dir attribute of body directly.
(WebCore::HTMLDocument::setDir): Ditto.

* html/HTMLElement.cpp: Deleted unused functions.
* html/HTMLElement.h: Ditto.

* html/HTMLImageElement.cpp: Deleted unused functions.
(WebCore::HTMLImageElement::alt): Changed to return const AtomicString&.
(WebCore::HTMLImageElement::addSubresourceAttributeURLs): Changed to
get at usemap attribute directly, but added a FIXME because although
it is what the old code did, it looks to not be entirely correct.

* html/HTMLImageElement.h: Deleted unused functions.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString): Get at alt attribute directly.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageMap): Get at usemap attribute directly.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer): Get at id attribute
directly.
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Removed
explicit HTMLNames namespace qualification.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* rendering/MediaControlElements.cpp: Removed unneeded include of CString.h,
resorted includes, renamed "doc" to "document" and fixed formatting.

Reviewed by Sam Weinig.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        WebInspector: Reset InjectedScript styles cache on document change.

        https://bugs.webkit.org/show_bug.cgi?id=28390

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::close):
        (WebCore::InspectorController::populateScriptObjects):
        (WebCore::InspectorController::didCommitLoad):
        (WebCore::InspectorController::resetInjectedScript):
        * inspector/InspectorController.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::setDocument):
        * inspector/InspectorDOMAgent.h:
        * inspector/front-end/InjectedScript.js:
        (InjectedScript._reset):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Eric Seidel.

        Use OwnPtrs for GraphicsLayers
        https://bugs.webkit.org/show_bug.cgi?id=28399

        Convert RenderLayerBacking and RenderLayerCompositor to use OwnPtrs
        for their references to GraphicsLayers.

        * platform/graphics/GraphicsLayer.h:
        * platform/graphics/mac/GraphicsLayerCA.mm:
        (WebCore::GraphicsLayer::create):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::RenderLayerBacking):
        (WebCore::RenderLayerBacking::createGraphicsLayer):
        (WebCore::RenderLayerBacking::destroyGraphicsLayer):
        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
        (WebCore::RenderLayerBacking::updateInternalHierarchy):
        (WebCore::RenderLayerBacking::updateClippingLayers):
        (WebCore::RenderLayerBacking::updateForegroundLayer):
        (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
        * rendering/RenderLayerBacking.h:
        (WebCore::RenderLayerBacking::graphicsLayer):
        (WebCore::RenderLayerBacking::clippingLayer):
        (WebCore::RenderLayerBacking::ancestorClippingLayer):
        (WebCore::RenderLayerBacking::foregroundLayer):
        (WebCore::RenderLayerBacking::parentForSublayers):
        (WebCore::RenderLayerBacking::childForSuperlayers):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
        (WebCore::RenderLayerCompositor::rootPlatformLayer):
        (WebCore::RenderLayerCompositor::didMoveOnscreen):
        (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
        (WebCore::RenderLayerCompositor::destroyRootPlatformLayer):
        * rendering/RenderLayerCompositor.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Yong Li  <yong.li@torchmobile.com>

        Reviewed by Adam Treat.

        Allow image decoders to down-sample the image directly
        to scaled output buffer. This can be enabled/disabled by
        macro ENABLE(IMAGE_DECODER_DOWN_SAMPLING).
        Only JPEG and PNG decoders are modified to support it now.
        https://bugs.webkit.org/show_bug.cgi?id=28308

        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::setData):
        * platform/image-decoders/ImageDecoder.cpp: Added.
        * platform/image-decoders/ImageDecoder.h:
        (WebCore::ImageDecoder::ImageDecoder):
        (WebCore::ImageDecoder::setMaxNumPixels):
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::convertCMYKToRGBA):
        (WebCore::convertRGBToRGBA):
        (WebCore::JPEGImageDecoder::outputScanlines):
        * platform/image-decoders/jpeg/JPEGImageDecoder.h:
        (WebCore::JPEGImageDecoder::setSize):
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::headerAvailable):
        (WebCore::PNGImageDecoder::rowAvailable):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Simon Fraser  <simon.fraser@apple.com>

        Build fix: fix float literals to avoid casting warnings.

        * rendering/MediaControlElements.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Simon Fraser  <simon.fraser@apple.com>

        Speculative fix for Windows build bustage.

        * DOMHTMLClasses.cpp:
        (DOMHTMLElement::idName):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Unreviewed. Reverts 47371, since it breaks GTK+.

        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::setData):
        * platform/image-decoders/ImageDecoder.cpp: Removed.
        * platform/image-decoders/ImageDecoder.h:
        (WebCore::ImageDecoder::ImageDecoder):
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::convertCMYKToRGBA):
        (WebCore::convertRGBToRGBA):
        (WebCore::JPEGImageDecoder::outputScanlines):
        * platform/image-decoders/jpeg/JPEGImageDecoder.h:
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::headerAvailable):
        (WebCore::PNGImageDecoder::rowAvailable):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Correct crash when processing local cancelled requests.

Reviewed by Kevin Ollivier.

No new tests. Existing fast/images/favicon-as-image.html
displays the problem.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback): Add check for m_cancelled after
  performing local-file processing.
(WebCore::ResourceHandleManager::downloadTimerCallback): Add
  check for m_cancelled after performing local-file processing.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix Qt build.

Patch by Darin Adler <darin@apple.com> on 2009-08-17
* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::shouldShowDeleteInterface):
Use getAttribute(classAttr) instead of className() function.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Yong Li  <yong.li@torchmobile.com>

        Reviewed by Adam Treat.

        Allow image decoders to down-sample the image directly
        to scaled output buffer. This can be enabled/disabled by
        macro ENABLE(IMAGE_DECODER_DOWN_SAMPLING).
        Only JPEG and PNG decoders are modified to support it now.
        https://bugs.webkit.org/show_bug.cgi?id=28308

        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::setData):
        * platform/image-decoders/ImageDecoder.cpp: Added.
        * platform/image-decoders/ImageDecoder.h:
        (WebCore::ImageDecoder::ImageDecoder):
        (WebCore::ImageDecoder::setMaxNumPixels):
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::convertCMYKToRGBA):
        (WebCore::convertRGBToRGBA):
        (WebCore::JPEGImageDecoder::outputScanlines):
        * platform/image-decoders/jpeg/JPEGImageDecoder.h:
        (WebCore::JPEGImageDecoder::setSize):
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::headerAvailable):
        (WebCore::PNGImageDecoder::rowAvailable):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Mark Rowe.

        Fix build with FAST_MALLOC_MATCH_VALIDATION enabled.

        * wtf/FastMalloc.cpp:
        (WTF::fastMalloc):
        (WTF::fastCalloc):
        (WTF::fastRealloc):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r47255): MediaWiki's (including Wikipedia) navigation pane
appears below the main content
https://bugs.webkit.org/show_bug.cgi?id=28350

Reviewed by Darin Adler.

A particular version of the MediaWiki software detects WebKit through
user agent sniffing and imports a style sheet called KHTMLFixes.css,
which contains a single rule that was meant to work around some KHTML
bug, but currently has the sole effect of causing the float containing
the main article content to extend all the way to the left and thus push
down the left navigation pane.

* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::setCSSStyleSheet): If site specific hacks are
enabled, check if the imported style sheet is the MediaWiki
KHTMLFixes.css. If so, remove the offending rule.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-08-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

        Reviewed by Xan Lopez.

        Protect ResourceHandle for g_file_query_info_async call, using the
        same technique we already use for HTTP requests that take the soup
        path.

        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        (WebCore::ResourceHandle::~ResourceHandle):
        (WebCore::finishedCallback):
        (WebCore::):

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