OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2556 if (isWritingModeRoot() && !isRubyRun()) | 2556 if (isWritingModeRoot() && !isRubyRun()) |
2557 return -1; | 2557 return -1; |
2558 if (!childrenInline()) | 2558 if (!childrenInline()) |
2559 return LayoutBlock::inlineBlockBaseline(lineDirection); | 2559 return LayoutBlock::inlineBlockBaseline(lineDirection); |
2560 if (lastLineBox()) { | 2560 if (lastLineBox()) { |
2561 const SimpleFontData* fontData = | 2561 const SimpleFontData* fontData = |
2562 style(lastLineBox() == firstLineBox())->font().primaryFont(); | 2562 style(lastLineBox() == firstLineBox())->font().primaryFont(); |
2563 DCHECK(fontData); | 2563 DCHECK(fontData); |
2564 if (!fontData) | 2564 if (!fontData) |
2565 return -1; | 2565 return -1; |
| 2566 // InlineFlowBox::placeBoxesInBlockDirection will flip lines in |
| 2567 // case of verticalLR mode, so we can assume verticalRL for now. |
| 2568 if (style()->isFlippedLinesWritingMode()) { |
| 2569 return (logicalHeight() - lastLineBox()->logicalBottom() + |
| 2570 fontData->getFontMetrics().ascent(lastRootBox()->baselineType())) |
| 2571 .toInt(); |
| 2572 } |
2566 return (lastLineBox()->logicalTop() + | 2573 return (lastLineBox()->logicalTop() + |
2567 fontData->getFontMetrics().ascent(lastRootBox()->baselineType())) | 2574 fontData->getFontMetrics().ascent(lastRootBox()->baselineType())) |
2568 .toInt(); | 2575 .toInt(); |
2569 } | 2576 } |
2570 if (!hasLineIfEmpty()) | 2577 if (!hasLineIfEmpty()) |
2571 return -1; | 2578 return -1; |
2572 | 2579 |
2573 const SimpleFontData* fontData = firstLineStyle()->font().primaryFont(); | 2580 const SimpleFontData* fontData = firstLineStyle()->font().primaryFont(); |
2574 DCHECK(fontData); | 2581 DCHECK(fontData); |
2575 if (!fontData) | 2582 if (!fontData) |
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4538 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 4545 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
4539 } | 4546 } |
4540 | 4547 |
4541 void LayoutBlockFlow::invalidateDisplayItemClients( | 4548 void LayoutBlockFlow::invalidateDisplayItemClients( |
4542 PaintInvalidationReason invalidationReason) const { | 4549 PaintInvalidationReason invalidationReason) const { |
4543 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( | 4550 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( |
4544 invalidationReason); | 4551 invalidationReason); |
4545 } | 4552 } |
4546 | 4553 |
4547 } // namespace blink | 4554 } // namespace blink |
OLD | NEW |