Timeline
Jul 18, 2021:
- 3:59 PM Changeset in webkit [280021] by
-
- 3 edits in trunk/Tools
Ignore weak external symbols in clang coverage builds using check-for-weak-vtables-and-externals
<https://webkit.org/b/228063>
<rdar://problem/80477138>
Reviewed by Alexey Proskuryakov.
- Scripts/check-for-weak-vtables-and-externals:
- Ignore weak symbols from llvm when building with coverage enabled. This fixes the build.
- coverage/coverage.xcconfig:
(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Remove.
- Can't use -unexported_symbol and -exported_symbol together, so remove this.
- 12:18 PM Changeset in webkit [280020] by
-
- 3 edits in trunk/Source/WebCore
Fix canvas overflow checking to use CheckedArithmatic rather than adhoc floating point mechanism
https://bugs.webkit.org/show_bug.cgi?id=228058
Reviewed by Dean Jackson.
We have CheckedArithmatic just for this case. Use it.
- html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::shouldAccelerate const):
(WebCore::HTMLCanvasElement::createImageBuffer const):
- html/HTMLCanvasElement.h:
- 8:41 AM Changeset in webkit [280019] by
-
- 12 edits in trunk/Source
[iOS] [AX] Keyboard text candidates don't update when changing selection using Switch Control
https://bugs.webkit.org/show_bug.cgi?id=228051
rdar://79944295
Reviewed by Tim Horton.
Source/WebCore:
See WebKit ChangeLog for more details.
- accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const):
Call the new EditorClient methods added below. Additionally, drive-by fix
setSelectedVisiblePositionRangeso
that it also performs a user-triggered selection change in the case where the range is not collapsed; this
matches the behavior ofsetSelectedTextRangeas well.
- page/EditorClient.h:
(WebCore::EditorClient::willChangeSelectionForAccessibility):
(WebCore::EditorClient::didChangeSelectionForAccessibility):
Add new EditorClient hooks,
(will|did)ChangeSelectionForAccessibility, that accessibility code can call before
and after it triggers a selection change; we use these two codepaths above when using the "Previous/Next
Character", "Previous/Next Word", and "Previous/Next Line" Switch Control menu actions.
Source/WebKit:
Add support for updating text candidates by calling into UIKeyboardImpl when changing the selection via
accessibility UI (e.g. when using Switch Control). To achieve this, we add a new EditorState flag that indicates
whether or not the EditorState change was triggered by accessibility; in WKContentView, we then consult this
flag and call-beginSelectionChange/-endSelectionChangein the case where the updated editor state change was
triggered by accessibility and we're also not already in the scope of another selection change or gesture-based
selection change.
Note that the latter part of the check is critical in order to avoid deadlocks in UIKeyboardTaskQueue; see
r246013, r246425 and r246665, which introduced and later reverted a similar mechanism for updating
UIKeyboardImpl, but after every selection change.
- Shared/EditorState.cpp:
(WebKit::EditorState::encode const):
(WebKit::EditorState::decode):
(WebKit::operator<<):
- Shared/EditorState.h:
Add the new boolean flag,
triggeredByAccessibilitySelectionChange.
- UIProcess/WebPageProxy.cpp:
- UIProcess/ios/WKContentViewInteraction.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView beginSelectionChange]):
(-[WKContentView endSelectionChange]):
Add a new
unsignedflag,_selectionChangeNestingLevel, that lets us know if we're expecting an eventual call
to-endSelectionChange. See-_selectionChangedbelow for more details. Note that we don't need to reset
_selectionChangeNestingLevelto 0 when cleaning up the interaction after web process termination, because
the completion handlers that contain all the balanced calls to-endSelectionChangeshould be invoked after
such an event anyways.
(-[WKContentView _selectionChanged]):
If the
triggeredByAccessibilitySelectionChangebit is set on the incoming (post layout data) EditorState and:
(1) UIKit isn't in the middle of handling a gesture that modifies the selection, and...
(2) We aren't expecting a call to-endSelectionChange.
...then we force UIKeyboardImpl to reload its UI (text suggestions, B/I/U state, etc.) using the incoming
EditorState. This allows accessibility-driven selection changes using Switch Control to behave like gesture-
based selection changes.
- WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::willChangeSelectionForAccessibility):
(WebKit::WebEditorClient::didChangeSelectionForAccessibility):
Implement a couple of client hooks in WebKit2 so that we set a boolean flag on WebPage,
m_isChangingSelectionForAccessibility, totrueover the scope of an AX-driven selection change. See related
AX changes in WebCore for more details.
- WebProcess/WebCoreSupport/WebEditorClient.h:
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::hasPendingEditorStateUpdate const):
Add a helper method so that we can conveniently check whether we have a pending editor state update to flush,
since the previous boolean flag is now a tri-state enum (m_pendingEditorStateUpdateStatus).
(WebKit::WebPage::editorState const):
(WebKit::WebPage::willCommitLayerTree):
(WebKit::WebPage::sendEditorStateUpdate):
(WebKit::WebPage::scheduleFullEditorStateUpdate):
If we're in the scope of an accessibility selection change, transition
m_pendingEditorStateUpdateStatusto
ScheduledDuringAccessibilitySelectionChange; otherwise, just useScheduled.
(WebKit::WebPage::flushPendingEditorStateUpdate):
Refactor
m_hasPendingEditorStateUpdateso that it now captures three states:
(1) We haven't scheduled an editor state update yet.
(2) We've scheduled an editor state update that was not triggered by accessibility.
(3) We've scheduled an editor state update that was triggered by accessibility.
The distinction between (2) and (3) allows us to populate EditorState's new
triggeredByAccessibilitySelectionChangeflag.
- WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::willChangeSelectionForAccessibility):
(WebKit::WebPage::didChangeSelectionForAccessibility):
Jul 17, 2021:
- 10:27 AM Changeset in webkit [280018] by
-
- 8 edits1 add in trunk/Source/WebCore
[LFC][IFC] Move InlineLevelBox class to its own file
https://bugs.webkit.org/show_bug.cgi?id=228045
Reviewed by Sam Weinig.
LineBox class has grown a lot since the subclass of InlineLevelBox has been introduced.
It is also in preparation for merging LineBox and LineBoxGeometry classes.
- WebCore.xcodeproj/project.pbxproj:
- layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForInlineBox const):
(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndAlignInlineLevelBoxesVertically):
(WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::SimplifiedVerticalAlignment):
(WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::canUseSimplifiedAlignment):
(WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::align):
(WebCore::Layout::LineBoxBuilder::SimplifiedVerticalAlignment::adjust):
(WebCore::Layout::InlineFormattingGeometry::inlineLevelBoxAffectsLineBox const):
- layout/formattingContexts/inline/InlineFormattingGeometry.h:
- layout/formattingContexts/inline/InlineFormattingQuirks.cpp:
(WebCore::Layout::InlineFormattingQuirks::inlineLevelBoxAffectsLineBox const):
- layout/formattingContexts/inline/InlineFormattingQuirks.h:
- layout/formattingContexts/inline/InlineLevelBox.h: Added.
(WebCore::Layout::InlineLevelBox::baseline const):
(WebCore::Layout::InlineLevelBox::descent const):
(WebCore::Layout::InlineLevelBox::LayoutBounds::height const):
(WebCore::Layout::InlineLevelBox::LayoutBounds::operator== const):
(WebCore::Layout::InlineLevelBox::layoutBounds const):
(WebCore::Layout::InlineLevelBox::hasContent const):
(WebCore::Layout::InlineLevelBox::verticalAlign const):
(WebCore::Layout::InlineLevelBox::layoutBox const):
(WebCore::Layout::InlineLevelBox::style const):
(WebCore::Layout::InlineLevelBox::isInlineBox const):
(WebCore::Layout::InlineLevelBox::isRootInlineBox const):
(WebCore::Layout::InlineLevelBox::isAtomicInlineLevelBox const):
(WebCore::Layout::InlineLevelBox::isLineBreakBox const):
(WebCore::Layout::InlineLevelBox::type const):
(WebCore::Layout::InlineLevelBox::logicalRect const):
(WebCore::Layout::InlineLevelBox::logicalTop const):
(WebCore::Layout::InlineLevelBox::logicalBottom const):
(WebCore::Layout::InlineLevelBox::logicalLeft const):
(WebCore::Layout::InlineLevelBox::logicalWidth const):
(WebCore::Layout::InlineLevelBox::logicalHeight const):
(WebCore::Layout::InlineLevelBox::setLogicalWidth):
(WebCore::Layout::InlineLevelBox::setLogicalHeight):
(WebCore::Layout::InlineLevelBox::setLogicalTop):
(WebCore::Layout::InlineLevelBox::setBaseline):
(WebCore::Layout::InlineLevelBox::setDescent):
(WebCore::Layout::InlineLevelBox::setLayoutBounds):
(WebCore::Layout::InlineLevelBox::InlineLevelBox):
(WebCore::Layout::m_type):
(WebCore::Layout::InlineLevelBox::setHasContent):
(WebCore::Layout::InlineLevelBox::hasLineBoxRelativeAlignment const):
(WebCore::Layout::InlineLevelBox::createAtomicInlineLevelBox):
(WebCore::Layout::InlineLevelBox::createInlineBox):
(WebCore::Layout::InlineLevelBox::createLineBreakBox):
(WebCore::Layout::InlineLevelBox::createGenericInlineLevelBox):
- layout/formattingContexts/inline/InlineLineBox.cpp:
(WebCore::Layout::LineBox::InlineLevelBox::InlineLevelBox): Deleted.
(WebCore::Layout::m_type): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setBaseline): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setDescent): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLayoutBounds): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLogicalTop): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLogicalHeight): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setHasContent): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::hasLineBoxRelativeAlignment const): Deleted.
- layout/formattingContexts/inline/InlineLineBox.h:
(WebCore::Layout::LineBox::InlineLevelBox::baseline const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::descent const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::LayoutBounds::height const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::LayoutBounds::operator== const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::layoutBounds const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::hasContent const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::verticalAlign const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::layoutBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::style const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::isInlineBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::isRootInlineBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::isAtomicInlineLevelBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::isLineBreakBox const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::type const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalRect const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalTop const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalBottom const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalLeft const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalWidth const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::logicalHeight const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLogicalWidth): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::createAtomicInlineLevelBox): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::createInlineBox): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::createLineBreakBox): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::createGenericInlineLevelBox): Deleted.