| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 Node* n = Traversal::firstChild(*commonAncestor); | 168 Node* n = Traversal::firstChild(*commonAncestor); |
| 169 while (n) { | 169 while (n) { |
| 170 if (n == childA) | 170 if (n == childA) |
| 171 return -1; // A is before B | 171 return -1; // A is before B |
| 172 if (n == childB) | 172 if (n == childB) |
| 173 return 1; // A is after B | 173 return 1; // A is after B |
| 174 n = Traversal::nextSibling(*n); | 174 n = Traversal::nextSibling(*n); |
| 175 } | 175 } |
| 176 | 176 |
| 177 // Should never reach this point. | 177 // Should never reach this point. |
| 178 ASSERT_NOT_REACHED(); | 178 NOTREACHED(); |
| 179 return 0; | 179 return 0; |
| 180 } | 180 } |
| 181 | 181 |
| 182 int comparePositionsInDOMTree(Node* containerA, int offsetA, Node* containerB, i
nt offsetB, bool* disconnected) | 182 int comparePositionsInDOMTree(Node* containerA, int offsetA, Node* containerB, i
nt offsetB, bool* disconnected) |
| 183 { | 183 { |
| 184 return comparePositions<NodeTraversal>(containerA, offsetA, containerB, offs
etB, disconnected); | 184 return comparePositions<NodeTraversal>(containerA, offsetA, containerB, offs
etB, disconnected); |
| 185 } | 185 } |
| 186 | 186 |
| 187 int comparePositionsInFlatTree(Node* containerA, int offsetA, Node* containerB,
int offsetB, bool* disconnected) | 187 int comparePositionsInFlatTree(Node* containerA, int offsetA, Node* containerB,
int offsetB, bool* disconnected) |
| 188 { | 188 { |
| (...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 | 1313 |
| 1314 HTMLElement* createDefaultParagraphElement(Document& document) | 1314 HTMLElement* createDefaultParagraphElement(Document& document) |
| 1315 { | 1315 { |
| 1316 switch (document.frame()->editor().defaultParagraphSeparator()) { | 1316 switch (document.frame()->editor().defaultParagraphSeparator()) { |
| 1317 case EditorParagraphSeparatorIsDiv: | 1317 case EditorParagraphSeparatorIsDiv: |
| 1318 return HTMLDivElement::create(document); | 1318 return HTMLDivElement::create(document); |
| 1319 case EditorParagraphSeparatorIsP: | 1319 case EditorParagraphSeparatorIsP: |
| 1320 return HTMLParagraphElement::create(document); | 1320 return HTMLParagraphElement::create(document); |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 ASSERT_NOT_REACHED(); | 1323 NOTREACHED(); |
| 1324 return nullptr; | 1324 return nullptr; |
| 1325 } | 1325 } |
| 1326 | 1326 |
| 1327 HTMLElement* createHTMLElement(Document& document, const QualifiedName& name) | 1327 HTMLElement* createHTMLElement(Document& document, const QualifiedName& name) |
| 1328 { | 1328 { |
| 1329 return HTMLElementFactory::createHTMLElement(name.localName(), document, 0,
CreatedByCloneNode); | 1329 return HTMLElementFactory::createHTMLElement(name.localName(), document, 0,
CreatedByCloneNode); |
| 1330 } | 1330 } |
| 1331 | 1331 |
| 1332 bool isTabHTMLSpanElement(const Node* node) | 1332 bool isTabHTMLSpanElement(const Node* node) |
| 1333 { | 1333 { |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1784 { | 1784 { |
| 1785 if (!RuntimeEnabledFeatures::inputEventEnabled()) | 1785 if (!RuntimeEnabledFeatures::inputEventEnabled()) |
| 1786 return DispatchEventResult::NotCanceled; | 1786 return DispatchEventResult::NotCanceled; |
| 1787 if (!target) | 1787 if (!target) |
| 1788 return DispatchEventResult::NotCanceled; | 1788 return DispatchEventResult::NotCanceled; |
| 1789 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data
, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotCo
mposing, ranges); | 1789 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data
, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotCo
mposing, ranges); |
| 1790 return target->dispatchEvent(beforeInputEvent); | 1790 return target->dispatchEvent(beforeInputEvent); |
| 1791 } | 1791 } |
| 1792 | 1792 |
| 1793 } // namespace blink | 1793 } // namespace blink |
| OLD | NEW |