Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: Source/core/editing/EditingStyle.cpp

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/DeleteFromTextNodeCommand.cpp ('k') | Source/core/editing/Editor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc.
3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 return 0; 1236 return 0;
1237 1237
1238 RefPtr<EditingStyle> style = EditingStyle::create(element, EditingStyle::All Properties); 1238 RefPtr<EditingStyle> style = EditingStyle::create(element, EditingStyle::All Properties);
1239 style->mergeTypingStyle(element->document()); 1239 style->mergeTypingStyle(element->document());
1240 1240
1241 // If background color is transparent, traverse parent nodes until we hit a different value or document root 1241 // If background color is transparent, traverse parent nodes until we hit a different value or document root
1242 // Also, if the selection is a range, ignore the background color at the sta rt of selection, 1242 // Also, if the selection is a range, ignore the background color at the sta rt of selection,
1243 // and find the background color of the common ancestor. 1243 // and find the background color of the common ancestor.
1244 if (shouldUseBackgroundColorInEffect && (selection.isRange() || hasTranspare ntBackgroundColor(style->m_mutableStyle.get()))) { 1244 if (shouldUseBackgroundColorInEffect && (selection.isRange() || hasTranspare ntBackgroundColor(style->m_mutableStyle.get()))) {
1245 RefPtr<Range> range(selection.toNormalizedRange()); 1245 RefPtr<Range> range(selection.toNormalizedRange());
1246 if (PassRefPtr<CSSValue> value = backgroundColorInEffect(range->commonAn cestorContainer(IGNORE_EXCEPTION_STATE))) 1246 if (PassRefPtr<CSSValue> value = backgroundColorInEffect(range->commonAn cestorContainer(IGNORE_EXCEPTION)))
1247 style->setProperty(CSSPropertyBackgroundColor, value->cssText()); 1247 style->setProperty(CSSPropertyBackgroundColor, value->cssText());
1248 } 1248 }
1249 1249
1250 return style; 1250 return style;
1251 } 1251 }
1252 1252
1253 WritingDirection EditingStyle::textDirectionForSelection(const VisibleSelection& selection, EditingStyle* typingStyle, bool& hasNestedOrMultipleEmbeddings) 1253 WritingDirection EditingStyle::textDirectionForSelection(const VisibleSelection& selection, EditingStyle* typingStyle, bool& hasNestedOrMultipleEmbeddings)
1254 { 1254 {
1255 hasNestedOrMultipleEmbeddings = true; 1255 hasNestedOrMultipleEmbeddings = true;
1256 1256
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 { 1621 {
1622 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1622 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1623 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl aration::create(ancestor); 1623 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl aration::create(ancestor);
1624 if (!hasTransparentBackgroundColor(ancestorStyle.get())) 1624 if (!hasTransparentBackgroundColor(ancestorStyle.get()))
1625 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1625 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1626 } 1626 }
1627 return 0; 1627 return 0;
1628 } 1628 }
1629 1629
1630 } 1630 }
OLDNEW
« no previous file with comments | « Source/core/editing/DeleteFromTextNodeCommand.cpp ('k') | Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698