| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class CSSStyleDeclaration; | 42 class CSSStyleDeclaration; |
| 43 class EditingStyle; | 43 class EditingStyle; |
| 44 class MutableStylePropertySet; | 44 class MutableStylePropertySet; |
| 45 class Node; | 45 class Node; |
| 46 class StylePropertySet; | 46 class StylePropertySet; |
| 47 | 47 |
| 48 class EditingStyleUtilities { | 48 class EditingStyleUtilities { |
| 49 STATIC_ONLY(EditingStyleUtilities); | 49 STATIC_ONLY(EditingStyleUtilities); |
| 50 | 50 |
| 51 public: | 51 public: |
| 52 static EditingStyle* wrappingStyleForAnnotatedSerialization( | 52 static EditingStyle* createWrappingStyleForAnnotatedSerialization( |
| 53 ContainerNode* context); | 53 ContainerNode* context); |
| 54 static EditingStyle* wrappingStyleForSerialization(ContainerNode* context); | 54 static EditingStyle* createWrappingStyleForSerialization( |
| 55 static EditingStyle* styleAtSelectionStart( | 55 ContainerNode* context); |
| 56 static EditingStyle* createStyleAtSelectionStart( |
| 56 const VisibleSelection&, | 57 const VisibleSelection&, |
| 57 bool shouldUseBackgroundColorInEffect = false, | 58 bool shouldUseBackgroundColorInEffect = false, |
| 58 MutableStylePropertySet* styleToCheck = nullptr); | 59 MutableStylePropertySet* styleToCheck = nullptr); |
| 59 static WritingDirection textDirectionForSelection( | 60 static WritingDirection textDirectionForSelection( |
| 60 const VisibleSelection&, | 61 const VisibleSelection&, |
| 61 EditingStyle* typingStyle, | 62 EditingStyle* typingStyle, |
| 62 bool& hasNestedOrMultipleEmbeddings); | 63 bool& hasNestedOrMultipleEmbeddings); |
| 63 static bool isEmbedOrIsolate(CSSValueID unicodeBidi) { | 64 static bool isEmbedOrIsolate(CSSValueID unicodeBidi) { |
| 64 return unicodeBidi == CSSValueIsolate || | 65 return unicodeBidi == CSSValueIsolate || |
| 65 unicodeBidi == CSSValueWebkitIsolate || unicodeBidi == CSSValueEmbed; | 66 unicodeBidi == CSSValueWebkitIsolate || unicodeBidi == CSSValueEmbed; |
| 66 } | 67 } |
| 67 | 68 |
| 68 static bool isTransparentColorValue(const CSSValue*); | 69 static bool isTransparentColorValue(const CSSValue*); |
| 69 static bool hasTransparentBackgroundColor(CSSStyleDeclaration*); | 70 static bool hasTransparentBackgroundColor(CSSStyleDeclaration*); |
| 70 static bool hasTransparentBackgroundColor(StylePropertySet*); | 71 static bool hasTransparentBackgroundColor(StylePropertySet*); |
| 71 static const CSSValue* backgroundColorValueInEffect(Node*); | 72 static const CSSValue* backgroundColorValueInEffect(Node*); |
| 72 static bool hasAncestorVerticalAlignStyle(Node&, CSSValueID); | 73 static bool hasAncestorVerticalAlignStyle(Node&, CSSValueID); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace blink | 76 } // namespace blink |
| 76 | 77 |
| 77 #endif // EditingStyleUtilities_h | 78 #endif // EditingStyleUtilities_h |
| OLD | NEW |