| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the select element layoutObject in WebCore. | 2 * This file is part of the select element layoutObject in WebCore. |
| 3 * | 3 * |
| 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * (C) 2009 Torch Mobile Inc. All rights reserved. | 7 * (C) 2009 Torch Mobile Inc. All rights reserved. |
| 8 * (http://www.torchmobile.com/) | 8 * (http://www.torchmobile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 void LayoutMenuList::DidUpdateActiveOption(HTMLOptionElement* option) { | 302 void LayoutMenuList::DidUpdateActiveOption(HTMLOptionElement* option) { |
| 303 if (!GetDocument().ExistingAXObjectCache()) | 303 if (!GetDocument().ExistingAXObjectCache()) |
| 304 return; | 304 return; |
| 305 | 305 |
| 306 int option_index = option ? option->index() : -1; | 306 int option_index = option ? option->index() : -1; |
| 307 if (last_active_index_ == option_index) | 307 if (last_active_index_ == option_index) |
| 308 return; | 308 return; |
| 309 last_active_index_ = option_index; | 309 last_active_index_ = option_index; |
| 310 | 310 |
| 311 if (option_index < 0) | |
| 312 return; | |
| 313 | |
| 314 // We skip sending accessiblity notifications for the very first option, | 311 // We skip sending accessiblity notifications for the very first option, |
| 315 // otherwise we get extra focus and select events that are undesired. | 312 // otherwise we get extra focus and select events that are undesired. |
| 316 if (!has_updated_active_option_) { | 313 if (!has_updated_active_option_) { |
| 317 has_updated_active_option_ = true; | 314 has_updated_active_option_ = true; |
| 318 return; | 315 return; |
| 319 } | 316 } |
| 320 | 317 |
| 321 GetDocument().ExistingAXObjectCache()->HandleUpdateActiveMenuOption( | 318 GetDocument().ExistingAXObjectCache()->HandleUpdateActiveMenuOption( |
| 322 this, option_index); | 319 this, option_index); |
| 323 } | 320 } |
| 324 | 321 |
| 325 LayoutUnit LayoutMenuList::ClientPaddingLeft() const { | 322 LayoutUnit LayoutMenuList::ClientPaddingLeft() const { |
| 326 return PaddingLeft() + inner_block_->PaddingLeft(); | 323 return PaddingLeft() + inner_block_->PaddingLeft(); |
| 327 } | 324 } |
| 328 | 325 |
| 329 LayoutUnit LayoutMenuList::ClientPaddingRight() const { | 326 LayoutUnit LayoutMenuList::ClientPaddingRight() const { |
| 330 return PaddingRight() + inner_block_->PaddingRight(); | 327 return PaddingRight() + inner_block_->PaddingRight(); |
| 331 } | 328 } |
| 332 | 329 |
| 333 } // namespace blink | 330 } // namespace blink |
| OLD | NEW |