| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple 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 23 matching lines...) Expand all Loading... |
| 34 , verticalOverflow(false) | 34 , verticalOverflow(false) |
| 35 { | 35 { |
| 36 } | 36 } |
| 37 | 37 |
| 38 OverflowEvent::OverflowEvent() | 38 OverflowEvent::OverflowEvent() |
| 39 : Event(EventTypeNames::overflowchanged, false, false) | 39 : Event(EventTypeNames::overflowchanged, false, false) |
| 40 , m_orient(VERTICAL) | 40 , m_orient(VERTICAL) |
| 41 , m_horizontalOverflow(false) | 41 , m_horizontalOverflow(false) |
| 42 , m_verticalOverflow(false) | 42 , m_verticalOverflow(false) |
| 43 { | 43 { |
| 44 ScriptWrappable::init(this); | |
| 45 } | 44 } |
| 46 | 45 |
| 47 OverflowEvent::OverflowEvent(bool horizontalOverflowChanged, bool horizontalOver
flow, bool verticalOverflowChanged, bool verticalOverflow) | 46 OverflowEvent::OverflowEvent(bool horizontalOverflowChanged, bool horizontalOver
flow, bool verticalOverflowChanged, bool verticalOverflow) |
| 48 : Event(EventTypeNames::overflowchanged, false, false) | 47 : Event(EventTypeNames::overflowchanged, false, false) |
| 49 , m_horizontalOverflow(horizontalOverflow) | 48 , m_horizontalOverflow(horizontalOverflow) |
| 50 , m_verticalOverflow(verticalOverflow) | 49 , m_verticalOverflow(verticalOverflow) |
| 51 { | 50 { |
| 52 ASSERT(horizontalOverflowChanged || verticalOverflowChanged); | 51 ASSERT(horizontalOverflowChanged || verticalOverflowChanged); |
| 53 ScriptWrappable::init(this); | |
| 54 | 52 |
| 55 if (horizontalOverflowChanged && verticalOverflowChanged) | 53 if (horizontalOverflowChanged && verticalOverflowChanged) |
| 56 m_orient = BOTH; | 54 m_orient = BOTH; |
| 57 else if (horizontalOverflowChanged) | 55 else if (horizontalOverflowChanged) |
| 58 m_orient = HORIZONTAL; | 56 m_orient = HORIZONTAL; |
| 59 else | 57 else |
| 60 m_orient = VERTICAL; | 58 m_orient = VERTICAL; |
| 61 } | 59 } |
| 62 | 60 |
| 63 OverflowEvent::OverflowEvent(const AtomicString& type, const OverflowEventInit&
initializer) | 61 OverflowEvent::OverflowEvent(const AtomicString& type, const OverflowEventInit&
initializer) |
| 64 : Event(type, initializer) | 62 : Event(type, initializer) |
| 65 , m_orient(initializer.orient) | 63 , m_orient(initializer.orient) |
| 66 , m_horizontalOverflow(initializer.horizontalOverflow) | 64 , m_horizontalOverflow(initializer.horizontalOverflow) |
| 67 , m_verticalOverflow(initializer.verticalOverflow) | 65 , m_verticalOverflow(initializer.verticalOverflow) |
| 68 { | 66 { |
| 69 ScriptWrappable::init(this); | |
| 70 } | 67 } |
| 71 | 68 |
| 72 const AtomicString& OverflowEvent::interfaceName() const | 69 const AtomicString& OverflowEvent::interfaceName() const |
| 73 { | 70 { |
| 74 return EventNames::OverflowEvent; | 71 return EventNames::OverflowEvent; |
| 75 } | 72 } |
| 76 | 73 |
| 77 void OverflowEvent::trace(Visitor* visitor) | 74 void OverflowEvent::trace(Visitor* visitor) |
| 78 { | 75 { |
| 79 Event::trace(visitor); | 76 Event::trace(visitor); |
| 80 } | 77 } |
| 81 | 78 |
| 82 } | 79 } |
| OLD | NEW |