webkitpy: integrate pylint into check-webkit-style, part I
https://bugs.webkit.org/show_bug.cgi?id=101285

Reviewed by Ojan Vafai.

This patch re-works lint-webkitpy so that the logic is pushed
into check-webkit-style (mostly); we don't yet control which
messages are displayed using the rules in webkitpy/style/checker.py
(we're still using the pylintrc to suppress messages instead),
but otherwise things work. For now we will only report pylint
"errors", not warnings.

* Scripts/lint-webkitpy:
* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checkers/python.py:
(PythonChecker):
(PythonChecker.check):
(PythonChecker._check_pep8):
(PythonChecker._check_pylint):
(Pylinter):
(Pylinter.__init__):
(Pylinter.run):
(_FilteredStringIO):
(_FilteredStringIO.__init__):
(_FilteredStringIO.write):
(_FilteredStringIO._filter):
* Scripts/webkitpy/style/checkers/python_unittest.py:
(PythonCheckerTest.test_check):
* Scripts/webkitpy/style/checkers/python_unittest_input.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reduce the crazy number of parameters to RenderLayer painting member functions
https://bugs.webkit.org/show_bug.cgi?id=101895

Reviewed by Beth Dakin.

The various RenderLayer::paintLayer* functions took a lot of arguments, most
of which were passed down directly to descendants.

Gather these arguments into a LayerPaintingInfo struct.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint): Create a LayerPaintingInfo struct to pass
to descendant paint calls.
(WebCore::RenderLayer::paintOverlayScrollbars): Ditto.
(WebCore::RenderLayer::paintLayer): When painting transformed layers, we
make a new LayerPaintingInfo because the root layer is shifted.
(WebCore::RenderLayer::paintLayerContentsAndReflection):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::paintPaginatedChildLayer):
(WebCore::RenderLayer::paintChildLayerIntoColumns): Create a new LayerPaintingInfo
struct for column painting.
* rendering/RenderLayer.h:
(WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
(LayerPaintingInfo):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer): Build a LayerPaintingInfo
to enter layer painting.
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::paint): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename RemoteLayerTreeController to RemoteLayerTreeContext
https://bugs.webkit.org/show_bug.cgi?id=101993

Reviewed by Andreas Kling.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
(RemoteGraphicsLayer):
* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
(WebKit::RemoteGraphicsLayer::create):
(WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
(WebKit::RemoteGraphicsLayer::flushCompositingStateForThisLayerOnly):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.h.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.mm.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
(RemoteLayerTreeDrawingArea):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::graphicsLayerFactory):
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG should not emit function checks if we've already proved that the operand is that exact function
https://bugs.webkit.org/show_bug.cgi?id=101885

Reviewed by Oliver Hunt.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::filterByValue):
(AbstractValue):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG ArithMul overflow check elimination is too aggressive
https://bugs.webkit.org/show_bug.cgi?id=101871

Reviewed by Oliver Hunt.

Source/JavaScriptCore: 

The code was ignoring the fact that ((a * b) | 0) == (((a | 0) * (b | 0)) | 0)
only holds if a * b < 2^53. So, I changed it to only enable the optimization
when a < 2^22 and b is an int32 (and vice versa), using a super trivial peephole
analysis to prove the inequality. I considered writing an epic forward flow
formulation that tracks the ranges of integer values but then I thought better
of it.
        
This also rewires the ArithMul integer speculation logic. Previously, we would
assume that an ArithMul was only UsedAsNumber if it escaped, and separately we
would decide whether to speculate integer based on a proof of the <2^22
inequality. Now, we treat the double rounding behavior of ArithMul as if the
result was UsedAsNumber even if it did not escape. Then we try to prove that
double rounding cannot happen by attemping to prove that a < 2^22. This then
feeds back into the decision of whether or not to speculate integer (if we fail
to prove a < 2^22 then we're UsedAsNumber, and if we're also MayOverflow then
that forces double speculation).
        
No performance impact. It just fixes a bug.

* dfg/DFGGraph.h:
(JSC::DFG::Graph::mulShouldSpeculateInteger):
* dfg/DFGPredictionPropagationPhase.cpp:
(PredictionPropagationPhase):
(JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant):
(JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive):
(JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo):
(JSC::DFG::PredictionPropagationPhase::propagate):

LayoutTests: 

* fast/js/dfg-mul-big-integer-with-small-integer-and-bitor-expected.txt: Added.
* fast/js/dfg-mul-big-integer-with-small-integer-and-bitor.html: Added.
* fast/js/dfg-mul-big-integer-with-small-integer-and-detect-overflow-expected.txt: Added.
* fast/js/dfg-mul-big-integer-with-small-integer-and-detect-overflow.html: Added.
* fast/js/dfg-mul-big-integer-with-small-integer-expected.txt: Added.
* fast/js/dfg-mul-big-integer-with-small-integer.html: Added.
* fast/js/dfg-mul-big-integers-expected.txt: Added.
* fast/js/dfg-mul-big-integers.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-mul-big-integer-with-small-integer-and-bitor.js: Added.
(foo):
* fast/js/script-tests/dfg-mul-big-integer-with-small-integer-and-detect-overflow.js: Added.
(foo):
* fast/js/script-tests/dfg-mul-big-integer-with-small-integer.js: Added.
(foo):
* fast/js/script-tests/dfg-mul-big-integers.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PDFPlugin should support non-1 device scale factor
https://bugs.webkit.org/show_bug.cgi?id=101923

Reviewed by Alexey Proskuryakov.

Do the appropriate plumbing to ensure that PDFPlugin handles device scale factor > 1
(it's called contentsScaleFactor in plugins), both for normal drawing and for snapshotting.

* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add deviceScaleFactor setter/getter to PDFLayerController.
* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin): Override contentsScaleFactorChanged.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pdfDocumentDidLoad): Plumb device scale factor through to PDFLayerController.
(WebKit::PDFPlugin::contentsScaleFactorChanged): Plumb device scale factor through to PDFLayerController
when we're notified that it has changed.
(WebKit::PDFPlugin::snapshot): Create snapshots with the device scale factor applied.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Many things crash when switching to V8's new aligned pointer API
https://bugs.webkit.org/show_bug.cgi?id=101994

Reviewed by Eric Seidel.

When using the aligned pointer API, we need to make sure to initialize
every internal field that we later read because the new API has better
error checks than the old API. This patch explicitly initializes the
enteredIsolatedWorldIndex internal field to zero for main worlds,
fixing the LayoutTest crashes from our previous attempt to move the
aligned pointer API.

* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initializeIfNeeded):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Added more Hi-DPI wont-fixes.

* platform/chromium/TestExpectations: Added wont-fixes.

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