| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return m_popupClient->locale().formatDateTime(date, Locale::FormatTypeShort); | 93 return m_popupClient->locale().formatDateTime(date, Locale::FormatTypeShort); |
| 94 } | 94 } |
| 95 | 95 |
| 96 String PagePopupController::formatWeek(int year, | 96 String PagePopupController::formatWeek(int year, |
| 97 int weekNumber, | 97 int weekNumber, |
| 98 const String& localizedDateString) { | 98 const String& localizedDateString) { |
| 99 if (!m_popupClient) | 99 if (!m_popupClient) |
| 100 return emptyString(); | 100 return emptyString(); |
| 101 DateComponents week; | 101 DateComponents week; |
| 102 bool setWeekResult = week.setWeek(year, weekNumber); | 102 bool setWeekResult = week.setWeek(year, weekNumber); |
| 103 ASSERT_UNUSED(setWeekResult, setWeekResult); | 103 DCHECK(setWeekResult); |
| 104 String localizedWeek = m_popupClient->locale().formatDateTime(week); | 104 String localizedWeek = m_popupClient->locale().formatDateTime(week); |
| 105 return m_popupClient->locale().queryString( | 105 return m_popupClient->locale().queryString( |
| 106 WebLocalizedString::AXCalendarWeekDescription, localizedWeek, | 106 WebLocalizedString::AXCalendarWeekDescription, localizedWeek, |
| 107 localizedDateString); | 107 localizedDateString); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void PagePopupController::clearPagePopupClient() { | 110 void PagePopupController::clearPagePopupClient() { |
| 111 m_popupClient = nullptr; | 111 m_popupClient = nullptr; |
| 112 } | 112 } |
| 113 | 113 |
| 114 void PagePopupController::setWindowRect(int x, int y, int width, int height) { | 114 void PagePopupController::setWindowRect(int x, int y, int width, int height) { |
| 115 m_popup.setWindowRect(IntRect(x, y, width, height)); | 115 m_popup.setWindowRect(IntRect(x, y, width, height)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace blink | 118 } // namespace blink |
| OLD | NEW |