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

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

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Small rebase fixes 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 return 0; 739 return 0;
740 740
741 FingerprintSourceData data; 741 FingerprintSourceData data;
742 if (const LayoutObject* parent = parentElementLayoutObject(layoutObject)) 742 if (const LayoutObject* parent = parentElementLayoutObject(layoutObject))
743 data.m_parentHash = getFingerprint(parent); 743 data.m_parentHash = getFingerprint(parent);
744 744
745 data.m_qualifiedNameHash = 745 data.m_qualifiedNameHash =
746 QualifiedNameHash::hash(toElement(node)->tagQName()); 746 QualifiedNameHash::hash(toElement(node)->tagQName());
747 747
748 if (const ComputedStyle* style = layoutObject->style()) { 748 if (const ComputedStyle* style = layoutObject->style()) {
749 data.m_packedStyleProperties = style->direction(); 749 data.m_packedStyleProperties = static_cast<unsigned>(style->direction());
750 data.m_packedStyleProperties |= (style->position() << 1); 750 data.m_packedStyleProperties |= (style->position() << 1);
751 data.m_packedStyleProperties |= 751 data.m_packedStyleProperties |=
752 (static_cast<unsigned>(style->floating()) << 4); 752 (static_cast<unsigned>(style->floating()) << 4);
753 data.m_packedStyleProperties |= 753 data.m_packedStyleProperties |=
754 (static_cast<unsigned>(style->display()) << 6); 754 (static_cast<unsigned>(style->display()) << 6);
755 data.m_packedStyleProperties |= (style->width().type() << 11); 755 data.m_packedStyleProperties |= (style->width().type() << 11);
756 // packedStyleProperties effectively using 15 bits now. 756 // packedStyleProperties effectively using 15 bits now.
757 757
758 // consider for adding: writing mode, padding. 758 // consider for adding: writing mode, padding.
759 759
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 computedSize = specifiedSize; 1299 computedSize = specifiedSize;
1300 } 1300 }
1301 return computedSize; 1301 return computedSize;
1302 } 1302 }
1303 1303
1304 DEFINE_TRACE(TextAutosizer) { 1304 DEFINE_TRACE(TextAutosizer) {
1305 visitor->trace(m_document); 1305 visitor->trace(m_document);
1306 } 1306 }
1307 1307
1308 } // namespace blink 1308 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698