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 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. |
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 if (fastHasAttribute(contenteditableAttr)) { | 1021 if (fastHasAttribute(contenteditableAttr)) { |
1022 const AtomicString& value = fastGetAttribute(contenteditableAttr); | 1022 const AtomicString& value = fastGetAttribute(contenteditableAttr); |
1023 | 1023 |
1024 if (value.isEmpty() || equalIgnoringCase(value, "true") || equalIgnoring
Case(value, "plaintext-only")) | 1024 if (value.isEmpty() || equalIgnoringCase(value, "true") || equalIgnoring
Case(value, "plaintext-only")) |
1025 return true; | 1025 return true; |
1026 if (equalIgnoringCase(value, "false")) | 1026 if (equalIgnoringCase(value, "false")) |
1027 return false; | 1027 return false; |
1028 // All other values should be treated as "inherit". | 1028 // All other values should be treated as "inherit". |
1029 } | 1029 } |
1030 | 1030 |
1031 return parentElement() && parentElement()->hasEditableStyle(); | 1031 return parentElement() && hasEditableStyle(*parentElement()); |
1032 } | 1032 } |
1033 | 1033 |
1034 void HTMLElement::handleKeypressEvent(KeyboardEvent* event) | 1034 void HTMLElement::handleKeypressEvent(KeyboardEvent* event) |
1035 { | 1035 { |
1036 if (!isSpatialNavigationEnabled(document().frame()) || !supportsFocus()) | 1036 if (!isSpatialNavigationEnabled(document().frame()) || !supportsFocus()) |
1037 return; | 1037 return; |
1038 // if the element is a text form control (like <input type=text> or <textare
a>) | 1038 // if the element is a text form control (like <input type=text> or <textare
a>) |
1039 // or has contentEditable attribute on, we should enter a space or newline | 1039 // or has contentEditable attribute on, we should enter a space or newline |
1040 // even in spatial navigation mode instead of handling it as a "click" actio
n. | 1040 // even in spatial navigation mode instead of handling it as a "click" actio
n. |
1041 if (isTextFormControl() || isContentEditable()) | 1041 if (isTextFormControl() || isContentEditable()) |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 #ifndef NDEBUG | 1101 #ifndef NDEBUG |
1102 | 1102 |
1103 // For use in the debugger | 1103 // For use in the debugger |
1104 void dumpInnerHTML(blink::HTMLElement*); | 1104 void dumpInnerHTML(blink::HTMLElement*); |
1105 | 1105 |
1106 void dumpInnerHTML(blink::HTMLElement* element) | 1106 void dumpInnerHTML(blink::HTMLElement* element) |
1107 { | 1107 { |
1108 printf("%s\n", element->innerHTML().ascii().data()); | 1108 printf("%s\n", element->innerHTML().ascii().data()); |
1109 } | 1109 } |
1110 #endif | 1110 #endif |
OLD | NEW |