When animating mask-postion on a composited layer, element renders incorrectly
https://bugs.webkit.org/show_bug.cgi?id=103700

Reviewed by Tim Horton.

Source/WebCore:

When a composited layer has a mask, we clipped the layer bounds to the
size of the mask. This caused problems when animating the mask origin,
which is considered a 'repaint' style change and so should not require
layout or compositing geometry changes.

Fix by ignoring the mask when computing the bounds of the compositing
layer.

Test: compositing/masks/mask-layer-size.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::localBoundingBox):
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):

LayoutTests:

Test that dumps the layer tree for a composited layer with a mask.

* compositing/masks/mask-layer-size-expected.txt: Added.
* compositing/masks/mask-layer-size.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Qt/SH4 build slave to build.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=103384

Patch by Julien BRIANCEAU <jbrianceau@nds.com> on 2012-12-03
Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/config.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Skia] Deferred SkCanvas save()
https://bugs.webkit.org/show_bug.cgi?id=102272

Reviewed by Stephen White.

Implement a lazy save() strategy: instead of delegating to the canvas upfront, defer and
only commit when a clip/matrix mutation is observed.

The patch yields a 1-20% SkCanvas save/restore reduction for heavy pages, with much larger
gains observed for deeply nested SVG content.

No new tests: no behaviour changes, coverage provided by existing tests.

* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::canvasClip):
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore):
(WebCore::PlatformContextSkia::DeferredSaveState::DeferredSaveState):
(PlatformContextSkia::DeferredSaveState):
(WebCore::PlatformContextSkia::PlatformContextSkia):
(WebCore::PlatformContextSkia::save):
(WebCore::PlatformContextSkia::saveLayer):
(WebCore::PlatformContextSkia::beginLayerClippedToImage):
(WebCore::PlatformContextSkia::restore):
(WebCore::PlatformContextSkia::applyClipFromImage):
* platform/graphics/skia/PlatformContextSkia.h:
(PlatformContextSkia):
(WebCore::PlatformContextSkia::realizeSave):
(WebCore):
(WebCore::PlatformContextSkia::canvas):
(WebCore::PlatformContextSkia::clipPath):
(WebCore::PlatformContextSkia::clipRect):
(WebCore::PlatformContextSkia::setMatrix):
(WebCore::PlatformContextSkia::concat):
(WebCore::PlatformContextSkia::rotate):
(WebCore::PlatformContextSkia::scale):
(WebCore::PlatformContextSkia::translate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed speculative Windows buildfix.

Somehow it seems messing around with the export macros made some old issues resurface.

* Api/qwebsettings.cpp:
(qt_networkAccessAllowed):
* Api/qwebsettings.h:
* Api/qwebkitglobal.h: fix an obvious blunder from r136394.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: clean up exception propagation / handling for interrupts and early exits
https://bugs.webkit.org/show_bug.cgi?id=103830

Reviewed by Ojan Vafai.

The code for propagating early exits out of the test run was
convoluted and hard to follow. By adjusting the WorkerException to
derive from BaseException rather than Exception (which is a fair
way of representing an error that was really unexpected/unrecoverable
anyway) and pushing the TestRunInterruptedException into the
ResultSummary (which is also fair since it was more of a result
than an exception) this allows us to consolidate and clean up
a bunch of the try/catch logic and pass fewer state flags around.

There are no real functional changes to this patch; there's an
API change in that we stop exporting TestRunInterruptedException
and WorkerException out of the Manager, and the existence of the
MessagePool is now completely hidden.

* Scripts/webkitpy/common/message_pool.py:
(WorkerException):
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.run_tests):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(summarize_results):
(Manager.run):
* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ResultSummaryTest.summarized_results):
* Scripts/webkitpy/layout_tests/models/result_summary.py:
(ResultSummary.__init__):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(run):
(main):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.test_exception_raised.of):
(MainTest.test_exception_raised):
(MainTest.test_run_force):
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_print_unexpected_results.get_unexpected_results):
(Testprinter):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Resource Timing] Record and report initiator
https://bugs.webkit.org/show_bug.cgi?id=103777

Reviewed by Nate Chapin.

This will start populating the Resource Timing buffer with entries. The initiator will be
recorded for each CachedResourceLoader. This should match the next update of the spec.

Tests: http/tests/w3c/webperf/submission/resource-timing

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):
* loader/ResourceLoadNotifier.cpp: Always record timing information if ENABLE(RESOURCE_TIMING).
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::releaseResources): Report the actual resource that called loadDone().
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::loadResource): Record the initiator.
(WebCore::CachedResourceLoader::loadDone): Record the entry in Resource Timing.
* loader/cache/CachedResourceLoader.h:
(CachedResourceLoader):
(InitiatorInfo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-03  Xan Lopez  <xlopez@igalia.com>

        Unreviewed gardening.

        Update grid layout tests with proper expected results for cosmetic
        debug() changes I did in the previous patch.

        * fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
        * fast/css-grid-layout/resources/grid-columns-rows-get-set.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: autoinstaller is failing on windows
https://bugs.webkit.org/show_bug.cgi?id=103699

Reviewed by Tony Chang.

Attempt to fix the python autoinstaller to work for pylint on win32
again ... it turns out one of the dependent packages contains
a write-protected test file and windows will choke when it tries to move
it into place. Fortunately we can just delete the file prior to
installing it in the final location, but we have to jump through
a couple of hoops to do so.

Also, make sure that we're flattening nested module names like
"logilab/common" into either safe basenames (logilab_common) or
host-specific subdirs (logilab\common) as needed.

* Scripts/webkitpy/common/system/autoinstall.py:
(AutoInstaller._url_downloaded_path):
(AutoInstaller._install):
(AutoInstaller.install):
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pylint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Refactor the backingstore to swap full geometries.
https://bugs.webkit.org/show_bug.cgi?id=103924
RIM PR 253496

Reviewed by Yong Li.
Internally reviewed by Adam Treat and Arvid Nilsson.

The backingstore had a working split between front and
back state, but it was multilayered and hard to grasp.
This commit cleanly divides the responsibilities of
BackingStoreGeometry and TileBuffer, with the latter
now being able to function on its own without the help
of its geometry. The BackingStoreTile class was an
unnecessary middleman and can be removed wholesale.

A BackingStoreGeometry can now function with null tiles
being assigned to its indices, which enables us to reclaim
tile buffers outside of the visible contents area as back
buffers. This reduces the need to swap and block when the
backingstore size exceeds the contents size, and also lets
us use more tiles for initial rendering after a call to
resetTiles() which is now implemented as swapping in a
geometry with only null buffers.

setBackingStoreRect() was the only function that had to
get a change of behavior. Because we're now constructing
new BackingStoreGeometry objects every time the front
geometry is being exchanged for a new one, it is only
safe to call other functions reliant on the new geometry
after it has been finalized and put in place. Therefore,
updateTilesForScrollOrNotRenderedRegion() takes on the
render queue maintenance tasks that setBackingStoreRect()
had performed previously. It was already doing something
very similar so only few changes to the function were
necessary.

This commit will make subsequent changes to the
backingstore geometry and tile logic a lot easier.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStoreGeometry::isTileCorrespondingToBuffer):
(WebKit):
(BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
(BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate):
(BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
(BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
(BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
(BlackBerry::WebKit::BackingStorePrivate::clearRenderedRegion):
(BlackBerry::WebKit::BackingStorePrivate::isCurrentVisibleJob):
(BlackBerry::WebKit::BackingStorePrivate::render):
(BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToTileBuffer):
(BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
(BlackBerry::WebKit::BackingStorePrivate::compositeContents):
(BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
(BlackBerry::WebKit::BackingStorePrivate::tileVisibleContentsRect):
(BlackBerry::WebKit::BackingStorePrivate::resetTiles):
(BlackBerry::WebKit::BackingStorePrivate::updateTiles):
(BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
(BlackBerry::WebKit::BackingStorePrivate::mapFromTilesToTransformedContents):
(BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles):
(BlackBerry::WebKit::BackingStorePrivate::transformChanged):
(BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
(BlackBerry::WebKit::BackingStoreGeometry::originOfTile):
(BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState):
* Api/BackingStore_p.h:
(WebKit):
(BackingStoreGeometry):
(BlackBerry::WebKit::BackingStoreGeometry::tileBufferAt):
(BackingStorePrivate):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setLoadState):
(BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
* Api/WebPage_p.h:
(WebKit):
* WebKitSupport/BackingStoreTile.cpp:
(BlackBerry::WebKit::TileBuffer::TileBuffer):
(BlackBerry::WebKit::TileBuffer::~TileBuffer):
(BlackBerry::WebKit::TileBuffer::isRendered):
(BlackBerry::WebKit::TileBuffer::nativeBuffer):
(BlackBerry::WebKit::TileBuffer::wasNativeBufferCreated):
(BlackBerry::WebKit::TileBuffer::paintBackground):
* WebKitSupport/BackingStoreTile.h:
(BlackBerry::WebKit::TileBuffer::lastRenderOrigin):
(BlackBerry::WebKit::TileBuffer::setLastRenderOrigin):
(BlackBerry::WebKit::TileBuffer::lastRenderScale):
(BlackBerry::WebKit::TileBuffer::setLastRenderScale):
(TileBuffer):
(BlackBerry::WebKit::TileBuffer::backgroundPainted):
* WebKitSupport/SurfacePool.cpp:
(BlackBerry::WebKit::SurfacePool::SurfacePool):
(BlackBerry::WebKit::SurfacePool::size):
(WebKit):
(BlackBerry::WebKit::SurfacePool::initialize):
(BlackBerry::WebKit::SurfacePool::initializeVisibleTileBuffer):
(BlackBerry::WebKit::SurfacePool::hasBackBuffer):
(BlackBerry::WebKit::SurfacePool::takeBackBuffer):
(BlackBerry::WebKit::SurfacePool::addBackBuffer):
(BlackBerry::WebKit::SurfacePool::createBuffers):
(BlackBerry::WebKit::SurfacePool::releaseBuffers):
(BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
* WebKitSupport/SurfacePool.h:
(BlackBerry::WebKit::SurfacePool::isActive):
(BlackBerry::WebKit::SurfacePool::isEmpty):
(SurfacePool):
(BlackBerry::WebKit::SurfacePool::visibleTileBuffer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy's run_webkit_tests should initialize the printer earlier on
https://bugs.webkit.org/show_bug.cgi?id=103661

Reviewed by Eric Seidel.

Initialize the printer before computing the derived options
from the command line arguments, so that we can safely log from
port methods.

Also clean up a few miscellaneous lint warnings.

* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidPort.path_to_adb):
* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort.default_child_processes):
(MacPort.sample_process):
(MacPort.start_helper):
(MacPort.stop_helper):
(MacPort.nm_command):
* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(test_default_child_processes):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(run):
(_set_up_derived_options):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed build fix after r136410

When building without libjpeg, take JPEGImageDecoder's header out, since it now includes libjpeg.h.

* Target.pri: conditionally add JPEGImageDecoder.h to HEADERS
* platform/image-decoders/ImageDecoder.cpp: guard JPEGImageDecoder.h's include

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening on Apple Windows port.

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r136444.
http://trac.webkit.org/changeset/136444
https://bugs.webkit.org/show_bug.cgi?id=103938

broke chromium build (Requested by zhenyao_wfh on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-03

* Target.pri:
* platform/image-decoders/ImageDecoder.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Expose removeAttribute in WebElement
https://bugs.webkit.org/show_bug.cgi?id=103780

Reviewed by Darin Fisher.

* public/WebElement.h:
(WebElement):
* src/WebElement.cpp:
(WebKit::WebElement::removeAttribute):
(WebKit):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: make it possible to fliter out messages from console.{time,timeEnd}()
https://bugs.webkit.org/show_bug.cgi?id=103781

Reviewed by Yury Semikhatsky.

- make console messages produced by console.timeEnd() TimingMessageType & DebugMessageLevel;
- add console filter for Debug messages;

* inspector/ConsoleMessage.cpp:
(WebCore::messageTypeValue):
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::stopTiming):
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype.toMessageElement):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.):
(WebInspector.ConsoleView.prototype.filter):
* inspector/front-end/inspector.css:
(.console-warning-level, .console-error-level, .console-log-level, .console-debug-level):
(.filter-all .console-debug-level, .filter-debug .console-debug-level):
(.filter-all .console-debug-level.repeated-message, .filter-debug .console-debug-level.repeated-message):
* page/ConsoleTypes.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135271.
http://trac.webkit.org/changeset/135271
https://bugs.webkit.org/show_bug.cgi?id=103940

Some user stylesheet API clients broken (Requested by anttik
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-03

* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::collectRulesFromUserStyleSheets):
(WebCore::collectCSSOMWrappers):
* css/StyleResolver.h:
(StyleResolver):
* dom/Document.cpp:
(WebCore::Document::setCompatibilityMode):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::pageUserSheet):
(WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
(WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
(WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
(WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
* dom/DocumentStyleSheetCollection.h:
(DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
* page/Page.cpp:
(WebCore::Page::userStyleSheetLocationChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][Qt][WK2] Fixed position elements are not always fixed
https://bugs.webkit.org/show_bug.cgi?id=103452

Reviewed by Simon Fraser.

The code figuring out whether fixed position layers are inside
the visible viewport, assumes that the visible viewport is always
the size of the layout viewport. This assumption doesn't hold with
how the Qt and EFL tiled backing store and coordinated graphics
works, so instead using the visibleContentsRect(), which provides
the right values in all cases.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

    Use visibleContentsRect instead of scrollOffsetForFixedPosition().

    scrollOffsetForFixedPosition() is needed sometimes in the Mac code
    because visibleContentRect() will return negative offsets when you
    are in the rubber-band phase of a scroll on the Mac.

    However that is not an issue here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed build fix after r136410

When building without libjpeg, take JPEGImageDecoder's header out, since it now includes libjpeg.h.

* Target.pri: conditionally add JPEGImageDecoder.h to HEADERS
* platform/image-decoders/ImageDecoder.cpp: guard JPEGImageDecoder.h's include

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix Mac compilation after r136448.

* WebCoreSupport/WebChromeClient.mm:
(stringForMessageType):

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