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 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 } | 1911 } |
1912 } | 1912 } |
1913 | 1913 |
1914 void LayoutBlockFlow::computeOverflow(LayoutUnit oldClientAfterEdge, bool recomp
uteFloats) | 1914 void LayoutBlockFlow::computeOverflow(LayoutUnit oldClientAfterEdge, bool recomp
uteFloats) |
1915 { | 1915 { |
1916 LayoutBlock::computeOverflow(oldClientAfterEdge, recomputeFloats); | 1916 LayoutBlock::computeOverflow(oldClientAfterEdge, recomputeFloats); |
1917 if (recomputeFloats || createsNewFormattingContext() || hasSelfPaintingLayer
()) | 1917 if (recomputeFloats || createsNewFormattingContext() || hasSelfPaintingLayer
()) |
1918 addOverflowFromFloats(); | 1918 addOverflowFromFloats(); |
1919 } | 1919 } |
1920 | 1920 |
| 1921 void LayoutBlockFlow::computeSelfHitTestRects(Vector<LayoutRect>& rects, const L
ayoutPoint& layerOffset) const |
| 1922 { |
| 1923 LayoutBlock::computeSelfHitTestRects(rects, layerOffset); |
| 1924 |
| 1925 if (!hasHorizontalLayoutOverflow() && !hasVerticalLayoutOverflow()) |
| 1926 return; |
| 1927 |
| 1928 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox())
{ |
| 1929 LayoutUnit top = std::max<LayoutUnit>(curr->lineTop(), curr->top()); |
| 1930 LayoutUnit bottom = std::min<LayoutUnit>(curr->lineBottom(), curr->top()
+ curr->height()); |
| 1931 LayoutRect rect(layerOffset.x() + curr->x(), layerOffset.y() + top, curr
->width(), bottom - top); |
| 1932 // It's common for this rect to be entirely contained in our box, so exc
lude that simple case. |
| 1933 if (!rect.isEmpty() && (rects.isEmpty() || !rects[0].contains(rect))) |
| 1934 rects.append(rect); |
| 1935 } |
| 1936 } |
| 1937 |
1921 RootInlineBox* LayoutBlockFlow::createAndAppendRootInlineBox() | 1938 RootInlineBox* LayoutBlockFlow::createAndAppendRootInlineBox() |
1922 { | 1939 { |
1923 RootInlineBox* rootBox = createRootInlineBox(); | 1940 RootInlineBox* rootBox = createRootInlineBox(); |
1924 m_lineBoxes.appendLineBox(rootBox); | 1941 m_lineBoxes.appendLineBox(rootBox); |
1925 | 1942 |
1926 return rootBox; | 1943 return rootBox; |
1927 } | 1944 } |
1928 | 1945 |
1929 void LayoutBlockFlow::deleteLineBoxTree() | 1946 void LayoutBlockFlow::deleteLineBoxTree() |
1930 { | 1947 { |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3117 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. | 3134 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. |
3118 GlyphOverflowAndFallbackFontsMap textBoxDataMap; | 3135 GlyphOverflowAndFallbackFontsMap textBoxDataMap; |
3119 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { | 3136 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { |
3120 RootInlineBox* box = *it; | 3137 RootInlineBox* box = *it; |
3121 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); | 3138 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); |
3122 } | 3139 } |
3123 return childrenOverflowChanged; | 3140 return childrenOverflowChanged; |
3124 } | 3141 } |
3125 | 3142 |
3126 } // namespace blink | 3143 } // namespace blink |
OLD | NEW |