[Webkit-unassigned] [Bug 49353] ComplexTextController not prepared to handle multiple runs
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 10 20:48:58 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=49353
mitz at webkit.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #73555|review? |review+
Flag| |
--- Comment #2 from mitz at webkit.org 2010-11-10 20:48:58 PST ---
(From update of attachment 73555)
View in context: https://bugs.webkit.org/attachment.cgi?id=73555&action=review
Wow, the code was totally wrong. I said r+ but I think there’s room for improvement.
> WebCore/platform/graphics/mac/ComplexTextController.h:167
> + const int m_end;
Huh? I can’t cq+ because of this.
> WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp:54
> m_coreTextIndices = CTRunGetStringIndicesPtr(m_coreTextRun.get());
> - if (!m_coreTextIndices) {
> + if (!m_coreTextIndices || runRange.location) {
You can save the function call to CTRunGetStringIndicesPtr() if runRange.location is non-zero. I’d to it like this:
m_coreTextIndices = runRange.location ? 0 : CTRunGetStringIndicesPtr(m_coreTextRun.get())
if (!m_coreTextIndices) { …
> WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp:58
> + for (unsigned i = 0; i < m_glyphCount; ++i)
> + m_coreTextIndicesVector[i] -= runRange.location;
This loop should arguably be inside an if (runRange.location) block.
--
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