-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Remove non-standard legacy drawImageFromRect
(CanvasDrawImage)
#38135
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
base: main
Are you sure you want to change the base?
Remove non-standard legacy drawImageFromRect
(CanvasDrawImage)
#38135
Conversation
EWS run on previous version of this PR (hash 90a58f3) |
90a58f3
to
3edfe49
Compare
EWS run on previous version of this PR (hash 3edfe49) |
You're leaving some references to it in WebInspectorUI on purpose? |
Web Inspector supports inspecting back to iOS 13, so unless this was not possible to use back then it's best to keep the code in Web Inspector until there's no supported versions of iOS that have this feature |
If anybody was Inspecting anybody using the feature, it'd be illogical to remove it in here? |
I didn't remove it from |
3edfe49
to
f79203e
Compare
EWS run on previous version of this PR (hash f79203e) |
well @kkinnunen-apple has a point. if we know for sure that this isn't used by webpages then i think it's probably fine to remove from Web Inspector as well since there's not really a need to debug it (since it's not used by webpages) |
f79203e
to
4713ef8
Compare
EWS run on previous version of this PR (hash 4713ef8) |
@dcrousso - Updated and removed references from WebInspector as well (all which I could find). @kkinnunen-apple - FYI |
https://bugs.webkit.org/show_bug.cgi?id=284878 rdar://141681635 Reviewed by NOBODY (OOPS!). This patch is to align WebKit with Gecko / Firefox and Blink / Chromium. We have our current implementation based on standards (drawImage) so this patch aims to get rid of legacy non-standard `drawImageFromRect`. Blink removed this as well in 2014 in below commit: Commit: chromium/chromium@ce07cef From MDN data, Safari / WebKit has supported standard alternatives since Safari 2, so this is about time to try to get rid of non-standard legacy `drawImageFromRect`. * Source/WebCore/html/canvas/CanvasRenderingContext2D.idl: * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImageFromRect): Deleted. * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h: * Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js: * Source/WebInspectorUI/UserInterface/Models/RecordingAction.js: (WI.RecordingAction.prototype.getImageParameters): * Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._classNameForAction): * LayoutTests/fast/canvas/canvas-overloads-drawImageFromRect-expected.txt: Removed. * LayoutTests/fast/canvas/canvas-overloads-drawImageFromRect.html: Removed. * LayoutTests/fast/canvas/drawImageFromRect_withToDataURLAsSource-expected.txt: Removed. * LayoutTests/fast/canvas/drawImageFromRect_withToDataURLAsSource.html: Removed. * LayoutTests/fast/canvas/image-object-in-canvas-expected.txt: * LayoutTests/fast/canvas/image-object-in-canvas.html: * LayoutTests/inspector/canvas/recording-2d-full-expected.txt:
4713ef8
to
31137a0
Compare
EWS run on current version of this PR (hash 31137a0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with a request to git grep one more time and remove all references if removing them makes sense.
@@ -305,19 +305,6 @@ frames: | |||
3: (anonymous function) | |||
4: executeFrameFunction | |||
15: (duration) | |||
0: drawImageFromRect([object HTMLImageElement], 1, 2, 3, 4, 5, 6, 7, 8, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you need to remove the calls in recording-2d.js ?
31137a0
31137a0