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

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingStyleUtilities.h

Issue 2628943009: Introduce EditingStyleUtilities.{cpp,h} (Closed)
Patch Set: add STATIC_ONLY Created 3 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EditingStyleUtilities_h
6 #define EditingStyleUtilities_h
7
8 #include "core/CSSPropertyNames.h"
9 #include "core/CSSValueKeywords.h"
10 #include "core/editing/VisibleSelection.h"
11 #include "core/editing/WritingDirection.h"
12
13 namespace blink {
14
15 class ContainerNode;
16 class CSSStyleDeclaration;
17 class EditingStyle;
18 class MutableStylePropertySet;
19 class Node;
20 class StylePropertySet;
21
22 class EditingStyleUtilities {
23 STATIC_ONLY(EditingStyleUtilities);
24
25 public:
26 static EditingStyle* createStyleAtSelectionStart(
27 const VisibleSelection&,
28 bool shouldUseBackgroundColorInEffect = false,
29 MutableStylePropertySet* styleToCheck = nullptr);
30 static EditingStyle* createWrappingStyleForSerialization(
31 ContainerNode* context);
32 static EditingStyle* createWrappingStyleForAnnotatedSerialization(
33 ContainerNode* context);
34 static WritingDirection textDirectionForSelection(
35 const VisibleSelection&,
36 EditingStyle* typingStyle,
37 bool& hasNestedOrMultipleEmbeddings);
38 static bool isEmbedOrIsolate(CSSValueID unicodeBidi) {
39 return unicodeBidi == CSSValueIsolate ||
40 unicodeBidi == CSSValueWebkitIsolate || unicodeBidi == CSSValueEmbed;
41 }
42
43 static bool isTransparentColorValue(const CSSValue*);
44 static bool hasTransparentBackgroundColor(CSSStyleDeclaration*);
45 static bool hasTransparentBackgroundColor(StylePropertySet*);
46 static const CSSValue* backgroundColorValueInEffect(Node*);
47 static bool hasAncestorVerticalAlignStyle(Node&, CSSValueID);
48 };
49
50 } // namespace blink
51
52 #endif // EditingStyleUtilities_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698