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

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

Issue 1280423002: CSS4: Implement :placeholder-shown pseudo class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated testcase Created 5 years, 4 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) 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 680
681 const AtomicString& Internals::shadowPseudoId(Element* element) 681 const AtomicString& Internals::shadowPseudoId(Element* element)
682 { 682 {
683 ASSERT(element); 683 ASSERT(element);
684 return element->shadowPseudoId(); 684 return element->shadowPseudoId();
685 } 685 }
686 686
687 String Internals::visiblePlaceholder(Element* element) 687 String Internals::visiblePlaceholder(Element* element)
688 { 688 {
689 if (element && isHTMLTextFormControlElement(*element)) { 689 if (element && isHTMLTextFormControlElement(*element)) {
690 if (toHTMLTextFormControlElement(element)->placeholderShouldBeVisible()) 690 const HTMLTextFormControlElement& textFormControlElement = toHTMLTextFor mControlElement(*element);
691 return toHTMLTextFormControlElement(element)->placeholderElement()-> textContent(); 691 if (!textFormControlElement.isPlaceholderVisible())
692 return String();
693 if (HTMLElement* placeholderElement = textFormControlElement.placeholder Element())
694 return placeholderElement->textContent();
692 } 695 }
693 696
694 return String(); 697 return String();
695 } 698 }
696 699
697 void Internals::selectColorInColorChooser(Element* element, const String& colorV alue) 700 void Internals::selectColorInColorChooser(Element* element, const String& colorV alue)
698 { 701 {
699 ASSERT(element); 702 ASSERT(element);
700 if (!isHTMLInputElement(*element)) 703 if (!isHTMLInputElement(*element))
701 return; 704 return;
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 2484
2482 return animator->setScrollbarsVisibleForTesting(visible); 2485 return animator->setScrollbarsVisibleForTesting(visible);
2483 } 2486 }
2484 2487
2485 void Internals::forceRestrictIFramePermissions() 2488 void Internals::forceRestrictIFramePermissions()
2486 { 2489 {
2487 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); 2490 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true);
2488 } 2491 }
2489 2492
2490 } // namespace blink 2493 } // namespace blink
OLDNEW
« Source/core/html/forms/TextFieldInputType.cpp ('K') | « Source/core/layout/LayoutTextControl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698