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

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingStyle.cpp

Issue 1681273003: Add CSS parser support for break-after, break-before and break-inside. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 4 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) 2007, 2008, 2009 Apple Computer, Inc. 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc.
3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 RefPtrWillBeRawPtr<EditingStyle> copy = EditingStyle::create(); 596 RefPtrWillBeRawPtr<EditingStyle> copy = EditingStyle::create();
597 if (m_mutableStyle) 597 if (m_mutableStyle)
598 copy->m_mutableStyle = m_mutableStyle->mutableCopy(); 598 copy->m_mutableStyle = m_mutableStyle->mutableCopy();
599 copy->m_isMonospaceFont = m_isMonospaceFont; 599 copy->m_isMonospaceFont = m_isMonospaceFont;
600 copy->m_fontSizeDelta = m_fontSizeDelta; 600 copy->m_fontSizeDelta = m_fontSizeDelta;
601 return copy; 601 return copy;
602 } 602 }
603 603
604 // This is the list of CSS properties that apply specially to block-level elemen ts. 604 // This is the list of CSS properties that apply specially to block-level elemen ts.
605 static const CSSPropertyID staticBlockProperties[] = { 605 static const CSSPropertyID staticBlockProperties[] = {
606 CSSPropertyBreakAfter,
607 CSSPropertyBreakBefore,
608 CSSPropertyBreakInside,
606 CSSPropertyOrphans, 609 CSSPropertyOrphans,
607 CSSPropertyOverflow, // This can be also be applied to replaced elements 610 CSSPropertyOverflow, // This can be also be applied to replaced elements
608 CSSPropertyWebkitColumnCount, 611 CSSPropertyWebkitColumnCount,
609 CSSPropertyWebkitColumnGap, 612 CSSPropertyWebkitColumnGap,
610 CSSPropertyWebkitColumnRuleColor, 613 CSSPropertyWebkitColumnRuleColor,
611 CSSPropertyWebkitColumnRuleStyle, 614 CSSPropertyWebkitColumnRuleStyle,
612 CSSPropertyWebkitColumnRuleWidth, 615 CSSPropertyWebkitColumnRuleWidth,
613 CSSPropertyWebkitColumnBreakBefore, 616 CSSPropertyWebkitColumnBreakBefore,
614 CSSPropertyWebkitColumnBreakAfter, 617 CSSPropertyWebkitColumnBreakAfter,
615 CSSPropertyWebkitColumnBreakInside, 618 CSSPropertyWebkitColumnBreakInside,
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 { 1727 {
1725 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1728 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1726 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu tedStyleDeclaration::create(ancestor); 1729 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu tedStyleDeclaration::create(ancestor);
1727 if (!hasTransparentBackgroundColor(ancestorStyle.get())) 1730 if (!hasTransparentBackgroundColor(ancestorStyle.get()))
1728 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1731 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1729 } 1732 }
1730 return nullptr; 1733 return nullptr;
1731 } 1734 }
1732 1735
1733 } // namespace blink 1736 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698