<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166465] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166465">166465</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-30 13:32:22 -0700 (Sun, 30 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make RenderStyle's non inherited flags more JSC friendly
https://bugs.webkit.org/show_bug.cgi?id=130939
Reviewed by Andreas Kling.
Make RenderStyle::NonInheritedFlags accessible to the JIT:
-Make the struct public to give access to the offset.
-Move away from a bit field to static offsets we can use
with the MacroAssembler.
-Reorder the field to simplify bit access of the flags we need.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyVerticalAlign::createHandler):
(WebCore::ApplyPropertyDisplay::applyInitialValue):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::copyNonInheritedFrom):
(WebCore::RenderStyle::hashForTextAutosizing):
(WebCore::RenderStyle::equalForTextAutosizing):
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::hasAnyPublicPseudoStyles):
(WebCore::RenderStyle::hasPseudoStyle):
(WebCore::RenderStyle::setHasPseudoStyle):
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleMultiColDatacpp">trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166464 => 166465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-30 19:50:53 UTC (rev 166464)
+++ trunk/Source/WebCore/ChangeLog        2014-03-30 20:32:22 UTC (rev 166465)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2014-03-30 Benjamin Poulain <benjamin@webkit.org>
+
+ Make RenderStyle's non inherited flags more JSC friendly
+ https://bugs.webkit.org/show_bug.cgi?id=130939
+
+ Reviewed by Andreas Kling.
+
+ Make RenderStyle::NonInheritedFlags accessible to the JIT:
+ -Make the struct public to give access to the offset.
+ -Move away from a bit field to static offsets we can use
+ with the MacroAssembler.
+ -Reorder the field to simplify bit access of the flags we need.
+
+ * css/DeprecatedStyleBuilder.cpp:
+ (WebCore::ApplyPropertyVerticalAlign::createHandler):
+ (WebCore::ApplyPropertyDisplay::applyInitialValue):
+ (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::adjustRenderStyle):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::RenderStyle):
+ (WebCore::RenderStyle::copyNonInheritedFrom):
+ (WebCore::RenderStyle::hashForTextAutosizing):
+ (WebCore::RenderStyle::equalForTextAutosizing):
+ (WebCore::RenderStyle::changeRequiresLayout):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::hasAnyPublicPseudoStyles):
+ (WebCore::RenderStyle::hasPseudoStyle):
+ (WebCore::RenderStyle::setHasPseudoStyle):
+ * rendering/style/StyleMultiColData.cpp:
+ (WebCore::StyleMultiColData::StyleMultiColData):
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+
</ins><span class="cx"> 2014-03-30 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS] Fix build of HTMLConverter.mm after r166454
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (166464 => 166465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-03-30 19:50:53 UTC (rev 166464)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-03-30 20:32:22 UTC (rev 166465)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2011 Google Inc. All rights reserved.
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -1977,7 +1977,7 @@
</span><span class="cx">
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="cx"> {
</span><del>- PropertyHandler handler = ApplyPropertyDefaultBase<EVerticalAlign, &RenderStyle::verticalAlign, EVerticalAlign, &RenderStyle::setVerticalAlign, EVerticalAlign, &RenderStyle::initialVerticalAlign>::createHandler();
</del><ins>+ PropertyHandler handler = ApplyPropertyDefaultBase<EVerticalAlign, &RenderStyle::verticalAlign, EVerticalAlign, &RenderStyle::setVerticalAlign, EVerticalAlign, &RenderStyle::NonInheritedFlags::initialVerticalAlign>::createHandler();
</ins><span class="cx"> return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="lines">@@ -2102,7 +2102,7 @@
</span><span class="cx">
</span><span class="cx"> static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
</span><span class="cx"> {
</span><del>- styleResolver->style()->setDisplay(RenderStyle::initialDisplay());
</del><ins>+ styleResolver->style()->setDisplay(RenderStyle::NonInheritedFlags::initialDisplay());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="lines">@@ -2385,7 +2385,7 @@
</span><span class="cx"> setPropertyHandler(CSSPropertyBottom, ApplyPropertyLength<&RenderStyle::bottom, &RenderStyle::setBottom, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyBoxSizing, ApplyPropertyDefault<EBoxSizing, &RenderStyle::boxSizing, EBoxSizing, &RenderStyle::setBoxSizing, EBoxSizing, &RenderStyle::initialBoxSizing>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyCaptionSide, ApplyPropertyDefault<ECaptionSide, &RenderStyle::captionSide, ECaptionSide, &RenderStyle::setCaptionSide, ECaptionSide, &RenderStyle::initialCaptionSide>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyClear, ApplyPropertyDefault<EClear, &RenderStyle::clear, EClear, &RenderStyle::setClear, EClear, &RenderStyle::initialClear>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyClear, ApplyPropertyDefault<EClear, &RenderStyle::clear, EClear, &RenderStyle::setClear, EClear, &RenderStyle::NonInheritedFlags::initialClear>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyClip, ApplyPropertyClip::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyColor, ApplyPropertyColor<InheritFromParent, &RenderStyle::color, &RenderStyle::setColor, &RenderStyle::setVisitedLinkColor, &RenderStyle::invalidColor, RenderStyle::initialColor>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyCounterIncrement, ApplyPropertyCounter<Increment>::createHandler());
</span><span class="lines">@@ -2394,7 +2394,7 @@
</span><span class="cx"> setPropertyHandler(CSSPropertyDirection, ApplyPropertyDirection<&RenderStyle::direction, &RenderStyle::setDirection, RenderStyle::initialDirection>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyDisplay, ApplyPropertyDisplay::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyEmptyCells, ApplyPropertyDefault<EEmptyCell, &RenderStyle::emptyCells, EEmptyCell, &RenderStyle::setEmptyCells, EEmptyCell, &RenderStyle::initialEmptyCells>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyFloat, ApplyPropertyDefault<EFloat, &RenderStyle::floating, EFloat, &RenderStyle::setFloating, EFloat, &RenderStyle::initialFloating>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyFloat, ApplyPropertyDefault<EFloat, &RenderStyle::floating, EFloat, &RenderStyle::setFloating, EFloat, &RenderStyle::NonInheritedFlags::initialFloating>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyFontFamily, ApplyPropertyFontFamily::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyFontSize, ApplyPropertyFontSize::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont<FontItalic, &FontDescription::italic, &FontDescription::setItalic, FontItalicOff>::createHandler());
</span><span class="lines">@@ -2435,22 +2435,22 @@
</span><span class="cx"> setPropertyHandler(CSSPropertyOutlineStyle, ApplyPropertyOutlineStyle::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyOutlineWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::outlineWidth, &RenderStyle::setOutlineWidth, &RenderStyle::initialOutlineWidth, NormalDisabled, ThicknessEnabled>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyOverflowWrap, ApplyPropertyDefault<EOverflowWrap, &RenderStyle::overflowWrap, EOverflowWrap, &RenderStyle::setOverflowWrap, EOverflowWrap, &RenderStyle::initialOverflowWrap>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyOverflowX, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowX, EOverflow, &RenderStyle::setOverflowX, EOverflow, &RenderStyle::initialOverflowX>::createHandler());
- setPropertyHandler(CSSPropertyOverflowY, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowY, EOverflow, &RenderStyle::setOverflowY, EOverflow, &RenderStyle::initialOverflowY>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyOverflowX, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowX, EOverflow, &RenderStyle::setOverflowX, EOverflow, &RenderStyle::NonInheritedFlags::initialOverflowX>::createHandler());
+ setPropertyHandler(CSSPropertyOverflowY, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowY, EOverflow, &RenderStyle::setOverflowY, EOverflow, &RenderStyle::NonInheritedFlags::initialOverflowY>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyPaddingBottom, ApplyPropertyLength<&RenderStyle::paddingBottom, &RenderStyle::setPaddingBottom, &RenderStyle::initialPadding>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyPaddingLeft, ApplyPropertyLength<&RenderStyle::paddingLeft, &RenderStyle::setPaddingLeft, &RenderStyle::initialPadding>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyPaddingRight, ApplyPropertyLength<&RenderStyle::paddingRight, &RenderStyle::setPaddingRight, &RenderStyle::initialPadding>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyPaddingTop, ApplyPropertyLength<&RenderStyle::paddingTop, &RenderStyle::setPaddingTop, &RenderStyle::initialPadding>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyPageBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakAfter, EPageBreak, &RenderStyle::setPageBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
- setPropertyHandler(CSSPropertyPageBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakBefore, EPageBreak, &RenderStyle::setPageBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
- setPropertyHandler(CSSPropertyPageBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakInside, EPageBreak, &RenderStyle::setPageBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyPageBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakAfter, EPageBreak, &RenderStyle::setPageBreakAfter, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
+ setPropertyHandler(CSSPropertyPageBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakBefore, EPageBreak, &RenderStyle::setPageBreakBefore, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
+ setPropertyHandler(CSSPropertyPageBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakInside, EPageBreak, &RenderStyle::setPageBreakInside, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyPointerEvents, ApplyPropertyDefault<EPointerEvents, &RenderStyle::pointerEvents, EPointerEvents, &RenderStyle::setPointerEvents, EPointerEvents, &RenderStyle::initialPointerEvents>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyPosition, ApplyPropertyDefault<EPosition, &RenderStyle::position, EPosition, &RenderStyle::setPosition, EPosition, &RenderStyle::initialPosition>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyPosition, ApplyPropertyDefault<EPosition, &RenderStyle::position, EPosition, &RenderStyle::setPosition, EPosition, &RenderStyle::NonInheritedFlags::initialPosition>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyResize, ApplyPropertyResize::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyRight, ApplyPropertyLength<&RenderStyle::right, &RenderStyle::setRight, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertySize, ApplyPropertyPageSize::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertySpeak, ApplyPropertyDefault<ESpeak, &RenderStyle::speak, ESpeak, &RenderStyle::setSpeak, ESpeak, &RenderStyle::initialSpeak>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyTableLayout, ApplyPropertyDefault<ETableLayout, &RenderStyle::tableLayout, ETableLayout, &RenderStyle::setTableLayout, ETableLayout, &RenderStyle::initialTableLayout>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyTableLayout, ApplyPropertyDefault<ETableLayout, &RenderStyle::tableLayout, ETableLayout, &RenderStyle::setTableLayout, ETableLayout, &RenderStyle::NonInheritedFlags::initialTableLayout>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyTabSize, ApplyPropertyDefault<unsigned, &RenderStyle::tabSize, unsigned, &RenderStyle::setTabSize, unsigned, &RenderStyle::initialTabSize>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler());
</span><span class="lines">@@ -2468,7 +2468,7 @@
</span><span class="cx"> setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont<TextRenderingMode, &FontDescription::textRenderingMode, &FontDescription::setTextRenderingMode, AutoTextRendering>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyTextTransform, ApplyPropertyDefault<ETextTransform, &RenderStyle::textTransform, ETextTransform, &RenderStyle::setTextTransform, ETextTransform, &RenderStyle::initialTextTransform>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyTop, ApplyPropertyLength<&RenderStyle::top, &RenderStyle::setTop, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyUnicodeBidi, ApplyPropertyDefault<EUnicodeBidi, &RenderStyle::unicodeBidi, EUnicodeBidi, &RenderStyle::setUnicodeBidi, EUnicodeBidi, &RenderStyle::initialUnicodeBidi>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyUnicodeBidi, ApplyPropertyDefault<EUnicodeBidi, &RenderStyle::unicodeBidi, EUnicodeBidi, &RenderStyle::setUnicodeBidi, EUnicodeBidi, &RenderStyle::NonInheritedFlags::initialUnicodeBidi>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyVerticalAlign, ApplyPropertyVerticalAlign::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyVisibility, ApplyPropertyDefault<EVisibility, &RenderStyle::visibility, EVisibility, &RenderStyle::setVisibility, EVisibility, &RenderStyle::initialVisibility>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitAnimationDelay, ApplyPropertyAnimation<double, &Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSToStyleMap::mapAnimationDelay, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
</span><span class="lines">@@ -2507,9 +2507,9 @@
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitBoxPack, ApplyPropertyDefault<EBoxPack, &RenderStyle::boxPack, EBoxPack, &RenderStyle::setBoxPack, EBoxPack, &RenderStyle::initialBoxPack>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitColorCorrection, ApplyPropertyDefault<ColorSpace, &RenderStyle::colorSpace, ColorSpace, &RenderStyle::setColorSpace, ColorSpace, &RenderStyle::initialColorSpace>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitColumnAxis, ApplyPropertyDefault<ColumnAxis, &RenderStyle::columnAxis, ColumnAxis, &RenderStyle::setColumnAxis, ColumnAxis, &RenderStyle::initialColumnAxis>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyWebkitColumnBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakAfter, EPageBreak, &RenderStyle::setColumnBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
- setPropertyHandler(CSSPropertyWebkitColumnBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakBefore, EPageBreak, &RenderStyle::setColumnBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
- setPropertyHandler(CSSPropertyWebkitColumnBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakInside, EPageBreak, &RenderStyle::setColumnBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyWebkitColumnBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakAfter, EPageBreak, &RenderStyle::setColumnBreakAfter, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitColumnBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakBefore, EPageBreak, &RenderStyle::setColumnBreakBefore, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitColumnBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakInside, EPageBreak, &RenderStyle::setColumnBreakInside, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyWebkitColumnCount, ApplyPropertyAuto<unsigned short, &RenderStyle::columnCount, &RenderStyle::setColumnCount, &RenderStyle::hasAutoColumnCount, &RenderStyle::setHasAutoColumnCount>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitColumnFill, ApplyPropertyDefault<ColumnFill, &RenderStyle::columnFill, ColumnFill, &RenderStyle::setColumnFill, ColumnFill, &RenderStyle::initialColumnFill>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitColumnGap, ApplyPropertyAuto<float, &RenderStyle::columnGap, &RenderStyle::setColumnGap, &RenderStyle::hasNormalColumnGap, &RenderStyle::setHasNormalColumnGap, ComputeLength, CSSValueNormal>::createHandler());
</span><span class="lines">@@ -2583,9 +2583,9 @@
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitPerspectiveOriginY, ApplyPropertyLength<&RenderStyle::perspectiveOriginY, &RenderStyle::setPerspectiveOriginY, &RenderStyle::initialPerspectiveOriginY>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitPrintColorAdjust, ApplyPropertyDefault<PrintColorAdjust, &RenderStyle::printColorAdjust, PrintColorAdjust, &RenderStyle::setPrintColorAdjust, PrintColorAdjust, &RenderStyle::initialPrintColorAdjust>::createHandler());
</span><span class="cx"> #if ENABLE(CSS_REGIONS)
</span><del>- setPropertyHandler(CSSPropertyWebkitRegionBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakAfter, EPageBreak, &RenderStyle::setRegionBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
- setPropertyHandler(CSSPropertyWebkitRegionBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakBefore, EPageBreak, &RenderStyle::setRegionBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
- setPropertyHandler(CSSPropertyWebkitRegionBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakInside, EPageBreak, &RenderStyle::setRegionBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyWebkitRegionBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakAfter, EPageBreak, &RenderStyle::setRegionBreakAfter, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitRegionBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakBefore, EPageBreak, &RenderStyle::setRegionBreakBefore, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitRegionBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakInside, EPageBreak, &RenderStyle::setRegionBreakInside, EPageBreak, &RenderStyle::NonInheritedFlags::initialPageBreak>::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyWebkitRegionFragment, ApplyPropertyDefault<RegionFragment, &RenderStyle::regionFragment, RegionFragment, &RenderStyle::setRegionFragment, RegionFragment, &RenderStyle::initialRegionFragment>::createHandler());
</span><span class="cx"> #endif
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitRtlOrdering, ApplyPropertyDefault<Order, &RenderStyle::rtlOrdering, Order, &RenderStyle::setRTLOrdering, Order, &RenderStyle::initialRTLOrdering>::createHandler());
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (166464 => 166465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2014-03-30 19:50:53 UTC (rev 166464)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2014-03-30 20:32:22 UTC (rev 166465)
</span><span class="lines">@@ -1350,7 +1350,7 @@
</span><span class="cx">
</span><span class="cx"> // Only the root <svg> element in an SVG document fragment tree honors css position
</span><span class="cx"> if (!(e->hasTagName(SVGNames::svgTag) && e->parentNode() && !e->parentNode()->isSVGElement()))
</span><del>- style.setPosition(RenderStyle::initialPosition());
</del><ins>+ style.setPosition(RenderStyle::NonInheritedFlags::initialPosition());
</ins><span class="cx">
</span><span class="cx"> // RenderSVGRoot handles zooming for the whole SVG subtree, so foreignObject content should
</span><span class="cx"> // not be scaled again.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (166464 => 166465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-03-30 19:50:53 UTC (rev 166464)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-03-30 20:32:22 UTC (rev 166465)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
</span><del>- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="lines">@@ -126,7 +126,27 @@
</span><span class="cx"> , inherited(StyleInheritedData::create())
</span><span class="cx"> , m_svgStyle(SVGRenderStyle::create())
</span><span class="cx"> {
</span><del>- setBitDefaults();
</del><ins>+ inherited_flags._empty_cells = initialEmptyCells();
+ inherited_flags._caption_side = initialCaptionSide();
+ inherited_flags._list_style_type = initialListStyleType();
+ inherited_flags._list_style_position = initialListStylePosition();
+ inherited_flags._visibility = initialVisibility();
+ inherited_flags._text_align = initialTextAlign();
+ inherited_flags._text_transform = initialTextTransform();
+ inherited_flags._text_decorations = initialTextDecoration();
+ inherited_flags._cursor_style = initialCursor();
+#if ENABLE(CURSOR_VISIBILITY)
+ inherited_flags.m_cursorVisibility = initialCursorVisibility();
+#endif
+ inherited_flags._direction = initialDirection();
+ inherited_flags._white_space = initialWhiteSpace();
+ inherited_flags._border_collapse = initialBorderCollapse();
+ inherited_flags.m_rtlOrdering = initialRTLOrdering();
+ inherited_flags._box_direction = initialBoxDirection();
+ inherited_flags.m_printColorAdjust = initialPrintColorAdjust();
+ inherited_flags._pointerEvents = initialPointerEvents();
+ inherited_flags._insideLink = NotInsideLink;
+ inherited_flags.m_writingMode = initialWritingMode();
</ins><span class="cx">
</span><span class="cx"> static_assert((sizeof(InheritedFlags) <= 8), "InheritedFlags does not grow");
</span><span class="cx"> static_assert((sizeof(NonInheritedFlags) <= 8), "NonInheritedFlags does not grow");
</span><span class="lines">@@ -170,21 +190,7 @@
</span><span class="cx"> m_background = other->m_background;
</span><span class="cx"> surround = other->surround;
</span><span class="cx"> rareNonInheritedData = other->rareNonInheritedData;
</span><del>- // The flags are copied one-by-one because noninherited_flags contains a bunch of stuff other than real style data.
- noninherited_flags._effectiveDisplay = other->noninherited_flags._effectiveDisplay;
- noninherited_flags._originalDisplay = other->noninherited_flags._originalDisplay;
- noninherited_flags._overflowX = other->noninherited_flags._overflowX;
- noninherited_flags._overflowY = other->noninherited_flags._overflowY;
- noninherited_flags._vertical_align = other->noninherited_flags._vertical_align;
- noninherited_flags._clear = other->noninherited_flags._clear;
- noninherited_flags._position = other->noninherited_flags._position;
- noninherited_flags._floating = other->noninherited_flags._floating;
- noninherited_flags._table_layout = other->noninherited_flags._table_layout;
- noninherited_flags._unicodeBidi = other->noninherited_flags._unicodeBidi;
- noninherited_flags._page_break_before = other->noninherited_flags._page_break_before;
- noninherited_flags._page_break_after = other->noninherited_flags._page_break_after;
- noninherited_flags._page_break_inside = other->noninherited_flags._page_break_inside;
- noninherited_flags.explicitInheritance = other->noninherited_flags.explicitInheritance;
</del><ins>+ noninherited_flags.copyNonInheritedFrom(other->noninherited_flags);
</ins><span class="cx">
</span><span class="cx"> if (m_svgStyle != other->m_svgStyle)
</span><span class="cx"> m_svgStyle.access()->copyNonInheritedFrom(other->m_svgStyle.get());
</span><span class="lines">@@ -310,8 +316,8 @@
</span><span class="cx"> hash ^= inherited->vertical_border_spacing;
</span><span class="cx"> hash ^= inherited_flags._box_direction;
</span><span class="cx"> hash ^= inherited_flags.m_rtlOrdering;
</span><del>- hash ^= noninherited_flags._position;
- hash ^= noninherited_flags._floating;
</del><ins>+ hash ^= noninherited_flags.position();
+ hash ^= noninherited_flags.floating();
</ins><span class="cx"> hash ^= rareNonInheritedData->textOverflow;
</span><span class="cx"> hash ^= rareInheritedData->textSecurity;
</span><span class="cx"> return hash;
</span><span class="lines">@@ -334,8 +340,8 @@
</span><span class="cx"> && inherited->vertical_border_spacing == other->inherited->vertical_border_spacing
</span><span class="cx"> && inherited_flags._box_direction == other->inherited_flags._box_direction
</span><span class="cx"> && inherited_flags.m_rtlOrdering == other->inherited_flags.m_rtlOrdering
</span><del>- && noninherited_flags._position == other->noninherited_flags._position
- && noninherited_flags._floating == other->noninherited_flags._floating
</del><ins>+ && noninherited_flags.position() == other->noninherited_flags.position()
+ && noninherited_flags.floating() == other->noninherited_flags.floating()
</ins><span class="cx"> && rareNonInheritedData->textOverflow == other->rareNonInheritedData->textOverflow;
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="lines">@@ -386,7 +392,7 @@
</span><span class="cx"> || m_box->maxHeight() != other->m_box->maxHeight())
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (m_box->verticalAlign() != other->m_box->verticalAlign() || noninherited_flags._vertical_align != other->noninherited_flags._vertical_align)
</del><ins>+ if (m_box->verticalAlign() != other->m_box->verticalAlign() || noninherited_flags.verticalAlign() != other->noninherited_flags.verticalAlign())
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> if (m_box->boxSizing() != other->m_box->boxSizing())
</span><span class="lines">@@ -527,17 +533,17 @@
</span><span class="cx"> || inherited->vertical_border_spacing != other->inherited->vertical_border_spacing
</span><span class="cx"> || inherited_flags._box_direction != other->inherited_flags._box_direction
</span><span class="cx"> || inherited_flags.m_rtlOrdering != other->inherited_flags.m_rtlOrdering
</span><del>- || noninherited_flags._position != other->noninherited_flags._position
- || noninherited_flags._floating != other->noninherited_flags._floating
- || noninherited_flags._originalDisplay != other->noninherited_flags._originalDisplay)
</del><ins>+ || noninherited_flags.position() != other->noninherited_flags.position()
+ || noninherited_flags.floating() != other->noninherited_flags.floating()
+ || noninherited_flags.originalDisplay() != other->noninherited_flags.originalDisplay())
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx">
</span><del>- if (((int)noninherited_flags._effectiveDisplay) >= TABLE) {
</del><ins>+ if ((noninherited_flags.effectiveDisplay()) >= TABLE) {
</ins><span class="cx"> if (inherited_flags._border_collapse != other->inherited_flags._border_collapse
</span><span class="cx"> || inherited_flags._empty_cells != other->inherited_flags._empty_cells
</span><span class="cx"> || inherited_flags._caption_side != other->inherited_flags._caption_side
</span><del>- || noninherited_flags._table_layout != other->noninherited_flags._table_layout)
</del><ins>+ || noninherited_flags.tableLayout() != other->noninherited_flags.tableLayout())
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // In the collapsing border model, 'hidden' suppresses other borders, while 'none'
</span><span class="lines">@@ -554,7 +560,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (noninherited_flags._effectiveDisplay == LIST_ITEM) {
</del><ins>+ if (noninherited_flags.effectiveDisplay() == LIST_ITEM) {
</ins><span class="cx"> if (inherited_flags._list_style_type != other->inherited_flags._list_style_type
</span><span class="cx"> || inherited_flags._list_style_position != other->inherited_flags._list_style_position)
</span><span class="cx"> return true;
</span><span class="lines">@@ -564,8 +570,8 @@
</span><span class="cx"> || inherited_flags._text_transform != other->inherited_flags._text_transform
</span><span class="cx"> || inherited_flags._direction != other->inherited_flags._direction
</span><span class="cx"> || inherited_flags._white_space != other->inherited_flags._white_space
</span><del>- || noninherited_flags._clear != other->noninherited_flags._clear
- || noninherited_flags._unicodeBidi != other->noninherited_flags._unicodeBidi)
</del><ins>+ || noninherited_flags.clear() != other->noninherited_flags.clear()
+ || noninherited_flags.unicodeBidi() != other->noninherited_flags.unicodeBidi())
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // Check block flow direction.
</span><span class="lines">@@ -577,8 +583,8 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // Overflow returns a layout hint.
</span><del>- if (noninherited_flags._overflowX != other->noninherited_flags._overflowX
- || noninherited_flags._overflowY != other->noninherited_flags._overflowY)
</del><ins>+ if (noninherited_flags.overflowX() != other->noninherited_flags.overflowX()
+ || noninherited_flags.overflowY() != other->noninherited_flags.overflowY())
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // If our border widths change, then we need to layout. Other changes to borders
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (166464 => 166465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-03-30 19:50:53 UTC (rev 166464)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-03-30 20:32:22 UTC (rev 166465)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
</span><span class="cx"> * (C) 2000 Antti Koivisto (koivisto@kde.org)
</span><span class="cx"> * (C) 2000 Dirk Mueller (mueller@kde.org)
</span><del>- * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
</span><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="lines">@@ -134,6 +134,260 @@
</span><span class="cx"> friend class RenderSVGResource; // FIXME: Needs to alter the visited state by hand. Should clean the SVG code up and move it into RenderStyle perhaps.
</span><span class="cx"> friend class RenderTreeAsText; // FIXME: Only needed so the render tree can keep lying and dump the wrong colors. Rebaselining would allow this to be yanked.
</span><span class="cx"> friend class StyleResolver; // Sets members directly.
</span><ins>+
+public:
+ struct NonInheritedFlags {
+ NonInheritedFlags()
+ {
+ // The default values should all be zero.
+ ASSERT(!initialOverflowX());
+ ASSERT(!initialOverflowY());
+ ASSERT(!initialClear());
+ ASSERT(!initialDisplay());
+ ASSERT(!initialUnicodeBidi());
+ ASSERT(!initialPosition());
+ ASSERT(!initialVerticalAlign());
+ ASSERT(!initialFloating());
+ ASSERT(!initialTableLayout());
+
+ m_flags = 0;
+ }
+
+ bool operator==(const NonInheritedFlags& other) const
+ {
+ return m_flags == other.m_flags;
+ }
+
+ bool operator!=(const NonInheritedFlags& other) const { return !(*this == other); }
+
+ void copyNonInheritedFrom(const NonInheritedFlags& other)
+ {
+ // Only a subset is copied because NonInheritedFlags contains a bunch of stuff other than real style data.
+ uint64_t nonInheritedMask = overflowMask << overflowXOffset
+ | overflowMask << overflowYOffset
+ | clearMask << clearOffset
+ | displayMask << effectiveDisplayOffset
+ | positionMask << positionOffset
+ | displayMask << originalDisplayOffset
+ | unicodeBidiMask << unicodeBidiOffset
+ | verticalAlignMask << verticalAlignOffset
+ | floatingMask << floatingOffset
+ | pageBreakMask << pageBreakInsideOffset
+ | pageBreakMask << pageBreakBeforeOffset
+ | pageBreakMask << pageBreakAfterOffset
+ | oneBitMask << explicitInheritanceOffset
+ | tableLayoutBitMask << tableLayoutOffset;
+
+ m_flags = (m_flags & ~nonInheritedMask) | (other.m_flags & nonInheritedMask);
+ }
+
+ EOverflow overflowX() const { return static_cast<EOverflow>(getValue(overflowMask, overflowXOffset)); }
+ void setOverflowX(EOverflow overflowX) { updateValue(overflowX, overflowMask, overflowXOffset); }
+
+ EOverflow overflowY() const { return static_cast<EOverflow>(getValue(overflowMask, overflowYOffset)); }
+ void setOverflowY(EOverflow overflowY) { updateValue(overflowY, overflowMask, overflowYOffset); }
+
+ EClear clear() const { return static_cast<EClear>(getValue(clearMask, clearOffset)); }
+ void setClear(EClear clear) { updateValue(clear, clearMask, clearOffset); }
+
+ EDisplay effectiveDisplay() const { return static_cast<EDisplay>(getValue(displayMask, effectiveDisplayOffset)); }
+ void setEffectiveDisplay(EDisplay effectiveDisplay) { updateValue(effectiveDisplay, displayMask, effectiveDisplayOffset); }
+
+ EPosition position() const { return static_cast<EPosition>(getValue(positionMask, positionOffset)); }
+ void setPosition(EPosition position) { updateValue(position, positionMask, positionOffset); }
+
+ EDisplay originalDisplay() const { return static_cast<EDisplay>(getValue(displayMask, originalDisplayOffset)); }
+ void setOriginalDisplay(EDisplay originalDisplay) { updateValue(originalDisplay, displayMask, originalDisplayOffset); }
+
+ EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(getValue(unicodeBidiMask, unicodeBidiOffset)); }
+ void setUnicodeBidi(EUnicodeBidi unicodeBidi) { updateValue(unicodeBidi, unicodeBidiMask, unicodeBidiOffset); }
+
+ EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(getValue(verticalAlignMask, verticalAlignOffset)); }
+ void setVerticalAlign(EVerticalAlign verticalAlign) { updateValue(verticalAlign, verticalAlignMask, verticalAlignOffset); }
+
+ bool hasExplicitlyInheritedProperties() const { return getBoolean(explicitInheritanceOffset); }
+ void setHasExplicitlyInheritedProperties(bool value) { updateBoolean(value, explicitInheritanceOffset); }
+
+ bool isFloating() const { return floating() != NoFloat; }
+ EFloat floating() const { return static_cast<EFloat>(getValue(floatingMask, floatingOffset)); }
+ void setFloating(EFloat floating) { updateValue(floating, floatingMask, floatingOffset); }
+
+ // For valid values of page-break-inside see http://www.w3.org/TR/CSS21/page.html#page-break-props
+ EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(getValue(pageBreakMask, pageBreakInsideOffset)); }
+ void setPageBreakInside(EPageBreak pageBreakInside) { ASSERT(pageBreakInside == PBAUTO || pageBreakInside == PBAVOID); updateValue(pageBreakInside, pageBreakMask, pageBreakInsideOffset); }
+
+ EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(getValue(pageBreakMask, pageBreakBeforeOffset)); }
+ void setPageBreakBefore(EPageBreak pageBreakBefore) { updateValue(pageBreakBefore, pageBreakMask, pageBreakBeforeOffset); }
+
+ EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(getValue(pageBreakMask, pageBreakAfterOffset)); }
+ void setPageBreakAfter(EPageBreak pageBreakAfter) { updateValue(pageBreakAfter, pageBreakMask, pageBreakAfterOffset); }
+
+ bool hasAnyPublicPseudoStyles() const { return PUBLIC_PSEUDOID_MASK & getValue(pseudoBitsMask, pseudoBitsOffset); }
+ bool hasPseudoStyle(PseudoId pseudo) const
+ {
+ ASSERT(pseudo > NOPSEUDO);
+ ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
+ return (oneBitMask << (pseudoBitsOffset - 1 + pseudo)) & m_flags;
+ }
+ void setHasPseudoStyle(PseudoId pseudo)
+ {
+ ASSERT(pseudo > NOPSEUDO);
+ ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
+ m_flags |= oneBitMask << (pseudoBitsOffset - 1 + pseudo);
+ }
+
+ ETableLayout tableLayout() const { return static_cast<ETableLayout>(getValue(tableLayoutBitMask, tableLayoutOffset)); }
+ void setTableLayout(ETableLayout tableLayout) { updateValue(tableLayout, tableLayoutBitMask, tableLayoutOffset); }
+
+ PseudoId styleType() const { return static_cast<PseudoId>(getValue(styleTypeMask, styleTypeOffset)); }
+ void setStyleType(PseudoId styleType) { updateValue(styleType, styleTypeMask, styleTypeOffset); }
+
+ bool isUnique() const { return getBoolean(isUniqueOffset); }
+ void setIsUnique() { updateBoolean(true, isUniqueOffset); }
+
+ bool emptyState() const { return getBoolean(emptyStateOffset); }
+ void setEmptyState(bool value) { updateBoolean(value, emptyStateOffset); }
+
+ bool firstChildState() const { return getBoolean(firstChildStateOffset); }
+ void setFirstChildState(bool value) { updateBoolean(value, firstChildStateOffset); }
+
+ bool lastChildState() const { return getBoolean(lastChildStateOffset); }
+ void setLastChildState(bool value) { updateBoolean(value, lastChildStateOffset); }
+
+ bool affectedByHover() const { return getBoolean(affectedByHoverOffset); }
+ void setAffectedByHover(bool value) { updateBoolean(value, affectedByHoverOffset); }
+
+ bool affectedByActive() const { return getBoolean(affectedByActiveOffset); }
+ void setAffectedByActive(bool value) { updateBoolean(value, affectedByActiveOffset); }
+
+ bool affectedByDrag() const { return getBoolean(affectedByDragOffset); }
+ void setAffectedByDrag(bool value) { updateBoolean(value, affectedByDragOffset); }
+
+ bool isLink() const { return getBoolean(isLinkOffset); }
+ void setIsLink(bool value) { updateBoolean(value, isLinkOffset); }
+
+ static EOverflow initialOverflowX() { return OVISIBLE; }
+ static EOverflow initialOverflowY() { return OVISIBLE; }
+ static EClear initialClear() { return CNONE; }
+ static EDisplay initialDisplay() { return INLINE; }
+ static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
+ static EPosition initialPosition() { return StaticPosition; }
+ static EVerticalAlign initialVerticalAlign() { return BASELINE; }
+ static EFloat initialFloating() { return NoFloat; }
+ static EPageBreak initialPageBreak() { return PBAUTO; }
+ static ETableLayout initialTableLayout() { return TAUTO; }
+
+ static ptrdiff_t flagsMemoryOffset() { return OBJECT_OFFSETOF(NonInheritedFlags, m_flags); }
+ static uint8_t flagIsUnique() { return isUniqueOffset; }
+ static uint8_t flagEmptyState() { return emptyStateOffset; }
+ static uint8_t flagFirstChildState() { return firstChildStateOffset; }
+ static uint8_t flagLastChildState() { return lastChildStateOffset; }
+ static uint8_t flagAffectedByHover() { return affectedByHoverOffset; }
+ static uint8_t flagAffectedByActive() { return affectedByActiveOffset; }
+ static uint8_t flagAffectedByDrag() { return affectedByDragOffset; }
+ private:
+ void updateBoolean(bool isSet, unsigned offset)
+ {
+ if (isSet)
+ m_flags |= (oneBitMask << offset);
+ else
+ m_flags &= ~(oneBitMask << offset);
+ }
+
+ bool getBoolean(unsigned offset) const
+ {
+ return m_flags & (oneBitMask << offset);
+ }
+
+ void updateValue(uint8_t newValue, uint64_t positionIndependentMask, unsigned offset)
+ {
+ ASSERT(!(newValue & ~positionIndependentMask));
+ uint64_t positionDependentMask = positionIndependentMask << offset;
+ m_flags = (m_flags & ~positionDependentMask) | (static_cast<uint64_t>(newValue) << offset);
+ }
+
+ unsigned getValue(uint64_t positionIndependentMask, unsigned offset) const
+ {
+ return (m_flags >> offset) & positionIndependentMask;
+ }
+
+ // To type the bit mask properly on 64bits.
+ static const uint64_t oneBitMask = 0x1;
+
+ // Byte 1.
+ static const unsigned overflowBitCount = 3;
+ static const uint64_t overflowMask = (oneBitMask << overflowBitCount) - 1;
+ static const unsigned overflowXOffset = 0;
+ static const unsigned overflowYOffset = overflowXOffset + overflowBitCount;
+ static const unsigned clearBitCount = 2;
+ static const uint64_t clearMask = (oneBitMask << clearBitCount) - 1;
+ static const unsigned clearOffset = overflowYOffset + overflowBitCount;
+
+ // Byte 2.
+ static const unsigned displayBitCount = 5;
+ static const uint64_t displayMask = (oneBitMask << displayBitCount) - 1;
+ static const unsigned effectiveDisplayOffset = clearOffset + clearBitCount;
+ static const unsigned positionBitCount = 3;
+ static const uint64_t positionMask = (oneBitMask << positionBitCount) - 1;
+ static const unsigned positionOffset = effectiveDisplayOffset + displayBitCount;
+
+ // Byte 3.
+ static const unsigned originalDisplayOffset = positionOffset + positionBitCount;
+ static const unsigned unicodeBidiBitCount = 3;
+ static const uint64_t unicodeBidiMask = (oneBitMask << unicodeBidiBitCount) - 1;
+ static const unsigned unicodeBidiOffset = originalDisplayOffset + displayBitCount;
+
+ // Byte 4.
+ static const unsigned floatingBitCount = 2;
+ static const uint64_t floatingMask = (oneBitMask << floatingBitCount) - 1;
+ static const unsigned floatingOffset = unicodeBidiOffset + unicodeBidiBitCount;
+ static const unsigned pageBreakBitCount = 2;
+ static const uint64_t pageBreakMask = (oneBitMask << pageBreakBitCount) - 1;
+ static const unsigned pageBreakInsideOffset = floatingOffset + floatingBitCount;
+ static const unsigned pageBreakBeforeOffset = pageBreakInsideOffset + pageBreakBitCount;
+ static const unsigned pageBreakAfterOffset = pageBreakBeforeOffset + pageBreakBitCount;
+
+ // Byte 5.
+ static const unsigned explicitInheritanceBitCount = 1;
+ static const unsigned explicitInheritanceOffset = pageBreakAfterOffset + pageBreakBitCount;
+ static const unsigned tableLayoutBitCount = 1;
+ static const uint64_t tableLayoutBitMask = oneBitMask;
+ static const unsigned tableLayoutOffset = explicitInheritanceOffset + explicitInheritanceBitCount;
+ static const unsigned verticalAlignBitCount = 4;
+ static const unsigned verticalAlignPadding = 2;
+ static const unsigned verticalAlignAndPaddingBitCount = verticalAlignBitCount + verticalAlignPadding;
+ static const uint64_t verticalAlignMask = (oneBitMask << verticalAlignBitCount) - 1;
+ static const unsigned verticalAlignOffset = tableLayoutOffset + tableLayoutBitCount;
+
+ // Byte 6.
+ static const unsigned pseudoBitsBitCount = 7;
+ static const unsigned pseudoBitsPadding = 1;
+ static const unsigned pseudoBitsAndPaddingBitCount = pseudoBitsBitCount + pseudoBitsPadding;
+ static const uint64_t pseudoBitsMask = (oneBitMask << pseudoBitsAndPaddingBitCount) - 1;
+ static const unsigned pseudoBitsOffset = verticalAlignOffset + verticalAlignAndPaddingBitCount;
+
+ // Byte 7.
+ static const unsigned styleTypeBitCount = 6;
+ static const unsigned styleTypePadding = 2;
+ static const unsigned styleTypeAndPaddingBitCount = styleTypeBitCount + styleTypePadding;
+ static const uint64_t styleTypeMask = (oneBitMask << styleTypeAndPaddingBitCount) - 1;
+ static const unsigned styleTypeOffset = pseudoBitsOffset + pseudoBitsAndPaddingBitCount;
+
+ // Byte 8.
+ static const unsigned isUniqueOffset = styleTypeOffset + styleTypeAndPaddingBitCount;
+ static const unsigned emptyStateOffset = isUniqueOffset + 1;
+ static const unsigned firstChildStateOffset = emptyStateOffset + 1;
+ static const unsigned lastChildStateOffset = firstChildStateOffset + 1;
+ static const unsigned affectedByHoverOffset = lastChildStateOffset + 1;
+ static const unsigned affectedByActiveOffset = affectedByHoverOffset + 1;
+ static const unsigned affectedByDragOffset = affectedByActiveOffset + 1;
+ static const unsigned isLinkOffset = affectedByDragOffset + 1;
+
+ // Only 59 bits are assigned. There are 5 bits available currently used as padding to improve code generation.
+ // If you add more style bits here, you will also need to update RenderStyle::copyNonInheritedFrom().
+ uint64_t m_flags;
+ };
+
</ins><span class="cx"> protected:
</span><span class="cx">
</span><span class="cx"> // non-inherited attributes
</span><span class="lines">@@ -214,130 +468,10 @@
</span><span class="cx"> } inherited_flags;
</span><span class="cx">
</span><span class="cx"> // don't inherit
</span><del>- struct NonInheritedFlags {
- bool operator==(const NonInheritedFlags& other) const
- {
- return _effectiveDisplay == other._effectiveDisplay
- && _originalDisplay == other._originalDisplay
- && _overflowX == other._overflowX
- && _overflowY == other._overflowY
- && _vertical_align == other._vertical_align
- && _clear == other._clear
- && _position == other._position
- && _floating == other._floating
- && _table_layout == other._table_layout
- && _page_break_before == other._page_break_before
- && _page_break_after == other._page_break_after
- && _page_break_inside == other._page_break_inside
- && _styleType == other._styleType
- && _affectedByHover == other._affectedByHover
- && _affectedByActive == other._affectedByActive
- && _affectedByDrag == other._affectedByDrag
- && _pseudoBits == other._pseudoBits
- && _unicodeBidi == other._unicodeBidi
- && explicitInheritance == other.explicitInheritance
- && unique == other.unique
- && emptyState == other.emptyState
- && firstChildState == other.firstChildState
- && lastChildState == other.lastChildState
- && _isLink == other._isLink;
- }
</del><ins>+ NonInheritedFlags noninherited_flags;
</ins><span class="cx">
</span><del>- bool operator!=(const NonInheritedFlags& other) const { return !(*this == other); }
-
- unsigned _effectiveDisplay : 5; // EDisplay
- unsigned _originalDisplay : 5; // EDisplay
- unsigned _overflowX : 3; // EOverflow
- unsigned _overflowY : 3; // EOverflow
- unsigned _vertical_align : 4; // EVerticalAlign
- unsigned _clear : 2; // EClear
- unsigned _position : 3; // EPosition
- unsigned _floating : 2; // EFloat
- unsigned _table_layout : 1; // ETableLayout
-
- unsigned _unicodeBidi : 3; // EUnicodeBidi
- // 31 bits
- unsigned _page_break_before : 2; // EPageBreak
- unsigned _page_break_after : 2; // EPageBreak
- unsigned _page_break_inside : 2; // EPageBreak
-
- unsigned _styleType : 6; // PseudoId
- unsigned _pseudoBits : 7;
- unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property
- unsigned unique : 1; // Style can not be shared.
- unsigned emptyState : 1;
- unsigned firstChildState : 1;
- unsigned lastChildState : 1;
-
- bool affectedByHover() const { return _affectedByHover; }
- void setAffectedByHover(bool value) { _affectedByHover = value; }
- bool affectedByActive() const { return _affectedByActive; }
- void setAffectedByActive(bool value) { _affectedByActive = value; }
- bool affectedByDrag() const { return _affectedByDrag; }
- void setAffectedByDrag(bool value) { _affectedByDrag = value; }
- bool isLink() const { return _isLink; }
- void setIsLink(bool value) { _isLink = value; }
- private:
- unsigned _affectedByHover : 1;
- unsigned _affectedByActive : 1;
- unsigned _affectedByDrag : 1;
- unsigned _isLink : 1;
- // If you add more style bits here, you will also need to update RenderStyle::copyNonInheritedFrom()
- // 59 bits
- } noninherited_flags;
-
</del><span class="cx"> // !END SYNC!
</span><span class="cx">
</span><del>-protected:
- void setBitDefaults()
- {
- inherited_flags._empty_cells = initialEmptyCells();
- inherited_flags._caption_side = initialCaptionSide();
- inherited_flags._list_style_type = initialListStyleType();
- inherited_flags._list_style_position = initialListStylePosition();
- inherited_flags._visibility = initialVisibility();
- inherited_flags._text_align = initialTextAlign();
- inherited_flags._text_transform = initialTextTransform();
- inherited_flags._text_decorations = initialTextDecoration();
- inherited_flags._cursor_style = initialCursor();
-#if ENABLE(CURSOR_VISIBILITY)
- inherited_flags.m_cursorVisibility = initialCursorVisibility();
-#endif
- inherited_flags._direction = initialDirection();
- inherited_flags._white_space = initialWhiteSpace();
- inherited_flags._border_collapse = initialBorderCollapse();
- inherited_flags.m_rtlOrdering = initialRTLOrdering();
- inherited_flags._box_direction = initialBoxDirection();
- inherited_flags.m_printColorAdjust = initialPrintColorAdjust();
- inherited_flags._pointerEvents = initialPointerEvents();
- inherited_flags._insideLink = NotInsideLink;
- inherited_flags.m_writingMode = initialWritingMode();
-
- noninherited_flags._effectiveDisplay = noninherited_flags._originalDisplay = initialDisplay();
- noninherited_flags._overflowX = initialOverflowX();
- noninherited_flags._overflowY = initialOverflowY();
- noninherited_flags._vertical_align = initialVerticalAlign();
- noninherited_flags._clear = initialClear();
- noninherited_flags._position = initialPosition();
- noninherited_flags._floating = initialFloating();
- noninherited_flags._table_layout = initialTableLayout();
- noninherited_flags._unicodeBidi = initialUnicodeBidi();
- noninherited_flags._page_break_before = initialPageBreak();
- noninherited_flags._page_break_after = initialPageBreak();
- noninherited_flags._page_break_inside = initialPageBreak();
- noninherited_flags._styleType = NOPSEUDO;
- noninherited_flags._pseudoBits = 0;
- noninherited_flags.explicitInheritance = false;
- noninherited_flags.unique = false;
- noninherited_flags.emptyState = false;
- noninherited_flags.firstChildState = false;
- noninherited_flags.lastChildState = false;
- noninherited_flags.setAffectedByHover(false);
- noninherited_flags.setAffectedByActive(false);
- noninherited_flags.setAffectedByDrag(false);
- noninherited_flags.setIsLink(false);
- }
-
</del><span class="cx"> private:
</span><span class="cx"> // used to create the default style.
</span><span class="cx"> ALWAYS_INLINE RenderStyle(bool);
</span><span class="lines">@@ -360,8 +494,8 @@
</span><span class="cx"> void inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary = NotAtShadowBoundary);
</span><span class="cx"> void copyNonInheritedFrom(const RenderStyle*);
</span><span class="cx">
</span><del>- PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags._styleType); }
- void setStyleType(PseudoId styleType) { noninherited_flags._styleType = styleType; }
</del><ins>+ PseudoId styleType() const { return noninherited_flags.styleType(); }
+ void setStyleType(PseudoId styleType) { noninherited_flags.setStyleType(styleType); }
</ins><span class="cx">
</span><span class="cx"> RenderStyle* getCachedPseudoStyle(PseudoId) const;
</span><span class="cx"> RenderStyle* addCachedPseudoStyle(PassRefPtr<RenderStyle>);
</span><span class="lines">@@ -381,7 +515,7 @@
</span><span class="cx">
</span><span class="cx"> bool operator==(const RenderStyle& other) const;
</span><span class="cx"> bool operator!=(const RenderStyle& other) const { return !(*this == other); }
</span><del>- bool isFloating() const { return noninherited_flags._floating != NoFloat; }
</del><ins>+ bool isFloating() const { return noninherited_flags.isFloating(); }
</ins><span class="cx"> bool hasMargin() const { return surround->margin.nonZero(); }
</span><span class="cx"> bool hasBorder() const { return surround->border.hasBorder(); }
</span><span class="cx"> bool hasPadding() const { return surround->padding.nonZero(); }
</span><span class="lines">@@ -436,8 +570,8 @@
</span><span class="cx">
</span><span class="cx"> // attribute getter methods
</span><span class="cx">
</span><del>- EDisplay display() const { return static_cast<EDisplay>(noninherited_flags._effectiveDisplay); }
- EDisplay originalDisplay() const { return static_cast<EDisplay>(noninherited_flags._originalDisplay); }
</del><ins>+ EDisplay display() const { return noninherited_flags.effectiveDisplay(); }
+ EDisplay originalDisplay() const { return noninherited_flags.originalDisplay(); }
</ins><span class="cx">
</span><span class="cx"> const Length& left() const { return surround->offset.left(); }
</span><span class="cx"> const Length& right() const { return surround->offset.right(); }
</span><span class="lines">@@ -457,11 +591,11 @@
</span><span class="cx"> bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? hasAutoLeftAndRight() : hasAutoTopAndBottom(); }
</span><span class="cx"> bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? hasAutoTopAndBottom() : hasAutoLeftAndRight(); }
</span><span class="cx">
</span><del>- EPosition position() const { return static_cast<EPosition>(noninherited_flags._position); }
</del><ins>+ EPosition position() const { return noninherited_flags.position(); }
</ins><span class="cx"> bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; }
</span><span class="cx"> bool hasInFlowPosition() const { return position() == RelativePosition || position() == StickyPosition; }
</span><span class="cx"> bool hasViewportConstrainedPosition() const { return position() == FixedPosition || position() == StickyPosition; }
</span><del>- EFloat floating() const { return static_cast<EFloat>(noninherited_flags._floating); }
</del><ins>+ EFloat floating() const { return noninherited_flags.floating(); }
</ins><span class="cx">
</span><span class="cx"> const Length& width() const { return m_box->width(); }
</span><span class="cx"> const Length& height() const { return m_box->height(); }
</span><span class="lines">@@ -529,11 +663,11 @@
</span><span class="cx"> EBorderStyle outlineStyle() const { return m_background->outline().style(); }
</span><span class="cx"> OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto>(m_background->outline().isAuto()); }
</span><span class="cx">
</span><del>- EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_flags._overflowX); }
- EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_flags._overflowY); }
</del><ins>+ EOverflow overflowX() const { return noninherited_flags.overflowX(); }
+ EOverflow overflowY() const { return noninherited_flags.overflowY(); }
</ins><span class="cx">
</span><span class="cx"> EVisibility visibility() const { return static_cast<EVisibility>(inherited_flags._visibility); }
</span><del>- EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(noninherited_flags._vertical_align); }
</del><ins>+ EVerticalAlign verticalAlign() const { return noninherited_flags.verticalAlign(); }
</ins><span class="cx"> const Length& verticalAlignLength() const { return m_box->verticalAlign(); }
</span><span class="cx">
</span><span class="cx"> const Length& clipLeft() const { return visual->clip.left(); }
</span><span class="lines">@@ -543,10 +677,10 @@
</span><span class="cx"> const LengthBox& clip() const { return visual->clip; }
</span><span class="cx"> bool hasClip() const { return visual->hasClip; }
</span><span class="cx">
</span><del>- EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninherited_flags._unicodeBidi); }
</del><ins>+ EUnicodeBidi unicodeBidi() const { return noninherited_flags.unicodeBidi(); }
</ins><span class="cx">
</span><del>- EClear clear() const { return static_cast<EClear>(noninherited_flags._clear); }
- ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninherited_flags._table_layout); }
</del><ins>+ EClear clear() const { return noninherited_flags.clear(); }
+ ETableLayout tableLayout() const { return noninherited_flags.tableLayout(); }
</ins><span class="cx">
</span><span class="cx"> const Font& font() const;
</span><span class="cx"> const FontMetrics& fontMetrics() const;
</span><span class="lines">@@ -721,9 +855,9 @@
</span><span class="cx"> short orphans() const { return rareInheritedData->orphans; }
</span><span class="cx"> bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; }
</span><span class="cx"> bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; }
</span><del>- EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninherited_flags._page_break_inside); }
- EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninherited_flags._page_break_before); }
- EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(noninherited_flags._page_break_after); }
</del><ins>+ EPageBreak pageBreakInside() const { return noninherited_flags.pageBreakInside(); }
+ EPageBreak pageBreakBefore() const { return noninherited_flags.pageBreakBefore(); }
+ EPageBreak pageBreakAfter() const { return noninherited_flags.pageBreakAfter(); }
</ins><span class="cx">
</span><span class="cx"> // CSS3 Getter Methods
</span><span class="cx">
</span><span class="lines">@@ -994,10 +1128,10 @@
</span><span class="cx">
</span><span class="cx"> // attribute setter methods
</span><span class="cx">
</span><del>- void setDisplay(EDisplay v) { noninherited_flags._effectiveDisplay = v; }
- void setOriginalDisplay(EDisplay v) { noninherited_flags._originalDisplay = v; }
- void setPosition(EPosition v) { noninherited_flags._position = v; }
- void setFloating(EFloat v) { noninherited_flags._floating = v; }
</del><ins>+ void setDisplay(EDisplay v) { noninherited_flags.setEffectiveDisplay(v); }
+ void setOriginalDisplay(EDisplay v) { noninherited_flags.setOriginalDisplay(v); }
+ void setPosition(EPosition v) { noninherited_flags.setPosition(v); }
+ void setFloating(EFloat v) { noninherited_flags.setFloating(v); }
</ins><span class="cx">
</span><span class="cx"> void setLeft(Length v) { SET_VAR(surround, offset.m_left, std::move(v)); }
</span><span class="cx"> void setRight(Length v) { SET_VAR(surround, offset.m_right, std::move(v)); }
</span><span class="lines">@@ -1115,10 +1249,10 @@
</span><span class="cx"> void setOutlineStyle(EBorderStyle v) { SET_VAR(m_background, m_outline.m_style, v); }
</span><span class="cx"> void setOutlineColor(const Color& v) { SET_BORDERVALUE_COLOR(m_background, m_outline, v); }
</span><span class="cx">
</span><del>- void setOverflowX(EOverflow v) { noninherited_flags._overflowX = v; }
- void setOverflowY(EOverflow v) { noninherited_flags._overflowY = v; }
</del><ins>+ void setOverflowX(EOverflow v) { noninherited_flags.setOverflowX(v); }
+ void setOverflowY(EOverflow v) { noninherited_flags.setOverflowY(v); }
</ins><span class="cx"> void setVisibility(EVisibility v) { inherited_flags._visibility = v; }
</span><del>- void setVerticalAlign(EVerticalAlign v) { noninherited_flags._vertical_align = v; }
</del><ins>+ void setVerticalAlign(EVerticalAlign v) { noninherited_flags.setVerticalAlign(v); }
</ins><span class="cx"> void setVerticalAlignLength(Length length) { setVerticalAlign(LENGTH); SET_VAR(m_box, m_verticalAlign, std::move(length)); }
</span><span class="cx">
</span><span class="cx"> void setHasClip(bool b = true) { SET_VAR(visual, hasClip, b); }
</span><span class="lines">@@ -1129,10 +1263,10 @@
</span><span class="cx"> void setClip(Length top, Length right, Length bottom, Length left);
</span><span class="cx"> void setClip(LengthBox box) { SET_VAR(visual, clip, std::move(box)); }
</span><span class="cx">
</span><del>- void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags._unicodeBidi = b; }
</del><ins>+ void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags.setUnicodeBidi(b); }
</ins><span class="cx">
</span><del>- void setClear(EClear v) { noninherited_flags._clear = v; }
- void setTableLayout(ETableLayout v) { noninherited_flags._table_layout = v; }
</del><ins>+ void setClear(EClear v) { noninherited_flags.setClear(v); }
+ void setTableLayout(ETableLayout v) { noninherited_flags.setTableLayout(v); }
</ins><span class="cx">
</span><span class="cx"> bool setFontDescription(const FontDescription&);
</span><span class="cx"> // Only used for blending font sizes when animating, for MathML anonymous blocks, and for text autosizing.
</span><span class="lines">@@ -1276,9 +1410,9 @@
</span><span class="cx"> void setOrphans(short o) { SET_VAR(rareInheritedData, m_hasAutoOrphans, false); SET_VAR(rareInheritedData, orphans, o); }
</span><span class="cx">
</span><span class="cx"> // For valid values of page-break-inside see http://www.w3.org/TR/CSS21/page.html#page-break-props
</span><del>- void setPageBreakInside(EPageBreak b) { ASSERT(b == PBAUTO || b == PBAVOID); noninherited_flags._page_break_inside = b; }
- void setPageBreakBefore(EPageBreak b) { noninherited_flags._page_break_before = b; }
- void setPageBreakAfter(EPageBreak b) { noninherited_flags._page_break_after = b; }
</del><ins>+ void setPageBreakInside(EPageBreak b) { noninherited_flags.setPageBreakInside(b); }
+ void setPageBreakBefore(EPageBreak b) { noninherited_flags.setPageBreakBefore(b); }
+ void setPageBreakAfter(EPageBreak b) { noninherited_flags.setPageBreakAfter(b); }
</ins><span class="cx">
</span><span class="cx"> // CSS3 Setters
</span><span class="cx"> void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v); }
</span><span class="lines">@@ -1582,20 +1716,20 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // A unique style is one that has matches something that makes it impossible to share.
</span><del>- bool unique() const { return noninherited_flags.unique; }
- void setUnique() { noninherited_flags.unique = true; }
</del><ins>+ bool unique() const { return noninherited_flags.isUnique(); }
+ void setUnique() { noninherited_flags.setIsUnique(); }
</ins><span class="cx">
</span><del>- bool emptyState() const { return noninherited_flags.emptyState; }
- void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; }
- bool firstChildState() const { return noninherited_flags.firstChildState; }
- void setFirstChildState() { setUnique(); noninherited_flags.firstChildState = true; }
- bool lastChildState() const { return noninherited_flags.lastChildState; }
- void setLastChildState() { setUnique(); noninherited_flags.lastChildState = true; }
</del><ins>+ bool emptyState() const { return noninherited_flags.emptyState(); }
+ void setEmptyState(bool b) { setUnique(); noninherited_flags.setEmptyState(b); }
+ bool firstChildState() const { return noninherited_flags.firstChildState(); }
+ void setFirstChildState() { setUnique(); noninherited_flags.setFirstChildState(true); }
+ bool lastChildState() const { return noninherited_flags.lastChildState(); }
+ void setLastChildState() { setUnique(); noninherited_flags.setLastChildState(true); }
</ins><span class="cx">
</span><span class="cx"> Color visitedDependentColor(int colorProperty) const;
</span><span class="cx">
</span><del>- void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInheritance = true; }
- bool hasExplicitlyInheritedProperties() const { return noninherited_flags.explicitInheritance; }
</del><ins>+ void setHasExplicitlyInheritedProperties() { noninherited_flags.setHasExplicitlyInheritedProperties(true); }
+ bool hasExplicitlyInheritedProperties() const { return noninherited_flags.hasExplicitlyInheritedProperties(); }
</ins><span class="cx">
</span><span class="cx"> // Initial values for all the properties
</span><span class="cx"> static EBorderCollapse initialBorderCollapse() { return BSEPARATE; }
</span><span class="lines">@@ -1604,7 +1738,6 @@
</span><span class="cx"> static NinePieceImage initialNinePieceImage() { return NinePieceImage(); }
</span><span class="cx"> static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed), Length(0, Fixed)); }
</span><span class="cx"> static ECaptionSide initialCaptionSide() { return CAPTOP; }
</span><del>- static EClear initialClear() { return CNONE; }
</del><span class="cx"> static ColorSpace initialColorSpace() { return ColorSpaceDeviceRGB; }
</span><span class="cx"> static ColumnAxis initialColumnAxis() { return AutoColumnAxis; }
</span><span class="cx"> static ColumnProgression initialColumnProgression() { return NormalColumnProgression; }
</span><span class="lines">@@ -1613,17 +1746,9 @@
</span><span class="cx"> static TextCombine initialTextCombine() { return TextCombineNone; }
</span><span class="cx"> static TextOrientation initialTextOrientation() { return TextOrientationVerticalRight; }
</span><span class="cx"> static ObjectFit initialObjectFit() { return ObjectFitFill; }
</span><del>- static EDisplay initialDisplay() { return INLINE; }
</del><span class="cx"> static EEmptyCell initialEmptyCells() { return SHOW; }
</span><del>- static EFloat initialFloating() { return NoFloat; }
</del><span class="cx"> static EListStylePosition initialListStylePosition() { return OUTSIDE; }
</span><span class="cx"> static EListStyleType initialListStyleType() { return Disc; }
</span><del>- static EOverflow initialOverflowX() { return OVISIBLE; }
- static EOverflow initialOverflowY() { return OVISIBLE; }
- static EPageBreak initialPageBreak() { return PBAUTO; }
- static EPosition initialPosition() { return StaticPosition; }
- static ETableLayout initialTableLayout() { return TAUTO; }
- static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
</del><span class="cx"> static ETextTransform initialTextTransform() { return TTNONE; }
</span><span class="cx"> static EVisibility initialVisibility() { return VISIBLE; }
</span><span class="cx"> static EWhiteSpace initialWhiteSpace() { return NORMAL; }
</span><span class="lines">@@ -1651,7 +1776,6 @@
</span><span class="cx"> static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
</span><span class="cx"> static TextIndentType initialTextIndentType() { return TextIndentNormal; }
</span><span class="cx"> #endif
</span><del>- static EVerticalAlign initialVerticalAlign() { return BASELINE; }
</del><span class="cx"> static short initialWidows() { return 2; }
</span><span class="cx"> static short initialOrphans() { return 2; }
</span><span class="cx"> static Length initialLineHeight() { return Length(-100.0, Percent); }
</span><span class="lines">@@ -1839,7 +1963,7 @@
</span><span class="cx"> void setVisitedLinkTextFillColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextFillColor, v); }
</span><span class="cx"> void setVisitedLinkTextStrokeColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextStrokeColor, v); }
</span><span class="cx">
</span><del>- void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags._unicodeBidi = parent->noninherited_flags._unicodeBidi; }
</del><ins>+ void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags.setUnicodeBidi(parent->noninherited_flags.unicodeBidi()); }
</ins><span class="cx"> void getShadowExtent(const ShadowData*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const;
</span><span class="cx"> LayoutBoxExtent getShadowInsetExtent(const ShadowData*) const;
</span><span class="cx"> void getShadowHorizontalExtent(const ShadowData*, LayoutUnit& left, LayoutUnit& right) const;
</span><span class="lines">@@ -1901,6 +2025,8 @@
</span><span class="cx"> Color lightingColor() const { return svgStyle().lightingColor(); }
</span><span class="cx">
</span><span class="cx"> void appendContent(std::unique_ptr<ContentData>);
</span><ins>+
+ static ptrdiff_t noninheritedFlagsMemoryOffset() { return OBJECT_OFFSETOF(RenderStyle, noninherited_flags); }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline int adjustForAbsoluteZoom(int value, const RenderStyle& style)
</span><span class="lines">@@ -1959,21 +2085,17 @@
</span><span class="cx">
</span><span class="cx"> inline bool RenderStyle::hasAnyPublicPseudoStyles() const
</span><span class="cx"> {
</span><del>- return PUBLIC_PSEUDOID_MASK & noninherited_flags._pseudoBits;
</del><ins>+ return noninherited_flags.hasAnyPublicPseudoStyles();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline bool RenderStyle::hasPseudoStyle(PseudoId pseudo) const
</span><span class="cx"> {
</span><del>- ASSERT(pseudo > NOPSEUDO);
- ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
- return (1 << (pseudo - 1)) & noninherited_flags._pseudoBits;
</del><ins>+ return noninherited_flags.hasPseudoStyle(pseudo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline void RenderStyle::setHasPseudoStyle(PseudoId pseudo)
</span><span class="cx"> {
</span><del>- ASSERT(pseudo > NOPSEUDO);
- ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
- noninherited_flags._pseudoBits |= 1 << (pseudo - 1);
</del><ins>+ noninherited_flags.setHasPseudoStyle(pseudo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleMultiColDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp (166464 => 166465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp        2014-03-30 19:50:53 UTC (rev 166464)
+++ trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp        2014-03-30 20:32:22 UTC (rev 166465)
</span><span class="lines">@@ -35,9 +35,9 @@
</span><span class="cx"> , m_normalGap(true)
</span><span class="cx"> , m_fill(RenderStyle::initialColumnFill())
</span><span class="cx"> , m_columnSpan(false)
</span><del>- , m_breakBefore(RenderStyle::initialPageBreak())
- , m_breakAfter(RenderStyle::initialPageBreak())
- , m_breakInside(RenderStyle::initialPageBreak())
</del><ins>+ , m_breakBefore(RenderStyle::NonInheritedFlags::initialPageBreak())
+ , m_breakAfter(RenderStyle::NonInheritedFlags::initialPageBreak())
+ , m_breakInside(RenderStyle::NonInheritedFlags::initialPageBreak())
</ins><span class="cx"> , m_axis(RenderStyle::initialColumnAxis())
</span><span class="cx"> , m_progression(RenderStyle::initialColumnProgression())
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (166464 => 166465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2014-03-30 19:50:53 UTC (rev 166464)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2014-03-30 20:32:22 UTC (rev 166465)
</span><span class="lines">@@ -66,9 +66,9 @@
</span><span class="cx"> , m_flowThread(RenderStyle::initialFlowThread())
</span><span class="cx"> , m_regionThread(RenderStyle::initialRegionThread())
</span><span class="cx"> , m_regionFragment(RenderStyle::initialRegionFragment())
</span><del>- , m_regionBreakAfter(RenderStyle::initialPageBreak())
- , m_regionBreakBefore(RenderStyle::initialPageBreak())
- , m_regionBreakInside(RenderStyle::initialPageBreak())
</del><ins>+ , m_regionBreakAfter(RenderStyle::NonInheritedFlags::initialPageBreak())
+ , m_regionBreakBefore(RenderStyle::NonInheritedFlags::initialPageBreak())
+ , m_regionBreakInside(RenderStyle::NonInheritedFlags::initialPageBreak())
</ins><span class="cx"> , m_pageSizeType(PAGE_SIZE_AUTO)
</span><span class="cx"> , m_transformStyle3D(RenderStyle::initialTransformStyle3D())
</span><span class="cx"> , m_backfaceVisibility(RenderStyle::initialBackfaceVisibility())
</span></span></pre>
</div>
</div>
</body>
</html>