Skip to content

Commit

Permalink
Remove unused function nodeFullyUnselected from `ApplyStyleCommand.…
Browse files Browse the repository at this point in the history
…cpp|h`

https://bugs.webkit.org/show_bug.cgi?id=267047

Reviewed by Ryosuke Niwa.

This PR is to delete unused function `nodeFullyUnselected` from ApplyStyleCommand.cpp|h.

* Source/WebCore/editing/ApplyStyleCommand.cpp:
(ApplyStyleCommand::nodeFullyUnselected): Deleted
* Source/WebCore/editing/ApplyStyleCommand.h: Delete function definition

Canonical link: https://commits.webkit.org/272623@main
  • Loading branch information
Ahmad-S792 authored and Ahmad Saleem committed Jan 3, 2024
1 parent bb4e804 commit a392df4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
7 changes: 0 additions & 7 deletions Source/WebCore/editing/ApplyStyleCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1180,13 +1180,6 @@ bool ApplyStyleCommand::nodeFullySelected(Element& element, const Position& star
return firstPositionInOrBeforeNode(&element) >= start && lastPositionInOrAfterNode(&element).upstream() <= end;
}

bool ApplyStyleCommand::nodeFullyUnselected(Element& element, const Position& start, const Position& end) const
{
// The tree may have changed and Position::upstream() relies on an up-to-date layout.
element.protectedDocument()->updateLayoutIgnorePendingStylesheets();
return lastPositionInOrAfterNode(&element).upstream() < start || firstPositionInOrBeforeNode(&element) > end;
}

void ApplyStyleCommand::splitTextAtStart(const Position& start, const Position& end)
{
ASSERT(is<Text>(start.containerNode()));
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/editing/ApplyStyleCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class ApplyStyleCommand : public CompositeEditCommand {
void pushDownInlineStyleAroundNode(EditingStyle&, Node*);
void removeInlineStyle(EditingStyle&, const Position& start, const Position& end);
bool nodeFullySelected(Element&, const Position& start, const Position& end) const;
bool nodeFullyUnselected(Element&, const Position& start, const Position& end) const;

// style-application helpers
void applyBlockStyle(EditingStyle&);
Expand Down

0 comments on commit a392df4

Please sign in to comment.