Changeset 155318 in webkit for trunk/Source/WebCore/rendering/RenderReplaced.cpp
- Timestamp:
- Sep 8, 2013, 7:11:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r155026 r155318 190 190 LayoutUnit bottom = adjustedPaintOffset.y() + visualOverflowRect().maxY(); 191 191 if (isSelected() && m_inlineBoxWrapper) { 192 LayoutUnit selTop = paintOffset.y() + m_inlineBoxWrapper->root()->selectionTop(); 193 LayoutUnit selBottom = paintOffset.y() + selTop + m_inlineBoxWrapper->root()->selectionHeight(); 192 const RootInlineBox& rootBox = m_inlineBoxWrapper->root(); 193 LayoutUnit selTop = paintOffset.y() + rootBox.selectionTop(); 194 LayoutUnit selBottom = paintOffset.y() + selTop + rootBox.selectionHeight(); 194 195 top = min(selTop, top); 195 196 bottom = max(selBottom, bottom); … … 491 492 // FIXME: This code is buggy if the replaced element is relative positioned. 492 493 InlineBox* box = inlineBoxWrapper(); 493 RootInlineBox* rootBox = box ?box->root() : 0;494 const RootInlineBox* rootBox = box ? &box->root() : 0; 494 495 495 496 LayoutUnit top = rootBox ? rootBox->selectionTop() : logicalTop(); … … 539 540 return LayoutRect(LayoutPoint(), size()); 540 541 541 RootInlineBox* root= m_inlineBoxWrapper->root();542 LayoutUnit newLogicalTop = root ->block().style()->isFlippedBlocksWritingMode() ? m_inlineBoxWrapper->logicalBottom() - root->selectionBottom() : root->selectionTop() - m_inlineBoxWrapper->logicalTop();543 if (root ->block().style()->isHorizontalWritingMode())544 return LayoutRect(0, newLogicalTop, width(), root ->selectionHeight());545 return LayoutRect(newLogicalTop, 0, root ->selectionHeight(), height());542 const RootInlineBox& rootBox = m_inlineBoxWrapper->root(); 543 LayoutUnit newLogicalTop = rootBox.block().style()->isFlippedBlocksWritingMode() ? m_inlineBoxWrapper->logicalBottom() - rootBox.selectionBottom() : rootBox.selectionTop() - m_inlineBoxWrapper->logicalTop(); 544 if (rootBox.block().style()->isHorizontalWritingMode()) 545 return LayoutRect(0, newLogicalTop, width(), rootBox.selectionHeight()); 546 return LayoutRect(newLogicalTop, 0, rootBox.selectionHeight(), height()); 546 547 } 547 548 … … 552 553 553 554 if (m_inlineBoxWrapper && canUpdateSelectionOnRootLineBoxes()) 554 if (RootInlineBox* root = m_inlineBoxWrapper->root()) 555 root->setHasSelectedChildren(isSelected()); 555 m_inlineBoxWrapper->root().setHasSelectedChildren(isSelected()); 556 556 } 557 557
Note:
See TracChangeset
for help on using the changeset viewer.