[Webkit-unassigned] [Bug 253969] New: Stop including the expensive headers Document.h / LocalFrame.h in Page.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 15 09:59:21 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=253969

            Bug ID: 253969
           Summary: Stop including the expensive headers Document.h /
                    LocalFrame.h in Page.h
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bfulgham at webkit.org

The 'Page.h' header is included in many places, and pulls in Document.h and LocalFrame.h, which are costly to parse. Instead, we should forward-declare these types and limit the includes to files that actually use the implementation details.

Correct a layering violation introduced in Bug 253293 that moved the implementation of Document::page() to the Page.h header by relocating that to the existing 'DocumentInlines.h'. This should retain the performance improvement without providing an implementation in an unrelated file.

Similarly, move the inline implementation of Frame::page() that was moved into Page.h in Bug 253204 to Frame.h.

This patch adds the necessary includes that should have been added in Bugs 253293 and 253204 instead of adding the implementation in a header that happened to be commonly included.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230315/d472cb77/attachment.htm>


More information about the webkit-unassigned mailing list