| Index: third_party/WebKit/Source/core/editing/EditingStyleUtilities.h
|
| diff --git a/third_party/WebKit/Source/core/editing/EditingStyleUtilities.h b/third_party/WebKit/Source/core/editing/EditingStyleUtilities.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7157de311ca86f65325d7286169cf06a037cf5b9
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/EditingStyleUtilities.h
|
| @@ -0,0 +1,52 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef EditingStyleUtilities_h
|
| +#define EditingStyleUtilities_h
|
| +
|
| +#include "core/CSSPropertyNames.h"
|
| +#include "core/CSSValueKeywords.h"
|
| +#include "core/editing/VisibleSelection.h"
|
| +#include "core/editing/WritingDirection.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class ContainerNode;
|
| +class CSSStyleDeclaration;
|
| +class EditingStyle;
|
| +class MutableStylePropertySet;
|
| +class Node;
|
| +class StylePropertySet;
|
| +
|
| +class EditingStyleUtilities {
|
| + STATIC_ONLY(EditingStyleUtilities);
|
| +
|
| + public:
|
| + static EditingStyle* createStyleAtSelectionStart(
|
| + const VisibleSelection&,
|
| + bool shouldUseBackgroundColorInEffect = false,
|
| + MutableStylePropertySet* styleToCheck = nullptr);
|
| + static EditingStyle* createWrappingStyleForSerialization(
|
| + ContainerNode* context);
|
| + static EditingStyle* createWrappingStyleForAnnotatedSerialization(
|
| + ContainerNode* context);
|
| + static WritingDirection textDirectionForSelection(
|
| + const VisibleSelection&,
|
| + EditingStyle* typingStyle,
|
| + bool& hasNestedOrMultipleEmbeddings);
|
| + static bool isEmbedOrIsolate(CSSValueID unicodeBidi) {
|
| + return unicodeBidi == CSSValueIsolate ||
|
| + unicodeBidi == CSSValueWebkitIsolate || unicodeBidi == CSSValueEmbed;
|
| + }
|
| +
|
| + static bool isTransparentColorValue(const CSSValue*);
|
| + static bool hasTransparentBackgroundColor(CSSStyleDeclaration*);
|
| + static bool hasTransparentBackgroundColor(StylePropertySet*);
|
| + static const CSSValue* backgroundColorValueInEffect(Node*);
|
| + static bool hasAncestorVerticalAlignStyle(Node&, CSSValueID);
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // EditingStyleUtilities_h
|
|
|