| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 16 matching lines...) Expand all Loading... |
| 27 #include "core/rendering/RenderNamedFlowThread.h" | 27 #include "core/rendering/RenderNamedFlowThread.h" |
| 28 | 28 |
| 29 #include "RuntimeEnabledFeatures.h" | 29 #include "RuntimeEnabledFeatures.h" |
| 30 #include "bindings/v8/ExceptionStatePlaceholder.h" | 30 #include "bindings/v8/ExceptionStatePlaceholder.h" |
| 31 #include "core/dom/NamedFlow.h" | 31 #include "core/dom/NamedFlow.h" |
| 32 #include "core/dom/NodeRenderingTraversal.h" | 32 #include "core/dom/NodeRenderingTraversal.h" |
| 33 #include "core/dom/NodeTraversal.h" | 33 #include "core/dom/NodeTraversal.h" |
| 34 #include "core/dom/Position.h" | 34 #include "core/dom/Position.h" |
| 35 #include "core/dom/Range.h" | 35 #include "core/dom/Range.h" |
| 36 #include "core/dom/Text.h" | 36 #include "core/dom/Text.h" |
| 37 #include "core/inspector/InspectorInstrumentation.h" | |
| 38 #include "core/rendering/FlowThreadController.h" | 37 #include "core/rendering/FlowThreadController.h" |
| 39 #include "core/rendering/InlineTextBox.h" | 38 #include "core/rendering/InlineTextBox.h" |
| 40 #include "core/rendering/RenderInline.h" | 39 #include "core/rendering/RenderInline.h" |
| 41 #include "core/rendering/RenderRegion.h" | 40 #include "core/rendering/RenderRegion.h" |
| 42 #include "core/rendering/RenderText.h" | 41 #include "core/rendering/RenderText.h" |
| 43 #include "core/rendering/RenderView.h" | 42 #include "core/rendering/RenderView.h" |
| 44 | 43 |
| 45 namespace WebCore { | 44 namespace WebCore { |
| 46 | 45 |
| 47 RenderNamedFlowThread* RenderNamedFlowThread::createAnonymous(Document* document
, PassRefPtr<NamedFlow> namedFlow) | 46 RenderNamedFlowThread* RenderNamedFlowThread::createAnonymous(Document* document
, PassRefPtr<NamedFlow> namedFlow) |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 Node* originalParent = NodeRenderingTraversal::parent(child->node()); | 487 Node* originalParent = NodeRenderingTraversal::parent(child->node()); |
| 489 if (!originalParent || !originalParent->renderer()) | 488 if (!originalParent || !originalParent->renderer()) |
| 490 return true; | 489 return true; |
| 491 | 490 |
| 492 return originalParent->renderer()->isChildAllowed(child, style); | 491 return originalParent->renderer()->isChildAllowed(child, style); |
| 493 } | 492 } |
| 494 | 493 |
| 495 void RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent() | 494 void RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent() |
| 496 { | 495 { |
| 497 RenderFlowThread::dispatchRegionLayoutUpdateEvent(); | 496 RenderFlowThread::dispatchRegionLayoutUpdateEvent(); |
| 498 InspectorInstrumentation::didUpdateRegionLayout(&document(), m_namedFlow.get
()); | |
| 499 | 497 |
| 500 if (!m_regionLayoutUpdateEventTimer.isActive() && m_namedFlow->hasEventListe
ners()) | 498 if (!m_regionLayoutUpdateEventTimer.isActive() && m_namedFlow->hasEventListe
ners()) |
| 501 m_regionLayoutUpdateEventTimer.startOneShot(0); | 499 m_regionLayoutUpdateEventTimer.startOneShot(0); |
| 502 } | 500 } |
| 503 | 501 |
| 504 void RenderNamedFlowThread::dispatchRegionOversetChangeEvent() | 502 void RenderNamedFlowThread::dispatchRegionOversetChangeEvent() |
| 505 { | 503 { |
| 506 RenderFlowThread::dispatchRegionOversetChangeEvent(); | 504 RenderFlowThread::dispatchRegionOversetChangeEvent(); |
| 507 InspectorInstrumentation::didChangeRegionOverset(&document(), m_namedFlow.ge
t()); | |
| 508 | 505 |
| 509 if (!m_regionOversetChangeEventTimer.isActive() && m_namedFlow->hasEventList
eners()) | 506 if (!m_regionOversetChangeEventTimer.isActive() && m_namedFlow->hasEventList
eners()) |
| 510 m_regionOversetChangeEventTimer.startOneShot(0); | 507 m_regionOversetChangeEventTimer.startOneShot(0); |
| 511 } | 508 } |
| 512 | 509 |
| 513 void RenderNamedFlowThread::regionLayoutUpdateEventTimerFired(Timer<RenderNamedF
lowThread>*) | 510 void RenderNamedFlowThread::regionLayoutUpdateEventTimerFired(Timer<RenderNamedF
lowThread>*) |
| 514 { | 511 { |
| 515 ASSERT(m_namedFlow); | 512 ASSERT(m_namedFlow); |
| 516 | 513 |
| 517 m_namedFlow->dispatchRegionLayoutUpdateEvent(); | 514 m_namedFlow->dispatchRegionLayoutUpdateEvent(); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 lastEndNode = node; | 718 lastEndNode = node; |
| 722 } | 719 } |
| 723 } | 720 } |
| 724 } | 721 } |
| 725 if (foundStartPosition || skipOverOutsideNodes) | 722 if (foundStartPosition || skipOverOutsideNodes) |
| 726 rangeObjects.append(range); | 723 rangeObjects.append(range); |
| 727 } | 724 } |
| 728 } | 725 } |
| 729 | 726 |
| 730 } | 727 } |
| OLD | NEW |