DFG shouldn't treat the 'this' argument as being captured if a code block uses arguments
https://bugs.webkit.org/show_bug.cgi?id=106398
<rdar://problem/12439776>

Source/JavaScriptCore: 

Reviewed by Mark Hahnenberg.
        
This is a possible optimization for inlined calls, and fixes crashes for inlined constructors, in the case
that the inlined code used arguments. The problem was that assuming that 'this' was captured implies the
assumption that it was initialized by the caller, which is wrong for constructors and this.
        
Also added a pretty essential DFG IR validation rule: we shouldn't have any live locals at the top of the
root block. This helps to catch this bug: our assumption that 'this' was captured in an inlined constructor
that used arguments led to liveness for the temporary that would have held 'this' in the caller being
propagated all the way up to the entrypoint of the function.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::isCaptured):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
(JSC::DFG::Validate::reportValidationContext):
(Validate):
(JSC::DFG::Validate::dumpGraphIfAppropriate):

LayoutTests: 

Reviewed by Mark Hahnenberg.

* fast/js/dfg-inline-constructor-that-uses-arguments-expected.txt: Added.
* fast/js/dfg-inline-constructor-that-uses-arguments.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-inline-constructor-that-uses-arguments.js: Added.
(Foo):
(bar):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Color bleeding with rounded rectangles on high dpi displays
https://bugs.webkit.org/show_bug.cgi?id=106373

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/backgrounds/gradient-background-leakage-hidpi.html

Avoid using the BackgroundBleedShrinkBackground draw strategy for
RenderBox when border width is less than two layout units. This
is because rounded rectangles are always snapped to integer layout
coordinates, even with subpixel layout enabled.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::determineBackgroundBleedAvoidance):

LayoutTests:

New layout test to verify that rounded rectangle corners do not
produce color bleeding on high dpi devices.

* fast/backgrounds/gradient-background-leakage-hidpi-expected.txt: Added.
* fast/backgrounds/gradient-background-leakage-hidpi.html: Added.
* platform/chromium-linux/fast/backgrounds/gradient-background-leakage-hidpi-expected.png: Added.


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