Update more Mac baselines after r115846.

* platform/mac/editing/selection/select-from-textfield-outwards-expected.txt:
* platform/mac/fast/block/float/avoiding-float-centered-expected.txt:
* platform/mac/fast/block/float/float-not-removed-from-next-sibling3-expected.txt:
* platform/mac/media/audio-controls-rendering-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Avoid extra Region copies in CCOcclusionTracker
https://bugs.webkit.org/show_bug.cgi?id=85257

Reviewed by Adrienne Walker.

Instead of making a Region for each layer and then uniting the region
with the current occlusion, directly add the rects for the given layer
to the current occlusion.

When subtracting a region from a rect, just subtract the region
directly instead of computing the intersecting region.

Covered by existing tests.

* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::addOcclusionBehindLayer):
(WebCore::::markOccludedBehindLayer):
(WebCore::rectSubtractRegion):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: Remove direct sys.platform usage in run_webkit_tests_integrationtest.
https://bugs.webkit.org/show_bug.cgi?id=85419

Reviewed by Dirk Pranke.

Another part of the work towards replacing direct sys.platform
usage with PlatformInfo.

* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.setUp): Move the setting of SHOULD_TEST_PROCESSES
here. Even though it is costlier, unittest.setUpClass was
introduced in Python 2.7.
(MainTest.test_child_processes_2): Use self.SHOULD_TEST_PROCESSES.
(MainTest.test_child_processes_min): Ditto.
(MainTest.test_exception_raised): Ditto.
(MainTest.test_keyboard_interrupt): Ditto.
(MainTest.test_crash_log): Check for PlatformInfo.is_mac().
(MainTest.test_web_process_crash_log): Ditto, and remove duplicate
check at the end.
(MainTest.test_no_http_tests): Remove check for (cygwin && Python
2.5.2), as we only support Python 2.6+.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: Remove direct sys.platform usage in run_webkit_tests_integrationtest.
https://bugs.webkit.org/show_bug.cgi?id=85419

Rubber-stamped by Dirk Pranke.

Follow-up patch to r115887 which fixes some capitalization problems
pointed out in comments 2 and 4.

* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.setUp):
(MainTest.test_child_processes_2):
(MainTest.test_child_processes_min):
(MainTest.test_exception_raised):
(MainTest.test_keyboard_interrupt):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add WebDocument::referrerPolicy() which wraps the same method on Document
https://bugs.webkit.org/show_bug.cgi?id=85201

Reviewed by Adam Barth.

Embedders should use webFrame->document()->referrerPolicy() instead of webFrame->referrerPolicy(). The latter will be removed soon.

* public/WebDocument.h:
(WebDocument):
* src/WebDocument.cpp:
(WebKit::WebDocument::referrerPolicy):
(WebKit):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update two more Mac baselines.

* platform/mac/fast/forms/input-appearance-spinbutton-expected.txt:
* platform/mac/tables/mozilla/bugs/bug4527-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
media/audio-repaint.html sometimes fails on Lion Debug (Tests)
https://bugs.webkit.org/show_bug.cgi?id=84357

* platform/mac/Skipped: Skipped the flaky test.

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

* platform/gtk/test_expectations.txt: remove duplicate annotation
for fast/workers/storage/use-same-database-in-page-and-workers.html,
added comment explaining the ocasional ASSERT that's a
cross-platform problem.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Let WebKit parse with clang on windows with -std=c++11
https://bugs.webkit.org/show_bug.cgi?id=85398

Reviewed by Ryosuke Niwa.

See http://trac.webkit.org/changeset/85945 for background on the line
I'm changing. With clang, __GXX_EXPERIMENTLAL_CXX0X__ is set in c++11
mode, but MSVC's c++ library doesn't have a tr1/memory header. So also
check for __GLIBCXX__, like it's done in the rest of this file.

* wtf/TypeTraits.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: Remove direct sys.platform usage in run_webkit_tests_integrationtest.
https://bugs.webkit.org/show_bug.cgi?id=85419

Reviewed by Dirk Pranke.

As pointed out by Dirk Pranke, a PlatformInfo is not supposed to
be created directly, we should should a SystemHost instead.

* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.setUp): Create a SystemHost and obtain the PlatformInfo
object from it instead of creating PlatformInfo directly.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
After appending MathML with jquery the table renders with overlaps
https://bugs.webkit.org/show_bug.cgi?id=52444

Patch by David Barton <dbarton@mathscribe.com> on 2012-05-02
Reviewed by Julien Chaffraix.

Source/WebCore:

This patch also fixes bugs 72834 and 47781. The main problem is that correct preferred
logical widths are affected by operator stretching. Thus we add a call to
setNeedsLayoutAndPrefWidthsRecalc() after the stretching code in
RenderMathMLOperator.cpp, and change RenderMathMLBlock and RenderMathMLRow to make sure
that stretching of children is done before an <mrow>'s preferred logical widths are
computed.

Test: Added a test to mathml/presentation/mo-stretch.html

* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
(WebCore::RenderMathMLBlock::computePreferredLogicalWidths):
(WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
(WebCore::RenderMathMLBlock::preferredLogicalHeightAfterSizing):
* rendering/mathml/RenderMathMLBlock.h:
(WebCore::RenderMathMLBlock::unembellishedOperator):
(WebCore::RenderMathMLBlock::isPreferredLogicalHeightDirty):
(WebCore::RenderMathMLBlock::preferredLogicalHeight):
(WebCore::RenderMathMLBlock::setPreferredLogicalHeight):
    - Add m_preferredLogicalHeight and methods to compute and return it.
    - Remove stretchToHeight() from most classes as it no longer needs to be done
      recursively. We just call it on the base of an embellished operator, and that
      calls setNeedsLayoutAndPrefWidthsRecalc() to mark itself and its container
      chain.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::stretchToHeight):
    - Don't compare an unexpanded height to an expanded one.
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
(WebCore::RenderMathMLOperator::updateFromElement):
    - After stretching, call setNeedsLayoutAndPrefWidthsRecalc().
* rendering/mathml/RenderMathMLOperator.h:
(RenderMathMLOperator):

* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::computePreferredLogicalWidths):
(WebCore::RenderMathMLRow::layout):
* rendering/mathml/RenderMathMLRow.h:
(RenderMathMLRow):
    - Add computePreferredLogicalWidths(), using computeChildrenPreferredLogicalHeights()
      to compute our children's preferred logical heights if necessary, followed by
      operator stretching.

* rendering/mathml/RenderMathMLSubSup.cpp:
* rendering/mathml/RenderMathMLSubSup.h:
(RenderMathMLSubSup):
* rendering/mathml/RenderMathMLUnderOver.cpp:
* rendering/mathml/RenderMathMLUnderOver.h:
(RenderMathMLUnderOver):

LayoutTests:

* mathml/presentation/mo-stretch.html:
* platform/mac/mathml/presentation/mo-stretch-expected.png:
* platform/mac/mathml/presentation/mo-stretch-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in WebCore::TextTrackList::remove
https://bugs.webkit.org/show_bug.cgi?id=85095

Reviewed by Maciej Stachowiak.

Source/WebCore: 

Test: media/track/track-remove-quickly.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::willRemoveTrack): Return immediately if the tracks collection
    has not been allocated yet.

LayoutTests: 

* media/track/track-remove-quickly-expected.txt: Added.
* media/track/track-remove-quickly.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Childlist mutations in shadow DOM should be observable with MutationObservers
https://bugs.webkit.org/show_bug.cgi?id=85402

Reviewed by Ojan Vafai.

Source/WebCore:

Though Mutation Events are not supported in Shadow DOM,
MutationObservers are supposed to be. Due to a misplacement of the
ChildListMutationScope, they were erroneously getting skipped.

This patch moves code around to properly notify when childlist are
mutated in shadow DOM and covers that change with a new test.

Test: fast/mutation/shadow-dom.html

* dom/ContainerNode.cpp:
(WebCore::willRemoveChild): Handle notification of removal directly.
(WebCore::willRemoveChildren): ditto.
(WebCore::dispatchChildInsertionEvents): Remove notification of insertion.
(WebCore::dispatchChildRemovalEvents): Remove notification of removal.
(WebCore::updateTreeAfterInsertion): Handle notification of insertion directly.

LayoutTests:

Added test covering childList mutations as well as attribute and
characterData mutations (these were already working).

* fast/mutation/shadow-dom-expected.txt: Added.
* fast/mutation/shadow-dom.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: Remove direct checks for sys.platform == 'darwin' in the layout test classes.
https://bugs.webkit.org/show_bug.cgi?id=85424

Reviewed by Tony Chang.

We should reduce direct usage of sys.platform in webkitpy and use
PlatformInfo instead.

* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd._prepare_config): Call PlatformInfo.is_mac() instead of
checking for 'darwin' directly.
* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase.__init__): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline, unreviewed.

* platform/chromium-mac/fast/text/textIteratorNilRenderer-expected.txt:
* platform/chromium/media/media-can-play-wav-audio-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: Use a SystemHost instead of PlatformInfo in the PNG checker.
https://bugs.webkit.org/show_bug.cgi?id=85426

Reviewed by Dirk Pranke.

r115880 replaced the direct use of sys.platform with a
PlatformInfo object. Dirk Pranke later told me SystemHost objects
should be preferred, as nothing out of webkitpy.common.system
should create its own PlatformInfo instances.

* Scripts/webkitpy/common/system/systemhost_mock.py:
(MockSystemHost.__init__): Make it possible to specify a custom
filesystem object.
* Scripts/webkitpy/style/checkers/png.py:
(PNGChecker.__init__): Accept a host object instead of a
filesystem one, which is now obtained from host.
(PNGChecker._config_file_path): Retrieve PlatformInfo from
SystemHost.
* Scripts/webkitpy/style/checkers/png_unittest.py:
(PNGCheckerTest.test_init): Adjust calls to PNGChecker to its new
constructor signature.
(PNGCheckerTest.test_check): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline, unreviewed.

* platform/chromium-mac/fast/text/textIteratorNilRenderer-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Handle generated keys up to 2^53
https://bugs.webkit.org/show_bug.cgi?id=85114

Source/WebCore:

The spec defines the behavior for generated keys up to 2^53
(the maximum integer storable as an ECMAScript number) and
the error case when going beyond that. Ensure that we can
handle values up to that point and generate errors beyond.

Reviewed by Tony Chang.

Test: storage/indexeddb/key-generator.html

* Modules/indexeddb/IDBBackingStore.h:
(IDBBackingStore):
* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
* Modules/indexeddb/IDBLevelDBBackingStore.h:
(IDBLevelDBBackingStore):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(IDBObjectStoreBackendImpl):

LayoutTests:

Reviewed by Tony Chang.

* storage/indexeddb/key-generator-expected.txt:
* storage/indexeddb/resources/key-generator.js:
(get defineTest):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: make ServerProcess work on chromium win
https://bugs.webkit.org/show_bug.cgi?id=85333

Reviewed by Ojan Vafai.

This change implements a poor man's select() that will
slow-spin doing non-blocking reads on the stdout and stderr
named pipes connecting the worker to the driver. Seems to work
and I have yet to see much overhead or ill effects but it
probably needs more testing.

* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumDriver.__init__):
* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess._start):
(ServerProcess._wait_for_data_and_update_buffers_using_select):
(ServerProcess._wait_for_data_and_update_buffers_using_win32_apis):
(ServerProcess):
(ServerProcess._non_blocking_read_win32):
(ServerProcess._read):
* Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
(TestServerProcess.test_basic): Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix mistake I committed when applying review comments.

* jhbuild/jhbuild-wrapper: dependencies_path was getting 'Root'
appended to its path, so jhbuild itself was being cloned and
installed in the wrong place when using WEBKITOUTPUTDIR.

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