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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2882093002: Make EUserSelect an enum class. (Closed)
Patch Set: Rebase Created 3 years, 7 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
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 1385
1386 for (const LayoutObject* child = SlowFirstChild(); child; 1386 for (const LayoutObject* child = SlowFirstChild(); child;
1387 child = child->NextSibling()) 1387 child = child->NextSibling())
1388 child->ShowLayoutTreeAndMark(marked_object1, marked_label1, marked_object2, 1388 child->ShowLayoutTreeAndMark(marked_object1, marked_label1, marked_object2,
1389 marked_label2, depth + 1); 1389 marked_label2, depth + 1);
1390 } 1390 }
1391 1391
1392 #endif // NDEBUG 1392 #endif // NDEBUG
1393 1393
1394 bool LayoutObject::IsSelectable() const { 1394 bool LayoutObject::IsSelectable() const {
1395 return !IsInert() && !(Style()->UserSelect() == SELECT_NONE && 1395 return !IsInert() && !(Style()->UserSelect() == EUserSelect::kNone &&
1396 Style()->UserModify() == EUserModify::kReadOnly); 1396 Style()->UserModify() == EUserModify::kReadOnly);
1397 } 1397 }
1398 1398
1399 Color LayoutObject::SelectionBackgroundColor() const { 1399 Color LayoutObject::SelectionBackgroundColor() const {
1400 if (!IsSelectable()) 1400 if (!IsSelectable())
1401 return Color::kTransparent; 1401 return Color::kTransparent;
1402 1402
1403 if (RefPtr<ComputedStyle> pseudo_style = GetUncachedSelectionStyle()) 1403 if (RefPtr<ComputedStyle> pseudo_style = GetUncachedSelectionStyle())
1404 return ResolveColor(*pseudo_style, CSSPropertyBackgroundColor) 1404 return ResolveColor(*pseudo_style, CSSPropertyBackgroundColor)
1405 .BlendWithWhite(); 1405 .BlendWithWhite();
(...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after
3648 const blink::LayoutObject* root = object1; 3648 const blink::LayoutObject* root = object1;
3649 while (root->Parent()) 3649 while (root->Parent())
3650 root = root->Parent(); 3650 root = root->Parent();
3651 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); 3651 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0);
3652 } else { 3652 } else {
3653 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3653 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3654 } 3654 }
3655 } 3655 }
3656 3656
3657 #endif 3657 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/SmartClip.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698