| Index: Source/core/testing/LayerRectList.cpp
|
| diff --git a/Source/core/dom/ClientRect.cpp b/Source/core/testing/LayerRectList.cpp
|
| similarity index 72%
|
| copy from Source/core/dom/ClientRect.cpp
|
| copy to Source/core/testing/LayerRectList.cpp
|
| index bff5d8091a33497146bbf2374f3161f20f5aa0a5..7216ad14855998b1923e7887c2a591460ee78e29 100644
|
| --- a/Source/core/dom/ClientRect.cpp
|
| +++ b/Source/core/testing/LayerRectList.cpp
|
| @@ -20,30 +20,43 @@
|
| * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
| * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| *
|
| */
|
|
|
| #include "config.h"
|
| +#include "core/testing/LayerRectList.h"
|
| +
|
| #include "core/dom/ClientRect.h"
|
| +#include "core/dom/Node.h"
|
| +#include "core/testing/LayerRect.h"
|
|
|
| namespace WebCore {
|
|
|
| -ClientRect::ClientRect()
|
| +LayerRectList::LayerRectList()
|
| +{
|
| +}
|
| +
|
| +LayerRectList::~LayerRectList()
|
| {
|
| - ScriptWrappable::init(this);
|
| }
|
|
|
| -ClientRect::ClientRect(const IntRect& rect)
|
| - : m_rect(rect)
|
| +unsigned LayerRectList::length() const
|
| {
|
| - ScriptWrappable::init(this);
|
| + return m_list.size();
|
| +}
|
| +
|
| +LayerRect* LayerRectList::item(unsigned index)
|
| +{
|
| + if (index >= m_list.size())
|
| + return 0;
|
| +
|
| + return m_list[index].get();
|
| }
|
|
|
| -ClientRect::ClientRect(const FloatRect& rect)
|
| - : m_rect(rect)
|
| +void LayerRectList::append(PassRefPtr<Node> layerRootNode, PassRefPtr<ClientRect> layerRelativeRect)
|
| {
|
| - ScriptWrappable::init(this);
|
| + m_list.append(LayerRect::create(layerRootNode, layerRelativeRect));
|
| }
|
|
|
| } // namespace WebCore
|
|
|