[Webkit-unassigned] [Bug 65307] Document markers layout issue when highlithing text
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 9 07:37:45 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=65307
--- Comment #5 from Kamil Blank <k.blank at samsung.com> 2011-08-09 07:37:45 PST ---
I found that this bug started occur after changeset r71465 (http://trac.webkit.org/changeset/71465)
Bug: https://bugs.webkit.org/show_bug.cgi?id=47237
I've found 2 ways to fix this issue on bbc.co.uk however I'd like to ask for your opinion on these approaches as I'm not too familiar with markers.
Both solutions changes if-statement inside RootInlineBox::selectionTop()
1) To make selectionTop() similar to selectionBottom() by adding negation
diff --git a/Source/WebCore/rendering/RootInlineBox.cpp b/Source/WebCore/rendering/RootInlineBox.cpp
index ecfaaf5..259a692 100644
--- a/Source/WebCore/rendering/RootInlineBox.cpp
+++ b/Source/WebCore/rendering/RootInlineBox.cpp
@@ -403,7 +403,7 @@ LayoutUnit RootInlineBox::selectionTop() const
if (m_hasAnnotationsBefore)
selectionTop -= !renderer()->style()->isFlippedLinesWritingMode() ? computeOverAnnotationAdjustment(m_lineTop) : computeUnderAnnotationAdjustment(m_lineTop);
- if (renderer()->style()->isFlippedLinesWritingMode())
+ if (!renderer()->style()->isFlippedLinesWritingMode())
return selectionTop;
LayoutUnit prevBottom = prevRootBox() ? prevRootBox()->selectionBottom() : block()->borderBefore() + block()->paddingBefore();
2) To add !prevRootBox checking as it was before r71435
diff --git a/Source/WebCore/rendering/RootInlineBox.cpp b/Source/WebCore/rendering/RootInlineBox.cpp
index ecfaaf5..8ad4454 100644
--- a/Source/WebCore/rendering/RootInlineBox.cpp
+++ b/Source/WebCore/rendering/RootInlineBox.cpp
@@ -403,7 +403,7 @@ LayoutUnit RootInlineBox::selectionTop() const
if (m_hasAnnotationsBefore)
selectionTop -= !renderer()->style()->isFlippedLinesWritingMode() ? computeOverAnnotationAdjustment(m_lineTop) : computeUnderAnnotationAdjustment(m_lineTop);
- if (renderer()->style()->isFlippedLinesWritingMode())
+ if (renderer()->style()->isFlippedLinesWritingMode() !prevRootBox())
return selectionTop;
LayoutUnit prevBottom = prevRootBox() ? prevRootBox()->selectionBottom() : block()->borderBefore() + block()->paddingBefore();
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list