Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/WebCore/dom/XMLTokenizerQt.cpp

Issue 21165: Revert the merge. Mac build is mysteriously broken. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2008 Holger Hans Peter Freyther 7 * Copyright (C) 2008 Holger Hans Peter Freyther
8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 } 500 }
501 } 501 }
502 502
503 void XMLTokenizer::parseStartElement() 503 void XMLTokenizer::parseStartElement()
504 { 504 {
505 if (!m_sawFirstElement && m_parsingFragment) { 505 if (!m_sawFirstElement && m_parsingFragment) {
506 // skip dummy element for fragments 506 // skip dummy element for fragments
507 m_sawFirstElement = true; 507 m_sawFirstElement = true;
508 return; 508 return;
509 } 509 }
510
511 bool isFirstElement = !m_sawFirstElement;
512 m_sawFirstElement = true; 510 m_sawFirstElement = true;
513 511
514 exitText(); 512 exitText();
515 513
516 String localName = m_stream.name(); 514 String localName = m_stream.name();
517 String uri = m_stream.namespaceUri(); 515 String uri = m_stream.namespaceUri();
518 String prefix = prefixFromQName(m_stream.qualifiedName().toString()); 516 String prefix = prefixFromQName(m_stream.qualifiedName().toString());
519 517
520 if (m_parsingFragment && uri.isNull()) { 518 if (m_parsingFragment && uri.isNull()) {
521 Q_ASSERT (prefix.isNull()); 519 Q_ASSERT (prefix.isNull());
(...skipping 25 matching lines...) Expand all
547 m_scriptStartLine = lineNumber(); 545 m_scriptStartLine = lineNumber();
548 546
549 if (!m_currentNode->addChild(newElement.get())) { 547 if (!m_currentNode->addChild(newElement.get())) {
550 stopParsing(); 548 stopParsing();
551 return; 549 return;
552 } 550 }
553 551
554 setCurrentNode(newElement.get()); 552 setCurrentNode(newElement.get());
555 if (m_view && !newElement->attached()) 553 if (m_view && !newElement->attached())
556 newElement->attach(); 554 newElement->attach();
557
558 if (isFirstElement && m_doc->frame())
559 m_doc->frame()->loader()->dispatchDocumentElementAvailable();
560 } 555 }
561 556
562 void XMLTokenizer::parseEndElement() 557 void XMLTokenizer::parseEndElement()
563 { 558 {
564 exitText(); 559 exitText();
565 560
566 Node* n = m_currentNode; 561 Node* n = m_currentNode;
567 RefPtr<Node> parent = n->parentNode(); 562 RefPtr<Node> parent = n->parentNode();
568 n->finishParsingChildren(); 563 n->finishParsingChildren();
569 564
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 #endif 763 #endif
769 if (!m_parsingFragment) 764 if (!m_parsingFragment)
770 m_doc->addChild(DocumentType::create(m_doc, name, publicId, systemId)); 765 m_doc->addChild(DocumentType::create(m_doc, name, publicId, systemId));
771 766
772 } 767 }
773 } 768 }
774 769
775 770
776 771
777 772
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/dom/XMLTokenizerLibxml2.cpp ('k') | third_party/WebKit/WebCore/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698