| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 class Document; | 41 class Document; |
| 42 class NamedFlowCollection; | 42 class NamedFlowCollection; |
| 43 class Node; | 43 class Node; |
| 44 class NodeList; | 44 class NodeList; |
| 45 class RenderNamedFlowThread; | 45 class RenderNamedFlowThread; |
| 46 class ScriptExecutionContext; | 46 class ScriptExecutionContext; |
| 47 | 47 |
| 48 class NamedFlow : public RefCounted<NamedFlow>, public ScriptWrappable, public E
ventTarget { | 48 class NamedFlow : public RefCounted<NamedFlow>, public ScriptWrappable, public E
ventTargetWithInlineData { |
| 49 public: | 49 public: |
| 50 static PassRefPtr<NamedFlow> create(PassRefPtr<NamedFlowCollection> manager,
const AtomicString& flowThreadName); | 50 static PassRefPtr<NamedFlow> create(PassRefPtr<NamedFlowCollection> manager,
const AtomicString& flowThreadName); |
| 51 | 51 |
| 52 ~NamedFlow(); | 52 ~NamedFlow(); |
| 53 | 53 |
| 54 const AtomicString& name() const; | 54 const AtomicString& name() const; |
| 55 bool overset() const; | 55 bool overset() const; |
| 56 int firstEmptyRegionIndex() const; | 56 int firstEmptyRegionIndex() const; |
| 57 PassRefPtr<NodeList> getRegionsByContent(Node*); | 57 PassRefPtr<NodeList> getRegionsByContent(Node*); |
| 58 PassRefPtr<NodeList> getRegions(); | 58 PassRefPtr<NodeList> getRegions(); |
| 59 PassRefPtr<NodeList> getContent(); | 59 PassRefPtr<NodeList> getContent(); |
| 60 | 60 |
| 61 using RefCounted<NamedFlow>::ref; | 61 using RefCounted<NamedFlow>::ref; |
| 62 using RefCounted<NamedFlow>::deref; | 62 using RefCounted<NamedFlow>::deref; |
| 63 | 63 |
| 64 virtual const AtomicString& interfaceName() const; | 64 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 65 virtual ScriptExecutionContext* scriptExecutionContext() const; | 65 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; |
| 66 | 66 |
| 67 // This function is called from the JS binding code to determine if the Name
dFlow object is reachable or not. | 67 // This function is called from the JS binding code to determine if the Name
dFlow object is reachable or not. |
| 68 // If the object has listeners, the object should only be discarded if the p
arent Document is not reachable. | 68 // If the object has listeners, the object should only be discarded if the p
arent Document is not reachable. |
| 69 Node* ownerNode() const; | 69 Node* ownerNode() const; |
| 70 | 70 |
| 71 void setRenderer(RenderNamedFlowThread* parentFlowThread); | 71 void setRenderer(RenderNamedFlowThread* parentFlowThread); |
| 72 | 72 |
| 73 enum FlowState { | 73 enum FlowState { |
| 74 FlowStateCreated, | 74 FlowStateCreated, |
| 75 FlowStateNull | 75 FlowStateNull |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 FlowState flowState() const { return m_parentFlowThread ? FlowStateCreated :
FlowStateNull; } | 78 FlowState flowState() const { return m_parentFlowThread ? FlowStateCreated :
FlowStateNull; } |
| 79 | 79 |
| 80 void dispatchRegionLayoutUpdateEvent(); | 80 void dispatchRegionLayoutUpdateEvent(); |
| 81 void dispatchRegionOversetChangeEvent(); | 81 void dispatchRegionOversetChangeEvent(); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 NamedFlow(PassRefPtr<NamedFlowCollection>, const AtomicString&); | 84 NamedFlow(PassRefPtr<NamedFlowCollection>, const AtomicString&); |
| 85 | 85 |
| 86 // EventTarget implementation. | 86 // EventTarget implementation. |
| 87 virtual void refEventTarget() { ref(); } | 87 virtual void refEventTarget() OVERRIDE { ref(); } |
| 88 virtual void derefEventTarget() { deref(); } | 88 virtual void derefEventTarget() OVERRIDE { deref(); } |
| 89 | |
| 90 virtual EventTargetData* eventTargetData() OVERRIDE; | |
| 91 virtual EventTargetData* ensureEventTargetData() OVERRIDE; | |
| 92 | 89 |
| 93 // The name of the flow thread as specified in CSS. | 90 // The name of the flow thread as specified in CSS. |
| 94 AtomicString m_flowThreadName; | 91 AtomicString m_flowThreadName; |
| 95 | 92 |
| 96 RefPtr<NamedFlowCollection> m_flowManager; | 93 RefPtr<NamedFlowCollection> m_flowManager; |
| 97 RenderNamedFlowThread* m_parentFlowThread; | 94 RenderNamedFlowThread* m_parentFlowThread; |
| 98 | |
| 99 EventTargetData m_eventTargetData; | |
| 100 }; | 95 }; |
| 101 | 96 |
| 102 } | 97 } |
| 103 | 98 |
| 104 #endif | 99 #endif |
| OLD | NEW |