Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 91dd963fc136bbac4182ed0331e3ac9114c25e76
https://github.com/WebKit/WebKit/commit/91dd963fc136bbac4182ed0331e3ac9114c25e76
Author: Chris Dumez <[email protected]>
Date: 2026-02-03 (Tue, 03 Feb 2026)
Changed paths:
M Source/JavaScriptCore/runtime/VM.h
M Source/WTF/wtf/Ref.h
M Source/WTF/wtf/RefPtr.h
M Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp
M Source/WebCore/accessibility/AXTextMarker.cpp
M Source/WebCore/dom/AbstractRange.cpp
M Source/WebCore/dom/AbstractRange.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/FragmentDirectiveGenerator.cpp
M Source/WebCore/dom/Position.cpp
M Source/WebCore/dom/Position.h
M Source/WebCore/dom/PositionIterator.h
M Source/WebCore/dom/ProcessingInstruction.cpp
M Source/WebCore/dom/ProcessingInstruction.h
M Source/WebCore/dom/Range.cpp
M Source/WebCore/dom/Range.h
M Source/WebCore/dom/RangeBoundaryPoint.h
M Source/WebCore/dom/ScriptElement.cpp
M Source/WebCore/dom/ScriptElement.h
M Source/WebCore/dom/ScriptExecutionContext.cpp
M Source/WebCore/dom/ScriptExecutionContext.h
M Source/WebCore/dom/ScriptExecutionContextInlines.h
M Source/WebCore/dom/SecurityContext.cpp
M Source/WebCore/dom/SecurityContext.h
M Source/WebCore/dom/ShadowRoot.cpp
M Source/WebCore/dom/ShadowRoot.h
M Source/WebCore/dom/SimpleRange.h
M Source/WebCore/dom/SlotAssignment.cpp
M Source/WebCore/dom/StyledElement.cpp
M Source/WebCore/dom/StyledElement.h
M Source/WebCore/dom/TreeScope.cpp
M Source/WebCore/dom/TreeScope.h
M Source/WebCore/editing/ApplyStyleCommand.cpp
M Source/WebCore/editing/CompositeEditCommand.cpp
M Source/WebCore/editing/DeleteSelectionCommand.cpp
M Source/WebCore/editing/Editing.cpp
M Source/WebCore/editing/EditingStyle.cpp
M Source/WebCore/editing/Editor.cpp
M Source/WebCore/editing/FrameSelection.cpp
M Source/WebCore/editing/IndentOutdentCommand.cpp
M Source/WebCore/editing/InsertListCommand.cpp
M Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp
M Source/WebCore/editing/ReplaceSelectionCommand.cpp
M Source/WebCore/editing/TextListParser.cpp
M Source/WebCore/editing/VisiblePosition.cpp
M Source/WebCore/editing/VisibleSelection.cpp
M Source/WebCore/editing/VisibleUnits.cpp
M Source/WebCore/editing/markup.cpp
M Source/WebCore/html/DOMURL.cpp
M Source/WebCore/page/EventHandler.cpp
M Source/WebCore/page/PageSerializer.cpp
M Source/WebCore/rendering/ReferencedSVGResources.cpp
M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
M Source/WebCore/rendering/RenderObject.cpp
M Source/WebCore/rendering/svg/legacy/SVGResources.cpp
M Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
M
Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm
M Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMRange.mm
M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
M Source/WebKit/WebProcess/WebPage/FindController.cpp
M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Log Message:
-----------
Drop more `protected*()` member functions in Source/WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=306848
Reviewed by Ryosuke Niwa.
Drop more `protected*()` member functions in Source/WebCore/dom by adopting
`protect()` at call sites.
Also make `protect()` work with JSC::VM. Although, JSC::VM doesn't have
ref() / deref() functions, it has the suitable RefPtr Traits for work
with Ref and RefPtr. This was needed to get rid of `protectedVM()` in
the dom/ folder.
* Source/JavaScriptCore/runtime/VM.h:
* Source/WTF/wtf/Ref.h:
* Source/WTF/wtf/RefPtr.h:
* Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::computeErrors const):
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::TextMarkerData::TextMarkerData):
* Source/WebCore/dom/AbstractRange.cpp:
(WebCore::AbstractRange::protectedStartContainer const): Deleted.
(WebCore::AbstractRange::protectedEndContainer const): Deleted.
* Source/WebCore/dom/AbstractRange.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::caretPositionFromPoint):
* Source/WebCore/dom/FragmentDirectiveGenerator.cpp:
(WebCore::beforeStartOfCurrentBlock):
(WebCore::afterEndOfCurrentBlock):
* Source/WebCore/dom/Position.cpp:
(WebCore::Position::atFirstEditingPositionForNode const):
(WebCore::Position::atLastEditingPositionForNode const):
(WebCore::Position::atStartOfTree const):
(WebCore::Position::atEndOfTree const):
(WebCore::Position::protectedContainerText const): Deleted.
* Source/WebCore/dom/Position.h:
(WebCore::Position::anchorNode const):
(WebCore::Position::deprecatedNode const):
(WebCore::Position::protectedContainerNode const): Deleted.
(WebCore::Position::protectedAnchorNode const): Deleted.
(WebCore::Position::protectedDeprecatedNode const): Deleted.
* Source/WebCore/dom/PositionIterator.h:
(WebCore::PositionIterator::node const):
(WebCore::PositionIterator::protectedNode const): Deleted.
* Source/WebCore/dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::protectedSheet const): Deleted.
* Source/WebCore/dom/ProcessingInstruction.h:
* Source/WebCore/dom/Range.cpp:
(WebCore::Range::Range):
(WebCore::Range::~Range):
(WebCore::Range::updateAssociatedSelection):
(WebCore::Range::updateAssociatedHighlight):
(WebCore::Range::updateDocument):
(WebCore::Range::processContents):
(WebCore::Range::cloneRange const):
(WebCore::Range::updateRangeForParentlessNodeMovedToNewDocument):
(WebCore::Range::expand):
(WebCore::makeSimpleRange):
(WebCore::Range::protectedOwnerDocument): Deleted.
(WebCore::Range::protectedStartContainer const): Deleted.
(WebCore::Range::protectedEndContainer const): Deleted.
* Source/WebCore/dom/Range.h:
* Source/WebCore/dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::protectedContainer const): Deleted.
* Source/WebCore/dom/ScriptElement.h:
(WebCore::ScriptElement::element const):
(WebCore::ScriptElement::loadableScript):
(WebCore::ScriptElement::protectedElement const): Deleted.
(WebCore::ScriptElement::protectedLoadableScript): Deleted.
* Source/WebCore/dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::protectedTopOrigin const): Deleted.
(WebCore::ScriptExecutionContext::protectedVM): Deleted.
(WebCore::ScriptExecutionContext::protectedPublicURLManager): Deleted.
(WebCore::ScriptExecutionContext::protectedNativePromiseDispatcher): Deleted.
(WebCore::ScriptExecutionContext::protectedSocketProvider): Deleted.
* Source/WebCore/dom/ScriptExecutionContext.h:
* Source/WebCore/dom/ScriptExecutionContextInlines.h:
(WebCore::ScriptExecutionContext::enqueueTaskWhenSettled):
* Source/WebCore/dom/SecurityContext.cpp:
(WebCore::SecurityContext::protectedSecurityOrigin const): Deleted.
* Source/WebCore/dom/SecurityContext.h:
* Source/WebCore/dom/ShadowRoot.h:
* Source/WebCore/dom/SimpleRange.h:
(WebCore::SimpleRange::startContainer const):
(WebCore::SimpleRange::endContainer const):
(WebCore::SimpleRange::protectedStartContainer const): Deleted.
(WebCore::SimpleRange::protectedEndContainer const): Deleted.
(WebCore::IntersectingNodeIterator::protectedNode const): Deleted.
* Source/WebCore/dom/SlotAssignment.cpp:
(WebCore::ManualSlotAssignment::addSlotElementByName):
* Source/WebCore/dom/StyledElement.cpp:
(WebCore::StyledElement::protectedInlineStyle const): Deleted.
* Source/WebCore/dom/StyledElement.h:
* Source/WebCore/dom/TreeScope.cpp:
(WebCore::TreeScope::elementFromPoint):
(WebCore::TreeScope::protectedDocumentScope const): Deleted.
* Source/WebCore/dom/TreeScope.h:
(WebCore::TreeScope::documentScope const):
* Source/WebCore/editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle):
(WebCore::ApplyStyleCommand::splitTextElementAtStart):
(WebCore::ApplyStyleCommand::splitTextElementAtEnd):
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
* Source/WebCore/editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
(WebCore::CompositeEditCommand::replaceCollapsibleWhitespaceWithNonBreakingSpaceIfNeeded):
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
(WebCore::CompositeEditCommand::moveParagraphWithClones):
(WebCore::CompositeEditCommand::moveParagraphs):
* Source/WebCore/editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
(WebCore::DeleteSelectionCommand::doApply):
* Source/WebCore/editing/Editing.cpp:
(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):
(WebCore::directionOfEnclosingBlock):
(WebCore::enclosingEmptyListItem):
* Source/WebCore/editing/EditingStyle.cpp:
(WebCore::EditingStyle::EditingStyle):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl):
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
(WebCore::EditingStyle::textDirectionForSelection):
* Source/WebCore/editing/Editor.cpp:
(WebCore::Editor::selectionStartHasMarkerFor const):
(WebCore::Editor::selectionStartSetMarkerForTesting):
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::removingNodeRemovesPosition):
(WebCore::FrameSelection::updateFromAssociatedLiveRange):
* Source/WebCore/editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::indentIntoBlockquote):
* Source/WebCore/editing/InsertListCommand.cpp:
(WebCore::adjacentEnclosingList):
* Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
* Source/WebCore/editing/ReplaceSelectionCommand.cpp:
(WebCore::positionAvoidingPrecedingNodes):
(WebCore::nodeToSplitToAvoidPastingIntoInlineNodesWithStyle):
(WebCore::ReplaceSelectionCommand::doApply):
* Source/WebCore/editing/TextListParser.cpp:
(WebCore::selectionAllowsSmartLists):
* Source/WebCore/editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore const):
(WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter const):
(WebCore::enclosingBlockFlowElement):
(WebCore::isFirstVisiblePositionInNode):
(WebCore::isLastVisiblePositionInNode):
(WebCore::areVisiblePositionsInSameTreeScope):
* Source/WebCore/editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::appendTrailingWhitespace):
(WebCore::VisibleSelection::adjustSelectionRespectingGranularity):
(WebCore::VisibleSelection::adjustPositionForEnd):
(WebCore::VisibleSelection::adjustPositionForStart):
(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
(WebCore::VisibleSelection::showTreeForThis const):
* Source/WebCore/editing/VisibleUnits.cpp:
(WebCore::startOfBlock):
(WebCore::endOfBlock):
(WebCore::inSameBlock):
(WebCore::startOfDocument):
(WebCore::endOfDocument):
* Source/WebCore/editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::serializeNodes):
* Source/WebCore/html/DOMURL.cpp:
(WebCore::DOMURL::createPublicURL):
(WebCore::DOMURL::revokeObjectURL):
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::updateSelectionForMouseDrag):
* Source/WebCore/page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* Source/WebCore/rendering/ReferencedSVGResources.cpp:
(WebCore::ReferencedSVGResources::referencedMarkerElement):
(WebCore::ReferencedSVGResources::referencedMaskElement):
(WebCore::ReferencedSVGResources::referencedPaintServerElement):
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::rendererForScrollbar):
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::usesVisuallyContiguousBidiTextSelection):
* Source/WebCore/rendering/svg/legacy/SVGResources.cpp:
(WebCore::paintingResourceFromSVGPaint):
* Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::endElementNs):
Canonical link: https://commits.webkit.org/306750@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications