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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Issue 2591373003: Changed WritingMode to an enum class and renamed its members (Closed)
Patch Set: Added comment Created 3 years, 12 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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 style.display() == EDisplay::TableFooterGroup || 356 style.display() == EDisplay::TableFooterGroup ||
357 style.display() == EDisplay::TableHeaderGroup || 357 style.display() == EDisplay::TableHeaderGroup ||
358 style.display() == EDisplay::TableRow || 358 style.display() == EDisplay::TableRow ||
359 style.display() == EDisplay::TableRowGroup || 359 style.display() == EDisplay::TableRowGroup ||
360 style.display() == EDisplay::TableCell) 360 style.display() == EDisplay::TableCell)
361 style.setWritingMode(parentStyle.getWritingMode()); 361 style.setWritingMode(parentStyle.getWritingMode());
362 362
363 // FIXME: Since we don't support block-flow on flexible boxes yet, disallow 363 // FIXME: Since we don't support block-flow on flexible boxes yet, disallow
364 // setting of block-flow to anything other than TopToBottomWritingMode. 364 // setting of block-flow to anything other than TopToBottomWritingMode.
365 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. 365 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support.
366 if (style.getWritingMode() != TopToBottomWritingMode && 366 if (style.getWritingMode() != WritingMode::HorizontalTb &&
367 (style.display() == EDisplay::WebkitBox || 367 (style.display() == EDisplay::WebkitBox ||
368 style.display() == EDisplay::WebkitInlineBox)) 368 style.display() == EDisplay::WebkitInlineBox))
369 style.setWritingMode(TopToBottomWritingMode); 369 style.setWritingMode(WritingMode::HorizontalTb);
370 370
371 if (parentStyle.isDisplayFlexibleOrGridBox()) { 371 if (parentStyle.isDisplayFlexibleOrGridBox()) {
372 style.setFloating(EFloat::None); 372 style.setFloating(EFloat::None);
373 style.setDisplay(equivalentBlockDisplay(style.display())); 373 style.setDisplay(equivalentBlockDisplay(style.display()));
374 374
375 // We want to count vertical percentage paddings/margins on flex items 375 // We want to count vertical percentage paddings/margins on flex items
376 // because our current behavior is different from the spec and we want to 376 // because our current behavior is different from the spec and we want to
377 // gather compatibility data. 377 // gather compatibility data.
378 if (style.paddingBefore().isPercentOrCalc() || 378 if (style.paddingBefore().isPercentOrCalc() ||
379 style.paddingAfter().isPercentOrCalc()) 379 style.paddingAfter().isPercentOrCalc())
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 style.setDisplay(EDisplay::Block); 476 style.setDisplay(EDisplay::Block);
477 477
478 // Columns don't apply to svg text elements. 478 // Columns don't apply to svg text elements.
479 if (isSVGTextElement(*element)) 479 if (isSVGTextElement(*element))
480 style.clearMultiCol(); 480 style.clearMultiCol();
481 } 481 }
482 adjustStyleForAlignment(style, parentStyle); 482 adjustStyleForAlignment(style, parentStyle);
483 } 483 }
484 484
485 } // namespace blink 485 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698