bmalloc: eager scavenge leaves behind a bogus allocator
https://bugs.webkit.org/show_bug.cgi?id=136743

Reviewed by Sam Weinig.

Be sure to clear the allocator after logging it in the eager scavenge
case, so that we don't later try to allocate out of the lines that we
have thrown away.

We didn't need to do this previously because scavenge would only happen
at thread exit time, after which no further allocation from the per-thread
cache would take place.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::scavenge):
* bmalloc/MediumAllocator.h:
(bmalloc::MediumAllocator::clear):
* bmalloc/SmallAllocator.h:
(bmalloc::SmallAllocator::clear):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed by Sam Weinig.

Renamed log => retire for clarity.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::scavenge):
(bmalloc::Allocator::retire):
(bmalloc::Allocator::allocateMedium):
(bmalloc::Allocator::allocateSlowCase):
(bmalloc::Allocator::log): Deleted.
* bmalloc/Allocator.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed rebaseline of inspector generator test results after r173120.

* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Check for varying packing restrictions per program instead of per shader.
https://bugs.webkit.org/show_bug.cgi?id=136585.
<rdar://problem/16308409>.

Reviewed by Dean Jackson.

Covered by webgl/1.0.2/conformance/ogles/GL/build/build_009_to_016.html.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::linkProgram): 
Check for varying packing restrictions when linking the program.

* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::checkVaryingsPacking): 
Checks varyings shared by both vertex and fragment shaders and makes sure
they satisfy packing restrictions.

Remove varying packing restrictions checks from ANGLE.
* src/compiler/translator/Compiler.cpp:
(TCompiler::compile):
(TCompiler::enforcePackingRestrictions):
* src/compiler/translator/ShHandle.h:

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use tighter typing for Document::ownerElement() return value
https://bugs.webkit.org/show_bug.cgi?id=136746

Reviewed by Ryosuke Niwa.

Use tighter typing for Document::ownerElement() return value at call
sites to increase code readability a bit and allow the compiler to
generate slightly more efficient code in some cases. In particular,
the more efficient HTMLElement::hasTagName(HTMLQualifiedName) is
now called in several cases instead of the one on Node. This bypasses
unnecessary isHTMLElement() checks.

No new tests, no behavior change.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
* dom/Document.cpp:
(WebCore::Document::updateLayout):
(WebCore::Document::topDocument):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Some MallocBench refinements
https://bugs.webkit.org/show_bug.cgi?id=136750

Reviewed by Sam Weinig.

* MallocBench/MallocBench/Interpreter.cpp:
(Interpreter::run): Allow for null entries in the object list so that
we can test in modes that exclude large or small allocations.

* MallocBench/MallocBench/churn.cpp:
(benchmark_churn):
* MallocBench/MallocBench/flickr.cpp:
(benchmark_flickr):
* MallocBench/MallocBench/fragment.cpp:
(benchmark_fragment_iterate):
* MallocBench/MallocBench/list.cpp:
(benchmark_list_allocate):
* MallocBench/MallocBench/reddit.cpp:
(benchmark_reddit): Updated test runtimes to weight them more equally,
for the sake of arithmetic mean.

* MallocBench/MallocBench/stress.cpp:
(Object::Object):
(allocate):
(deallocate):
(benchmark_stress): Verify the contents of memory as we go. Also,
force scavenging each time through the loop to test the scavenging path.

* MallocBench/MallocBench/theverge.cpp:
(benchmark_theverge):
* MallocBench/MallocBench/tree.cpp:
(benchmark_tree_churn): Re-weighted, as above.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Temporary change to determine why some snapshotting tests are failing only on bots.
Unskip skipped snapshotting tests and increase the time before we check the plugin state to 10s.
* platform/mac-wk2/TestExpectations:
* plugins/snapshotting/set-plugin-size-to-tiny.html:
* plugins/snapshotting/simple.html:
* plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Font Loading] Enable CSS Font Loading on Mac
https://bugs.webkit.org/show_bug.cgi?id=135473

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

Enable CSS Font Loading in FeatureDefines.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Enable CSS Font Loading in FeatureDefines, and in
RuntimeEnabledFeatures.

Font Loading tests have been toggled back on in the Mac
TestExpectations file.

* Configurations/FeatureDefines.xcconfig:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):

Source/WebKit/mac:

Enable CSS Font Loading in FeatureDefines.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Enable CSS Font Loading in FeatureDefines.

* Configurations/FeatureDefines.xcconfig:

LayoutTests:

Enable tests on the Mac platform. As more platforms
are added, this should move from the tests defaulting
to disabled to the tests defaulting to enabled.

* platform/mac/TestExpectations: Mark the Font Loading
tests as enabled.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More unreviewed gardening. Rebaseline some ML expected results.

* platform/mac-mountainlion/media/video-controls-captions-trackmenu-sorted-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add site-specific quirk for entering fullscreen on YouTube.com.
https://bugs.webkit.org/show_bug.cgi?id=136742

Reviewed by Eric Carlson.

YouTube only resizes its <video> content when entering fullscreen after receiving the "webkitfullscreenchange"
event, which is fired once the animation to enter fullscreen completes. This leaves the apparent <video> content
too small during the animation, especially at the beginning of the animation. Add a site-specific hack for
YouTube sites which fires the "webkitfullscreenchange" event synchronously with the beginning of the enter
fullscreen animation. This will cause YouTube to resize their <video> content during the period of time where we
disable screen updates, and makes the enter fullscreen animation seamless.

Add a static utility method, hostIsYouTube(), for the various pieces of this site-specific hack, and expand it
to match youtube.co.uk, youtube.fr, etc.

* dom/Document.cpp:
(WebCore::hostIsYouTube): Added.
(WebCore::Document::webkitWillEnterFullScreenForElement): Fire fullscreenchange event if hacks are enabled.
(WebCore::Document::webkitDidEnterFullScreenForElement): Don't fire the event if same.
(WebCore::Document::webkitDidExitFullScreenForElement): Use hostIsYouTube().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r172129): Vine pages load as blank
https://bugs.webkit.org/show_bug.cgi?id=136655
rdar://problem/18281215

Reviewed by Michael Saboff.
        
If lastNode is something that is subject to DCE, then removing the Phantom's reference to something
that lastNode references means that the thing being referenced may no longer be kept alive for OSR.
Teach PhantomRemovalPhase that it's only safe to do this if lastNode is a Phantom. That's probably too
conservative, but that's fine since this is mainly just an optimization to make the IR sane to read and
reasonably compact; it's OK if we miss cases here.

* dfg/DFGPhantomRemovalPhase.cpp:
(JSC::DFG::PhantomRemovalPhase::run):
* tests/stress/remove-phantom-after-setlocal.js: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy test failures from import-w3c-tests
https://bugs.webkit.org/show_bug.cgi?id=136752

Patch by Rebecca Hauck <rhauck@adobe.com> on 2014-09-11
Reviewed by Bem Jones-Bey.

This patch fixes a bug in import-w3c-tests where we were appending
the wrong set of files to the copy_list. This also updates the tests
to clear the failures introduced in the patch for bug 135929.

* Scripts/webkitpy/w3c/test_converter_unittest.py:
(W3CTestConverterTest.test_read_prefixed_property_list):
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.analyze_test):
(TestParser.support_files):
* Scripts/webkitpy/w3c/test_parser_unittest.py:

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