summaryrefslogtreecommitdiffstats
path: root/layout/generic/TextOverflow.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /layout/generic/TextOverflow.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/generic/TextOverflow.cpp')
-rw-r--r--layout/generic/TextOverflow.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/layout/generic/TextOverflow.cpp b/layout/generic/TextOverflow.cpp
index f529a2268d..758b61a99b 100644
--- a/layout/generic/TextOverflow.cpp
+++ b/layout/generic/TextOverflow.cpp
@@ -29,8 +29,7 @@
using mozilla::layout::TextDrawTarget;
-namespace mozilla {
-namespace css {
+namespace mozilla::css {
class LazyReferenceRenderingDrawTargetGetterFromFrame final
: public gfxFontGroup::LazyReferenceDrawTargetGetter {
@@ -165,8 +164,7 @@ class nsDisplayTextOverflowMarker final : public nsPaintedDisplayItem {
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder,
bool* aSnap) const override {
*aSnap = false;
- nsRect shadowRect = nsLayoutUtils::GetTextShadowRectsUnion(mRect, mFrame);
- return mRect.Union(shadowRect);
+ return nsLayoutUtils::GetTextShadowRectsUnion(mRect, mFrame);
}
virtual nsRect GetComponentAlphaBounds(
@@ -835,9 +833,10 @@ bool TextOverflow::CanHaveOverflowMarkers(nsBlockFrame* aBlockFrame,
return false;
}
- // Skip ComboboxControlFrame because it would clip the drop-down arrow.
- // Its anon block inherits 'text-overflow' and does what is expected.
- if (aBlockFrame->IsComboboxControlFrame()) {
+ // Skip the combobox anonymous block because it would clip the drop-down
+ // arrow. The inner label inherits 'text-overflow' and does the right thing.
+ if (aBlockFrame->GetParent() &&
+ aBlockFrame->GetParent()->IsComboboxControlFrame()) {
return false;
}
@@ -932,5 +931,4 @@ void TextOverflow::Marker::SetupString(nsIFrame* aFrame) {
mInitialized = true;
}
-} // namespace css
-} // namespace mozilla
+} // namespace mozilla::css