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

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

Issue 669553002: Remove <marquee> leftovers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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 | « Source/core/frame/UseCounter.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
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 3360 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 // just like a block. 3371 // just like a block.
3372 if (isInline() && linePositionMode == PositionOnContainingLine) { 3372 if (isInline() && linePositionMode == PositionOnContainingLine) {
3373 // For "leaf" theme objects, let the theme decide what the baseline posi tion is. 3373 // For "leaf" theme objects, let the theme decide what the baseline posi tion is.
3374 // FIXME: Might be better to have a custom CSS property instead, so that if the theme 3374 // FIXME: Might be better to have a custom CSS property instead, so that if the theme
3375 // is turned off, checkboxes/radios will still have decent baselines. 3375 // is turned off, checkboxes/radios will still have decent baselines.
3376 // FIXME: Need to patch form controls to deal with vertical lines. 3376 // FIXME: Need to patch form controls to deal with vertical lines.
3377 if (style()->hasAppearance() && !RenderTheme::theme().isControlContainer (style()->appearance())) 3377 if (style()->hasAppearance() && !RenderTheme::theme().isControlContainer (style()->appearance()))
3378 return RenderTheme::theme().baselinePosition(this); 3378 return RenderTheme::theme().baselinePosition(this);
3379 3379
3380 // CSS2.1 states that the baseline of an inline block is the baseline of the last line box in 3380 // CSS2.1 states that the baseline of an inline block is the baseline of the last line box in
3381 // the normal flow. We make an exception for marquees, since their base lines are meaningless 3381 // the normal flow.
3382 // (the content inside them moves). This matches WinIE as well, which j ust bottom-aligns them. 3382 // We give up on finding a baseline if we have a vertical scrollbar, or if we are scrolled
3383 // We also give up on finding a baseline if we have a vertical scrollbar , or if we are scrolled
3384 // 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).
3385 bool ignoreBaseline = (layer() && layer()->scrollableArea() && (isMarque e() || (direction == HorizontalLine ? (layer()->scrollableArea()->verticalScroll bar() || layer()->scrollableArea()->scrollYOffset()) 3384 bool ignoreBaseline = (layer() && layer()->scrollableArea()
3386 : (layer()->scrollableArea()->horizontalScrollbar() || layer()->scro llableArea()->scrollXOffset())))) || (isWritingModeRoot() && !isRubyRun()); 3385 && (direction == HorizontalLine
3386 ? (layer()->scrollableArea()->verticalScrollbar() || layer()->sc rollableArea()->scrollYOffset())
3387 : (layer()->scrollableArea()->horizontalScrollbar() || layer()-> scrollableArea()->scrollXOffset())))
3388 || (isWritingModeRoot() && !isRubyRun());
3387 3389
3388 int baselinePos = ignoreBaseline ? -1 : inlineBlockBaseline(direction); 3390 int baselinePos = ignoreBaseline ? -1 : inlineBlockBaseline(direction);
3389 3391
3390 if (isDeprecatedFlexibleBox()) { 3392 if (isDeprecatedFlexibleBox()) {
3391 // Historically, we did this check for all baselines. But we can't 3393 // Historically, we did this check for all baselines. But we can't
3392 // remove this code from deprecated flexbox, because it effectively 3394 // remove this code from deprecated flexbox, because it effectively
3393 // breaks -webkit-line-clamp, which is used in the wild -- we would 3395 // breaks -webkit-line-clamp, which is used in the wild -- we would
3394 // calculate the baseline as if -webkit-line-clamp wasn't used. 3396 // calculate the baseline as if -webkit-line-clamp wasn't used.
3395 // For simplicity, we use this for all uses of deprecated flexbox. 3397 // For simplicity, we use this for all uses of deprecated flexbox.
3396 LayoutUnit bottomOfContent = direction == HorizontalLine ? borderTop () + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWi dth(); 3398 LayoutUnit bottomOfContent = direction == HorizontalLine ? borderTop () + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWi dth();
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
4359 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 4361 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
4360 { 4362 {
4361 showRenderObject(); 4363 showRenderObject();
4362 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 4364 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
4363 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 4365 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
4364 } 4366 }
4365 4367
4366 #endif 4368 #endif
4367 4369
4368 } // namespace blink 4370 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698