OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 11 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 12 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
11 * Copyright (C) 2012 Google Inc. All rights reserved. | 13 * Copyright (C) 2012 Google Inc. All rights reserved. |
12 * | 14 * |
13 * This library is free software; you can redistribute it and/or | 15 * This library is free software; you can redistribute it and/or |
14 * modify it under the terms of the GNU Library General Public | 16 * modify it under the terms of the GNU Library General Public |
15 * License as published by the Free Software Foundation; either | 17 * License as published by the Free Software Foundation; either |
16 * version 2 of the License, or (at your option) any later version. | 18 * version 2 of the License, or (at your option) any later version. |
17 * | 19 * |
18 * This library is distributed in the hope that it will be useful, | 20 * This library is distributed in the hope that it will be useful, |
(...skipping 25 matching lines...) Expand all Loading... |
44 int pageIndex) const { | 46 int pageIndex) const { |
45 bool isFirstPageLeft = false; | 47 bool isFirstPageLeft = false; |
46 ASSERT(rootElementStyle); | 48 ASSERT(rootElementStyle); |
47 if (!rootElementStyle->isLeftToRightDirection()) | 49 if (!rootElementStyle->isLeftToRightDirection()) |
48 isFirstPageLeft = true; | 50 isFirstPageLeft = true; |
49 | 51 |
50 return (pageIndex + (isFirstPageLeft ? 1 : 0)) % 2; | 52 return (pageIndex + (isFirstPageLeft ? 1 : 0)) % 2; |
51 } | 53 } |
52 | 54 |
53 bool PageRuleCollector::isFirstPage(int pageIndex) const { | 55 bool PageRuleCollector::isFirstPage(int pageIndex) const { |
54 // FIXME: In case of forced left/right page, page at index 1 (not 0) can be th
e first page. | 56 // FIXME: In case of forced left/right page, page at index 1 (not 0) can be |
| 57 // the first page. |
55 return (!pageIndex); | 58 return (!pageIndex); |
56 } | 59 } |
57 | 60 |
58 String PageRuleCollector::pageName(int /* pageIndex */) const { | 61 String PageRuleCollector::pageName(int /* pageIndex */) const { |
59 // FIXME: Implement page index to page name mapping. | 62 // FIXME: Implement page index to page name mapping. |
60 return ""; | 63 return ""; |
61 } | 64 } |
62 | 65 |
63 PageRuleCollector::PageRuleCollector(const ComputedStyle* rootElementStyle, | 66 PageRuleCollector::PageRuleCollector(const ComputedStyle* rootElementStyle, |
64 int pageIndex) | 67 int pageIndex) |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 const StylePropertySet& properties = rule->properties(); | 126 const StylePropertySet& properties = rule->properties(); |
124 if (properties.isEmpty()) | 127 if (properties.isEmpty()) |
125 continue; | 128 continue; |
126 | 129 |
127 // Add this rule to our list of matched rules. | 130 // Add this rule to our list of matched rules. |
128 matchedRules.append(rule); | 131 matchedRules.append(rule); |
129 } | 132 } |
130 } | 133 } |
131 | 134 |
132 } // namespace blink | 135 } // namespace blink |
OLD | NEW |