Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images fail to load periodically on ikea.com #6595

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

stwrt
Copy link
Member

@stwrt stwrt commented Nov 17, 2022

5e60d4e

Images fail to load periodically on ikea.com
https://bugs.webkit.org/show_bug.cgi?id=248048
rdar://101657305

Reviewed by Chris Dumez.

Adding a quirk to address images showing up as grey boxes on ikea.com.
Disabling lazy image loading addresses an issue that was found
in gatsby. This issue has been addressed in a future version of gatsby.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::lazyImageLoadingEnabled const):
* Source/WebCore/dom/Document.h:
* Source/WebCore/html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* Source/WebCore/loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::shouldExposeShowModalDialog const):
(WebCore::Quirks::shouldDisableLazyImageLoading const):
* Source/WebCore/page/Quirks.h:

Canonical link: https://commits.webkit.org/256854@main

3272fbb

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe   πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios   πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim   πŸ§ͺ mac-wk2
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@stwrt stwrt self-assigned this Nov 17, 2022
@stwrt stwrt added the WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit). label Nov 17, 2022
@stwrt stwrt requested a review from shallawa November 17, 2022 18:46
Copy link
Contributor

@cdumez cdumez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned on Slack that this patch wasn't working yet so maybe this PR should be marked as Draft?

Source/WebCore/dom/Document.cpp Outdated Show resolved Hide resolved
@@ -1568,11 +1569,36 @@ bool Quirks::shouldExposeShowModalDialog() const
{
if (!needsQuirks())
return false;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary change. This wasn't resolved.

Source/WebCore/page/Quirks.cpp Outdated Show resolved Hide resolved
Source/WebCore/page/Quirks.cpp Outdated Show resolved Hide resolved
Source/WebCore/page/Quirks.h Outdated Show resolved Hide resolved
@cdumez
Copy link
Contributor

cdumez commented Nov 17, 2022

Images fail to load periodically on ikea.com
https://bugs.webkit.org/show_bug.cgi?id=248048

Please put radar number here too.

@stwrt
Copy link
Member Author

stwrt commented Nov 17, 2022

Images fail to load periodically on ikea.com
https://bugs.webkit.org/show_bug.cgi?id=248048

Please put radar number here too.

πŸ‘

@stwrt stwrt requested a review from cdumez November 17, 2022 21:35
Source/WebCore/dom/Document.cpp Outdated Show resolved Hide resolved
Source/WebCore/page/Quirks.cpp Outdated Show resolved Hide resolved
@@ -1568,11 +1569,36 @@ bool Quirks::shouldExposeShowModalDialog() const
{
if (!needsQuirks())
return false;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary change. This wasn't resolved.

Source/WebCore/page/Quirks.cpp Outdated Show resolved Hide resolved
Source/WebCore/page/Quirks.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@cdumez cdumez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is evidence this is a recent WebKit regression. Quirks are to work around a site bug, not a WebKit bug. So why are we doing a quirk?

Also, it seems lazy image loading got enabled before the regression point?

@webkit-early-warning-system
Copy link
Collaborator

Starting EWS tests for a2f09c9. Live statuses available at the PR page, #6595

Copy link
Contributor

@cdumez cdumez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM since Brandon tells me this is not a WebKit regression (The radar probably needs updating to clarify that).

Comment on lines 1525 to +1527

bool Quirks::shouldDisableLazyImageLoadingQuirk() const
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a local branch of mine, I have started to add comments for the quirks, because after a while it becomes very hard to understand where it comes from.

It probably be a good first step to refactor latter with messages in the console.

My format so far has been:

Suggested change
bool Quirks::shouldDisableLazyImageLoadingQuirk() const
{
// ikea.com https://bugs.webkit.org/show_bug.cgi?id=248048
bool Quirks::shouldDisableLazyImageLoadingQuirk() const
{

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning to add a link to the current Ikea discussion.

For the quirks I think I would like a bit more information then just a link to a bugzilla. Having information on the background of why this quirk exists, and information on how to eventually remove it would be nice too. @karlcow thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More would be better. We could come up with a kind of format where we could normalize step by step the other quirks too, but just start with this one.
Something that can be easily parsed.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 18, 2022
@stwrt stwrt removed the merging-blocked Applied to prevent a change from being merged label Nov 18, 2022
@stwrt stwrt added the merge-queue Applied to send a pull request to merge-queue label Nov 18, 2022
https://bugs.webkit.org/show_bug.cgi?id=248048
rdar://101657305

Reviewed by Chris Dumez.

Adding a quirk to address images showing up as grey boxes on ikea.com.
Disabling lazy image loading addresses an issue that was found
in gatsby. This issue has been addressed in a future version of gatsby.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::lazyImageLoadingEnabled const):
* Source/WebCore/dom/Document.h:
* Source/WebCore/html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* Source/WebCore/loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::shouldExposeShowModalDialog const):
(WebCore::Quirks::shouldDisableLazyImageLoading const):
* Source/WebCore/page/Quirks.h:

Canonical link: https://commits.webkit.org/256854@main
@webkit-commit-queue
Copy link
Collaborator

Committed 256854@main (5e60d4e): https://commits.webkit.org/256854@main

Reviewed commits have been landed. Closing PR #6595 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 5e60d4e into WebKit:main Nov 18, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 18, 2022
@stwrt stwrt deleted the eng/ikea_quirk branch November 30, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
Projects
None yet
7 participants