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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 1529363004: Simplify Node.prototype.baseURI to match the DOM spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
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) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 } 1054 }
1055 1055
1056 // FIXME: End of obviously misplaced HTML editing functions. Try to move these out of Node. 1056 // FIXME: End of obviously misplaced HTML editing functions. Try to move these out of Node.
1057 1057
1058 Document* Node::ownerDocument() const 1058 Document* Node::ownerDocument() const
1059 { 1059 {
1060 Document* doc = &document(); 1060 Document* doc = &document();
1061 return doc == this ? nullptr : doc; 1061 return doc == this ? nullptr : doc;
1062 } 1062 }
1063 1063
1064 KURL Node::baseURI() const 1064 const KURL& Node::baseURI() const
1065 { 1065 {
1066 return parentNode() ? parentNode()->baseURI() : KURL(); 1066 return document().baseURL();
1067 } 1067 }
1068 1068
1069 bool Node::isEqualNode(Node* other) const 1069 bool Node::isEqualNode(Node* other) const
1070 { 1070 {
1071 if (!other) 1071 if (!other)
1072 return false; 1072 return false;
1073 1073
1074 NodeType nodeType = this->nodeType(); 1074 NodeType nodeType = this->nodeType();
1075 if (nodeType != other->nodeType()) 1075 if (nodeType != other->nodeType())
1076 return false; 1076 return false;
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 2370
2371 void showNodePath(const blink::Node* node) 2371 void showNodePath(const blink::Node* node)
2372 { 2372 {
2373 if (node) 2373 if (node)
2374 node->showNodePathForThis(); 2374 node->showNodePathForThis();
2375 else 2375 else
2376 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2376 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2377 } 2377 }
2378 2378
2379 #endif 2379 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698