| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 { | 103 { |
| 104 return m_currentAnchor == &anchor; | 104 return m_currentAnchor == &anchor; |
| 105 } | 105 } |
| 106 | 106 |
| 107 void ValidationMessageClientImpl::documentDetached(const Document& document) | 107 void ValidationMessageClientImpl::documentDetached(const Document& document) |
| 108 { | 108 { |
| 109 if (m_currentAnchor && m_currentAnchor->document() == document) | 109 if (m_currentAnchor && m_currentAnchor->document() == document) |
| 110 hideValidationMessage(*m_currentAnchor); | 110 hideValidationMessage(*m_currentAnchor); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void ValidationMessageClientImpl::checkAnchorStatus(Timer<ValidationMessageClien
tImpl>*) | 113 void ValidationMessageClientImpl::checkAnchorStatus(TimerBase*) |
| 114 { | 114 { |
| 115 DCHECK(m_currentAnchor); | 115 DCHECK(m_currentAnchor); |
| 116 if (monotonicallyIncreasingTime() >= m_finishTime || !currentView()) { | 116 if (monotonicallyIncreasingTime() >= m_finishTime || !currentView()) { |
| 117 hideValidationMessage(*m_currentAnchor); | 117 hideValidationMessage(*m_currentAnchor); |
| 118 return; | 118 return; |
| 119 } | 119 } |
| 120 | 120 |
| 121 // Check the visibility of the element. | 121 // Check the visibility of the element. |
| 122 // FIXME: Can we check invisibility by scrollable non-frame elements? | 122 // FIXME: Can we check invisibility by scrollable non-frame elements? |
| 123 IntRect newAnchorRectInViewport = currentView()->contentsToViewport(m_curren
tAnchor->pixelSnappedBoundingBox()); | 123 IntRect newAnchorRectInViewport = currentView()->contentsToViewport(m_curren
tAnchor->pixelSnappedBoundingBox()); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 145 hideValidationMessage(*m_currentAnchor); | 145 hideValidationMessage(*m_currentAnchor); |
| 146 } | 146 } |
| 147 | 147 |
| 148 DEFINE_TRACE(ValidationMessageClientImpl) | 148 DEFINE_TRACE(ValidationMessageClientImpl) |
| 149 { | 149 { |
| 150 visitor->trace(m_currentAnchor); | 150 visitor->trace(m_currentAnchor); |
| 151 ValidationMessageClient::trace(visitor); | 151 ValidationMessageClient::trace(visitor); |
| 152 } | 152 } |
| 153 | 153 |
| 154 } // namespace blink | 154 } // namespace blink |
| OLD | NEW |