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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 return (renderer && (renderer->isTableCell() || renderer->isTableRow() || re nderer->isTableSection() || renderer->isRenderTableCol())); | 418 return (renderer && (renderer->isTableCell() || renderer->isTableRow() || re nderer->isTableSection() || renderer->isRenderTableCol())); |
419 } | 419 } |
420 | 420 |
421 const String& nonBreakingSpaceString() | 421 const String& nonBreakingSpaceString() |
422 { | 422 { |
423 DEFINE_STATIC_LOCAL(String, nonBreakingSpaceString, (&noBreakSpace, 1)); | 423 DEFINE_STATIC_LOCAL(String, nonBreakingSpaceString, (&noBreakSpace, 1)); |
424 return nonBreakingSpaceString; | 424 return nonBreakingSpaceString; |
425 } | 425 } |
426 | 426 |
427 // FIXME: need to dump this | 427 // FIXME: need to dump this |
428 bool isSpecialHTMLElement(const Node* n) | 428 static bool isSpecialHTMLElement(const Node* n) |
tkent
2014/11/05 01:07:20
nit: So, we can change the argument type to |const
| |
429 { | 429 { |
430 if (!n) | 430 ASSERT(n); |
431 return false; | |
432 | 431 |
433 if (!n->isHTMLElement()) | 432 if (!n->isHTMLElement()) |
434 return false; | 433 return false; |
435 | 434 |
436 if (n->isLink()) | 435 if (n->isLink()) |
437 return true; | 436 return true; |
438 | 437 |
439 RenderObject* renderer = n->renderer(); | 438 RenderObject* renderer = n->renderer(); |
440 if (!renderer) | 439 if (!renderer) |
441 return false; | 440 return false; |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1225 // if the selection starts just before a paragraph break, skip over it | 1224 // if the selection starts just before a paragraph break, skip over it |
1226 if (isEndOfParagraph(visiblePosition)) | 1225 if (isEndOfParagraph(visiblePosition)) |
1227 return visiblePosition.next().deepEquivalent().downstream(); | 1226 return visiblePosition.next().deepEquivalent().downstream(); |
1228 | 1227 |
1229 // otherwise, make sure to be at the start of the first selected node, | 1228 // otherwise, make sure to be at the start of the first selected node, |
1230 // instead of possibly at the end of the last node before the selection | 1229 // instead of possibly at the end of the last node before the selection |
1231 return visiblePosition.deepEquivalent().downstream(); | 1230 return visiblePosition.deepEquivalent().downstream(); |
1232 } | 1231 } |
1233 | 1232 |
1234 } // namespace blink | 1233 } // namespace blink |
OLD | NEW |