[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric at webkit.org
eric at webkit.org
Thu Feb 4 21:31:56 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 0647ede01e03b8db53bc4ff70d759aabb370eaf1
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 29 07:01:43 2010 +0000
2010-01-28 Hayato Ito <hayato at chromium.org>
Reviewed by Darin Adler.
Change CSS 'page-break-inside' property from inherited one to non-inherited one because CSS specification defines so.
Note: Currently, the 'page-break-inside' property is used only when parsing the CSS. That property is not used when rendering.
https://bugs.webkit.org/show_bug.cgi?id=34195
* fast/css/getComputedStyle/computed-style-page-break-inside-expected.txt: Added.
* fast/css/getComputedStyle/computed-style-page-break-inside.html: Added.
* fast/css/getComputedStyle/script-tests/computed-style-page-break-inside.js: Added.
2010-01-28 Hayato Ito <hayato at chromium.org>
Reviewed by Darin Adler.
Change CSS 'page-break-inside' property from inherited one to non-inherited one because CSS specification defines so.
Note: Currently, the 'page-break-inside' property is used only when parsing the CSS. That property is not used when rendering.
https://bugs.webkit.org/show_bug.cgi?id=34195
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::NonInheritedFlags::operator==):
(WebCore::InheritedFlags::setBitDefaults):
(WebCore::InheritedFlags::pageBreakInside):
(WebCore::InheritedFlags::setPageBreakInside):
* rendering/style/StyleInheritedData.cpp:
(WebCore::StyleInheritedData::StyleInheritedData):
(WebCore::StyleInheritedData::operator==):
* rendering/style/StyleInheritedData.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c8e178e..0dc372e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-28 Hayato Ito <hayato at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change CSS 'page-break-inside' property from inherited one to non-inherited one because CSS specification defines so.
+
+ Note: Currently, the 'page-break-inside' property is used only when parsing the CSS. That property is not used when rendering.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34195
+
+ * fast/css/getComputedStyle/computed-style-page-break-inside-expected.txt: Added.
+ * fast/css/getComputedStyle/computed-style-page-break-inside.html: Added.
+ * fast/css/getComputedStyle/script-tests/computed-style-page-break-inside.js: Added.
+
2010-01-28 Michael Nordman <michaeln at google.com>
Reviewed by Alexey Proskuryakov.
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-page-break-inside-expected.txt b/LayoutTests/fast/css/getComputedStyle/computed-style-page-break-inside-expected.txt
new file mode 100644
index 0000000..f46dd4a
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-page-break-inside-expected.txt
@@ -0,0 +1,11 @@
+Test that page-break-inside property is not inherited
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.getComputedStyle(parent).getPropertyCSSValue('page-break-inside').getStringValue() is "avoid"
+PASS window.getComputedStyle(child).getPropertyCSSValue('page-break-inside').getStringValue() is "auto"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-page-break-inside.html b/LayoutTests/fast/css/getComputedStyle/computed-style-page-break-inside.html
new file mode 100644
index 0000000..3473a44
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-page-break-inside.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/computed-style-page-break-inside.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/css/getComputedStyle/script-tests/computed-style-page-break-inside.js b/LayoutTests/fast/css/getComputedStyle/script-tests/computed-style-page-break-inside.js
new file mode 100644
index 0000000..452ff46
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle/script-tests/computed-style-page-break-inside.js
@@ -0,0 +1,15 @@
+description("Test that page-break-inside property is not inherited");
+
+var parent = document.createElement("div");
+parent.setAttribute("style", "page-break-inside: avoid");
+
+var child = document.createElement("div");
+parent.appendChild(child);
+document.body.appendChild(parent);
+
+shouldBe("window.getComputedStyle(parent).getPropertyCSSValue('page-break-inside').getStringValue()", '"avoid"');
+shouldBe("window.getComputedStyle(child).getPropertyCSSValue('page-break-inside').getStringValue()", '"auto"');
+
+document.body.removeChild(parent);
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index dc3ad97..93c54fe 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-01-28 Hayato Ito <hayato at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change CSS 'page-break-inside' property from inherited one to non-inherited one because CSS specification defines so.
+
+ Note: Currently, the 'page-break-inside' property is used only when parsing the CSS. That property is not used when rendering.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34195
+
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::NonInheritedFlags::operator==):
+ (WebCore::InheritedFlags::setBitDefaults):
+ (WebCore::InheritedFlags::pageBreakInside):
+ (WebCore::InheritedFlags::setPageBreakInside):
+ * rendering/style/StyleInheritedData.cpp:
+ (WebCore::StyleInheritedData::StyleInheritedData):
+ (WebCore::StyleInheritedData::operator==):
+ * rendering/style/StyleInheritedData.h:
+
2010-01-28 Michael Nordman <michaeln at google.com>
Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index 29ca9f0..963a0ed 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -208,23 +208,24 @@ protected:
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) &&
- (_styleType == other._styleType) &&
- (_affectedByHover == other._affectedByHover) &&
- (_affectedByActive == other._affectedByActive) &&
- (_affectedByDrag == other._affectedByDrag) &&
- (_pseudoBits == other._pseudoBits) &&
- (_unicodeBidi == other._unicodeBidi);
+ 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;
}
bool operator!=(const NonInheritedFlags& other) const { return !(*this == other); }
@@ -241,6 +242,7 @@ protected:
unsigned _page_break_before : 2; // EPageBreak
unsigned _page_break_after : 2; // EPageBreak
+ unsigned _page_break_inside : 2; // EPageBreak
unsigned _styleType : 5; // PseudoId
bool _affectedByHover : 1;
@@ -248,7 +250,7 @@ protected:
bool _affectedByDrag : 1;
unsigned _pseudoBits : 7;
unsigned _unicodeBidi : 2; // EUnicodeBidi
- // 48 bits
+ // 50 bits
} noninherited_flags;
// !END SYNC!
@@ -284,6 +286,7 @@ protected:
noninherited_flags._table_layout = initialTableLayout();
noninherited_flags._page_break_before = initialPageBreak();
noninherited_flags._page_break_after = initialPageBreak();
+ noninherited_flags._page_break_inside = initialPageBreak();
noninherited_flags._styleType = NOPSEUDO;
noninherited_flags._affectedByHover = false;
noninherited_flags._affectedByActive = false;
@@ -585,7 +588,7 @@ public:
short widows() const { return inherited->widows; }
short orphans() const { return inherited->orphans; }
- EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(inherited->page_break_inside); }
+ 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); }
@@ -921,7 +924,7 @@ public:
void setWidows(short w) { SET_VAR(inherited, widows, w); }
void setOrphans(short o) { SET_VAR(inherited, orphans, o); }
- void setPageBreakInside(EPageBreak b) { SET_VAR(inherited, page_break_inside, b); }
+ void setPageBreakInside(EPageBreak b) { 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; }
diff --git a/WebCore/rendering/style/StyleInheritedData.cpp b/WebCore/rendering/style/StyleInheritedData.cpp
index f59c0c2..c73497f 100644
--- a/WebCore/rendering/style/StyleInheritedData.cpp
+++ b/WebCore/rendering/style/StyleInheritedData.cpp
@@ -37,7 +37,6 @@ StyleInheritedData::StyleInheritedData()
, vertical_border_spacing(RenderStyle::initialVerticalBorderSpacing())
, widows(RenderStyle::initialWidows())
, orphans(RenderStyle::initialOrphans())
- , page_break_inside(RenderStyle::initialPageBreak())
{
}
@@ -58,7 +57,6 @@ StyleInheritedData::StyleInheritedData(const StyleInheritedData& o)
, vertical_border_spacing(o.vertical_border_spacing)
, widows(o.widows)
, orphans(o.orphans)
- , page_break_inside(o.page_break_inside)
{
}
@@ -84,8 +82,7 @@ bool StyleInheritedData::operator==(const StyleInheritedData& o) const
horizontal_border_spacing == o.horizontal_border_spacing &&
vertical_border_spacing == o.vertical_border_spacing &&
widows == o.widows &&
- orphans == o.orphans &&
- page_break_inside == o.page_break_inside;
+ orphans == o.orphans;
}
} // namespace WebCore
diff --git a/WebCore/rendering/style/StyleInheritedData.h b/WebCore/rendering/style/StyleInheritedData.h
index 548ca72..3b30b8f 100644
--- a/WebCore/rendering/style/StyleInheritedData.h
+++ b/WebCore/rendering/style/StyleInheritedData.h
@@ -68,7 +68,6 @@ public:
// Paged media properties.
short widows;
short orphans;
- unsigned page_break_inside : 2; // EPageBreak
private:
StyleInheritedData();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list