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

Side by Side Diff: third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Comment Created 4 years, 2 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 void MultipleFieldsTemporalInputTypeView::blur() 322 void MultipleFieldsTemporalInputTypeView::blur()
323 { 323 {
324 if (DateTimeEditElement* edit = dateTimeEditElement()) 324 if (DateTimeEditElement* edit = dateTimeEditElement())
325 edit->blurByOwner(); 325 edit->blurByOwner();
326 } 326 }
327 327
328 PassRefPtr<ComputedStyle> MultipleFieldsTemporalInputTypeView::customStyleForLay outObject(PassRefPtr<ComputedStyle> originalStyle) 328 PassRefPtr<ComputedStyle> MultipleFieldsTemporalInputTypeView::customStyleForLay outObject(PassRefPtr<ComputedStyle> originalStyle)
329 { 329 {
330 EDisplay originalDisplay = originalStyle->display(); 330 EDisplay originalDisplay = originalStyle->display();
331 EDisplay newDisplay = originalDisplay; 331 EDisplay newDisplay = originalDisplay;
332 if (originalDisplay == INLINE || originalDisplay == INLINE_BLOCK) 332 if (originalDisplay == EDisplay::Inline || originalDisplay == EDisplay::Inli neBlock)
333 newDisplay = INLINE_FLEX; 333 newDisplay = EDisplay::InlineFlex;
334 else if (originalDisplay == BLOCK) 334 else if (originalDisplay == EDisplay::Block)
335 newDisplay = FLEX; 335 newDisplay = EDisplay::Flex;
336 TextDirection contentDirection = computedTextDirection(); 336 TextDirection contentDirection = computedTextDirection();
337 if (originalStyle->direction() == contentDirection && originalDisplay == new Display) 337 if (originalStyle->direction() == contentDirection && originalDisplay == new Display)
338 return originalStyle; 338 return originalStyle;
339 339
340 RefPtr<ComputedStyle> style = ComputedStyle::clone(*originalStyle); 340 RefPtr<ComputedStyle> style = ComputedStyle::clone(*originalStyle);
341 style->setDirection(contentDirection); 341 style->setDirection(contentDirection);
342 style->setDisplay(newDisplay); 342 style->setDisplay(newDisplay);
343 style->setUnique(); 343 style->setUnique();
344 return style.release(); 344 return style.release();
345 } 345 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 } 625 }
626 626
627 AXObject* MultipleFieldsTemporalInputTypeView::popupRootAXObject() 627 AXObject* MultipleFieldsTemporalInputTypeView::popupRootAXObject()
628 { 628 {
629 if (PickerIndicatorElement* picker = pickerIndicatorElement()) 629 if (PickerIndicatorElement* picker = pickerIndicatorElement())
630 return picker->popupRootAXObject(); 630 return picker->popupRootAXObject();
631 return nullptr; 631 return nullptr;
632 } 632 }
633 633
634 } // namespace blink 634 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698