| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 LayoutUnit RootInlineBox::verticalPositionForBox(InlineBox* box, VerticalPositio
nCache& verticalPositionCache) | 650 LayoutUnit RootInlineBox::verticalPositionForBox(InlineBox* box, VerticalPositio
nCache& verticalPositionCache) |
| 651 { | 651 { |
| 652 if (box->renderer().isText()) | 652 if (box->renderer().isText()) |
| 653 return box->parent()->logicalTop(); | 653 return box->parent()->logicalTop(); |
| 654 | 654 |
| 655 RenderBoxModelObject* renderer = box->boxModelObject(); | 655 RenderBoxModelObject* renderer = box->boxModelObject(); |
| 656 ASSERT(renderer->isInline()); | 656 ASSERT(renderer->isInline()); |
| 657 if (!renderer->isInline()) | 657 if (!renderer->isInline()) |
| 658 return 0; | 658 return 0; |
| 659 | 659 |
| 660 // This method determines the vertical position for inline elements. | 660 bool firstLine = false; |
| 661 bool firstLine = isFirstLineStyle(); | |
| 662 if (firstLine && !renderer->document().styleEngine()->usesFirstLineRules()) | |
| 663 firstLine = false; | |
| 664 | 661 |
| 665 // Check the cache. | 662 // Check the cache. |
| 666 bool isRenderInline = renderer->isRenderInline(); | 663 bool isRenderInline = renderer->isRenderInline(); |
| 667 if (isRenderInline && !firstLine) { | 664 if (isRenderInline && !firstLine) { |
| 668 LayoutUnit verticalPosition = verticalPositionCache.get(renderer, baseli
neType()); | 665 LayoutUnit verticalPosition = verticalPositionCache.get(renderer, baseli
neType()); |
| 669 if (verticalPosition != PositionUndefined) | 666 if (verticalPosition != PositionUndefined) |
| 670 return verticalPosition; | 667 return verticalPosition; |
| 671 } | 668 } |
| 672 | 669 |
| 673 LayoutUnit verticalPosition = 0; | 670 LayoutUnit verticalPosition = 0; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 } | 803 } |
| 807 | 804 |
| 808 #ifndef NDEBUG | 805 #ifndef NDEBUG |
| 809 const char* RootInlineBox::boxName() const | 806 const char* RootInlineBox::boxName() const |
| 810 { | 807 { |
| 811 return "RootInlineBox"; | 808 return "RootInlineBox"; |
| 812 } | 809 } |
| 813 #endif | 810 #endif |
| 814 | 811 |
| 815 } // namespace blink | 812 } // namespace blink |
| OLD | NEW |