icecat: add release icecat-140.7.0-1gnu1 for ecne
This commit is contained in:
parent
7d0f5dab3b
commit
30225f2e73
156 changed files with 9131 additions and 4525 deletions
|
|
@ -162,6 +162,22 @@ class MOZ_STACK_CLASS WSScanResult final {
|
|||
return mContent->AsText();
|
||||
}
|
||||
|
||||
template <typename EditorLineBreakType>
|
||||
MOZ_NEVER_INLINE_DEBUG EditorLineBreakType CreateEditorLineBreak() const {
|
||||
if (ReachedBRElement()) {
|
||||
return EditorLineBreakType(*BRElementPtr());
|
||||
}
|
||||
if (ReachedPreformattedLineBreak()) {
|
||||
MOZ_ASSERT_IF(mDirection == ScanDirection::Backward, *mOffset > 0);
|
||||
return EditorLineBreakType(*TextPtr(),
|
||||
mDirection == ScanDirection::Forward
|
||||
? mOffset.valueOr(0)
|
||||
: std::max(mOffset.valueOr(1), 1u) - 1);
|
||||
}
|
||||
MOZ_CRASH("Didn't reach a line break");
|
||||
return EditorLineBreakType(*BRElementPtr());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if found or reached content is editable.
|
||||
*/
|
||||
|
|
@ -277,6 +293,15 @@ class MOZ_STACK_CLASS WSScanResult final {
|
|||
return mReason == WSType::PreformattedLineBreak;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if reached a <br> element or a preformatted line break.
|
||||
* Return false when reached a block boundary. Use ReachedLineBoundary() if
|
||||
* you want it to return true in the case too.
|
||||
*/
|
||||
[[nodiscard]] bool ReachedLineBreak() const {
|
||||
return ReachedBRElement() || ReachedPreformattedLineBreak();
|
||||
}
|
||||
|
||||
/**
|
||||
* The scanner reached a <hr> element.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue