| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2011 Igalia S.L. | 4 * Copyright (C) 2011 Igalia S.L. |
| 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 if (!baseURL.isEmpty() && baseURL != blankURL() && baseURL != document.baseU
RL()) | 667 if (!baseURL.isEmpty() && baseURL != blankURL() && baseURL != document.baseU
RL()) |
| 668 completeURLs(*fragment, baseURL); | 668 completeURLs(*fragment, baseURL); |
| 669 | 669 |
| 670 return fragment.release(); | 670 return fragment.release(); |
| 671 } | 671 } |
| 672 | 672 |
| 673 static const char fragmentMarkerTag[] = "webkit-fragment-marker"; | 673 static const char fragmentMarkerTag[] = "webkit-fragment-marker"; |
| 674 | 674 |
| 675 static bool findNodesSurroundingContext(Document* document, RefPtrWillBeRawPtr<C
omment>& nodeBeforeContext, RefPtrWillBeRawPtr<Comment>& nodeAfterContext) | 675 static bool findNodesSurroundingContext(Document* document, RefPtrWillBeRawPtr<C
omment>& nodeBeforeContext, RefPtrWillBeRawPtr<Comment>& nodeAfterContext) |
| 676 { | 676 { |
| 677 for (Node& node : NodeTraversal::from(document->firstChild())) { | 677 for (Node& node : NodeTraversal::startsAt(document->firstChild())) { |
| 678 if (node.nodeType() == Node::COMMENT_NODE && toComment(node).data() == f
ragmentMarkerTag) { | 678 if (node.nodeType() == Node::COMMENT_NODE && toComment(node).data() == f
ragmentMarkerTag) { |
| 679 if (!nodeBeforeContext) | 679 if (!nodeBeforeContext) |
| 680 nodeBeforeContext = &toComment(node); | 680 nodeBeforeContext = &toComment(node); |
| 681 else { | 681 else { |
| 682 nodeAfterContext = &toComment(node); | 682 nodeAfterContext = &toComment(node); |
| 683 return true; | 683 return true; |
| 684 } | 684 } |
| 685 } | 685 } |
| 686 } | 686 } |
| 687 return false; | 687 return false; |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 node->document().updateLayoutIgnorePendingStylesheets(); | 1089 node->document().updateLayoutIgnorePendingStylesheets(); |
| 1090 | 1090 |
| 1091 StyledMarkupAccumulator accumulator(0, ResolveAllURLs, AnnotateForNavigation
Transition, nullptr, 0); | 1091 StyledMarkupAccumulator accumulator(0, ResolveAllURLs, AnnotateForNavigation
Transition, nullptr, 0); |
| 1092 accumulator.serializeNodes(node, NodeTraversal::nextSkippingChildren(*node))
; | 1092 accumulator.serializeNodes(node, NodeTraversal::nextSkippingChildren(*node))
; |
| 1093 | 1093 |
| 1094 static const char* documentMarkup = "<!DOCTYPE html><meta name=\"viewport\"
content=\"width=device-width, user-scalable=0\">"; | 1094 static const char* documentMarkup = "<!DOCTYPE html><meta name=\"viewport\"
content=\"width=device-width, user-scalable=0\">"; |
| 1095 return documentMarkup + accumulator.takeResults(); | 1095 return documentMarkup + accumulator.takeResults(); |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 } | 1098 } |
| OLD | NEW |