| Summary: | Document::topDocument() should return a reference | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | aboxhall, apinheiro, benjamin, cfleizach, commit-queue, darin, dmazzoni, esprehn+autocc, glenn, jcraig, jdiggs, kangil.han, kondapallykalyan, mario, samuel_white | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Antti Koivisto
2014-01-28 12:09:29 PST
Created attachment 222473 [details]
patch
Attachment 222473 [details] did not pass style-queue:
ERROR: Source/WebCore/rendering/RenderView.cpp:1269: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4]
Total errors found: 1 in 8 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 222473 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=222473&action=review > Source/WebCore/dom/Document.cpp:4316 > - return m_frame ? m_frame->mainFrame().document() : const_cast<Document*>(this); > + return m_frame ? *m_frame->mainFrame().document() : const_cast<Document&>(*this); We should make this 100% safe by null-checking MainFrame::document and falling back to this in that case too. And if we ever change MainFrame::document to return a reference we can delete that branch. Looks like it does not build on iOS. Never mind, I am late on the internal updates. Antti already fixed the build. |