| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 bool HTMLLabelElement::willRespondToMouseClickEvents() | 196 bool HTMLLabelElement::willRespondToMouseClickEvents() |
| 197 { | 197 { |
| 198 if (control() && control()->willRespondToMouseClickEvents()) | 198 if (control() && control()->willRespondToMouseClickEvents()) |
| 199 return true; | 199 return true; |
| 200 | 200 |
| 201 return HTMLElement::willRespondToMouseClickEvents(); | 201 return HTMLElement::willRespondToMouseClickEvents(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void HTMLLabelElement::focus(const FocusParams& params) | 204 void HTMLLabelElement::focus(const FocusParams& params) |
| 205 { | 205 { |
| 206 document().updateLayoutTreeIgnorePendingStylesheets(); |
| 206 if (isFocusable()) { | 207 if (isFocusable()) { |
| 207 HTMLElement::focus(params); | 208 HTMLElement::focus(params); |
| 208 return; | 209 return; |
| 209 } | 210 } |
| 210 // To match other browsers, always restore previous selection. | 211 // To match other browsers, always restore previous selection. |
| 211 if (HTMLElement* element = control()) | 212 if (HTMLElement* element = control()) |
| 212 element->focus(FocusParams(SelectionBehaviorOnFocus::Restore, params.typ
e, params.sourceCapabilities)); | 213 element->focus(FocusParams(SelectionBehaviorOnFocus::Restore, params.typ
e, params.sourceCapabilities)); |
| 213 } | 214 } |
| 214 | 215 |
| 215 void HTMLLabelElement::accessKeyAction(bool sendMouseEvents) | 216 void HTMLLabelElement::accessKeyAction(bool sendMouseEvents) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 if (attributeName == forAttr) { | 279 if (attributeName == forAttr) { |
| 279 TreeScope& scope = treeScope(); | 280 TreeScope& scope = treeScope(); |
| 280 if (scope.shouldCacheLabelsByForAttribute()) | 281 if (scope.shouldCacheLabelsByForAttribute()) |
| 281 updateLabel(scope, oldValue, attributeValue); | 282 updateLabel(scope, oldValue, attributeValue); |
| 282 } | 283 } |
| 283 HTMLElement::parseAttribute(attributeName, oldValue, attributeValue); | 284 HTMLElement::parseAttribute(attributeName, oldValue, attributeValue); |
| 284 } | 285 } |
| 285 } | 286 } |
| 286 | 287 |
| 287 } // namespace blink | 288 } // namespace blink |
| OLD | NEW |