Use more smart pointers in the HTML parsing code#17801
Use more smart pointers in the HTML parsing code#17801webkit-commit-queue merged 1 commit intoWebKit:mainfrom
Conversation
|
EWS run on previous version of this PR (hash e60f770) Details |
e60f770 to
e299bf9
Compare
|
EWS run on previous version of this PR (hash e299bf9) Details
|
e299bf9 to
c3e3fc4
Compare
|
EWS run on previous version of this PR (hash c3e3fc4) Details
|
c3e3fc4 to
c255095
Compare
|
EWS run on previous version of this PR (hash c255095) Details
|
c255095 to
b7fd0f6
Compare
|
EWS run on current version of this PR (hash b7fd0f6) Details
|
|
Patch is ready for review. |
There was a problem hiding this comment.
Why not document(), like in the version taking the DocumentFragment argument?
There was a problem hiding this comment.
Unlike in the other constructor, we have a document argument here that we can leverage. Note that document() wouldn't build since there is a document parameter. You'd have to use this->document(). I think document looks much better than this->document().
There was a problem hiding this comment.
Should these ASSERT that their members are non-null?
There was a problem hiding this comment.
Good idea. will update.
There was a problem hiding this comment.
Actually, this is not needed because RefPtr's operator*() already ASSERTs this.
T& operator*() const { ASSERT(m_ptr); return *PtrTraits::unwrap(m_ptr); }
https://bugs.webkit.org/show_bug.cgi?id=261589 Reviewed by Brent Fulgham. * Source/WebCore/html/parser/HTMLConstructionSite.cpp: (WebCore::insert): (WebCore::executeReparentTask): (WebCore::executeTakeAllChildrenAndReparentTask): (WebCore::HTMLConstructionSite::attachLater): (WebCore::HTMLConstructionSite::HTMLConstructionSite): (WebCore::HTMLConstructionSite::protectedDocument const): (WebCore::HTMLConstructionSite::protectedAttachmentRoot const): (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded): (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::setDefaultCompatibilityMode): (WebCore::HTMLConstructionSite::setCompatibilityMode): (WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype): (WebCore::HTMLConstructionSite::finishedParsing): (WebCore::HTMLConstructionSite::insertDoctype): (WebCore::HTMLConstructionSite::insertComment): (WebCore::HTMLConstructionSite::insertCommentOnDocument): (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement): (WebCore::HTMLConstructionSite::insertHTMLHeadElement): (WebCore::HTMLConstructionSite::insertHTMLBodyElement): (WebCore::HTMLConstructionSite::insertHTMLFormElement): (WebCore::HTMLConstructionSite::insertHTMLElement): (WebCore::HTMLConstructionSite::insertHTMLTemplateElement): (WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface): (WebCore::HTMLConstructionSite::insertCustomElement): (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::insertForeignElement): (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements): * Source/WebCore/html/parser/HTMLConstructionSite.h: (WebCore::HTMLConstructionSite::protectedCurrentNode const): (WebCore::HTMLConstructionSite::isTelephoneNumberParsingEnabled): * Source/WebCore/html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): * Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp: (WebCore::HTMLFastPathParser::parseCompleteInput): (WebCore::HTMLFastPathParser::parseChildren): (WebCore::HTMLFastPathParser::parseElementAfterTagName): * Source/WebCore/html/parser/HTMLFormattingElementList.cpp: (WebCore::HTMLFormattingElementList::swapTo): (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition): * Source/WebCore/html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): (WebCore::TokenPreloadScanner::StartTagScanner::resourceType const): * Source/WebCore/html/parser/HTMLResourcePreloader.cpp: (WebCore::HTMLResourcePreloader::preload): * Source/WebCore/html/parser/HTMLResourcePreloader.h: * Source/WebCore/html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): Canonical link: https://commits.webkit.org/268278@main
b7fd0f6 to
49c1df2
Compare
|
Committed 268278@main (49c1df2): https://commits.webkit.org/268278@main Reviewed commits have been landed. Closing PR #17801 and removing active labels. |
49c1df2
b7fd0f6