GraphicsContextCG's roundToDevicePixels should round even when there's no transform
https://bugs.webkit.org/show_bug.cgi?id=84191

Reviewed by Eric Seidel.

When painting with the identify transform, the roundToDevicePixels function in GraphicsContextCG
does an early return that simply returns the FloatRect that was passed in. This proved to be a
problem in sub-pixel layout, as we wouldn't adjust the paint rect for text underline, and it could
end up being more than one pixel wide. Adding a roundedIntRect method on FloatRect for the simple
short-circuit case.

No new tests. No change in behavior before switching to sub-pixel layout.

* platform/graphics/FloatRect.cpp:
(WebCore::roundedIntRect):
* platform/graphics/FloatRect.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::roundToDevicePixels):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Sandbox violations prevent attaching files to gmail messages
        https://bugs.webkit.org/show_bug.cgi?id=84263
        <rdar://problem/11248260>

        Reviewed by Oliver Hunt.

        * page/DragActions.h: Removed the newly added upload action. We cannot know if or when an
        upload is going to happen - a drop even listener can always get a reference to a File object,
        and upload it with XMLHttpRequest.

        * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): Removed a separate
        willPerformDragDestinationAction call for upload action - ther is nothing we'd want to only
        do when dropping on a file upload button.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Solid color shader should use premultiplied alpha.
https://bugs.webkit.org/show_bug.cgi?id=84215

Patch by David Reveman <reveman@chromium.org> on 2012-04-18
Reviewed by Adrienne Walker.

For efficiency and consistency, expect premultiplied alpha in
solid color shader.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawDebugBorderQuad):
(WebCore::LayerRendererChromium::drawSolidColorQuad):
* platform/graphics/chromium/ShaderChromium.cpp:
(WebCore::FragmentShaderColor::getShaderString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Lion Production Test failing with error: "Failed to stop httpd: pid file still exists" https://bugs.webkit.org/show_bug.cgi?id=84177

Reviewed by Dirk Pranke.

Try to delete the pid file left by Apache in the case it was killed forcefully.

* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd._stop_running_server):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Rename overdraw histograms so we can use field trials in histograms.xml
https://bugs.webkit.org/show_bug.cgi?id=83500

Reviewed by James Robinson.

* platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
(WebCore::CCOverdrawMetrics::recordMetricsInternal):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSSValuePool: Make numeric value caches fixed-size arrays.
<http://webkit.org/b/84268>

Reviewed by Antti Koivisto.

Change the numeric CSSPrimitiveValue caches in CSSValuePool from HashMaps to
fixed-size arrays of RefPtr<CSSPrimitiveValue>s.

This is more space efficient and doesn't incur the cost of a hash lookup every
time a numeric CSSPrimitiveValue is needed. We retain the limit of caching
only values between 0-255 for now.

* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createValue):
* css/CSSValuePool.h:
(CSSValuePool):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: support additional test expectations files
https://bugs.webkit.org/show_bug.cgi?id=84222

Reviewed by Ojan Vafai.

This patch adds an --additional-expectations flag that can be
used to point to more files that will override the default set
of expectations. This will allow us to remove the
'google_chrome' ports and eventually help to clean up override
handling in the chromium ports and unify expectations files and
Skipped files; this can also be used to specify overrides for
tests that run differently on a given machine.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.test_expectations_overrides):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.test_expectations_overrides):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.test_additional_expectations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prevent switch case fallthrough in StylePropertySet::getPropertyValue().
https://bugs.webkit.org/show_bug.cgi?id=84266

Reviewed by Kentaro Hara.

No new tests / code cleanup found by static analysis.

* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Chromium compile of WebDatabase.cpp fails without SQL_DATABASE
https://bugs.webkit.org/show_bug.cgi?id=84212

Patch by Myles Maxfield <mmaxfield@google.com> on 2012-04-18
Reviewed by Kentaro Hara.

* src/WebDatabase.cpp:
(WebCore::AbstractDatabase::isSyncDatabase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore.gypi not current
https://bugs.webkit.org/show_bug.cgi?id=84224

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2012-04-18
Reviewed by Eric Seidel.

Updated JavaScriptCore.gypi to contain the latest sources. Removed os-win32 as it wasn't used. Also removed references to ICU files in the gypi file as ICU is most likely specified by the port itself.

Private and public header files were determined by looking at copy-files.cmd within Apple's Visual Studio directory.

* JavaScriptCore.gypi:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prevent potential null pointer dereference in CSSStyleSelector::applyProperty().
https://bugs.webkit.org/show_bug.cgi?id=84267

Reviewed by Kentaro Hara.

No new tests / code cleanup found via static analysis.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Full Screen mode does not preserve CALayer ordering after exiting.
https://bugs.webkit.org/show_bug.cgi?id=83931

Reviewed by Eric Carlson.

When swapping the placeholder and web views, use -[NSView addSubview:positioned:relativeTo:]
instead of -[NSView replaceSubview:with:], as the latter does not preserve the relative order
of the view's backing CALayers.

Source/WebKit/mac:

* WebView/WebFullScreenController.mm:
(-[WebFullScreenController _swapView:with:]):

Source/WebKit2:

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController _swapView:with:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add explicit template instantiation to chromium/PopupListBox.cpp to prepare for sub-pixel layout
https://bugs.webkit.org/show_bug.cgi?id=84264

Reviewed by Eric Seidel.

Explicitly instantiating integer max and min templates to fix compilation in Chromium. We
intentionally truncated these values in platform code, which matches earlier behavior.
See https://trac.webkit.org/wiki/LayoutUnit for details.

No new tests. No change in behavior.

* platform/chromium/PopupListBox.cpp:
(WebCore::PopupListBox::paintRow):
(WebCore::PopupListBox::layout):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Win8 builds usually fail due to cygwin rebasing
https://bugs.webkit.org/show_bug.cgi?id=84274

Reviewed by Dirk Pranke.

Cygwin can fail to spawn children if the DLL is rebased. This happens
frequently enough on Windows 8 that we should retry on failure.

No new tests. No behavior changed.

* bindings/scripts/preprocessor.pm:
(applyPreprocessor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSVALUE32_64 should be able to perform division on ARM without crashing, and variables
forced double should not be scrambled when performing OSR entry
https://bugs.webkit.org/show_bug.cgi?id=84272

Reviewed by Geoff Garen.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK test_expectations update.

* platform/gtk/test_expectations.txt: Mark some tests as crashing
in debug builds due to bug 63611.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(102040): Auto-table layout with percent width doesn't shrink-to-fit content a cell with colspan
https://bugs.webkit.org/show_bug.cgi?id=84260

Reviewed by Ojan Vafai.

Source/WebCore:

Tests: fast/table/td-width-fifty-percent-regression-expected.html
       fast/table/td-width-fifty-percent-regression.html

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
As we are spreading the cell's min / max logical width, we should be updating them.
This prevents the following logic getting confused and allocating more than needed.

LayoutTests:

* fast/table/td-width-fifty-percent-regression-expected.html: Added.
* fast/table/td-width-fifty-percent-regression.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
jsc command line should support typed arrays by default
https://bugs.webkit.org/show_bug.cgi?id=84298

Rubber stamped by Gavin Barraclough.

* JSCTypedArrayStubs.h:
(JSC):
* jsc.cpp:
(GlobalObject::finishCreation):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Call prefetchDNS directly
https://bugs.webkit.org/show_bug.cgi?id=84262

Reviewed by Kentaro Hara.

Part of a series, see tracking bug 82948.

Source/WebCore:

* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/network/chromium/DNSChromium.cpp:
(WebCore::prefetchDNS):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-webkit-tests picked up an old crash log
https://bugs.webkit.org/show_bug.cgi?id=84196

Reviewed by Ryosuke Niwa.

Modify the crash log-finding code so that we can
limit our search to logs newer than X - this prevents
us from finding old crash logs for a given process/pid
combination even when the PIDs might've wrapped.

Also fix a bug in filesystem_mock where files_under() would
return paths that didn't exist.

* Scripts/webkitpy/common/system/crashlogs.py:
(CrashLogs.find_newest_log):
(CrashLogs._find_newest_log_darwin):
* Scripts/webkitpy/common/system/crashlogs_unittest.py:
(CrashLogsTest.test_find_log_darwin):
(CrashLogsTest.test_find_log_darwin.bad_read):
(CrashLogsTest):
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.files_under):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port._get_crash_log):
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort._get_crash_log):
* Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort._get_crash_log):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(PortTestCase.test_get_crash_log):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitDriver.run_test):

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