| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 return m_popupClient->menuStyle().textDirection() == RTL; | 281 return m_popupClient->menuStyle().textDirection() == RTL; |
| 282 } | 282 } |
| 283 | 283 |
| 284 // From HTMLSelectElement.cpp | 284 // From HTMLSelectElement.cpp |
| 285 static String stripLeadingWhiteSpace(const String& string) | 285 static String stripLeadingWhiteSpace(const String& string) |
| 286 { | 286 { |
| 287 int length = string.length(); | 287 int length = string.length(); |
| 288 int i; | 288 int i; |
| 289 for (i = 0; i < length; ++i) | 289 for (i = 0; i < length; ++i) |
| 290 if (string[i] != noBreakSpace | 290 if (string[i] != noBreakSpace |
| 291 && (string[i] <= 0x7F ? !isASCIISpace(string[i]) : (direction(string
[i]) != WhiteSpaceNeutral))) | 291 && !isSpaceOrNewline(string[i])) |
| 292 break; | 292 break; |
| 293 | 293 |
| 294 return string.substring(i, length - i); | 294 return string.substring(i, length - i); |
| 295 } | 295 } |
| 296 | 296 |
| 297 // From HTMLSelectElement.cpp, with modifications | 297 // From HTMLSelectElement.cpp, with modifications |
| 298 void PopupListBox::typeAheadFind(const PlatformKeyboardEvent& event) | 298 void PopupListBox::typeAheadFind(const PlatformKeyboardEvent& event) |
| 299 { | 299 { |
| 300 TimeStamp now = static_cast<TimeStamp>(currentTime() * 1000.0f); | 300 TimeStamp now = static_cast<TimeStamp>(currentTime() * 1000.0f); |
| 301 TimeStamp delta = now - m_lastCharTime; | 301 TimeStamp delta = now - m_lastCharTime; |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 { | 817 { |
| 818 return numItems() && IntRect(0, 0, width(), height()).contains(point); | 818 return numItems() && IntRect(0, 0, width(), height()).contains(point); |
| 819 } | 819 } |
| 820 | 820 |
| 821 int PopupListBox::popupContentHeight() const | 821 int PopupListBox::popupContentHeight() const |
| 822 { | 822 { |
| 823 return height(); | 823 return height(); |
| 824 } | 824 } |
| 825 | 825 |
| 826 } // namespace WebCore | 826 } // namespace WebCore |
| OLD | NEW |