Unreviewed build fix for r135866.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::load):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: updated TestExpectations for crashes in
media/video-duration-known-after-eos.html
https://bugs.webkit.org/show_bug.cgi?id=103183

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix world-reuse test for mac build
https://bugs.webkit.org/show_bug.cgi?id=103385

Patch by Dan Carney <dcarney@google.com> on 2012-11-27
Reviewed by Jochen Eisinger.

Mac and chrome builds have different expectations for where
an isolated world is executed.

* http/tests/security/isolatedWorld/world-reuse.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add callbacks to the FrameLoaderClient when a resource is requested
https://bugs.webkit.org/show_bug.cgi?id=92761

Patch by Marja Hölttä <marja@chromium.org> on 2012-11-27
Reviewed by Adam Barth.

In Chromium, when an extension script cancels a network
request (which happens out of process), we'd like to
notify content scripts running on the current page about
which elements failed to load because the requests were
cancelled (as opposed to e.g. the network request just
didn't work). Since the resource request itself does not
carry any information what DOM element is was made for,
currently a content script has to search the DOM tree and
guess which requests will be cancelled by its counter
part. By adding these callbacks, the embedder can make
this connection explictly.

Source/WebCore:

Test: platform/chromium/fast/loader/resource-request-callbacks.html

* loader/FrameLoaderClient.h:
(WebCore):
(WebCore::FrameLoaderClient::dispatchWillRequestResource):
(FrameLoaderClient):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebCachedURLRequest.h: Added.
(WebKit):
(WebCachedURLRequest):
(WebKit::WebCachedURLRequest::~WebCachedURLRequest):
* public/WebFrameClient.h:
(WebKit):
(WebFrameClient):
(WebKit::WebFrameClient::willRequestResource):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::dispatchWillRequestResource):
(WebKit):
* src/FrameLoaderClientImpl.h:
(FrameLoaderClientImpl):
* src/WebCachedURLRequest.cpp: Added.
(WebKit):
(WebKit::WebCachedURLRequest::reset):
(WebKit::WebCachedURLRequest::urlRequest):
(WebKit::WebCachedURLRequest::charset):
(WebKit::WebCachedURLRequest::forPreload):
(WebKit::WebCachedURLRequest::initiatorName):
(WebKit::WebCachedURLRequest::initiatorElement):
(WebKit::WebCachedURLRequest::WebCachedURLRequest):

Tools:

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
(DRTTestRunner::dumpResourceRequestCallbacks):
(DRTTestRunner::reset):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
(DRTTestRunner::setShouldDumpResourceRequestCallbacks):
(DRTTestRunner::shouldDumpResourceRequestCallbacks):
* DumpRenderTree/chromium/TestShell.h:
(TestShell::shouldDumpResourceRequestCallbacks):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::willRequestResource):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

LayoutTests:

* platform/chromium/fast/loader/resource-request-callbacks-expected.txt: Added.
* platform/chromium/fast/loader/resource-request-callbacks.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skipping fast/backgrounds/background-opaque-images-over-color.html on mac
https://bugs.webkit.org/show_bug.cgi?id=103435

Unreviewed

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
freeV8NPObject: Skip trying to remove object from per context data's ObjectMap if the object does not exist in the map.
https://bugs.webkit.org/show_bug.cgi?id=103356

Patch by Istiaque Ahmed <lazyboy@chromium.org> on 2012-11-27
Reviewed by Adam Barth.

Before introducing per context data, it used to be the case that we would ignore removing v8 object
from context data's map if we couldn't find it. With perContextData change, this turned into an ASSERT
instead and we had crash reports.
Related crbug.com/154462.

Source/WebCore:

Test: platform/chromium/plugins/release-frame-content-window.html

* bindings/v8/NPV8Object.cpp:
(WebCore::freeV8NPObject):

LayoutTests:

* platform/chromium/plugins/release-frame-content-window-expected.txt: Added.
* platform/chromium/plugins/release-frame-content-window.html: Added.
* platform/chromium/plugins/resources/empty.html: Added.
* platform/chromium/plugins/resources/empty2.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Remove from TestExpectations tests that are passing.

* platform/efl/TestExpectations:



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

Remove leftover file that was replaced by PlatformScreenQt.cpp 4 years ago.

* platform/qt/ScreenQt.cpp: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed build fix on Linux clang.

../../third_party/WebKit/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:1055:63: error:
C++98 requires an accessible copy constructor for class 'WebKit::WebCachedURLRequest' when binding
a reference to a temporary; was private [-Werror,-Wbind-to-temporary-copy]

* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::dispatchWillRequestResource):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] WebPageProxy::relatedPages() cannot assume that this page is known to process
        https://bugs.webkit.org/show_bug.cgi?id=103433
        <rdar://problem/12543513>

        Reviewed by Jessie Berlin.

        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::relatedPages): Removed an incorrect
        assertion, and modified code to not rely on its condition being true.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, fixing lint errors in TestExpectations.

* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available.
https://bugs.webkit.org/show_bug.cgi?id=102452

Patch by Eberhard Graether <egraether@google.com> on 2012-11-27
Reviewed by Pavel Feldman.

This change makes the showPaintRects setting in the Web Inspector's settings notify InspectorClient
when changed. And the default paint rects drawing is not used if an alternative is available.
This allows Chromium to draw the paint rects in the compositor's HUDLayer.

Source/Platform:

* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):
(WebKit::WebLayerTreeView::setShowPaintRects):

Source/WebCore:

No new tests.

* inspector/InspectorClient.h:
(WebCore::InspectorClient::overridesShowPaintRects):
(WebCore::InspectorClient::setShowPaintRects):
(InspectorClient):
* inspector/InspectorPageAgent.cpp:
(PageAgentState):
(WebCore::InspectorPageAgent::restore):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::setShowPaintRects):
(WebCore::InspectorPageAgent::didPaint):

Source/WebKit/chromium:

* public/WebView.h:
(WebView):
* src/InspectorClientImpl.cpp:
(WebKit::InspectorClientImpl::overridesShowPaintRects):
(WebKit):
(WebKit::InspectorClientImpl::setShowPaintRects):
* src/InspectorClientImpl.h:
(InspectorClientImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setShowPaintRects):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
objc/objc-runtime.h does not exist on all PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=101780

Reviewed by Brent Fulgham.

Clean up header includes so we don't include objc/objc-runtime.h.

Source/WebCore:

No new tests because no functional changes.

* bridge/objc/objc_header.h:
* page/mac/EventHandlerMac.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/graphics/mac/WebLayer.mm:
* platform/mac/WebCoreObjCExtras.mm:
* platform/mac/WebVideoFullscreenController.mm:

Source/WebKit/mac:

* Carbon/HIWebView.mm:
(UpdateCommandStatus): Use wtfObjcMsgSend template instead of objc_msgSend.
* Plugins/WebNetscapePluginView.mm:
* Plugins/WebPluginContainerCheck.mm:
(-[WebPluginContainerCheck _continueWithPolicy:]): Use wtfObjcMsgSend template instead of objc_msgSend.
* Plugins/WebPluginController.mm:
* WebCoreSupport/WebCachedFramePlatformData.h:
* WebCoreSupport/WebDeviceOrientationClient.mm:
* WebView/WebDelegateImplementationCaching.mm:
* WebView/WebHTMLView.mm:
* WebView/WebPDFDocumentExtras.mm:
* WebView/WebPolicyDelegate.mm:
(-[WebPolicyDecisionListener _usePolicy:]): Use wtfObjcMsgSend template instead of objc_msgSend.
* WebView/WebView.mm:

Source/WebKit2:

* PluginProcess/mac/PluginProcessShim.mm:
* UIProcess/API/mac/PDFViewController.mm:

Source/WTF:

* wtf/Functional.h:
* wtf/ObjcRuntimeExtras.h: Include objc/message.h here so we don't rely on proper ordering
of includes in files that include this header.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
* DumpRenderTree/mac/ObjCPlugin.m:
* TestWebKitAPI/mac/InstanceMethodSwizzler.h:
* WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] EventLoop should end when WebKit thread is exiting
https://bugs.webkit.org/show_bug.cgi?id=103301

Reviewed by Rob Buis.
RIM PR# 194379.
Internally reviewed by Joe Mason.

Break the nested event loop when WebKit thread has been asked to quit.

* platform/blackberry/EventLoopBlackBerry.cpp:
(WebCore::EventLoop::cycle):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spacing and custom font
https://bugs.webkit.org/show_bug.cgi?id=101443

Reviewed by David Hyatt.

Source/WebCore:

Leading non-breaking space in a text run should always get word-spacing applied. When RenderText
calculates the preferred with of a run of text it breaks it up into word segments that contain
no breaking spaces and calculates the width of each. So when calculating the width of '&nbsp;b'
it needs to add word-spacing to the leading non-breaking space as it does not get collapsed away.

Test: fast/text/word-space-nbsp.html

* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):

LayoutTests:

* fast/text/word-space-nbsp-expected.html: Added.
* fast/text/word-space-nbsp.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test transitions/transition-shorthand-delay.html should usePauseAPI
https://bugs.webkit.org/show_bug.cgi?id=103402

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-11-27
Reviewed by Simon Fraser.

PauseAPI works when pausing during delay in transitions now, using it
should fix the flakiness.

* platform/efl/TestExpectations:
* transitions/transition-shorthand-delay.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
No need for ExceptionCode in HTMLMediaElement::load
https://bugs.webkit.org/show_bug.cgi?id=103438

Reviewed by Eric Carlson.

After https://bugs.webkit.org/show_bug.cgi?id=103318, there is no
need for the ExceptionCode parameter in load(). The HTML5 spec says
that all errors in loading are communicated via state.
http://dev.w3.org/html5/spec/media-elements.html#dom-media-load

Of the 29 tests exercising load(), none of them were exercising
exceptions (obviously).

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::load):
(WebCore::HTMLMediaElement::resume):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. fast/loader/submit-form-while-parsing-2.html is still flaky
so put it back in TestExpectations.

* platform/efl/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Canvas does not draw any text if the font is not fully loaded yet
https://bugs.webkit.org/show_bug.cgi?id=103392

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

Source/WebCore:

Update CanvasRenderingContext2D::drawTextInternal() so that the
text is being drawn, even if custom fonts are still being loaded.
Without this, WebKit was not drawing any text on the canvas if
the needed font is custom and is not fully loaded yet. This seems
broken.

The new behavior is according to specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html

The specification says: "If a font is used before it is fully
loaded, or if the font style source object does not have that
font in scope at the time the font is to be used, then it must be
treated as if it was an unknown font, falling back to another as
described by the relevant CSS specifications."

Test: http/tests/canvas/canvas-slow-font-loading.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* platform/graphics/Font.cpp:
(WebCore::Font::drawText): Add argument to specify the behavior
when custom fonts are not ready. By default, it will not draw
anything (same behavior as before). However, the Canvas code
can now request that a fallback font is used if the custom
font is not fully loaded yet.
* platform/graphics/Font.h: #undef Complex if defined to avoid
conflicting with Complex value in CodePath enum. X11/X.h is
defining Complex to 0.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawBidiText):
* platform/graphics/GraphicsContext.h:
(WebCore):
(GraphicsContext):

LayoutTests:

Add canvas test to check that text is drawn using a fallback font
if the primary font is not fully loaded yet.

* http/tests/canvas/canvas-slow-font-loading-expected.html: Added.
* http/tests/canvas/canvas-slow-font-loading.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening of failing tests
https://bugs.webkit.org/show_bug.cgi?id=103434

Unreviewed gardening.

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-11-27

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/efl/fast/js/global-constructors-expected.txt:

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