Bug 240317

Summary: TextBoxPainter::paintBackground should bail out early when nothing to paint
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, heycam, kangil.han, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
simon.fraser: review+, ews-feeder: commit-queue-
Patch
none
Patch
none
Patch
none
Patch none

Description zalan 2022-05-11 14:23:16 PDT
ssia
Comment 1 zalan 2022-05-11 14:31:49 PDT
Created attachment 459182 [details]
Patch
Comment 2 zalan 2022-05-11 14:55:34 PDT
Created attachment 459184 [details]
Patch
Comment 3 Simon Fraser (smfr) 2022-05-11 15:03:40 PDT
Comment on attachment 459182 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=459182&action=review

> Source/WebCore/rendering/TextBoxPainter.cpp:140
> +        if (m_document.hasHighlightRegister())

Maybe "has highlight register and has a non-zero number of highlights"?
Comment 4 zalan 2022-05-11 19:45:55 PDT
Created attachment 459203 [details]
Patch
Comment 5 Simon Fraser (smfr) 2022-05-11 19:47:56 PDT
Comment on attachment 459203 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=459203&action=review

> Source/WebCore/dom/Document.cpp:2891
> +    return (m_highlightRegister && !m_highlightRegister->isEmpty()) || (m_fragmentHighlightRegister && !m_fragmentHighlightRegister->isEmpty()) 

I'd wrap the || ... onto a new line, indented.

> Source/WebCore/dom/Document.cpp:2893
> +    || (m_appHighlightRegister && m_appHighlightRegister->isEmpty())

Indent this line
Comment 6 zalan 2022-05-11 19:51:09 PDT
Created attachment 459204 [details]
Patch
Comment 7 zalan 2022-05-11 19:54:03 PDT
(In reply to Simon Fraser (smfr) from comment #5)
> Comment on attachment 459203 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=459203&action=review
> 
> > Source/WebCore/dom/Document.cpp:2891
> > +    return (m_highlightRegister && !m_highlightRegister->isEmpty()) || (m_fragmentHighlightRegister && !m_fragmentHighlightRegister->isEmpty()) 
> 
> I'd wrap the || ... onto a new line, indented.
> 
> > Source/WebCore/dom/Document.cpp:2893
> > +    || (m_appHighlightRegister && m_appHighlightRegister->isEmpty())
> 
> Indent this line
oops
Comment 8 zalan 2022-05-11 19:55:24 PDT
Created attachment 459205 [details]
Patch
Comment 9 EWS 2022-05-12 06:13:32 PDT
Committed r294099 (250484@main): <https://commits.webkit.org/250484@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 459205 [details].
Comment 10 Radar WebKit Bug Importer 2022-05-12 06:14:13 PDT
<rdar://problem/93170251>
Comment 11 Brent Fulgham 2022-06-23 16:50:05 PDT
*** Bug 239986 has been marked as a duplicate of this bug. ***