Diff
Modified: trunk/LayoutTests/ChangeLog (122760 => 122761)
--- trunk/LayoutTests/ChangeLog 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/LayoutTests/ChangeLog 2012-07-16 21:06:54 UTC (rev 122761)
@@ -1,3 +1,18 @@
+2012-07-16 Beth Dakin <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=91299
+ Paginated views should restrict available height to column height
+ -and corresponding-
+ <rdar://problem/11152108>
+
+ Reviewed by Dan Bernstein.
+
+ New test.
+ * fast/multicol/resources/big-green.png: Added.
+ * fast/multicol/shrink-to-column-height-for-pagination.html: Added.
+ * platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.png: Added.
+ * platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt: Added.
+
2012-07-16 Vincent Scheib <[email protected]>
Fix Layout Test pointer-lock/locked-element-removed-from-dom.html flakiness.
Added: trunk/LayoutTests/fast/multicol/resources/big-green.png
(Binary files differ)
Property changes on: trunk/LayoutTests/fast/multicol/resources/big-green.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/fast/multicol/shrink-to-column-height-for-pagination.html (0 => 122761)
--- trunk/LayoutTests/fast/multicol/shrink-to-column-height-for-pagination.html (rev 0)
+++ trunk/LayoutTests/fast/multicol/shrink-to-column-height-for-pagination.html 2012-07-16 21:06:54 UTC (rev 122761)
@@ -0,0 +1,13 @@
+<html style="-webkit-writing-mode: vertical-rl;">
+<head>
+ <script>
+ if (window.internals)
+ internals.setPagination(document, "RightToLeftPaginated", 0, 400);
+ </script>
+</head>
+<body style="width:100%; height:100%;">
+ <div style="width:100%; height:100%;">
+ <img src="" style="width:100%; height:100%; max-width:100%; max-height:100%;"/>
+ </div>
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt (0 => 122761)
--- trunk/LayoutTests/platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt 2012-07-16 21:06:54 UTC (rev 122761)
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 400x600
+layer at (-400,0) size 800x600 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 400x600
+ RenderBlock {DIV} at (0,0) size 400x600
+ RenderImage {IMG} at (392,0) size 400x600
+ RenderText {#text} at (0,0) size 0x0
+scrolled to -385,0
Modified: trunk/Source/WebCore/ChangeLog (122760 => 122761)
--- trunk/Source/WebCore/ChangeLog 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/ChangeLog 2012-07-16 21:06:54 UTC (rev 122761)
@@ -1,3 +1,41 @@
+2012-07-16 Beth Dakin <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=91299
+ Paginated views should restrict available height to column height
+ -and corresponding-
+ <rdar://problem/11152108>
+
+ Reviewed by Dan Bernstein.
+
+ Now that RenderViews can have columns, availableLogicalHeight needs to consider
+ that column height, much like how availableLogicalWidth already considers column
+ width.
+
+ availableLogicalHeight is newly virtual, like the already-virtual
+ availableLogicalWidth.
+ * rendering/RenderBox.h:
+ (RenderBox):
+
+ Check with the columnHeight.
+ * rendering/RenderView.cpp:
+ (WebCore):
+ (WebCore::RenderView::availableLogicalHeight):
+ * rendering/RenderView.h:
+
+ setPagination now takes pageLength as an optional parameter.
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::setPagination):
+ * testing/InternalSettings.h:
+ (WebCore::InternalSettings::setPagination):
+ (InternalSettings):
+ * testing/InternalSettings.idl:
+ * testing/Internals.cpp:
+ (WebCore::Internals::setPagination):
+ * testing/Internals.h:
+ (WebCore::Internals::setPagination):
+ (Internals):
+ * testing/Internals.idl:
+
2012-07-16 Dana Jansens <[email protected]>
[chromium] Remove targetRenderSurface concept, give layers a renderTarget which is the layer whose coordinate space they draw into
Modified: trunk/Source/WebCore/rendering/RenderBox.h (122760 => 122761)
--- trunk/Source/WebCore/rendering/RenderBox.h 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2012-07-16 21:06:54 UTC (rev 122761)
@@ -353,9 +353,9 @@
LayoutUnit computePercentageLogicalHeight(const Length& height);
- // Block flows subclass availableWidth to handle multi column layout (shrinking the width available to children when laying out.)
+ // Block flows subclass availableWidth/Height to handle multi column layout (shrinking the width/height available to children when laying out.)
virtual LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); }
- LayoutUnit availableLogicalHeight() const;
+ virtual LayoutUnit availableLogicalHeight() const;
LayoutUnit availableLogicalHeightUsing(const Length&) const;
// There are a few cases where we need to refer specifically to the available physical width and available physical height.
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (122760 => 122761)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2012-07-16 21:06:54 UTC (rev 122761)
@@ -108,6 +108,14 @@
RenderBlock::computePreferredLogicalWidths();
}
+LayoutUnit RenderView::availableLogicalHeight() const
+{
+ // If we have columns, then the available logical height is reduced to the column height.
+ if (hasColumns())
+ return columnInfo()->columnHeight();
+ return RenderBlock::availableLogicalHeight();
+}
+
bool RenderView::isChildAllowed(RenderObject* child, RenderStyle*) const
{
return child->isBox();
Modified: trunk/Source/WebCore/rendering/RenderView.h (122760 => 122761)
--- trunk/Source/WebCore/rendering/RenderView.h 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/rendering/RenderView.h 2012-07-16 21:06:54 UTC (rev 122761)
@@ -63,6 +63,8 @@
// it only exists to make computePreferredLogicalWidths public.
virtual void computePreferredLogicalWidths() OVERRIDE;
+ virtual LayoutUnit availableLogicalHeight() const OVERRIDE;
+
// The same as the FrameView's layoutHeight/layoutWidth but with null check guards.
int viewHeight() const;
int viewWidth() const;
Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (122760 => 122761)
--- trunk/Source/WebCore/testing/InternalSettings.cpp 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp 2012-07-16 21:06:54 UTC (rev 122761)
@@ -520,7 +520,7 @@
#endif
}
-void InternalSettings::setPagination(const String& mode, int gap, ExceptionCode& ec)
+void InternalSettings::setPagination(const String& mode, int gap, int pageLength, ExceptionCode& ec)
{
if (!page()) {
ec = INVALID_ACCESS_ERR;
@@ -544,6 +544,7 @@
}
pagination.gap = gap;
+ pagination.pageLength = pageLength;
page()->setPagination(pagination);
}
Modified: trunk/Source/WebCore/testing/InternalSettings.h (122760 => 122761)
--- trunk/Source/WebCore/testing/InternalSettings.h 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/testing/InternalSettings.h 2012-07-16 21:06:54 UTC (rev 122761)
@@ -124,7 +124,8 @@
void setJavaScriptProfilingEnabled(bool enabled, ExceptionCode&);
Vector<String> userPreferredLanguages() const;
void setUserPreferredLanguages(const Vector<String>&);
- void setPagination(const String& mode, int gap, ExceptionCode&);
+ void setPagination(const String& mode, int gap, ExceptionCode& ec) { setPagination(mode, gap, 0, ec); }
+ void setPagination(const String& mode, int gap, int pageLength, ExceptionCode&);
void allowRoundingHacks() const;
void setShouldDisplayTrackKind(const String& kind, bool enabled, ExceptionCode&);
bool shouldDisplayTrackKind(const String& kind, ExceptionCode&);
Modified: trunk/Source/WebCore/testing/InternalSettings.idl (122760 => 122761)
--- trunk/Source/WebCore/testing/InternalSettings.idl 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/testing/InternalSettings.idl 2012-07-16 21:06:54 UTC (rev 122761)
@@ -66,7 +66,7 @@
void setWindowFocusRestricted(in boolean restricted) raises(DOMException);
void setDialogElementEnabled(in boolean enabled) raises(DOMException);
- void setPagination(in DOMString mode, in long gap) raises(DOMException);
+ void setPagination(in DOMString mode, in long gap, in [Optional] long pageLength) raises(DOMException);
sequence<String> userPreferredLanguages();
void setUserPreferredLanguages(in sequence<String> languages);
void allowRoundingHacks();
Modified: trunk/Source/WebCore/testing/Internals.cpp (122760 => 122761)
--- trunk/Source/WebCore/testing/Internals.cpp 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/testing/Internals.cpp 2012-07-16 21:06:54 UTC (rev 122761)
@@ -628,9 +628,9 @@
frameView->setConstrainsScrollingToContentEdge(constrainsScrollingToContentEdgeOldValue);
}
-void Internals::setPagination(Document*, const String& mode, int gap, ExceptionCode& ec)
+void Internals::setPagination(Document*, const String& mode, int gap, int pageLength, ExceptionCode& ec)
{
- settings()->setPagination(mode, gap, ec);
+ settings()->setPagination(mode, gap, pageLength, ec);
}
String Internals::configurationForViewport(Document*, float devicePixelRatio, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight, ExceptionCode& ec)
Modified: trunk/Source/WebCore/testing/Internals.h (122760 => 122761)
--- trunk/Source/WebCore/testing/Internals.h 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/testing/Internals.h 2012-07-16 21:06:54 UTC (rev 122761)
@@ -115,7 +115,8 @@
String markerDescriptionForNode(Node*, const String& markerType, unsigned index, ExceptionCode&);
void setScrollViewPosition(Document*, long x, long y, ExceptionCode&);
- void setPagination(Document*, const String& mode, int gap, ExceptionCode&);
+ void setPagination(Document* document, const String& mode, int gap, ExceptionCode& ec) { setPagination(document, mode, gap, 0, ec); }
+ void setPagination(Document*, const String& mode, int gap, int pageLength, ExceptionCode&);
String configurationForViewport(Document*, float devicePixelRatio, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight, ExceptionCode&);
bool wasLastChangeUserEdit(Element* textField, ExceptionCode&);
Modified: trunk/Source/WebCore/testing/Internals.idl (122760 => 122761)
--- trunk/Source/WebCore/testing/Internals.idl 2012-07-16 21:06:35 UTC (rev 122760)
+++ trunk/Source/WebCore/testing/Internals.idl 2012-07-16 21:06:54 UTC (rev 122761)
@@ -86,7 +86,7 @@
void setScrollViewPosition(in Document document, in long x, in long y) raises(DOMException);
- void setPagination(in Document document, in DOMString mode, in long gap) raises(DOMException);
+ void setPagination(in Document document, in DOMString mode, in long gap, in [Optional] long pageLength) raises(DOMException);
DOMString configurationForViewport(in Document document,
in float devicePixelRatio,