| Index: third_party/WebKit/Source/core/editing/LayoutSelectionTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/LayoutSelectionTest.cpp b/third_party/WebKit/Source/core/editing/LayoutSelectionTest.cpp
|
| index 8400ccdfce654a0956c3c346ef6e3d7da8dfb1ca..affa0c7942e33bff29cc6b646094fbe1c2fb287b 100644
|
| --- a/third_party/WebKit/Source/core/editing/LayoutSelectionTest.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/LayoutSelectionTest.cpp
|
| @@ -62,10 +62,18 @@ static bool TestLayoutObjectState(LayoutObject* object,
|
| }
|
|
|
| using IsTypeOf = Function<bool(const LayoutObject& layout_object)>;
|
| +#if 0
|
| #define USING_LAYOUTOBJECT_FUNC(member_func) \
|
| IsTypeOf member_func = WTF::Bind([](const LayoutObject& layout_object) { \
|
| return layout_object.member_func(); \
|
| })
|
| +#else
|
| +using IsTypeOfSimple = bool(const LayoutObject& layout_object);
|
| +#define USING_LAYOUTOBJECT_FUNC(member_func) \
|
| + bool member_func(const LayoutObject& layout_object) { \
|
| + return layout_object.member_func(); \
|
| + }
|
| +#endif // 0
|
|
|
| USING_LAYOUTOBJECT_FUNC(IsLayoutBlock);
|
| USING_LAYOUTOBJECT_FUNC(IsLayoutBlockFlow);
|
| @@ -87,6 +95,17 @@ static IsTypeOf IsLayoutTextFragmentOf(const String& text) {
|
| }
|
|
|
| static bool TestLayoutObject(LayoutObject* object,
|
| + IsTypeOfSimple& predicate,
|
| + SelectionState state,
|
| + InvalidateOption invalidate) {
|
| + if (!TestLayoutObjectState(object, state, invalidate))
|
| + return false;
|
| +
|
| + if (!predicate(*object))
|
| + return false;
|
| + return true;
|
| +}
|
| +static bool TestLayoutObject(LayoutObject* object,
|
| const IsTypeOf& predicate,
|
| SelectionState state,
|
| InvalidateOption invalidate) {
|
|
|