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

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

Issue 2677843002: Change ComputedStyle::setUnique to take bool parameter. (Closed)
Patch Set: Created 3 years, 10 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 style.adjustMaskLayers(); 451 style.adjustMaskLayers();
452 452
453 // Let the theme also have a crack at adjusting the style. 453 // Let the theme also have a crack at adjusting the style.
454 if (style.hasAppearance()) 454 if (style.hasAppearance())
455 LayoutTheme::theme().adjustStyle(style, element); 455 LayoutTheme::theme().adjustStyle(style, element);
456 456
457 // If we have first-letter pseudo style, transitions, or animations, do not 457 // If we have first-letter pseudo style, transitions, or animations, do not
458 // share this style. 458 // share this style.
459 if (style.hasPseudoStyle(PseudoIdFirstLetter) || style.transitions() || 459 if (style.hasPseudoStyle(PseudoIdFirstLetter) || style.transitions() ||
460 style.animations()) 460 style.animations())
461 style.setUnique(); 461 style.setUnique(true);
462 462
463 adjustStyleForEditing(style); 463 adjustStyleForEditing(style);
464 464
465 bool isSVGElement = element && element->isSVGElement(); 465 bool isSVGElement = element && element->isSVGElement();
466 if (isSVGElement) { 466 if (isSVGElement) {
467 // Only the root <svg> element in an SVG document fragment tree honors css 467 // Only the root <svg> element in an SVG document fragment tree honors css
468 // position. 468 // position.
469 if (!(isSVGSVGElement(*element) && element->parentNode() && 469 if (!(isSVGSVGElement(*element) && element->parentNode() &&
470 !element->parentNode()->isSVGElement())) 470 !element->parentNode()->isSVGElement()))
471 style.setPosition(ComputedStyle::initialPosition()); 471 style.setPosition(ComputedStyle::initialPosition());
472 472
473 // SVG text layout code expects us to be a block-level style element. 473 // SVG text layout code expects us to be a block-level style element.
474 if ((isSVGForeignObjectElement(*element) || isSVGTextElement(*element)) && 474 if ((isSVGForeignObjectElement(*element) || isSVGTextElement(*element)) &&
475 style.isDisplayInlineType()) 475 style.isDisplayInlineType())
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