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

Side by Side Diff: Source/WebCore/html/TextFieldInputType.cpp

Issue 11293258: Merge 134377 - Crash when replacing parts of text inputs with content: url(...) (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « Source/WebCore/css/html.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 ASSERT(!ec); 418 ASSERT(!ec);
419 } 419 }
420 m_placeholder->setInnerText(placeholderText, ec); 420 m_placeholder->setInnerText(placeholderText, ec);
421 ASSERT(!ec); 421 ASSERT(!ec);
422 element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_conta iner.get() : m_innerText.get()); 422 element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_conta iner.get() : m_innerText.get());
423 } 423 }
424 424
425 void TextFieldInputType::attach() 425 void TextFieldInputType::attach()
426 { 426 {
427 InputType::attach(); 427 InputType::attach();
428 // If container exists, the container should not have any content data.
429 ASSERT(!m_container || !m_container->renderStyle() || !m_container->renderSt yle()->hasContent());
430
428 element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_conta iner.get() : m_innerText.get()); 431 element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_conta iner.get() : m_innerText.get());
429 } 432 }
430 433
431 bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) cons t 434 bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) cons t
432 { 435 {
433 InputType::appendFormData(list, multipart); 436 InputType::appendFormData(list, multipart);
434 const AtomicString& dirnameAttrValue = element()->fastGetAttribute(dirnameAt tr); 437 const AtomicString& dirnameAttrValue = element()->fastGetAttribute(dirnameAt tr);
435 if (!dirnameAttrValue.isNull()) 438 if (!dirnameAttrValue.isNull())
436 list.appendData(dirnameAttrValue, element()->directionForFormData()); 439 list.appendData(dirnameAttrValue, element()->directionForFormData());
437 return true; 440 return true;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 { 474 {
472 return !element()->disabled() && !element()->readOnly(); 475 return !element()->disabled() && !element()->readOnly();
473 } 476 }
474 477
475 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() 478 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents()
476 { 479 {
477 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); 480 return shouldSpinButtonRespondToMouseEvents() && element()->focused();
478 } 481 }
479 482
480 } // namespace WebCore 483 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/css/html.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698