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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 | 465 |
466 static bool propertyMissingOrEqualToNone(StylePropertySet* style, CSSPropertyID
propertyID) | 466 static bool propertyMissingOrEqualToNone(StylePropertySet* style, CSSPropertyID
propertyID) |
467 { | 467 { |
468 if (!style) | 468 if (!style) |
469 return false; | 469 return false; |
470 RefPtr<CSSValue> value = style->getPropertyCSSValue(propertyID); | 470 RefPtr<CSSValue> value = style->getPropertyCSSValue(propertyID); |
471 if (!value) | 471 if (!value) |
472 return true; | 472 return true; |
473 if (!value->isPrimitiveValue()) | 473 if (!value->isPrimitiveValue()) |
474 return false; | 474 return false; |
475 return static_cast<CSSPrimitiveValue*>(value.get())->getIdent() == CSSValueN
one; | 475 return static_cast<CSSPrimitiveValue*>(value.get())->getValueID() == CSSValu
eNone; |
476 } | 476 } |
477 | 477 |
478 static bool needInterchangeNewlineAfter(const VisiblePosition& v) | 478 static bool needInterchangeNewlineAfter(const VisiblePosition& v) |
479 { | 479 { |
480 VisiblePosition next = v.next(); | 480 VisiblePosition next = v.next(); |
481 Node* upstreamNode = next.deepEquivalent().upstream().deprecatedNode(); | 481 Node* upstreamNode = next.deepEquivalent().upstream().deprecatedNode(); |
482 Node* downstreamNode = v.deepEquivalent().downstream().deprecatedNode(); | 482 Node* downstreamNode = v.deepEquivalent().downstream().deprecatedNode(); |
483 // Add an interchange newline if a paragraph break is selected and a br won'
t already be added to the markup to represent it. | 483 // Add an interchange newline if a paragraph break is selected and a br won'
t already be added to the markup to represent it. |
484 return isEndOfParagraph(v) && isStartOfParagraph(next) && !(upstreamNode->ha
sTagName(brTag) && upstreamNode == downstreamNode); | 484 return isEndOfParagraph(v) && isStartOfParagraph(next) && !(upstreamNode->ha
sTagName(brTag) && upstreamNode == downstreamNode); |
485 } | 485 } |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 if (hasOneChild(containerNode.get())) { | 1092 if (hasOneChild(containerNode.get())) { |
1093 containerNode->replaceChild(textNode.release(), containerNode->firstChil
d(), ec); | 1093 containerNode->replaceChild(textNode.release(), containerNode->firstChil
d(), ec); |
1094 return; | 1094 return; |
1095 } | 1095 } |
1096 | 1096 |
1097 containerNode->removeChildren(); | 1097 containerNode->removeChildren(); |
1098 containerNode->appendChild(textNode.release(), ec); | 1098 containerNode->appendChild(textNode.release(), ec); |
1099 } | 1099 } |
1100 | 1100 |
1101 } | 1101 } |
OLD | NEW |