Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject
https://bugs.webkit.org/show_bug.cgi?id=83343

Reviewed by Eric Seidel.

Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and
RenderEmbeddedObject in preparation for turing on subpixel support.

No new tests, no change in functionality.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::baselinePosition):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::nodeAtPoint):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build warning on const long long to int implicit conversion.

* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: ObjectStore/Index shouldn't hold reference to backing store
https://bugs.webkit.org/show_bug.cgi?id=83074

Source/WebCore:

We should be able to collect and close the leveldb backing store as soon as the database
connection is closed, but the IDBObjectStoreBackendImpl and IDBIndexBackendImpl were
holding RefPtrs, and those objects are kept alive by script references.

Replaced RefPtrs to the IDBBackingStore with pointers to the IDBDatabase. On the back end,
IDBDatabaseBackendImpl maintains a RefPtr to the IDBObjectStoreBackendImpl object, so
a raw pointer back is safe. On the front end, the IDBObjectStore maintains a RefPtr to
the IDBDatabase so script can navigate upwards. Ditto on both ends for the ObjectStore/Index
relationship. The frontend objects maintain RefPtrs to the backend objects, so the backend
objects and their owners are maintained as long as there's a script reference.

Also made IDBDatabaseBackendImpl handle a null IDBFactoryBackendImpl pointer, for testing.

Reviewed by Tony Chang.

Tests: webkit_unit_tests --gtest_filter="IDBDatabaseBackendTest.*"

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
(WebCore::IDBDatabaseBackendImpl::loadObjectStores):
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
(WebCore::IDBIndexBackendImpl::openCursorInternal):
(WebCore::IDBIndexBackendImpl::countInternal):
(WebCore::IDBIndexBackendImpl::getInternal):
(WebCore::IDBIndexBackendImpl::addingKeyAllowed):
* Modules/indexeddb/IDBIndexBackendImpl.h:
(WebCore::IDBIndexBackendImpl::create):
(IDBIndexBackendImpl):
(WebCore::IDBIndexBackendImpl::backingStore):
(WebCore::IDBIndexBackendImpl::databaseId):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
(WebCore::IDBObjectStoreBackendImpl::getInternal):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteInternal):
(WebCore::IDBObjectStoreBackendImpl::clearInternal):
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
(WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
(WebCore::IDBObjectStoreBackendImpl::countInternal):
(WebCore::IDBObjectStoreBackendImpl::loadIndexes):
(WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(WebCore::IDBObjectStoreBackendImpl::create):
(IDBObjectStoreBackendImpl):
(WebCore::IDBObjectStoreBackendImpl::backingStore):
(WebCore::IDBObjectStoreBackendImpl::databaseId):

Source/WebKit/chromium:

Reviewed by Tony Chang.

* WebKit.gypi:
* tests/IDBDatabaseBackendTest.cpp: Added.
(WebCore):
(MockIDBBackingStore):
(WebCore::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unskip some tests that appear to be passing on GTK+ and add a
new baseline to deal with whitespace issues.

* platform/gtk/Skipped: Unskip some tests passing locally.
* platform/gtk/plugins/document-open-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Layout Test svg/custom/oversized-pattern-scale.svg and svg/custom/transformed-pattern-clamp-svg-root.svg are flaky
https://bugs.webkit.org/show_bug.cgi?id=68982

Unreviewed Chromium expectations update.

These tests now passing without issue.

* platform/chromium-linux/svg/custom/oversized-pattern-scale-expected.png: Removed.
* platform/chromium-mac/svg/custom/oversized-pattern-scale-expected.png: Added.
* platform/chromium-mac/svg/custom/transformed-pattern-clamp-svg-root-expected.png:
* platform/chromium-win/svg/custom/oversized-pattern-scale-expected.png:
* platform/chromium-win/svg/custom/transformed-pattern-clamp-svg-root-expected.png:
* platform/chromium/svg/custom/oversized-pattern-scale-expected.png: Removed.
* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline tests for wk62974
https://bugs.webkit.org/show_bug.cgi?id=62974

Unreviewed test expectations update for Chromium.

Patch by Philip Rogers <pdr@google.com> on 2012-04-06

* platform/chromium-linux/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.png:
* platform/chromium-linux/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.txt: Added.
* platform/chromium-linux/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png:
* platform/chromium-linux/svg/text/text-altglyph-01-b-expected.png:
* platform/chromium-linux/svg/text/text-text-04-t-expected.png:
* platform/chromium-linux/svg/text/text-text-06-t-expected.png:
* platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.png:
* platform/chromium-mac-leopard/svg/text/text-altglyph-01-b-expected.png: Added.
* platform/chromium-mac-leopard/svg/text/text-text-04-t-expected.png: Added.
* platform/chromium-mac-leopard/svg/text/text-text-06-t-expected.png: Added.
* platform/chromium-mac-leopard/svg/wicd/test-rightsizing-b-expected.png: Added.
* platform/chromium-mac-snowleopard/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.txt: Added.
* platform/chromium-mac-snowleopard/svg/wicd/test-rightsizing-b-expected.png: Added.
* platform/chromium-mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png: Added.
* platform/chromium-mac/svg/text/text-altglyph-01-b-expected.png: Added.
* platform/chromium-mac/svg/text/text-text-04-t-expected.png: Added.
* platform/chromium-mac/svg/text/text-text-06-t-expected.png: Added.
* platform/chromium-mac/svg/wicd/test-rightsizing-b-expected.png: Added.
* platform/chromium-win-vista/svg/wicd: Removed.
* platform/chromium-win-vista/svg/wicd/test-rightsizing-b-expected.png: Removed.
* platform/chromium-win-xp/svg/wicd: Added.
* platform/chromium-win-xp/svg/wicd/test-rightsizing-b-expected.png: Added.
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.txt:
* platform/chromium-win/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png:
* platform/chromium-win/svg/text/text-altglyph-01-b-expected.png:
* platform/chromium-win/svg/text/text-text-04-t-expected.png:
* platform/chromium-win/svg/text/text-text-06-t-expected.png:
* platform/chromium-win/svg/wicd/test-rightsizing-b-expected.png:
* platform/chromium-win/svg/wicd/test-rightsizing-b-expected.txt:
* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline after r109097
https://bugs.webkit.org/show_bug.cgi?id=79568

Unreviewed update of test expectations.

Patch by Philip Rogers <pdr@google.com> on 2012-04-06

* platform/chromium-linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
* platform/chromium-linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.txt: Removed.
* platform/chromium-mac-leopard/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
* platform/chromium-mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png: Added.
* platform/chromium-win/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/filters-morph-01-f-expected.txt:
* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline after Skia 2527 landed
https://bugs.webkit.org/show_bug.cgi?id=83375

Unreviewed update of Chromium test expectations.

Patch by Philip Rogers <pdr@google.com> on 2012-04-06

* platform/chromium-linux/svg/as-background-image/svg-as-background-5-expected.png:
* platform/chromium-linux/svg/filters/subRegion-one-effect-expected.png:
* platform/chromium-linux/svg/filters/subRegion-two-effects-expected.png:
* platform/chromium-mac-leopard/svg/as-background-image/svg-as-background-5-expected.png:
* platform/chromium-mac-snowleopard/svg/as-background-image/svg-as-background-5-expected.png:
* platform/chromium-mac/svg/as-background-image/svg-as-background-5-expected.png: Added.
* platform/chromium-mac/svg/filters/subRegion-one-effect-expected.png:
* platform/chromium-mac/svg/filters/subRegion-two-effects-expected.png:
* platform/chromium-win/svg/as-background-image/svg-as-background-5-expected.png:
* platform/chromium-win/svg/filters/subRegion-one-effect-expected.png:
* platform/chromium-win/svg/filters/subRegion-two-effects-expected.png:
* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 layout tests known to fail on Mac10.6 with CPU-Skia graphics
https://bugs.webkit.org/show_bug.cgi?id=68436

Unreviewed Chromium test expectations update.

One of the files marked in this bug is a minor rebaselining. Done.

* platform/chromium-mac-leopard/svg/W3C-SVG-1.1/paths-data-12-t-expected.png: Removed.
* platform/chromium-mac-leopard/svg/W3C-SVG-1.1/paths-data-12-t-expected.txt: Removed.
* platform/chromium-mac-snowleopard/svg/W3C-SVG-1.1/paths-data-12-t-expected.png: Removed.
* platform/chromium-mac-snowleopard/svg/W3C-SVG-1.1/paths-data-12-t-expected.txt: Removed.
* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r113267.
http://trac.webkit.org/changeset/113267
https://bugs.webkit.org/show_bug.cgi?id=83384

causes dhtml perf regression (Requested by simonjam on
#webkit).

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

Source/WebCore:

* dom/ChildListMutationScope.cpp:
(ChildListMutationScope::MutationAccumulator):
(WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder):
(WebCore::ChildListMutationScope::MutationAccumulator::childAdded):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded):
* dom/ChildListMutationScope.h:
(WebCore::ChildListMutationScope::childAdded):
(MutationAccumulationRouter):
* dom/ContainerNode.cpp:
(WebCore):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::appendChild):
(WebCore::dispatchChildInsertionEvents):
(WebCore::updateTreeAfterInsertion):

LayoutTests:

* fast/events/domnodeinserted-entire-fragment-expected.txt: Removed.
* fast/events/domnodeinserted-entire-fragment.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
context-lost.html is failing
https://bugs.webkit.org/show_bug.cgi?id=81325

Reviewed by James Robinson.

Ensure that the DrawingBuffer does not attempt to restore the
TEXTURE_2D binding to an already-deleted texture.

Tested with layout test fast/canvas/webgl/context-lost.html as
well as WebGL conformance tests.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::loseContextImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Font-related tests are flaky on Chromium (sometimes glyphs don't draw)
https://bugs.webkit.org/show_bug.cgi?id=66908

Unreviewed chromium test expectations update.

* platform/chromium-mac-snowleopard/svg/custom/svg-fonts-fallback-expected.png: Removed.
* platform/chromium-mac/platform/chromium/virtual/gpu/canvas/philip/tests/2d.text.draw.fontface.notinpage-expected.txt:
* platform/chromium-mac/svg/custom/svg-fonts-fallback-expected.png: Added.
* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Rebaseline svg/clip-path/deep-nested-clip-in-mask* expectations
https://bugs.webkit.org/show_bug.cgi?id=83368

Unreviewed Chromium expectations rebaseline.

Patch by Florin Malita <fmalita@google.com> on 2012-04-06

* platform/chromium-mac-leopard/svg/clip-path/clip-path-pixelation-expected.png:
* platform/chromium-mac-leopard/svg/clip-path/deep-nested-clip-in-mask-expected.png:
* platform/chromium-mac-leopard/svg/clip-path/deep-nested-clip-in-mask-panning-expected.png:
* platform/chromium-mac-snowleopard/svg/clip-path/clip-in-mask-expected.png: Removed.
* platform/chromium-mac-snowleopard/svg/clip-path/clip-path-pixelation-expected.png: Added.
* platform/chromium-mac-snowleopard/svg/clip-path/deep-nested-clip-in-mask-expected.png:
* platform/chromium-mac-snowleopard/svg/clip-path/deep-nested-clip-in-mask-panning-expected.png:
* platform/chromium-mac-snowleopard/svg/clip-path/nested-clip-in-mask-image-based-clipping-expected.png: Removed.
* platform/chromium-mac-snowleopard/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png: Removed.
* platform/chromium-mac-snowleopard/svg/clip-path/nested-clip-in-mask-path-based-clipping-expected.png: Removed.
* platform/chromium-mac/svg/clip-path/clip-in-mask-expected.png: Added.
* platform/chromium-mac/svg/clip-path/clip-path-pixelation-expected.png:
* platform/chromium-mac/svg/clip-path/deep-nested-clip-in-mask-expected.png: Added.
* platform/chromium-mac/svg/clip-path/deep-nested-clip-in-mask-panning-expected.png: Added.
* platform/chromium-mac/svg/clip-path/nested-clip-in-mask-image-based-clipping-expected.png: Added.
* platform/chromium-mac/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png: Added.
* platform/chromium-mac/svg/clip-path/nested-clip-in-mask-path-based-clipping-expected.png: Added.
* platform/chromium-win/svg/clip-path/clip-in-mask-expected.png: Added.
* platform/chromium-win/svg/clip-path/deep-nested-clip-in-mask-expected.png: Added.
* platform/chromium-win/svg/clip-path/deep-nested-clip-in-mask-expected.txt: Renamed from LayoutTests/platform/chromium-linux/svg/clip-path/deep-nested-clip-in-mask-expected.txt.
* platform/chromium-win/svg/clip-path/deep-nested-clip-in-mask-panning-expected.png: Added.
* platform/chromium-win/svg/clip-path/deep-nested-clip-in-mask-panning-expected.txt: Renamed from LayoutTests/platform/chromium-linux/svg/clip-path/deep-nested-clip-in-mask-panning-expected.txt.
* platform/chromium-win/svg/clip-path/nested-clip-in-mask-image-based-clipping-expected.png: Added.
* platform/chromium-win/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.png: Added.
* platform/chromium-win/svg/clip-path/nested-clip-in-mask-path-based-clipping-expected.png: Added.
* platform/chromium/test_expectations.txt:
* platform/mac/svg/clip-path/clip-in-mask-expected.txt: Removed.
* platform/mac/svg/clip-path/nested-clip-in-mask-image-based-clipping-expected.txt: Removed.
* platform/mac/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.txt: Removed.
* platform/mac/svg/clip-path/nested-clip-in-mask-path-based-clipping-expected.txt: Removed.
* platform/qt/svg/clip-path/clip-in-mask-expected.txt: Removed.
* platform/qt/svg/clip-path/nested-clip-in-mask-image-based-clipping-expected.txt: Removed.
* platform/qt/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.txt: Removed.
* platform/qt/svg/clip-path/nested-clip-in-mask-path-based-clipping-expected.txt: Removed.
* svg/clip-path/clip-in-mask-expected.txt: Renamed from LayoutTests/platform/gtk/svg/clip-path/clip-in-mask-expected.txt.
* svg/clip-path/nested-clip-in-mask-image-based-clipping-expected.txt: Renamed from LayoutTests/platform/gtk/svg/clip-path/nested-clip-in-mask-image-based-clipping-expected.txt.
* svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.txt: Renamed from LayoutTests/platform/gtk/svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping-expected.txt.
* svg/clip-path/nested-clip-in-mask-path-based-clipping-expected.txt: Renamed from LayoutTests/platform/gtk/svg/clip-path/nested-clip-in-mask-path-based-clipping-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle
https://bugs.webkit.org/show_bug.cgi?id=83376

Reviewed by Eric Seidel.

Source/WebCore:

Correcting LayoutUnit usage in QT RenderTheme code.

No new tests. No change in behavior.

* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::convertToPaintingRect): Rounding the ancestor offset before
applying it to the pixel snapped partRect.
(WebCore::RenderThemeQt::paintSearchFieldCancelButton): Also rounding the ancestor
offset, and also pixel snapping the content rect before painting.

Source/WebKit/qt:

Calculating the progress animation using the pixel-snapped RenderProgress size instead
of the internal sub-pixel version.

* WebCoreSupport/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::animationDurationForProgressBar):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Race condition in layout test logging from window and worker
https://bugs.webkit.org/show_bug.cgi?id=83378

The sequencing of logging directly from window vs. logging via posted events
from a worker is racy, making this test flake when run under Chromium. Removed
the sensitive logging on the window side; the test logic is unaffected as the
blocked/success event sequence would not be present if the window handler was
not run.

Reviewed by Tony Chang.

* storage/indexeddb/dont-commit-on-blocked-expected.txt:
* storage/indexeddb/dont-commit-on-blocked.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add autodetection of image orientation from EXIF information
https://bugs.webkit.org/show_bug.cgi?id=19688
<rdar://problem/4126979> and <rdar://problem/11091578>

Original patch by David Carson and Eric Seidel.

Reviewed by Simon Fraser.

Add support for respecting EXIF image orientation, enabled by default for ImageDocuments.
The setting shouldRespectImageOrientation causes orientation to take effect for any image included via <img>.

Test: fast/images/exif-orientation.html, fast/images/exif-orientation-css.html

File list truncated because it's very long.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update LayoutUnit usage in RenderView
https://bugs.webkit.org/show_bug.cgi?id=83147

Reviewed by Julien Chaffraix.

Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly
affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is
necessary as we continue to accumulate sub-pixel offsets up to this level.

No new tests. No change in behavior.

* rendering/RenderView.cpp:
(WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel
boundaries. We don't currently ever position RenderViews at sub-pixel offsets.
(WebCore::RenderView::shouldRepaint):
(WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme
that used decomposed offsets. Pixel snapping is applied before handing the rect up to the
FrameView.
(WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing
the rect up to the Compositor.
(WebCore::RenderView::computeRectForRepaint):
(WebCore::RenderView::selectionBounds):
(WebCore::RenderView::viewRect):
(WebCore::RenderView::unscaledDocumentRect):
* rendering/RenderView.h:
(RenderView):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium} Rebaseline some failing Leopard tests
https://bugs.webkit.org/show_bug.cgi?id=83387

Unreviewed chromium test expectations update.

* platform/chromium-mac-leopard/fast/text/atsui-multiple-renderers-expected.png: Added.
* platform/chromium-mac-leopard/fast/text/find-kana-expected.txt: Added.
* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Turn on vibration support for BlackBerry.

Reviewed by Rob Buis.

* Scripts/build-webkit:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=81939
-webkit-image-set should update dynamically when the device scale factor 
changes
-and corresponding-
<rdar://problem/11101108> 

Reviewed by Darin Adler.

Source/WebCore: 

New member variable to keep track of the scale factor.
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::CSSImageSetValue):
(WebCore::CSSImageSetValue::bestImageForScaleFactor):

 Merge the two cachedImageSet functions. There was no need for two functions here.
(WebCore::CSSImageSetValue::cachedImageSet):

cachedOrPendingImageSet() now takes a Document as a parameter so that it can 
access the deviceScaleFactor. If there is a cached image already and the 
Document's deviceScaleFactor doesn't match m_scaleFactor, then m_imageSet is set 
to a pending image so that the best fit image will be reassessed and then 
loaded.
(WebCore::CSSImageSetValue::cachedOrPendingImageSet):
* css/CSSImageSetValue.h:
(WebCore):
(CSSImageSetValue):

cachedOrPendingImageSet() now takes a Document.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):

StyleCachedImageSet should inherit from CachedImageClient just like 
StyleCachedImage. It should add and remove itself as a client upon creation 
and destruction, respectively.
* rendering/style/StyleCachedImageSet.cpp:
(WebCore::StyleCachedImageSet::StyleCachedImageSet):
(WebCore):
(WebCore::StyleCachedImageSet::~StyleCachedImageSet):
* rendering/style/StyleCachedImageSet.h:
(StyleCachedImageSet):

LayoutTests: 

* fast/hidpi/image-set-background-dynamic.html: Added.
* fast/hidpi/image-set-border-image-dynamic.html: Added.
* fast/hidpi/image-set-in-content-dynamic.html: Added.
* platform/mac/fast/hidpi/image-set-background-dynamic-expected.png: Added.
* platform/mac/fast/hidpi/image-set-background-dynamic-expected.txt: Added.
* platform/mac/fast/hidpi/image-set-border-image-dynamic-expected.png: Added.
* platform/mac/fast/hidpi/image-set-border-image-dynamic-expected.txt: Added.
* platform/mac/fast/hidpi/image-set-in-content-dynamic-expected.png: Added.
* platform/mac/fast/hidpi/image-set-in-content-dynamic-expected.txt: Added.



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