1635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project/*
206ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen * Copyright (C) 2010 Google Inc. All rights reserved.
30bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch *
4635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * Redistribution and use in source and binary forms, with or without
5635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * modification, are permitted provided that the following conditions are
6635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * met:
70bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch *
8635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project *     * Redistributions of source code must retain the above copyright
9635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * notice, this list of conditions and the following disclaimer.
10635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project *     * Redistributions in binary form must reproduce the above
11635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * copyright notice, this list of conditions and the following disclaimer
12635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * in the documentation and/or other materials provided with the
13635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * distribution.
14635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project *     * Neither the name of Google Inc. nor the names of its
15635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * contributors may be used to endorse or promote products derived from
16635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * this software without specific prior written permission.
170bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch *
18635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project */
30635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project
3106ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen#include "config.h"
3206ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen#include "CompositionUnderlineVectorBuilder.h"
33635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project
3406ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen#include "CompositionUnderlineBuilder.h"
35d0825bca7fe65beaee391d30da42e937db621564Steve Block
3606ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsenusing namespace WebCore;
37635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project
3806ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsennamespace WebKit {
39635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project
4006ea8e899e48f1f2f396b70e63fae369f2f23232Kristian MonsenCompositionUnderlineVectorBuilder::CompositionUnderlineVectorBuilder(
4106ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen    const WebVector<WebCompositionUnderline>& underlines)
4206ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen{
4306ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen    size_t size = underlines.size();
4406ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen    reserveCapacity(size);
4506ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen    for (size_t i = 0; i < size; ++i)
4606ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen        append(CompositionUnderlineBuilder(underlines[i]));
4706ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen}
48635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project
4906ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen} // namespace WebKit
50