WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
#74132 is landed, reupload to fire the bots
patch2upload_simpleshapeinsideOnRegions.patch (text/plain), 9.48 KB, created by
Zoltan Horvath
on 2013-02-15 10:04:19 PST
(
hide
)
Description:
#74132 is landed, reupload to fire the bots
Filename:
MIME Type:
Creator:
Zoltan Horvath
Created:
2013-02-15 10:04:19 PST
Size:
9.48 KB
patch
obsolete
>Index: LayoutTests/fast/regions/shape-inside-on-region.html >=================================================================== >--- LayoutTests/fast/regions/shape-inside-on-region.html (revision 0) >+++ LayoutTests/fast/regions/shape-inside-on-region.html (revision 0) >@@ -0,0 +1,28 @@ >+<!DOCTYPE HTML> >+<html> >+<head> >+ <style> >+ #rectangle { >+ -webkit-flow-into: rectangle; >+ } >+ .region { >+ width: 300px; >+ -webkit-flow-from: rectangle; >+ } >+ #region1 { >+ height: 260px; >+ -webkit-shape-inside: rectangle(0, 0, 100%, 100%, 60%, 50%); >+ } >+ </style> >+</head> >+<body> >+ <div id="rectangle"> >+ Jernau Morat Gurgeh, a famously skilful player of board games and other similar contests, lives on Chiark Orbital, and is bored with his successful life. The Culture's Special Circumstances inquires about his willingness to participate in a long journey, though won't explain further unless Gurgeh agrees to participate. While he is considering this offer, one of his drone friends, Mawhrin-Skel, which had been ejected from Special Circumstances due to its unstable personality, convinces him to cheat in one of his matches in an attempt to win in an unprece- dented perfect fashion. The attempt fails, but Mawhrin-Skel uses his recording of the event to blackmail Gurgeh into accepting the offer and insisting that Mawhrin-Skel be admitted back into Special Circumstances as well. >+ </div> >+ <div id="page"> >+ <div id="region1" class="region"></div> >+ <div id="region2" class="region"></div> >+ </div> >+ <p>The -shape-inside property is applied to the first region itself. The text should start inside the rounded rectangle and overflow to a regular rectangle.</p> >+</body> >+</html> >Index: LayoutTests/fast/regions/shape-inside-on-region-expected.html >=================================================================== >--- LayoutTests/fast/regions/shape-inside-on-region-expected.html (revision 0) >+++ LayoutTests/fast/regions/shape-inside-on-region-expected.html (revision 0) >@@ -0,0 +1,22 @@ >+<!DOCTYPE HTML> >+<html> >+<head> >+ <style> >+ #rectangle { >+ width: 300px; >+ height: 260px; >+ -webkit-shape-inside: rectangle(0, 0, 100%, 100%, 60%, 50%); >+ } >+ #box { width: 300px; } >+ </style> >+</head> >+<body> >+ <div id="rectangle"> >+ Jernau Morat Gurgeh, a famously skilful player of board games and other similar contests, lives on Chiark Orbital, and is bored with his successful life. The Culture's Special Circumstances inquires about his willingness to participate in a long journey, though won't explain further unless Gurgeh agrees to participate. While he is considering this offer, one of his drone friends, Mawhrin-Skel, which had been ejected from Special >+ </div> >+ <div id="box"> >+ Circumstances due to its unstable personality, convinces him to cheat in one of his matches in an attempt to win in an unprece- dented perfect fashion. The attempt fails, but Mawhrin-Skel uses his recording of the event to blackmail Gurgeh into accepting the offer and insisting that Mawhrin-Skel be admitted back into Special Circumstances as well. >+ </div> >+ <p>The -shape-inside property is applied to the first region itself. The text should start inside the rounded rectangle and overflow to a regular rectangle.</p> >+</body> >+</html> >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 142904) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2013-02-14 Zoltan Horvath <zoltan@webkit.org> >+ >+ [CSS Regions] Region boxes should respect -shape-inside CSS property >+ https://bugs.webkit.org/show_bug.cgi?id=107880 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is the first step to implement shape-inside on regions. This change adds support for >+ simple cases when the shape-inside is applied to the first region in the region chain. >+ >+ * fast/regions/shape-inside-on-region-expected.html: Added. >+ * fast/regions/shape-inside-on-region.html: Added. >+ > 2013-02-14 Lamarque V. Souza <Lamarque.Souza@basyskom.com> > > Support the ch unit from css3-values >Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 142903) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,24 @@ >+2013-02-14 Zoltan Horvath <zoltan@webkit.org> >+ >+ [CSS Regions] Region boxes should respect -shape-inside CSS property >+ https://bugs.webkit.org/show_bug.cgi?id=107880 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is the first step to implement shape-inside on regions. This change adds support for >+ simple cases when the shape-inside is applied to the first region in the region chain. >+ >+ Test: fast/regions/shape-inside-on-region.html >+ >+ * rendering/RenderBlock.h: >+ (RenderBlock): Make computeExclusionShapeSize() protected, since it's required in RenderRegion. >+ * rendering/RenderBlockLineLayout.cpp: >+ (WebCore::logicalHeightForLine): >+ (WebCore): Move the function prior to layoutExclusionShapeInsideInfo, since we need to use there. >+ (WebCore::layoutExclusionShapeInsideInfo): Add support for cases when shape-inside is a region-block property. >+ * rendering/RenderRegion.cpp: >+ (WebCore::RenderRegion::layout): Compute the size of the exclusion shape for the RenderRegion. >+ > 2013-02-14 David Kilzer <ddkilzer@apple.com> > > [Mac] Clean up WARNING_CFLAGS >Index: Source/WebCore/rendering/RenderBlockLineLayout.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBlockLineLayout.cpp (revision 142762) >+++ Source/WebCore/rendering/RenderBlockLineLayout.cpp (working copy) >@@ -33,6 +33,7 @@ > #include "RenderInline.h" > #include "RenderLayer.h" > #include "RenderListMarker.h" >+#include "RenderRegion.h" > #include "RenderRubyRun.h" > #include "RenderView.h" > #include "Settings.h" >@@ -63,10 +64,30 @@ > // We don't let our line box tree for a single line get any deeper than this. > const unsigned cMaxLineDepth = 200; > >+static LayoutUnit logicalHeightForLine(const RenderBlock* block, bool isFirstLine, LayoutUnit replacedHeight = 0) >+{ >+ if (!block->document()->inNoQuirksMode() && replacedHeight) >+ return replacedHeight; >+ >+ if (!(block->style(isFirstLine)->lineBoxContain() & LineBoxContainBlock)) >+ return 0; >+ >+ return max<LayoutUnit>(replacedHeight, block->lineHeight(isFirstLine, block->isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes)); >+} >+ > #if ENABLE(CSS_EXCLUSIONS) > static inline ExclusionShapeInsideInfo* layoutExclusionShapeInsideInfo(const RenderBlock* block) > { >- return block->view()->layoutState()->exclusionShapeInsideInfo(); >+ ExclusionShapeInsideInfo* shapeInsideInfo = block->view()->layoutState()->exclusionShapeInsideInfo(); >+ >+ if (!shapeInsideInfo && block->inRenderFlowThread()) { >+ RenderFlowThread* renderFlowThread = block->enclosingRenderFlowThread(); >+ if (renderFlowThread) { >+ RenderRegion* region = renderFlowThread->regionAtBlockOffset(block->logicalHeight() + logicalHeightForLine(block, false)); >+ return region ? region->exclusionShapeInsideInfo() : 0; >+ } >+ } >+ return shapeInsideInfo; > } > #endif > >@@ -133,17 +154,6 @@ > bool m_isFirstLine; > }; > >-static LayoutUnit logicalHeightForLine(RenderBlock* block, bool isFirstLine, LayoutUnit replacedHeight = 0) >-{ >- if (!block->document()->inNoQuirksMode() && replacedHeight) >- return replacedHeight; >- >- if (!(block->style(isFirstLine)->lineBoxContain() & LineBoxContainBlock)) >- return 0; >- >- return max<LayoutUnit>(replacedHeight, block->lineHeight(isFirstLine, block->isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes)); >-} >- > inline void LineWidth::updateAvailableWidth(LayoutUnit replacedHeight) > { > LayoutUnit height = m_block->logicalHeight(); >Index: Source/WebCore/rendering/RenderRegion.cpp >=================================================================== >--- Source/WebCore/rendering/RenderRegion.cpp (revision 142762) >+++ Source/WebCore/rendering/RenderRegion.cpp (working copy) >@@ -254,6 +254,9 @@ > if (view()->checkTwoPassLayoutForAutoHeightRegions()) > view()->flowThreadController()->setNeedsTwoPassLayoutForAutoHeightRegions(true); > } >+#if ENABLE(CSS_EXCLUSIONS) >+ computeExclusionShapeSize(); >+#endif > } > > // FIXME: We need to find a way to set up overflow properly. Our flow thread hasn't gotten a layout >Index: Source/WebCore/rendering/RenderBlock.h >=================================================================== >--- Source/WebCore/rendering/RenderBlock.h (revision 142762) >+++ Source/WebCore/rendering/RenderBlock.h (working copy) >@@ -537,10 +537,11 @@ > void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox*); > > virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight); >- >+#if ENABLE(CSS_EXCLUSIONS) >+ void computeExclusionShapeSize(); >+#endif > private: > #if ENABLE(CSS_EXCLUSIONS) >- void computeExclusionShapeSize(); > void updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValue*, const ExclusionShapeValue* oldExclusionShape); > #endif > virtual RenderObjectChildList* virtualChildren() { return children(); }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
webkit.review.bot
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 107880
:
184611
|
188416
|
188594
|
188613
|
189071
|
189074
|
189079
|
189098
|
189472
|
189473
|
189726