JSDOMWrapper should ASSERT that it has an associated ScriptExecutionContext
https://bugs.webkit.org/show_bug.cgi?id=94053

Reviewed by Sam Weinig.

Previously we were unable have this ASSERT because DOMWindow needed a
Frame to find Document. Now that we can find the Document without a
Frame, we can include the ASSERT and sanity will rein across the land.

* bindings/js/JSDOMWrapper.h:
(WebCore::JSDOMWrapper::globalObject):
(WebCore::JSDOMWrapper::scriptExecutionContext):
(WebCore::JSDOMWrapper::JSDOMWrapper):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update expectations to match the bots. This test hasn't timed out in over 500 runs.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Upstream BlackBerry build fixes
https://bugs.webkit.org/show_bug.cgi?id=94121

Patch by Joshua Netterfield <jnetterfield@rim.com> on 2012-08-15
Reviewed by Rob Buis.

This includes several build fixes due to incorrect upstream patches.
These mistakes were never present downstream.

No new tests, because no new functionality is added.

Source/WebCore:

* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D):
(WebCore::GraphicsContext3D::ShaderSourceEntry::ShaderSourceEntry):
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRendererAction::LayerFilterRendererAction):
* platform/graphics/blackberry/LayerFilterRenderer.h:
(LayerFilterRendererAction):

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataEnableFeatures.in:
* WebCoreSupport/AboutTemplate.html.cpp:
(writeHeader):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename window.internals.fastMallocStatistics to mallocStatistics
https://bugs.webkit.org/show_bug.cgi?id=94033

Patch by Scott Graham <scottmg@chromium.org> on 2012-08-15
Reviewed by Adam Barth.

PerformanceTests:

* resources/runner.js:
(PerfTestRunner.storeHeapResults):
(PerfTestRunner.getUsedMallocHeap):
(PerfTestRunner.getAndPrintMemoryStatistics):
(PerfTestRunner.initAndStartLoop):

Source/WebCore:

Mechanical rename. In preparation for plumbing allocation information
from allocators that aren't "fastMalloc".

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCoreTestSupport.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::didTellClientAboutLoad):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::loadResource):
* testing/FastMallocStatistics.h: Removed.
* testing/FastMallocStatistics.idl: Removed.
* testing/Internals.cpp:
(WebCore::Internals::mallocStatistics):
* testing/Internals.h:
(WebCore):
(Internals):
* testing/Internals.idl:
* testing/MallocStatistics.h: Added.
* testing/MallocStatistics.idl: Added.

Tools:

* GNUmakefile.am:
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_run_memory_test):

LayoutTests:

* fast/harness/fastmallocstatistics-object.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gtk] atk_text_set_caret_offset() fails for table cells
https://bugs.webkit.org/show_bug.cgi?id=83501

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-08-15
Reviewed by Chris Fleizach.

Source/WebCore:

Allow using text ranges in accessible table cells.

* accessibility/gtk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::allowsTextRanges):
Add table cells to the list of accessibility objects supporting text ranges.

Source/WebKit/gtk:

Update unit test to include setting the caret in a table cell via the AtkText interface.

* tests/testatk.c:
(testWebkitAtkCaretOffsets): Add setting the caret inside the text of a table cell.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
z-index should work without position on flexitems
https://bugs.webkit.org/show_bug.cgi?id=91405

Reviewed by Tony Chang.

Source/WebCore:

Require a layer on any RenderBox that has a non-auto z-index.
Statically positioned, non-flex-item's have their z-index coerced to auto,
so it's safe to check z-index unconditionally.

Test: css3/flexbox/z-index.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
-Don't coerce z-index to auto on statically positioned flex-items.
-Use the parentStyle to determine if the parent is a flexbox instead of
looking at the element's parentNode's renderer.
* rendering/RenderBox.h:
-Add having a non-auto z-index to the list of things that require a layer.

LayoutTests:

* css3/flexbox/z-index-expected.html: Added.
* css3/flexbox/z-index.html: Added.
Use a ref-test since we want to be sure that the elements get painted in the right order.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AutoTableLayout truncates preferred widths for cells when it needs to ceil them to contain the contents
https://bugs.webkit.org/show_bug.cgi?id=93911

Reviewed by Eric Seidel.

Source/WebCore: 

Avoiding truncation of sub-pixel accumulated values when determining the preferred width of a table cell
in AutoTableLayout. Since we continue to layout tables using integers, we need to ceil the contents to
prevent premature wrapping of the contents.

This only affects ports with sub-pixel layout enabled, and fixes regressions of a handful of tests that
were missed when updating expectations when sub-pixel was enabled.

Test: fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping.html

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):

LayoutTests: 

This only affects ports with sub-pixel layout enabled, and fixes regressions of a handful of tests that
were missed when updating expectations when sub-pixel was enabled.

* fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping-expected.txt: Added.
* fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping.html: Added.
* platform/chromium-mac/editing/deleting/5144139-2-expected.txt:
* platform/chromium-mac/fast/forms/001-expected.png:
* platform/chromium-mac/fast/forms/001-expected.txt:
* platform/chromium-mac/fast/forms/button-white-space-expected.txt:
* platform/chromium-mac/fast/forms/form-element-geometry-expected.png:
* platform/chromium-mac/fast/forms/form-element-geometry-expected.txt:
* platform/chromium-mac/fast/forms/formmove3-expected.txt:
* platform/chromium-mac/fast/replaced/width100percent-button-expected.png:
* platform/chromium-mac/fast/replaced/width100percent-button-expected.txt:
* platform/chromium-mac/fast/replaced/width100percent-checkbox-expected.png:
* platform/chromium-mac/fast/replaced/width100percent-checkbox-expected.txt:
* platform/chromium-mac/fast/replaced/width100percent-radio-expected.png:
* platform/chromium-mac/fast/replaced/width100percent-radio-expected.txt:
* platform/chromium-mac/fast/table/rowindex-expected.png:
* platform/chromium-mac/fast/table/rowindex-expected.txt:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-CSS-expected.png:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-CSS-expected.txt:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-HTML-expected.png:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-HTML-expected.txt:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
* platform/chromium-mac/fast/text/international/bidi-layout-across-linebreak-expected.png:
* platform/chromium-mac/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/chromium-mac/fast/text/international/bidi-override-expected.png:
* platform/chromium-mac/fast/text/international/bidi-override-expected.txt:
* platform/chromium-mac/fast/text/textIteratorNilRenderer-expected.png:
* platform/chromium-mac/fast/text/textIteratorNilRenderer-expected.txt:
* platform/chromium-mac/fast/transforms/bounding-rect-zoom-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug1318-expected.png:
* platform/chromium-mac/tables/mozilla/bugs/bug1318-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug138725-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug18359-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug33855-expected.png:
* platform/chromium-mac/tables/mozilla/bugs/bug33855-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug39209-expected.png:
* platform/chromium-mac/tables/mozilla/bugs/bug39209-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug4527-expected.png:
* platform/chromium-mac/tables/mozilla/bugs/bug4527-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug55527-expected.png:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug89315-expected.png:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug89315-expected.txt:
* platform/chromium/TestExpectations:
* platform/mac/tables/mozilla/bugs/bug55527-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removing a plug-in element from a page opened in a background tab in Safari crashes
<rdar://problem/12057991> and https://bugs.webkit.org/show_bug.cgi?id=93913

Reviewed by Beth Dakin.

.:

* Source/autotools/symbols.filter: Allow this symbol through for DRT's sake.

Source/WebCore:

Expose Page::setCanStartMedia to regression tests so they can pretend to be in a non-windowed WebView.

Test: platform/mac-wk2/plugins/asynchronous-destroy-before-initialization.html

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setCanStartMedia):
(WebCore):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit2:

This only happens in WebKit2 with asynchronous plug-in initialization enabled.

* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::destroy): Null-check m_connection, as it might not have been created yet.

* win/WebKit2.def: Export Page::setCanStartMedia for InternalSettings/DRT use.

LayoutTests:

Using internal setting setCanStartMedia, pretend the page is in an unwindowed WebView then remove
the plug-in element.

* platform/mac-wk2/plugins/asynchronous-destroy-before-initialization-expected.txt: Added.
* platform/mac-wk2/plugins/asynchronous-destroy-before-initialization.html: Added.

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