Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: Source/core/rendering/RenderListItem.cpp

Issue 182413005: Return refererence from InlineBox::root() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: re-upload because previous patch didn't upload correctly. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /** 1 /**
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 LayoutUnit markerOldLogicalLeft = m_marker->logicalLeft(); 342 LayoutUnit markerOldLogicalLeft = m_marker->logicalLeft();
343 LayoutUnit blockOffset = 0; 343 LayoutUnit blockOffset = 0;
344 LayoutUnit lineOffset = 0; 344 LayoutUnit lineOffset = 0;
345 for (RenderBox* o = m_marker->parentBox(); o != this; o = o->parentBox() ) { 345 for (RenderBox* o = m_marker->parentBox(); o != this; o = o->parentBox() ) {
346 blockOffset += o->logicalTop(); 346 blockOffset += o->logicalTop();
347 lineOffset += o->logicalLeft(); 347 lineOffset += o->logicalLeft();
348 } 348 }
349 349
350 bool adjustOverflow = false; 350 bool adjustOverflow = false;
351 LayoutUnit markerLogicalLeft; 351 LayoutUnit markerLogicalLeft;
352 RootInlineBox* root = m_marker->inlineBoxWrapper()->root(); 352 RootInlineBox& root = m_marker->inlineBoxWrapper()->root();
353 bool hitSelfPaintingLayer = false; 353 bool hitSelfPaintingLayer = false;
354 354
355 RootInlineBox* rootBox = m_marker->inlineBoxWrapper()->root(); 355 LayoutUnit lineTop = root.lineTop();
356 LayoutUnit lineTop = rootBox->lineTop(); 356 LayoutUnit lineBottom = root.lineBottom();
357 LayoutUnit lineBottom = rootBox->lineBottom();
358 357
359 // FIXME: Need to account for relative positioning in the layout overflo w. 358 // FIXME: Need to account for relative positioning in the layout overflo w.
360 if (style()->isLeftToRightDirection()) { 359 if (style()->isLeftToRightDirection()) {
361 LayoutUnit leftLineOffset = logicalLeftOffsetForLine(blockOffset, lo gicalLeftOffsetForLine(blockOffset, false), false); 360 LayoutUnit leftLineOffset = logicalLeftOffsetForLine(blockOffset, lo gicalLeftOffsetForLine(blockOffset, false), false);
362 markerLogicalLeft = leftLineOffset - lineOffset - paddingStart() - b orderStart() + m_marker->marginStart(); 361 markerLogicalLeft = leftLineOffset - lineOffset - paddingStart() - b orderStart() + m_marker->marginStart();
363 m_marker->inlineBoxWrapper()->adjustLineDirectionPosition(markerLogi calLeft - markerOldLogicalLeft); 362 m_marker->inlineBoxWrapper()->adjustLineDirectionPosition(markerLogi calLeft - markerOldLogicalLeft);
364 for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); bo x; box = box->parent()) { 363 for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); bo x; box = box->parent()) {
365 LayoutRect newLogicalVisualOverflowRect = box->logicalVisualOver flowRect(lineTop, lineBottom); 364 LayoutRect newLogicalVisualOverflowRect = box->logicalVisualOver flowRect(lineTop, lineBottom);
366 LayoutRect newLogicalLayoutOverflowRect = box->logicalLayoutOver flowRect(lineTop, lineBottom); 365 LayoutRect newLogicalLayoutOverflowRect = box->logicalLayoutOver flowRect(lineTop, lineBottom);
367 if (markerLogicalLeft < newLogicalVisualOverflowRect.x() && !hit SelfPaintingLayer) { 366 if (markerLogicalLeft < newLogicalVisualOverflowRect.x() && !hit SelfPaintingLayer) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // assume that all the following ones have too. 525 // assume that all the following ones have too.
527 // This gives us the opportunity to stop here and avoid 526 // This gives us the opportunity to stop here and avoid
528 // marking the same nodes again. 527 // marking the same nodes again.
529 break; 528 break;
530 } 529 }
531 item->updateValue(); 530 item->updateValue();
532 } 531 }
533 } 532 }
534 533
535 } // namespace WebCore 534 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698