⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Nov 24, 2019:

5:29 PM Changeset in webkit [252844] by Jonathan Bedard
  • 2 edits in trunk/LayoutTests

[WebGL] Garden dedicated queue (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=204547

Unreviewed test gardening.

  • webgl/TestExpectations:
2:39 PM Changeset in webkit [252843] by ysuzuki@apple.com
  • 9 edits
    1 move
    5 deletes in trunk/Source/JavaScriptCore

[JSC] Introduce IsoHeapCellType
https://bugs.webkit.org/show_bug.cgi?id=204555

Reviewed by Mark Lam.

We introduce IsoHeapCellType<CellType>, which destroys cell based on CellType information, which should be in IsoSubspace.
By using this, we can avoid inheriting JSDestructibleObject. For each IsoSubspace, we know how to destroy cells if we use
IsoHeapCellType<CellType> without using methodTable. We start using it for, JSString, JSWeakMap, JSWeakSet, WebAssemblyFunction,
and JSWebAssemblyCodeBlock. And we use JSNonFinalObject for the base of JSWeakMap and JSWeakSet, which shrinks size of them
from 48 to 32.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • heap/IsoHeapCellType.h: Renamed from Source/JavaScriptCore/wasm/js/WebAssemblyFunctionHeapCellType.h.
  • runtime/JSString.cpp:

(JSC::JSString::destroy): Deleted.

  • runtime/JSString.h:

(JSC::JSString::destroy):

  • runtime/JSStringHeapCellType.cpp: Removed.
  • runtime/JSStringHeapCellType.h: Removed.
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • runtime/WeakMapImpl.h:
  • wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp: Removed.
  • wasm/js/JSWebAssemblyCodeBlockHeapCellType.h: Removed.
  • wasm/js/WebAssemblyFunctionHeapCellType.cpp: Removed.
12:18 PM Changeset in webkit [252842] by Jonathan Bedard
  • 2 edits in trunk/LayoutTests

[WebGL] Garden dedicated queue (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=204547

Unreviewed test gardening.

  • webgl/TestExpectations:
3:23 AM Changeset in webkit [252841] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebCore

Ensure SpeechSynthesis::cancel() correctly clears m_currentSpeechUtterance
https://bugs.webkit.org/show_bug.cgi?id=204429
<rdar://57072704>

Patch by Sunny He <sunny_he@apple.com> on 2019-11-24
Reviewed by Chris Fleizach.

Currently it is possible for the utterance that is in the process of
being spoken to be garbage collected. In this case, the pointer held
by SpeechSynthesis (m_currentSpeechUtterance) won't be properly
cleared on cancel(). This change ensures that cancel() nulls out the
current utterance and SpeechSynthesis takes a Ref for the utterance.

  • Modules/speech/SpeechSynthesis.cpp:

(WebCore::SpeechSynthesis::cancel):

  • Modules/speech/SpeechSynthesis.h:

Nov 23, 2019:

7:05 PM Changeset in webkit [252840] by wilander@apple.com
  • 46 edits
    4 adds in trunk

Resource Load Statistics: Allow multiple third-party cookie blocking settings
https://bugs.webkit.org/show_bug.cgi?id=204389
<rdar://problem/57344054>

Reviewed by Brent Fulgham.

Source/WebCore:

This change introduces an enum ThirdPartyCookieBlockingMode for how third-party
cookie blocking should be carried out. It then uses the set mode in
NetworkStorageSession::shouldBlockCookies().

The reason for supporting three different modes is that what is now named
OnlyAccordingToPerDomainPolicy is shipping, AllOnSitesWithoutUserInteraction is
in beta, and All is behind an experimental flag.

Tests: http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html

http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction.html

  • page/Settings.yaml:

Flipped the isThirdPartyCookieBlockingEnabled flag to on by default.

  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::shouldBlockCookies const):
(WebCore::NetworkStorageSession::setThirdPartyCookieBlockingMode):

  • platform/network/NetworkStorageSession.h:

(WebCore::NetworkStorageSession::setIsThirdPartyCookieBlockingEnabled): Deleted.

Source/WebKit:

This change make the third-party cookie blocking setting go from a boolean to
the new enum WebCore::ThirdPartyCookieBlockingMode with three different settings.
Functions and member variables are renamed accordingly.

The reason for supporting three different modes is that what is now named
OnlyAccordingToPerDomainPolicy is shipping, AllOnSitesWithoutUserInteraction is
in beta, and All is behind an experimental flag.

The change also updates the test API to map the TestRunner call to the enum.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction):

Now makes use of a completion handler and updates the cookie blocking state.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::areAllThirdPartyCookiesBlockedUnder):

New convenience function to check the cookie blocking status per first-party domain.

(WebKit::ResourceLoadStatisticsDatabaseStore::cookieAccess):

Restructured the code to make it very clear that the logic is the same as the
corresponding function in ResourceLoadStatisticsMemoryStore.
Can no longer be const since it calls areAllThirdPartyCookiesBlockedUnder() which
in turn calls hasHadUserInteraction() and that function may clear user interaction data.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUnexpiredRecentUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::cookieAccess const): Deleted.

See comment above on the non-const version of this function.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::areAllThirdPartyCookiesBlockedUnder):

New convenience function to check the cookie blocking status per first-party domain.

(WebKit::ResourceLoadStatisticsMemoryStore::cookieAccess):

Restructured the code to make it very clear that the logic is the same as the
corresponding function in ResourceLoadStatisticsDatabaseStore.
Can no longer be const since it calls areAllThirdPartyCookiesBlockedUnder() which
in turn calls hasHadUserInteraction() and that function may clear user interaction data.

(WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsMemoryStore::clearUserInteraction):

Now makes use of a completion handler and updates the cookie blocking state.

(WebKit::ResourceLoadStatisticsMemoryStore::cookieAccess const): Deleted.

See comment above on the non-const version of this function.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:

(WebKit::ResourceLoadStatisticsStore::setThirdPartyCookieBlockingMode):
(WebKit::ResourceLoadStatisticsStore::thirdPartyCookieBlockingMode const):
(WebKit::ResourceLoadStatisticsStore::setIsThirdPartyCookieBlockingEnabled): Deleted.
(WebKit::ResourceLoadStatisticsStore::isThirdPartyCookieBlockingEnabled const): Deleted.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::setThirdPartyCookieBlockingMode):
(WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):

Now forwards the completion handler.

(WebKit::WebResourceLoadStatisticsStore::setIsThirdPartyCookieBlockingEnabled): Deleted.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setShouldBlockThirdPartyCookiesForTesting):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:

The SetShouldBlockThirdPartyCookiesForTesting message now uses an enum instead of a
boolean.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setResourceLoadStatisticsEnabled):

Now forwards the enum value instead of a boolean.

(WebKit::NetworkSession::recreateResourceLoadStatisticStore):

Now makes sure the cookie blocking setting is forwarded to the recreated store.

(WebKit::NetworkSession::setThirdPartyCookieBlockingMode):
(WebKit::NetworkSession::setIsThirdPartyCookieBlockingEnabled): Deleted.

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

Support for the new enum.

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • Scripts/webkit/messages.py:

Tells the IPC code generator where to find WebCore::ThirdPartyCookieBlockingMode.

  • Shared/WebPreferences.yaml:

Flipped the IsThirdPartyCookieBlockingEnabled flag to on by default.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetResourceLoadStatisticsShouldBlockThirdPartyCookiesForTesting):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

Makes use of the enum in the NetworkSessionCreationParameters.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldBlockThirdPartyCookiesForTesting):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

This change allows the existing TestRunner function
setStatisticsShouldBlockThirdPartyCookies() to set an optional boolean
parameter onlyOnSitesWithoutUserInteraction to opt in to that behavior.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setStatisticsShouldBlockThirdPartyCookies):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

The added tests existed before and are not re-introduced to test their dedicated setting.

The changed tests have been expanded to cover the new code paths.

  • http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-expected.txt: Added.
  • http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction.html: Added.
  • http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-database-expected.txt:
  • http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-database.html:
  • http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-expected.txt:
  • http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking.html:
  • http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-database-expected.txt:
  • http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-database.html:
  • http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-expected.txt:
  • http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie.html:
7:03 PM Changeset in webkit [252839] by commit-queue@webkit.org
  • 36 edits
    2 adds in trunk

Unreviewed, rolling out r252805.
https://bugs.webkit.org/show_bug.cgi?id=204553

Caused test failures and ASan crashes (Requested by ap on
#webkit).

Reverted changeset:

"Cross-thread version StorageQuotaManager"
https://bugs.webkit.org/show_bug.cgi?id=203971
https://trac.webkit.org/changeset/252805

4:42 PM Changeset in webkit [252838] by Jonathan Bedard
  • 2 edits in trunk/LayoutTests

[WebGL] Garden dedicated queue (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=204547

Unreviewed test gardening.

  • webgl/TestExpectations:
3:39 PM Changeset in webkit [252837] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Replace redundant Line::isVisuallyEmpty() with LineBox::isConsideredEmpty()
https://bugs.webkit.org/show_bug.cgi?id=204551
<rdar://problem/57454620>

Reviewed by Antti Koivisto.

It turns out the we already cache the visually empty status in LineBox.

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::isEmpty const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::isInlineContainerConsideredEmpty): Deleted.
(WebCore::Layout::Line::isVisuallyEmpty const): Deleted.

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::isVisuallyEmpty const):
(WebCore::Layout::Line::hasContent const): Deleted.

  • layout/inlineformatting/InlineLineLayout.cpp:

(WebCore::Layout::LineLayout::placeInlineItem):
(WebCore::Layout::LineLayout::processUncommittedContent):

3:23 PM Changeset in webkit [252836] by Ross Kirsling
  • 4 edits
    1 add in trunk

[JSC] GetSubstitution is performed incorrectly via RegExp.prototype[@@replace]
https://bugs.webkit.org/show_bug.cgi?id=204490

Reviewed by Mark Lam.

JSTests:

  • stress/replace-indexed-backreferences.js: Added.
  • test262/expectations.yaml: Mark four test cases as passing.

Source/JavaScriptCore:

String.prototype.replace and RegExp.prototype[Symbol.replace] are meant to perform the same substitution
of $-backreferences (called GetSubstitution in the spec: https://tc39.es/ecma262/#sec-getsubstitution).

The implementation of this in StringPrototype.cpp is correct but the one in RegExpPrototype.js is not.
In particular, the latter *removes* backreferences with out-of-range indices, instead of leaving them as-is.

One thing that is *not* broken in either implementation and thus maintained here is the fact $10 is interpreted
as $1 followed by a 0 when we have 1 <= n < 10 captures (and analogously for other invalid $nn backreferences).
This behavior is consistent across all engines but currently described incorrectly in the spec; this patch thus
aligns with the spec PR currently open to correct this (https://github.com/tc39/ecma262/pull/1732).

  • builtins/RegExpPrototype.js:

(getSubstitution): Ensure that invalid backreferences remain untouched in the output string.
(replace): Fix off-by-one error when populating captures list. We shouldn't be reserving a slot for the full match.

1:36 PM Changeset in webkit [252835] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Defer run height/baseline adjustment computation until Line::close
https://bugs.webkit.org/show_bug.cgi?id=204550
<rdar://problem/57454497>

Reviewed by Antti Koivisto.

Currently we measure run height and adjust the line's baseline/height on every append.
We could do all that in Line::close after we've merged the neighboring runs.
([text][ ][content] vs. [text content])
This is about ~5% win on line-layout-simple.html

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::alignContentVertically):
(WebCore::Layout::Line::append):
(WebCore::Layout::Line::appendInlineContainerStart):
(WebCore::Layout::Line::appendInlineContainerEnd):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendLineBreak):
(WebCore::Layout::Line::adjustBaselineAndLineHeight):
(WebCore::Layout::Line::runContentHeight const):
(WebCore::Layout::Line::alignContentVertically const): Deleted.
(WebCore::Layout::Line::inlineItemContentHeight const): Deleted.

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::setLogicalHeight):

12:17 PM Changeset in webkit [252834] by pvollan@apple.com
  • 2 edits in trunk/Tools

Archive step is failing after r252827
https://bugs.webkit.org/show_bug.cgi?id=204548

Reviewed by Alexey Proskuryakov.

After https://trac.webkit.org/changeset/252827/webkit, the archive step is failing.

  • BuildSlaveSupport/built-product-archive:

(createZip):

8:58 AM Changeset in webkit [252833] by Jonathan Bedard
  • 2 edits in trunk/LayoutTests

[WebGL] Garden dedicated queue (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=204547

Unreviewed test gardening.

  • webgl/TestExpectations:
8:16 AM Changeset in webkit [252832] by Andres Gonzalez
  • 6 edits in trunk

Run LayoutTests/accessibility/mac/primary-screen-height.html on secondary accessibility thread.
https://bugs.webkit.org/show_bug.cgi?id=204391

Reviewed by Chris Fleizach.

Source/WebCore:

LayoutTests/accessibility/mac/primary-screen-height.html tests this
change when isolated tree is enabled.

Use ASSERT(!isMainThread()) instead of HIServices call to detect
whether not running in the secondary thread during LayoutTests.

  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:

(WebCore::AXIsolatedObject::children):
(WebCore::AXIsolatedObject::updateBackingStore):

Tools:

Added AccessibilityController::execute to execute any
AccessibilityUIElement call into AccessibilityObjectWrapper on the
secondary accessibility thread.

  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:

(WTR::AccessibilityController::rootElement): leftover from previous review.
(WTR::AccessibilityController::execute): added this to execute any AccessibilityUIElement method on the appropriate thread.

  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::getChildrenWithRange): Runs on secondary thread.
(WTR::AccessibilityUIElement::numberAttributeValue): Runs on secondary thread.

8:05 AM Changeset in webkit [252831] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WTF

Unreviewed. Try to fix the GTK WebDriver tests in the bots after r252770

They are failing in the bots because g_variant_new_from_data() is failing due to the given data not being
properly aligned for the type being loaded. This is not a problem since GLib 2.60 that checks the alignment and
reallocates the buffer in aligned memory only if needed. For previous versions we need to ensure the memory we
pass to g_variant_new_from_data() is aligned.

  • wtf/glib/SocketConnection.cpp:

(WTF::SocketConnection::readMessage):

7:34 AM Changeset in webkit [252830] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Some tests are failing on Win64
https://bugs.webkit.org/show_bug.cgi?id=204545

Unreviewed test gardening.

  • platform/win/TestExpectations:
5:33 AM Changeset in webkit [252829] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Remove unnecessary Line::hasContent() calls in LineLayout::placeInlineItem
https://bugs.webkit.org/show_bug.cgi?id=204540
<rdar://problem/57443500>

Reviewed by Antti Koivisto.

LineLayout::placeInlineItem is hot. This shaves off ~3% on line-layout-simple.html

  • layout/inlineformatting/InlineLineLayout.cpp:

(WebCore::Layout::LineLayout::placeInlineItem):

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
(WebCore::FrameViewLayoutContext::layout):

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::attachToRenderElementInternal):

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRendererStyle):

2:19 AM Changeset in webkit [252828] by Antti Koivisto
  • 14 edits
    4 adds in trunk

Media queries in img sizes attribute don't evaluate dynamically
https://bugs.webkit.org/show_bug.cgi?id=204521

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/images/sizes-dynamic-001.html

fast/images/sizes-dynamic-002.html

  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::evaluateForChanges const):

Add a helper function for evaluating dynamic results for changes.

  • css/MediaQueryEvaluator.h:

(WebCore::MediaQueryDynamicResults::isEmpty const):

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::SizesAttributeParser):
(WebCore::SizesAttributeParser::mediaConditionMatches):

Gather MediaQueryDynamicResults

  • css/parser/SizesAttributeParser.h:
  • dom/Document.cpp:

(WebCore::Document::updateElementsAffectedByMediaQueries):
(WebCore::Document::addDynamicMediaQueryDependentImage):
(WebCore::Document::removeDynamicMediaQueryDependentImage):

Replace viewport/appearance specific mechanism with a unified one (they were all invoked together anyway).
Make it about HTMLImageElement rather than HTMLPictureElement since that is the only client in this patch.

(WebCore::Document::checkViewportDependentPictures): Deleted.
(WebCore::Document::checkAppearanceDependentPictures): Deleted.
(WebCore::Document::addViewportDependentPicture): Deleted.
(WebCore::Document::removeViewportDependentPicture): Deleted.
(WebCore::Document::addAppearanceDependentPicture): Deleted.
(WebCore::Document::removeAppearanceDependentPicture): Deleted.

  • dom/Document.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::~HTMLImageElement):
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::evaluateDynamicMediaQueryDependencies):
(WebCore::HTMLImageElement::selectImageSource):

Gather MediaQueryDynamicResults from all paths.

(WebCore::HTMLImageElement::didMoveToNewDocument):

  • html/HTMLImageElement.h:
  • html/HTMLPictureElement.cpp:

(WebCore::HTMLPictureElement::~HTMLPictureElement):
(WebCore::HTMLPictureElement::didMoveToNewDocument):
(WebCore::HTMLPictureElement::viewportChangeAffectedPicture const): Deleted.
(WebCore::HTMLPictureElement::appearanceChangeAffectedPicture const): Deleted.

Move the media query dependency code to HTMLImageElement since thats where it is actually needed.

  • html/HTMLPictureElement.h:
  • rendering/RenderImage.cpp:

(WebCore::RenderImage::setImageDevicePixelRatio):

Update rendering also if only the pixel ratio changes.

  • rendering/RenderImage.h:

(WebCore::RenderImage::setImageDevicePixelRatio): Deleted.

LayoutTests:

  • fast/images/sizes-dynamic-001-expected.html: Added.
  • fast/images/sizes-dynamic-001.html: Added.
  • fast/images/sizes-dynamic-002-expected.html: Added.
  • fast/images/sizes-dynamic-002.html: Added.

Copied and modified from imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-dynamic-*
because we don't support reftest-wait (webkit.org/b/186045).

Note: See TracTimeline for information about the timeline view.