get_argument_by_val should be profiled everywhere
https://bugs.webkit.org/show_bug.cgi?id=88205

Reviewed by Geoffrey Garen.

* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_get_argument_by_val):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Document cleanup can get confused if parser still exists
https://bugs.webkit.org/show_bug.cgi?id=88250

Reviewed by Geoffrey Garen.

No new tests; no behavior changes.

* dom/Document.cpp:
(WebCore::Document::removedLastRef): Detach parser earlier

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mock scrollbars differ by 1px in DRT vs. WKTR
https://bugs.webkit.org/show_bug.cgi?id=80879

Rubber-stamped by Ryosuke Niwa.

Disable r119431 except for Apple Mac port.

* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::thumbLength):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove enabledProfilerReference
https://bugs.webkit.org/show_bug.cgi?id=88258

Reviewed by Michael Saboff.

Make the enabled profiler a member of JSGlobalData, and switch code that accesses it to do so directly
via the JSGlobalData, rather than holding a Profiler** reference to it. Do not pass the Profiler**
reference to JIT code. This patch does not change the stack layout on entry into JIT code (passing an
unused void* instead), since this is an intrusive change better handled in a separate patch.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):
* jit/JITCode.h:
(JSC::JITCode::execute):
    - Don't pass Profiler** to JIT code.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITStubs.cpp:
(JSC):
(JSC::ctiTrampoline):
(JSC::ctiVMThrowTrampoline):
(JSC::ctiOpThrowNotCaught):
(JSC::JITThunks::JITThunks):
(JSC::DEFINE_STUB_FUNCTION):
    - For ARM_THUMB2, rename ENABLE_PROFILER_REFERENCE_OFFSET to FIRST_STACK_ARGUMENT (which is how it is being used).
    - For MIPS, remove ENABLE_PROFILER_REFERENCE_OFFSET.
* jit/JITStubs.h:
(JITStackFrame):
(JSC):
    - Renamed enabledProfilerReference to unusedX.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* profiler/Profiler.cpp:
(JSC):
(JSC::Profiler::startProfiling):
(JSC::Profiler::stopProfiling):
* profiler/Profiler.h:
(Profiler):
    - Removed s_sharedEnabledProfilerReference, enabledProfilerReference().
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC):
(JSC::JSGlobalData::enabledProfiler):
(JSGlobalData):
    - Added m_enabledProfiler, enabledProfiler().
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed new baseline for test added in r119423.

* platform/mac/fast/hidpi/device-scale-factor-paint-expected.png: Added.
* platform/mac/fast/hidpi/device-scale-factor-paint-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
test-webkitpy is failing on win32 after r115054
https://bugs.webkit.org/show_bug.cgi?id=88264

Reviewed by Ryosuke Niwa.

The failing http_server test was improperly suppressed (the
tuple was missing a comma, and so wasn't a tuple at all, just a
string) and so we were skipping *all* tests on win32. The right
way to skip a single test is to disable it inside the test
itself.

* Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
(TestHttpServer.test_start_cmd):
* Scripts/webkitpy/test/test_finder.py:
(TestFinder._default_names):
* Scripts/webkitpy/test/main.py:
(Tester.run): Add error message if we don't find any tests to run.
* Scripts/webkitpy/test/main_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG arguments simplification should have rationalized handling of TearOffArguments
https://bugs.webkit.org/show_bug.cgi?id=88206

Reviewed by Geoffrey Garen.
        
- Accesses to the unmodified arguments register ought to have the same effect on
  alias/escape analysis of arguments as accesses to the mutable arguments register.
        
- The existence of TearOffArguments should not get in the way of arguments aliasing.
        
- TearOffArguments should be eliminated if CreateArguments is eliminated.

* dfg/DFGArgumentsSimplificationPhase.cpp:
(JSC::DFG::ArgumentsSimplificationPhase::run):
(JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
test-webkitpy is hanging under cygwin
https://bugs.webkit.org/show_bug.cgi?id=88269

Reviewed by Ryosuke Niwa.

The 'multiprocessing' module doesn't work correctly under Cygwin yet,
so we need to skip any tests that use it.

* Scripts/webkitpy/common/system/executive.py:
(Executive.run_in_parallel):
* Scripts/webkitpy/common/system/executive_unittest.py:
(ExecutiveTest.test_run_in_parallel):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebSocket] Send requires super linear time against data size
https://bugs.webkit.org/show_bug.cgi?id=87383

Reviewed by Kent Tamura.

Source/WebCore:

WebSocket send operation requires super linear time to send data
against data size. This is because removing sent data in Vector<char>
always requires data copy.
Introduced wtf/StreamBuffer realizes O(n) buffer operations.
This patch is only for optimization. No new tests are needed.

* platform/network/SocketStreamHandleBase.cpp:
(WebCore::SocketStreamHandleBase::sendPendingData):
* platform/network/SocketStreamHandleBase.h:
(SocketStreamHandleBase):

Source/WTF:

* wtf/StreamBuffer.h: Added.
(WTF):
(StreamBuffer):
(WTF::StreamBuffer::StreamBuffer):
(WTF::StreamBuffer::~StreamBuffer):
(WTF::StreamBuffer::isEmpty):
(WTF::StreamBuffer::append):
(WTF::StreamBuffer::consume):
(WTF::StreamBuffer::size):
(WTF::StreamBuffer::firstBlockData):
(WTF::StreamBuffer::firstBlockSize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove redundant setNeedsCommit when prepareToDraw fails
https://bugs.webkit.org/show_bug.cgi?id=88246

Reviewed by James Robinson.

Source/WebCore:

When prepareToDraw fails it explicitly calls setNeedsCommit, but the
scheduler already takes care of this for it. When a frame is not
successfully drawn, the scheduler state machine sets the needsCommit
bit itself.

This behaviour is covered by CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::prepareToDraw):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Start skipping all the failing tests on Windows to get the bots greener.

At this point it doesn't make sense to try to split the hundreds of failures out into
separate bugs and rebaseline. It makes more sense to use the Skipped list as a todo list
of things that need to be checked / updated for Windows.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip more tests on Windows to get the bots greener.

See r119449 for more context.

* platform/win/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy.layout_tests.port.server_process_unittest.TestServerProcess.test_basic is flaky
https://bugs.webkit.org/show_bug.cgi?id=88280

Unreviewed, build fix.

* Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
(TestServerProcess.test_basic):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Turn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag.
https://bugs.webkit.org/show_bug.cgi?id=88243

Patch by Hugo Parente Lima <hugo.lima@openbossa.org> on 2012-06-04
Reviewed by Adam Barth.

.:

* Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

No new tests needed, this just rename a compiler flag.

* dom/Document.cpp:
(WebCore::Document::setDocType):
* dom/ViewportArguments.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::process):

Tools:

* qmake/mkspecs/features/features.prf:

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

Rolled out r119364 because it's still causing crashes (when running
v8-earley in release builds of DRT)

This time for sure!

* heap/Heap.cpp:
(JSC::Heap::collect):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::sweep):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::resetAllocator):
(JSC):
* heap/MarkedSpace.cpp:
(JSC::ResetAllocator::operator()):
(JSC):
(JSC::MarkedSpace::resetAllocators):
(JSC::MarkedSpace::sweepWeakSets):
* heap/MarkedSpace.h:
(MarkedSpace):
* heap/WeakBlock.cpp:
(JSC::WeakBlock::sweep):
* heap/WeakSet.cpp:
(JSC::WeakSet::sweep):
(JSC::WeakSet::tryFindAllocator):
* heap/WeakSet.h:
(JSC::WeakSet::shrink):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Syntax error in fast/filesystem/resources/file-writer-gc-blob.js
https://bugs.webkit.org/show_bug.cgi?id=87939

Reviewed by Alexey Proskuryakov.

* fast/filesystem/resources/file-writer-gc-blob.js: Add parentheses around the blob data.
(startWrite):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS property 'order' should be a number rather than an int
https://bugs.webkit.org/show_bug.cgi?id=88111

Reviewed by Ojan Vafai.

Source/WebCore:

This changed in the spec:
http://dev.w3.org/csswg/css3-flexbox/#order

I also fixed the compile with CSS3_FLEXBOX disabled.

No new tests, covered by existing tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>.
(WebCore::CSSProperty::isInheritedProperty):
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>.
(RenderFlexibleBox::OrderIterator):
* rendering/RenderFlexibleBox.h:
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):

LayoutTests:

* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html: Allow decimal values.
* css3/flexbox/flex-order.html: Fix tests based on float limits.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add missing FractionalLayoutUnit += operator and move LineWidth to use all floats
https://bugs.webkit.org/show_bug.cgi?id=88259

Patch by Emil A Eklund  <eae@chromium.org> and Levi Weintraub <leviw@chromium.org> on 2012-06-04
Reviewed by Ryosuke Niwa.

Source/WebCore: 

Fix two rounding bugs in LineLayout and RenderBlock that caused inlines
and floats to wrap incorrectly.

Tests: fast/sub-pixel/float-containing-block-with-margin.html
       fast/sub-pixel/float-with-right-margin-zoom.html
       fast/sub-pixel/inline-block-with-padding.html

* platform/FractionalLayoutUnit.h:
(WebCore::operator+=):
Add missing float version of += operator thus avoiding a silent cast to
int loosing precision.
        
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
(WebCore::LineWidth::updateAvailableWidth):
Change LineWidth left/right to floating point and instead of rounding the
left and right edge separately.
        
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
Use explicit cast to avoid compiler ambiguity warning.

LayoutTests: 

* fast/dom/elementFromPoint-relative-to-viewport.html:
* fast/events/offsetX-offsetY.html:
Remove special casing for subpixel layout as it is no longer needed.
        
* fast/sub-pixel/float-containing-block-with-margin-expected.html: Added.
* fast/sub-pixel/float-containing-block-with-margin.html: Added.
* fast/sub-pixel/float-with-right-margin-zoom-expected.txt: Added.
* fast/sub-pixel/float-with-right-margin-zoom.html: Added.
* fast/sub-pixel/inline-block-with-padding-expected.txt: Added.
* fast/sub-pixel/inline-block-with-padding.html: Added.
New tests for wrapping logic.
        
* platform/chromium-linux/css2.1/t100801-c544-valgn-03-d-agi-expected.png:
* platform/chromium-linux/css2.1/t100801-c544-valgn-03-d-agi-expected.txt:
* platform/chromium-linux/fast/line-grid/line-align-left-edges-expected.png:
* platform/chromium-linux/fast/line-grid/line-grid-contains-value-expected.png:
* platform/chromium-linux/fast/multicol/float-multicol-expected.png:
* platform/chromium-win/fast/events/offsetX-offsetY-expected.txt:
* platform/chromium-win/fast/line-grid/line-grid-contains-value-expected.txt:
* platform/chromium-win/fast/multicol/float-multicol-expected.txt:
Update expectations to match pre-subpixel rendering.
        
* platform/chromium/TestExpectations:
Mark updated tests as failing on mac and windows temporarily.
        
* platform/chromium/fast/dom/elementFromPoint-relative-to-viewport-expected.txt:
Remove special casing for subpixel layout as it is no longer needed.
        
* platform/chromium/fast/line-grid/line-align-left-edges-expected.txt:
Update expectations to match pre-subpixel rendering.

* platform/efl/Skipped:
* platform/gtk-wk2/Skipped:
* platform/mac-lion/Skipped:
* platform/mac-snowleopard/Skipped:
* platform/mac-wk2/Skipped:
* platform/mac/Skipped:
* platform/qt-4.8/Skipped:
* platform/qt/Skipped:
* platform/win-wk2/Skipped:
* platform/win-xp/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:
* platform/wk2/Skipped:
Skip new sub-pixel tests on platforms that does not enable sub-pixel layout.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Python test fix attempt for Chromium Windows.

* Scripts/webkitpy/layout_tests/port/driver.py:
(Driver.uri_to_test):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Leaking ClipRects
https://bugs.webkit.org/show_bug.cgi?id=88282

Reviewed by Dan Bernstein.

In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::ClipRects):

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