Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5cce6db960ddc377d1f0a00df9d1e93cc2173e1a
      
https://github.com/WebKit/WebKit/commit/5cce6db960ddc377d1f0a00df9d1e93cc2173e1a
  Author: Simon Fraser <[email protected]>
  Date:   2026-06-17 (Wed, 17 Jun 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderImage.cpp
    M Source/WebCore/rendering/RenderImage.h

  Log Message:
  -----------
  Clean up RenderImage::paintReplaced()
https://bugs.webkit.org/show_bug.cgi?id=317268
rdar://179880055

Reviewed by Dan Glastonbury.

Move the missing image painting code, which is the bulk of 
`RenderImage::paintReplaced()`,
into its own function. We can add early returns and outdent much of the code.

There's a minor optimization here, which is that we avoid calling 
`contentSize()`
followed by `contentRect()`, since the latter's size is the same.

* Source/WebCore/rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIncompleteImageOutline const):
(WebCore::RenderImage::paintMissingImageState const):
(WebCore::RenderImage::paintReplaced):
* Source/WebCore/rendering/RenderImage.h:

Canonical link: https://commits.webkit.org/315373@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to