Add a PluginController class, use it for invalidation and getting the user agent
https://bugs.webkit.org/show_bug.cgi?id=42084

Reviewed by Adam Roben.

WebCore:

* WebCore.exp.in:
Export Widget::convertToContainingWindow.

WebKit2:

* WebKit2.xcodeproj/project.pbxproj:
Add PluginController.h

* WebProcess/Plugins/DummyPlugin.cpp:
(WebKit::DummyPlugin::initialize):
* WebProcess/Plugins/DummyPlugin.h:
Pass the PluginController to initialize.

* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
Implement NPN_UserAgent, NPN_MemAlloc, NPN_MemFree, NPN_InvalidateRect and NPN_InvalidateRegion.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
Initialize m_pluginController to null.

(WebKit::NetscapePlugin::invalidate):
Ask the plug-in controller to invalidate.

(WebKit::NetscapePlugin::userAgent):´
Ask the plug-in controller for the user agent.

(WebKit::NetscapePlugin::initialize):
Set the m_pluginController member variable.

* WebProcess/Plugins/Plugin.h:
Make initialize take a PluginController.

* WebProcess/Plugins/PluginController.h: Added.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
Pass the PluginController to initialize.

(WebKit::PluginView::invalidateRect):
Tell the host window to invalidate the given rect.

(WebKit::PluginView::invalidate):
Call invalidateRect.

(WebKit::PluginView::userAgent):
Ask the frame loader client for the user agent.

* WebProcess/Plugins/PluginView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=13075
        XMLHttpRequest with failed authentication should set status to 401

        https://bugs.webkit.org/show_bug.cgi?id=6871
        <rdar://problem/3363403> 401 error page is never shown



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

[Qt] Some inspector test fail intermittently
https://bugs.webkit.org/show_bug.cgi?id=42090

Add tests to the Skipped list until fix to avoid false positive alarms.

* platform/qt/Skipped:
 - inspector/timeline-layout.html skipped.
 - inspector/timeline-parse-html.html skipped.
 - inspector/timeline-recalculate-styles.html skipped.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 build fix for Windows.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Remove some stub function definitions.
* win/WebKit2.vcproj: Add PluginController.h to the vcproj.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-12  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        Suffix .mo files with the GTK+ API version so that they can be
        parallel installable.

        * configure.ac:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-12  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Oliver Hunt.

        CSS color parsing optimizations
        https://bugs.webkit.org/show_bug.cgi?id=42073

        - Avoid instantiating a CSSParser in parseColor() unless necessary.
        - Fixed hex color fast-path to support strings starting with '#'.
        - Avoid allocating a new string for the value part of a '#' color.

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseColor):
        * platform/graphics/Color.cpp:
        (WebCore::Color::parseHexColor):
        (WebCore::Color::Color):
        * platform/graphics/Color.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-12  Nate Chapin  <japhet@chromium.org>

        Reviewed by Darin Fisher.

        Ensure that a cache policy that forces validation is cleared once
        the load event is fired, rather than only doing so at the next
        navigation. This leads to a lot of unnecessary load on AJAX-y
        websites.

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

        Test: http/tests/xmlhttprequest/cache-headers-after-reload.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::handledOnloadEvents): Reset m_loadType to FrameLoadTypeStandard.
        (WebCore::FrameLoader::addExtraFieldsToRequest): Only respect the original request's cache policy if the
            DocumentLoader is still loading, and handle the other cache policy settings that were scattered around the loader.
        (WebCore::FrameLoader::loadResourceSynchronously): Merge cachePolicy setting into FrameLoader::addExtraFieldsToRequest.
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::create): Merge cachePolicy setting into FrameLoader::addExtraFieldsToRequest.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-12  Mario Sanchez Prada  <msanchez@igalia.com>

        Reviewed by Xan Lopez.

        Ensure DRT loads GAIL (Gtk+ module), for a11y tests
        https://bugs.webkit.org/show_bug.cgi?id=38648

        Add the GTK_MODULES envvar (set to "gail") to the clean
        environment when running DRT for the Gtk+ port

        * Scripts/old-run-webkit-tests:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-12  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Oliver Hunt.

        Canvas: Move fillRect() save/restore into GraphicsContext implementations
        https://bugs.webkit.org/show_bug.cgi?id=42088

        Saving the platform painter state is an expensive operation,
        so don't do it in fillRect() for platforms that don't need it. (CG, Qt)

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::fillRect):
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::fillRect):
        * platform/graphics/skia/GraphicsContextSkia.cpp:
        (WebCore::GraphicsContext::fillRect):
        * platform/graphics/wince/GraphicsContextWince.cpp:
        (WebCore::GraphicsContext::fillRect):
        * platform/graphics/wx/GraphicsContextWx.cpp:
        (WebCore::GraphicsContext::fillRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop generating stripped symbols for Release builds

It turns out we can strip the symbols after-the-fact using PDBCopy.

Fixes <http://webkit.org/b/42085>.

Reviewed by Steve Falkenburg.

JavaScriptCore:

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
Removed the pre-link event, which just created the public\sym
directory.

WebKit2:

* win/WebKit2.vcproj: Removed the no-longer-needed Release override of
the StripPrivateSymbols attribute. (This attribute is no longer set in
release.vsprops, so doesn't need to be overridden.)

WebKitLibraries:

* win/tools/vsprops/release.vsprops: Removed the StripPrivateSymbols
attribute, which caused link.exe to generate a stripped PDB file for
each project.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move WebKit2.vcproj's settings into .vsprops files

This makes it easier to make changes that affect all configurations.

Fixes <http://webkit.org/b/42097> WebKit2 should use .vsprops files

Reviewed by Steve Falkenburg.

* win/WebKit2.vcproj: Moved settings from here to the files below.
* win/WebKit2Apple.vsprops: Added. Links against Apple-specific
libraries.
* win/WebKit2CFLite.vsprops: Added. Links against CFLite.
* win/WebKit2Common.vsprops: Added. Contains settings shared by all
configurations.
* win/WebKit2DirectX.vsprops: Added. Contains settings to help with
linking against DirectX.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        https://bugs.webkit.org/show_bug.cgi?id=13075
        XMLHttpRequest with failed authentication should set status to 401

        https://bugs.webkit.org/show_bug.cgi?id=6871
        <rdar://problem/3363403> 401 error page is never shown

        The fix doesn't help Tiger, update results of one test and skip another.

        * platform/mac-tiger/Skipped: Skip 401-alternative-content.php.
        * platform/mac-tiger/http/tests/xmlhttprequest/failed-auth-expected.txt:
        Copied from http/tests/xmlhttprequest/failed-auth-expected.txt, updated for failure result
        in async case.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, build fix

[chromium] update test_expectations, and rebaseline a changed svg test.

* platform/chromium-win/fast/gradients/radial-centered-expected.checksum:
* platform/chromium-win/fast/gradients/radial-centered-expected.png:
* platform/chromium-win/fast/gradients/radial-centered-expected.txt:
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows failure-to-launch fix

* DumpRenderTree/win/DumpRenderTree.vcproj: Copy CoreVideo.dll and
CoreVideo.pdb into WebKitOutputDir in the post-build event, too, like
we already do for CoreFoundation, CFNetwork, etc.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Adam Roben.

        https://bugs.webkit.org/show_bug.cgi?id=13075
        XMLHttpRequest with failed authentication should set status to 401

        https://bugs.webkit.org/show_bug.cgi?id=6871
        <rdar://problem/3363403> 401 error page is never shown

        Fix crashes in Windows DumpRenderTree.

        * DumpRenderTree/win/ResourceLoadDelegate.cpp: (ResourceLoadDelegate::didReceiveAuthenticationChallenge):
        If we return an error, WebKit will call continueWithoutCredentialForAuthenticationChallenge()
        again on a destroyed sender.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-10  Eric Seidel  <eric@webkit.org>

        Reviewed by Adam Barth.

        make_names.pl should always generate all names in Names.* files
        https://bugs.webkit.org/show_bug.cgi?id=42023

        Only the *ElementFactory files need to have conditional contents
        based on enabled features.  WebCore should always have all known
        names for SVG, MathML, XML, XLink, HTML, etc. generated in the
        various *Names files, even if features are disabled.

        make_names.pl is kinda a big hack at this point.  I tried to clean
        up a little as I went.  The way I made *Names include all names was to
        read the .in files twice, once using the preprocessor and once without.

        * dom/make_names.pl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-12  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r63101.
        http://trac.webkit.org/changeset/63101
        https://bugs.webkit.org/show_bug.cgi?id=42103

        Broke one API test (Requested by xan_ on #webkit).

        * Scripts/old-run-webkit-tests:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-11  Eric Seidel  <eric@webkit.org>

        Reviewed by Darin Adler.

        Always generate SVGNames and MathMLNames for all ports (to support HTML5)
        https://bugs.webkit.org/show_bug.cgi?id=42050

        Historically, FOONames has only been generate when ENABLE(FOO) is defined.
        However, for HTML5 parser support, we need to have access to the SVG
        and MathML tag names regardless of whether we the engine is configured
        to render SVG or MathML content.

        This change enables generation of SVGNames and MathMLNames on all ports and
        makes it so that ports can include FOOElementFactory.* regardless of whether
        ENABLE(FOO) is defined (and have it do the right thing).

        No functional change (yet) so no tests.

        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gyp/WebCore.gyp:
        * WebCore.pri:
        * dom/make_names.pl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-12  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dan Bernstein.

        Need to do a layout when RenderLayers come and go because of compositing
        https://bugs.webkit.org/show_bug.cgi?id=42108

        If we create or destroy RenderLayers for reasons other than style changes
        (e.g. because of composited iframes or plugins), then we need to ensure
        that we do a layout.

        Test: compositing/iframes/layout-on-compositing-change.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::adjustStyleDifference):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows build fix

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