mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	LibWeb: Remove ByteString usage in input element placeholder_value()
This commit is contained in:
		
							parent
							
								
									3fd1164171
								
							
						
					
					
						commit
						b4bae912c9
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-17 03:18:29 +09:00 
				
			
			Author: https://github.com/bplaat
Commit: b4bae912c9
Pull-request: https://github.com/SerenityOS/serenity/pull/23551
Reviewed-by: https://github.com/trflynn89
			
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -689,7 +689,7 @@ String HTMLInputElement::placeholder() const | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // https://html.spec.whatwg.org/multipage/input.html#attr-input-placeholder
 | // https://html.spec.whatwg.org/multipage/input.html#attr-input-placeholder
 | ||||||
| Optional<ByteString> HTMLInputElement::placeholder_value() const | Optional<String> HTMLInputElement::placeholder_value() const | ||||||
| { | { | ||||||
|     if (!m_text_node || !m_text_node->data().is_empty()) |     if (!m_text_node || !m_text_node->data().is_empty()) | ||||||
|         return {}; |         return {}; | ||||||
|  | @ -697,7 +697,7 @@ Optional<ByteString> HTMLInputElement::placeholder_value() const | ||||||
|         return {}; |         return {}; | ||||||
|     if (!has_attribute(HTML::AttributeNames::placeholder)) |     if (!has_attribute(HTML::AttributeNames::placeholder)) | ||||||
|         return {}; |         return {}; | ||||||
|     return placeholder().to_byte_string(); |     return placeholder(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HTMLInputElement::create_shadow_tree_if_needed() | void HTMLInputElement::create_shadow_tree_if_needed() | ||||||
|  |  | ||||||
|  | @ -79,7 +79,7 @@ public: | ||||||
|     void commit_pending_changes(); |     void commit_pending_changes(); | ||||||
| 
 | 
 | ||||||
|     String placeholder() const; |     String placeholder() const; | ||||||
|     Optional<ByteString> placeholder_value() const; |     Optional<String> placeholder_value() const; | ||||||
| 
 | 
 | ||||||
|     bool checked() const { return m_checked; } |     bool checked() const { return m_checked; } | ||||||
|     enum class ChangeSource { |     enum class ChangeSource { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Bastiaan van der Plaat
						Bastiaan van der Plaat