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

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

Issue 629143005: Remove RenderObject::isMarquee() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/core/rendering/RenderBox.cpp » ('j') | Source/core/rendering/RenderBox.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 3359 matching lines...) Expand 10 before | Expand all | Expand 10 after
3370 // just like a block. 3370 // just like a block.
3371 if (isInline() && linePositionMode == PositionOnContainingLine) { 3371 if (isInline() && linePositionMode == PositionOnContainingLine) {
3372 // For "leaf" theme objects, let the theme decide what the baseline posi tion is. 3372 // For "leaf" theme objects, let the theme decide what the baseline posi tion is.
3373 // FIXME: Might be better to have a custom CSS property instead, so that if the theme 3373 // FIXME: Might be better to have a custom CSS property instead, so that if the theme
3374 // is turned off, checkboxes/radios will still have decent baselines. 3374 // is turned off, checkboxes/radios will still have decent baselines.
3375 // FIXME: Need to patch form controls to deal with vertical lines. 3375 // FIXME: Need to patch form controls to deal with vertical lines.
3376 if (style()->hasAppearance() && !RenderTheme::theme().isControlContainer (style()->appearance())) 3376 if (style()->hasAppearance() && !RenderTheme::theme().isControlContainer (style()->appearance()))
3377 return RenderTheme::theme().baselinePosition(this); 3377 return RenderTheme::theme().baselinePosition(this);
3378 3378
3379 // CSS2.1 states that the baseline of an inline block is the baseline of the last line box in 3379 // CSS2.1 states that the baseline of an inline block is the baseline of the last line box in
3380 // the normal flow. We make an exception for marquees, since their base lines are meaningless 3380 // the normal flow. We make an exception for marquees, since their base lines are meaningless
Mike West 2014/10/06 20:04:01 Nit: the marquee comment here should also be remov
Hajime Morrita 2014/10/06 20:22:10 Done.
3381 // (the content inside them moves). This matches WinIE as well, which j ust bottom-aligns them. 3381 // (the content inside them moves). This matches WinIE as well, which j ust bottom-aligns them.
3382 // We also give up on finding a baseline if we have a vertical scrollbar , or if we are scrolled 3382 // We also give up on finding a baseline if we have a vertical scrollbar , or if we are scrolled
3383 // vertically (e.g., an overflow:hidden block that has had scrollTop mov ed). 3383 // vertically (e.g., an overflow:hidden block that has had scrollTop mov ed).
3384 bool ignoreBaseline = (layer() && layer()->scrollableArea() && (isMarque e() || (direction == HorizontalLine ? (layer()->scrollableArea()->verticalScroll bar() || layer()->scrollableArea()->scrollYOffset()) 3384 bool ignoreBaseline = (layer() && layer()->scrollableArea() && ((directi on == HorizontalLine ? (layer()->scrollableArea()->verticalScrollbar() || layer( )->scrollableArea()->scrollYOffset())
Mike West 2014/10/06 20:04:01 Nit: This is hard to parse. Perhaps you could move
Hajime Morrita 2014/10/06 20:22:10 Done.
3385 : (layer()->scrollableArea()->horizontalScrollbar() || layer()->scro llableArea()->scrollXOffset())))) || (isWritingModeRoot() && !isRubyRun()); 3385 : (layer()->scrollableArea()->horizontalScrollbar() || layer()->scro llableArea()->scrollXOffset())))) || (isWritingModeRoot() && !isRubyRun());
3386 3386
3387 int baselinePos = ignoreBaseline ? -1 : inlineBlockBaseline(direction); 3387 int baselinePos = ignoreBaseline ? -1 : inlineBlockBaseline(direction);
3388 3388
3389 if (isDeprecatedFlexibleBox()) { 3389 if (isDeprecatedFlexibleBox()) {
3390 // Historically, we did this check for all baselines. But we can't 3390 // Historically, we did this check for all baselines. But we can't
3391 // remove this code from deprecated flexbox, because it effectively 3391 // remove this code from deprecated flexbox, because it effectively
3392 // breaks -webkit-line-clamp, which is used in the wild -- we would 3392 // breaks -webkit-line-clamp, which is used in the wild -- we would
3393 // calculate the baseline as if -webkit-line-clamp wasn't used. 3393 // calculate the baseline as if -webkit-line-clamp wasn't used.
3394 // For simplicity, we use this for all uses of deprecated flexbox. 3394 // For simplicity, we use this for all uses of deprecated flexbox.
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
4367 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 4367 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
4368 { 4368 {
4369 showRenderObject(); 4369 showRenderObject();
4370 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 4370 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
4371 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 4371 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
4372 } 4372 }
4373 4373
4374 #endif 4374 #endif
4375 4375
4376 } // namespace blink 4376 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderBox.cpp » ('j') | Source/core/rendering/RenderBox.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698