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 return (lastLineBox()->logicalTop() + | 2566 // InlineFlowBox::placeBoxesInBlockDirection will flip lines in |
2567 // case of verticalLR mode, so we can assume verticalRL for now. | |
2568 return ((style()->isFlippedLinesWritingMode() | |
mstensho (USE GERRIT)
2016/12/02 11:38:03
This expression now became very complex. Maybe you
jfernandez
2016/12/05 23:57:28
Acknowledged.
| |
2569 ? logicalHeight() - lastLineBox()->logicalBottom() | |
2570 : lastLineBox()->logicalTop()) + | |
2567 fontData->getFontMetrics().ascent(lastRootBox()->baselineType())) | 2571 fontData->getFontMetrics().ascent(lastRootBox()->baselineType())) |
2568 .toInt(); | 2572 .toInt(); |
2569 } | 2573 } |
2570 if (!hasLineIfEmpty()) | 2574 if (!hasLineIfEmpty()) |
2571 return -1; | 2575 return -1; |
2572 | 2576 |
2573 const SimpleFontData* fontData = firstLineStyle()->font().primaryFont(); | 2577 const SimpleFontData* fontData = firstLineStyle()->font().primaryFont(); |
2574 DCHECK(fontData); | 2578 DCHECK(fontData); |
2575 if (!fontData) | 2579 if (!fontData) |
2576 return -1; | 2580 return -1; |
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4538 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 4542 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
4539 } | 4543 } |
4540 | 4544 |
4541 void LayoutBlockFlow::invalidateDisplayItemClients( | 4545 void LayoutBlockFlow::invalidateDisplayItemClients( |
4542 PaintInvalidationReason invalidationReason) const { | 4546 PaintInvalidationReason invalidationReason) const { |
4543 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( | 4547 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( |
4544 invalidationReason); | 4548 invalidationReason); |
4545 } | 4549 } |
4546 | 4550 |
4547 } // namespace blink | 4551 } // namespace blink |
OLD | NEW |