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
Adjust cursor animator properties #12705
Adjust cursor animator properties #12705
Conversation
EWS run on previous version of this PR (hash 6792f39) |
6792f39
to
f12168a
Compare
EWS run on previous version of this PR (hash f12168a) |
f12168a
to
cdd54a9
Compare
EWS run on previous version of this PR (hash cdd54a9) |
cdd54a9
to
b123980
Compare
EWS run on previous version of this PR (hash b123980) |
Alternate | ||
}; | ||
|
||
enum class CaretAnimatorStopReason : uint8_t { | ||
Default, | ||
CaretRectChanged, | ||
}; |
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.
Slightly strange to see this before the forward declarations. Would you mind moving these enums below line 50?
{ | ||
if (!m_isActive) |
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.
Should probably move this into the implementation file.
@@ -91,7 +96,9 @@ class CaretAnimator { | |||
PresentationProperties presentationProperties() const { return m_presentationProperties; } | |||
virtual void paint(const Node&, GraphicsContext&, const FloatRect&, const Color&, const LayoutPoint&) const; | |||
virtual LayoutRect repaintCaretRectForLocalRect(LayoutRect) const; | |||
#if defined(__has_include) && __has_include(<WebKitAdditions/RenderBlockAdditions.h>) |
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.
Probably want a FIXME
+ bug, so we can remember to remove this #if
?
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.
Good idea, I added a FIXME with a bug
b123980
to
5536906
Compare
EWS run on current version of this PR (hash 5536906) |
5536906
to
98107fc
Compare
https://bugs.webkit.org/show_bug.cgi?id=255399 <radar://107662722> Reviewed by Aditya Keerthi. This patch allows suspending the blink state of the cursor from the UI process, moves logic from an static internal function to a virtual function, and corrects an issue where the caret does not start animating after a transition. This also removes CaretAnimator::addLine which is no longer used. * Source/WebCore/editing/FrameSelection.cpp: (WebCore::CaretBase::paintCaret const): (WebCore::FrameSelection::caretAnimatorInvalidated): Ensure animator starts animating after a caret transition. (WebCore::FrameSelection::updateAppearance): With CaretAnimator's stop function virtual, send the reason for why the stop was issued. * Source/WebCore/platform/CaretAnimator.cpp: (WebCore::CaretAnimator::adjustedClipRect const): Allow specific animator's to override the clip rectangle. * Source/WebCore/platform/CaretAnimator.h: (WebCore::CaretAnimator::stop): Allow for a reason to be used in determining stop behavior. (WebCore::CaretAnimator::addLine const): Deleted. This is no longer needed. * Source/WebCore/rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): (WebCore::RenderBlock::paintObject): Revert previously added changes. (WebCore::renderCaretInsideContentsClip): Deleted. This is no longer used, instead CaretAnimator has a virtual member function to control the clip rectangle. * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setCaretBlinkingSuspended): * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setCaretBlinkingSuspended): * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/WebPage.messages.in: Allow blink to be suspended from the UI process. Canonical link: https://commits.webkit.org/263083@main
98107fc
to
cebe6cd
Compare
Committed 263083@main (cebe6cd): https://commits.webkit.org/263083@main Reviewed commits have been landed. Closing PR #12705 and removing active labels. |
cebe6cd
5536906
π§ͺ api-macπ§ͺ gtk-wk2π§ͺ mac-wk2