Summary: | [Extended Background] Respect repeat-x/repeat-y when creating margin tiles | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||
Component: | New Bugs | Assignee: | Sam Weinig <sam> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bdakin, commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Sam Weinig
2014-05-03 15:27:05 PDT
Created attachment 230767 [details]
Patch
Comment on attachment 230767 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=230767&action=review > Source/WebCore/page/FrameView.cpp:2547 > + unsigned mode = 0; Can't this be a type? > Source/WebCore/page/FrameView.cpp:2561 > + if (documentElementRenderer && documentElementRenderer->style().hasBackgroundImage()) { > + if (documentElementRenderer->style().backgroundRepeatX() == RepeatFill) > + mode |= ExtendedBackgroundModeHorizontal; > + if (documentElementRenderer->style().backgroundRepeatY() == RepeatFill) > + mode |= ExtendedBackgroundModeVertical; > + } > + > + if (bodyRenderer && bodyRenderer->style().hasBackgroundImage()) { > + if (bodyRenderer->style().backgroundRepeatX() == RepeatFill) > + mode |= ExtendedBackgroundModeHorizontal; > + if (bodyRenderer->style().backgroundRepeatY() == RepeatFill) > + mode |= ExtendedBackgroundModeVertical; > + } I think you only want to look at the one that supplies the root background. We have (poorly factored) code elsewhere that does this. > Source/WebCore/page/FrameView.cpp:2592 > + renderView->compositor().setRootExtendedBackgroundColor(mode == ExtendedBackgroundModeAll ? Color() : documentBackgroundColor()); Any reason not to always set the color? What happens if the background image has alpha? > Source/WebCore/page/FrameView.cpp:2595 > + Boop. > Source/WebCore/page/FrameView.cpp:2614 > + Stupid xcode. > Source/WebCore/page/FrameView.h:203 > + }; > + Typedef for the bitmask please. > Source/WebCore/page/FrameView.h:210 > + r- Comment on attachment 230767 [details]
Patch
This is a good approach. r=me, but you should address Simon's comments.
Committed revision 168362. |