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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Added 2 changes in mac files Created 4 years 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 2627 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 bool Internals::selectPopupItemStyleIsRtl(Node* node, int itemIndex) { 2638 bool Internals::selectPopupItemStyleIsRtl(Node* node, int itemIndex) {
2639 if (!node || !isHTMLSelectElement(*node)) 2639 if (!node || !isHTMLSelectElement(*node))
2640 return false; 2640 return false;
2641 2641
2642 HTMLSelectElement& select = toHTMLSelectElement(*node); 2642 HTMLSelectElement& select = toHTMLSelectElement(*node);
2643 if (itemIndex < 0 || 2643 if (itemIndex < 0 ||
2644 static_cast<size_t>(itemIndex) >= select.listItems().size()) 2644 static_cast<size_t>(itemIndex) >= select.listItems().size())
2645 return false; 2645 return false;
2646 const ComputedStyle* itemStyle = 2646 const ComputedStyle* itemStyle =
2647 select.itemComputedStyle(*select.listItems()[itemIndex]); 2647 select.itemComputedStyle(*select.listItems()[itemIndex]);
2648 return itemStyle && itemStyle->direction() == RTL; 2648 return itemStyle && itemStyle->direction() == TextDirection::Rtl;
2649 } 2649 }
2650 2650
2651 int Internals::selectPopupItemStyleFontHeight(Node* node, int itemIndex) { 2651 int Internals::selectPopupItemStyleFontHeight(Node* node, int itemIndex) {
2652 if (!node || !isHTMLSelectElement(*node)) 2652 if (!node || !isHTMLSelectElement(*node))
2653 return false; 2653 return false;
2654 2654
2655 HTMLSelectElement& select = toHTMLSelectElement(*node); 2655 HTMLSelectElement& select = toHTMLSelectElement(*node);
2656 if (itemIndex < 0 || 2656 if (itemIndex < 0 ||
2657 static_cast<size_t>(itemIndex) >= select.listItems().size()) 2657 static_cast<size_t>(itemIndex) >= select.listItems().size())
2658 return false; 2658 return false;
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
3093 3093
3094 void Internals::crash() { 3094 void Internals::crash() {
3095 CHECK(false) << "Intentional crash"; 3095 CHECK(false) << "Intentional crash";
3096 } 3096 }
3097 3097
3098 void Internals::setIsLowEndDevice(bool isLowEndDevice) { 3098 void Internals::setIsLowEndDevice(bool isLowEndDevice) {
3099 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); 3099 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice);
3100 } 3100 }
3101 3101
3102 } // namespace blink 3102 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698