Bug 118300

Summary: [CSS Regions] Improve implementation of elements in region being flowed to another flow thread
Product: WebKit Reporter: Radu Stavila <stavila>
Component: CSSAssignee: Radu Stavila <stavila>
Status: RESOLVED FIXED    
Severity: Normal CC: abrhm, cmarcelo, commit-queue, d-r, esprehn+autocc, fmalita, glenn, kadam, kangil.han, mmaerean, ossy, pdr, schenney, WebkitBugTracker, zarvai
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 57312    
Attachments:
Description Flags
Patch
none
Patch (fixed styling issue)
none
buildfix for !ENABLE(CSS_REGIONS) builds none

Description Radu Stavila 2013-07-02 06:18:49 PDT
Improve https://bugs.webkit.org/show_bug.cgi?id=74144
Comment 1 Radu Stavila 2013-07-02 11:11:31 PDT
Created attachment 205927 [details]
Patch
Comment 2 Radu Stavila 2013-07-02 11:11:42 PDT
Ported from https://codereview.chromium.org/18080016/
Comment 3 WebKit Commit Bot 2013-07-02 11:14:24 PDT
Attachment 205927 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/regions/flow-body-in-html.html', u'LayoutTests/fast/regions/region-content-flown-into-region-expected.html', u'LayoutTests/fast/regions/region-content-flown-into-region.html', u'LayoutTests/fast/regions/universal-selector-children-to-the-same-region.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/Element.cpp', u'Source/WebCore/dom/Element.h', u'Source/WebCore/dom/ElementRareData.h', u'Source/WebCore/dom/Node.cpp', u'Source/WebCore/dom/Node.h', u'Source/WebCore/dom/NodeRenderingContext.cpp', u'Source/WebCore/dom/NodeRenderingContext.h', u'Source/WebCore/dom/PseudoElement.h', u'Source/WebCore/dom/Text.cpp', u'Source/WebCore/dom/Text.h', u'Source/WebCore/rendering/FlowThreadController.cpp', u'Source/WebCore/rendering/FlowThreadController.h', u'Source/WebCore/rendering/RenderObject.h', u'Source/WebCore/rendering/RenderRegion.h', u'Source/WebCore/svg/SVGElement.cpp', u'Source/WebCore/svg/SVGElement.h']" exit_code: 1
Source/WebCore/dom/NodeRenderingContext.cpp:251:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 1 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Radu Stavila 2013-07-02 11:22:11 PDT
Created attachment 205929 [details]
Patch (fixed styling issue)
Comment 5 Dave Hyatt 2013-07-02 11:26:50 PDT
Comment on attachment 205929 [details]
Patch (fixed styling issue)

r=me
Comment 6 WebKit Commit Bot 2013-07-02 13:44:11 PDT
Comment on attachment 205929 [details]
Patch (fixed styling issue)

Clearing flags on attachment: 205929

Committed r152320: <http://trac.webkit.org/changeset/152320>
Comment 7 WebKit Commit Bot 2013-07-02 13:44:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Mihai Maerean 2013-07-02 23:24:39 PDT
*** Bug 117637 has been marked as a duplicate of this bug. ***
Comment 9 Csaba Osztrogon√°c 2013-07-03 01:23:10 PDT
(In reply to comment #6)
> (From update of attachment 205929 [details])
> Clearing flags on attachment: 205929
> 
> Committed r152320: <http://trac.webkit.org/changeset/152320>

It broke the !ENABLE(CSS_REGIONS) builds, for example on the Qt minimal bot:

/ramdisk/qt-linux-release-minimal/build/WebKitBuild/Release/Source/WebCore//.obj/release-shared/dom/Element.o:(.data.rel.ro._ZTVN7WebCore7ElementE[vtable for WebCore::Element]+0x20c): undefined reference to `WebCore::Element::shouldMoveToFlowThread(WebCore::RenderStyle*) const'
/ramdisk/qt-linux-release-minimal/build/WebKitBuild/Release/Source/WebCore//.obj/release-shared/dom/StyledElement.o:(.data.rel.ro._ZTVN7WebCore13StyledElementE[vtable for WebCore::StyledElement]+0x20c): undefined reference to `WebCore::Element::shouldMoveToFlowThread(WebCore::RenderStyle*) const'
/ramdisk/qt-linux-release-minimal/build/WebKitBuild/Release/Source/WebCore//.obj/release-shared/html/FileInputType.o:(.data.rel.ro._ZTVN7WebCore19UploadButtonElementE[vtable for WebCore::UploadButtonElement]+0x20c): undefined reference to `WebCore::Element::shouldMoveToFlowThread(WebCore::RenderStyle*) const'
/ramdisk/qt-linux-release-minimal/build/WebKitBuild/Release/Source/WebCore//.obj/release-shared/html/HTMLAnchorElement.o:(.data.rel.ro._ZTVN7WebCore17HTMLAnchorElementE[vtable for WebCore::HTMLAnchorElement]+0x20c): undefined reference to `WebCore::Element::shouldMoveToFlowThread(WebCore::RenderStyle*) const'
/ramdisk/qt-linux-release-minimal/build/WebKitBuild/Release/Source/WebCore//.obj/release-shared/html/HTMLAppletElement.o:(.data.rel.ro._ZTVN7WebCore17HTMLAppletElementE[vtable for WebCore::HTMLAppletElement]+0x20c): undefined reference to `WebCore::Element::shouldMoveToFlowThread(WebCore::RenderStyle*) const'
/ramdisk/qt-linux-release-minimal/build/WebKitBuild/Release/Source/WebCore//.obj/release-shared/html/HTMLAreaElement.o:(.data.rel.ro._ZTVN7WebCore15HTMLAreaElementE[vtable for WebCore::HTMLAreaElement]+0x20c): more undefined references to `WebCore::Element::shouldMoveToFlowThread(WebCore::RenderStyle*) const' follow

The problem is that Element::shouldMoveToFlowThread(...) is defined inside
ENABLE(CSS_REGIONS) guard, but used outside the same guard. Could you fix
it, please?
Comment 10 Zoltan Arvai 2013-07-03 01:33:51 PDT
Created attachment 205979 [details]
buildfix for !ENABLE(CSS_REGIONS) builds

Fix guards for !ENABLE(CSS_REGIONS) builds.
Comment 11 Radu Stavila 2013-07-03 01:37:10 PDT
Comment on attachment 205979 [details]
buildfix for !ENABLE(CSS_REGIONS) builds

View in context: https://bugs.webkit.org/attachment.cgi?id=205979&action=review

> Source/WebCore/dom/NodeRenderingContext.cpp:210
> +#if ENABLE(CSS_REGIONS)

I think the entire content of this method should be under guard. If !ENABLE(CSS_REGIONS) it should just return false.
Comment 12 Radu Stavila 2013-07-03 01:37:42 PDT
@Zoltan Thanks for fixing this, you were faster than me :)
Comment 13 Csaba Osztrogon√°c 2013-07-03 02:07:12 PDT
Comment on attachment 205979 [details]
buildfix for !ENABLE(CSS_REGIONS) builds

buildfix landed: Committed r152345