| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 | 456 |
| 457 static bool propertyMissingOrEqualToNone(StylePropertySet* style, CSSPropertyID
propertyID) | 457 static bool propertyMissingOrEqualToNone(StylePropertySet* style, CSSPropertyID
propertyID) |
| 458 { | 458 { |
| 459 if (!style) | 459 if (!style) |
| 460 return false; | 460 return false; |
| 461 RefPtr<CSSValue> value = style->getPropertyCSSValue(propertyID); | 461 RefPtr<CSSValue> value = style->getPropertyCSSValue(propertyID); |
| 462 if (!value) | 462 if (!value) |
| 463 return true; | 463 return true; |
| 464 if (!value->isPrimitiveValue()) | 464 if (!value->isPrimitiveValue()) |
| 465 return false; | 465 return false; |
| 466 return static_cast<CSSPrimitiveValue*>(value.get())->getValueID() == CSSValu
eNone; | 466 return toCSSPrimitiveValue(value.get())->getValueID() == CSSValueNone; |
| 467 } | 467 } |
| 468 | 468 |
| 469 static bool needInterchangeNewlineAfter(const VisiblePosition& v) | 469 static bool needInterchangeNewlineAfter(const VisiblePosition& v) |
| 470 { | 470 { |
| 471 VisiblePosition next = v.next(); | 471 VisiblePosition next = v.next(); |
| 472 Node* upstreamNode = next.deepEquivalent().upstream().deprecatedNode(); | 472 Node* upstreamNode = next.deepEquivalent().upstream().deprecatedNode(); |
| 473 Node* downstreamNode = v.deepEquivalent().downstream().deprecatedNode(); | 473 Node* downstreamNode = v.deepEquivalent().downstream().deprecatedNode(); |
| 474 // Add an interchange newline if a paragraph break is selected and a br won'
t already be added to the markup to represent it. | 474 // Add an interchange newline if a paragraph break is selected and a br won'
t already be added to the markup to represent it. |
| 475 return isEndOfParagraph(v) && isStartOfParagraph(next) && !(upstreamNode->ha
sTagName(brTag) && upstreamNode == downstreamNode); | 475 return isEndOfParagraph(v) && isStartOfParagraph(next) && !(upstreamNode->ha
sTagName(brTag) && upstreamNode == downstreamNode); |
| 476 } | 476 } |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 if (hasOneChild(containerNode.get())) { | 1083 if (hasOneChild(containerNode.get())) { |
| 1084 containerNode->replaceChild(textNode.release(), containerNode->firstChil
d(), es); | 1084 containerNode->replaceChild(textNode.release(), containerNode->firstChil
d(), es); |
| 1085 return; | 1085 return; |
| 1086 } | 1086 } |
| 1087 | 1087 |
| 1088 containerNode->removeChildren(); | 1088 containerNode->removeChildren(); |
| 1089 containerNode->appendChild(textNode.release(), es); | 1089 containerNode->appendChild(textNode.release(), es); |
| 1090 } | 1090 } |
| 1091 | 1091 |
| 1092 } | 1092 } |
| OLD | NEW |