[webkit-changes] [113415] trunk/Source/WebCore
Title: [113415] trunk/Source/WebCore Revision 113415 Author ad...@apple.com Date 2012-04-05 22:23:25 -0700 (Thu, 05 Apr 2012) Log Message and https://bugs.webkit.org/show_bug.cgi?id=74129 REGRESSION (SnowLeopard, 5.1.4): All WK2 horizontal scrollbars look broken Patch by Dan Bernstein, Reviewed by Beth Dakin. This code assumed that the current CTM wouldn't have extraneous operations built into it, but this bug is evidence that that assumption was wrong. We should just get the base CTM instead and apply the device scale factor to it. No tests added since the SnowLeopard-style scrollbars aren't testable in our regression tests right now. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): (WebCore::GraphicsContext::applyDeviceScaleFactor): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp trunk/Source/WebCore/platform/graphics/GraphicsContext.h trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (113414 => 113415) --- trunk/Source/WebCore/ChangeLog 2012-04-06 05:16:05 UTC (rev 113414) +++ trunk/Source/WebCore/ChangeLog 2012-04-06 05:23:25 UTC (rev 113415) @@ -1,3 +1,22 @@ +2012-04-05 Adele Peterson + + and https://bugs.webkit.org/show_bug.cgi?id=74129 +REGRESSION (SnowLeopard, 5.1.4): All WK2 horizontal scrollbars look broken + +Patch by Dan Bernstein, Reviewed by Beth Dakin. + +This code assumed that the current CTM wouldn't have extraneous operations built into it, +but this bug is evidence that that assumption was wrong. We should just get the base CTM instead +and apply the device scale factor to it. + +No tests added since the SnowLeopard-style scrollbars aren't testable in our regression tests right now. + +* platform/graphics/GraphicsContext.cpp: +(WebCore::GraphicsContext::platformApplyDeviceScaleFactor): +(WebCore::GraphicsContext::applyDeviceScaleFactor): +* platform/graphics/GraphicsContext.h: (GraphicsContext): +* platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): + 2012-04-05 Yuta Kitamura Leak in WebSocketChannel with workers/worker-reload.html Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (113414 => 113415) --- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2012-04-06 05:16:05 UTC (rev 113414) +++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2012-04-06 05:23:25 UTC (rev 113415) @@ -765,7 +765,7 @@ } #if !USE(CG) -void GraphicsContext::platformApplyDeviceScaleFactor() +void GraphicsContext::platformApplyDeviceScaleFactor(float) { } #endif @@ -773,7 +773,7 @@ void GraphicsContext::applyDeviceScaleFactor(float deviceScaleFactor) { scale(FloatSize(deviceScaleFactor, deviceScaleFactor)); -platformApplyDeviceScaleFactor(); +platformApplyDeviceScaleFactor(deviceScaleFactor); } void GraphicsContext::fillEllipse(const FloatRect& ellipse) Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (113414 => 113415) --- trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2012-04-06 05:16:05 UTC (rev 113414) +++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2012-04-06 05:23:25 UTC (rev 113415) @@ -427,7 +427,7 @@ // This function applies the device scale factor to the context, making the context capable of // acting as a base-level context for a HiDPI environment. void applyDeviceScaleFactor(float); -void platformApplyDeviceScaleFactor(); +void platformApplyDeviceScaleFactor(float); #if OS(WINCE) && !PLATFORM(QT) void setBitmap(PassRefPtr); Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (113414 => 113415) --- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2012-04-06 05:16:05 UTC (rev 113414) +++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2012-04-06 05:23:25 UTC (rev 113415) @@ -65,9 +65,9 @@ #endif -// Undocumented CGContextSetCTM function, available at least since 10.4. extern "C" { CG_EXTERN void CGContextSetCTM(CGContextRef, CGAffineTransform); +CG_EXTERN CGAffineTransform CGContextGetBaseCTM(CGContextRef); }; using namespace std; @@ -1628,12 +1628,12 @@ CGContextSetBlendMode(platformContext(), target); } -void GraphicsContext::platformApplyDeviceScaleFactor() +void GraphicsContext::platformApplyDeviceScaleFactor(float deviceScaleFactor) { // CoreGraphics expects the base CTM of a HiDPI context to have the scale factor applied to it. // Failing to change the base level C
[webkit-changes] [111443] trunk/Tools
Title: [111443] trunk/Tools Revision 111443 Author ad...@apple.com Date 2012-03-20 14:42:23 -0700 (Tue, 20 Mar 2012) Log Message Update the last test to use EXPECT_WK_STREQ. Reviewed by Dan Bernstein. * TestWebKitAPI/Tests/mac/AttributedString.mm: (TestWebKitAPI::TEST): Modified Paths trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm Diff Modified: trunk/Tools/ChangeLog (111442 => 111443) --- trunk/Tools/ChangeLog 2012-03-20 21:39:27 UTC (rev 111442) +++ trunk/Tools/ChangeLog 2012-03-20 21:42:23 UTC (rev 111443) @@ -1,5 +1,13 @@ 2012-03-20 Adele Peterson +Update the last test to use EXPECT_WK_STREQ. + +Reviewed by Dan Bernstein. + +* TestWebKitAPI/Tests/mac/AttributedString.mm: (TestWebKitAPI::TEST): + +2012-03-20 Adele Peterson + "Attempt to insert nil value " exception when calling attributed string APIs on content with a custom font https://bugs.webkit.org/show_bug.cgi?id=81630 Modified: trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm (111442 => 111443) --- trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm 2012-03-20 21:39:27 UTC (rev 111442) +++ trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm 2012-03-20 21:42:23 UTC (rev 111443) @@ -63,7 +63,7 @@ NSAttributedString *attrString = [(NSView *)[[[webView.get() mainFrame] frameView] documentView] attributedSubstringFromRange:NSMakeRange(0, 5)]; -EXPECT_TRUE([[attrString string] isEqual:@"Lorem"]); +EXPECT_WK_STREQ("Lorem", [attrString string]); } TEST(WebKit2, AttributedStringTest) @@ -85,7 +85,8 @@ NSRange range = NSMakeRange(0, 5); NSRange actualRange; NSAttributedString *attrString = [webView.platformView() attributedSubstringForProposedRange:range actualRange:&actualRange]; -EXPECT_TRUE([[attrString string] isEqual:@"Lorem"]); + +EXPECT_WK_STREQ("Lorem", [attrString string]); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [110063] trunk/Source/WebCore
Title: [110063] trunk/Source/WebCore Revision 110063 Author ad...@apple.com Date 2012-03-07 09:23:46 -0800 (Wed, 07 Mar 2012) Log Message REGRESSION(r96566): Cursor is I-beam upon dragging an attachment in mail https://bugs.webkit.org/show_bug.cgi?id=80458 Reviewed by Dan Bernstein. No tests because we currently don't have any test machinery for cursors. Make sure the shortcut to always use an iBeam cursor during selection isn't used during dragging. Before r96566, we handled plugin cursors as a special case before calling into selectCursor, so we never hit this code path. * page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/EventHandler.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (110062 => 110063) --- trunk/Source/WebCore/ChangeLog 2012-03-07 17:23:43 UTC (rev 110062) +++ trunk/Source/WebCore/ChangeLog 2012-03-07 17:23:46 UTC (rev 110063) @@ -1,3 +1,18 @@ +2012-03-07 Adele Peterson + +REGRESSION(r96566): Cursor is I-beam upon dragging an attachment in mail +https://bugs.webkit.org/show_bug.cgi?id=80458 + + +Reviewed by Dan Bernstein. + +No tests because we currently don't have any test machinery for cursors. + +Make sure the shortcut to always use an iBeam cursor during selection isn't used during dragging. +Before r96566, we handled plugin cursors as a special case before calling into selectCursor, so we never hit this code path. + +* page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): + 2012-03-07 ChangSeok Oh [EFL] Key press event is not processed properly. Modified: trunk/Source/WebCore/page/EventHandler.cpp (110062 => 110063) --- trunk/Source/WebCore/page/EventHandler.cpp 2012-03-07 17:23:43 UTC (rev 110062) +++ trunk/Source/WebCore/page/EventHandler.cpp 2012-03-07 17:23:46 UTC (rev 110063) @@ -1285,8 +1285,8 @@ const Cursor& iBeam = horizontalText ? iBeamCursor() : verticalTextCursor(); // During selection, use an I-beam no matter what we're over. -// If you're capturing mouse events for a particular node, don't treat this as a selection. -if (m_mousePressed && m_mouseDownMayStartSelect && m_frame->selection()->isCaretOrRange() && !m_capturingMouseEventsNode) +// If a drag may be starting or we're capturing mouse events for a particular node, don't treat this as a selection. +if (m_mousePressed && m_mouseDownMayStartSelect && !m_mouseDownMayStartDrag && m_frame->selection()->isCaretOrRange() && !m_capturingMouseEventsNode) return iBeam; if (renderer) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [90290] trunk/Source
Title: [90290] trunk/Source Revision 90290 Author ad...@apple.com Date 2011-07-01 16:02:41 -0700 (Fri, 01 Jul 2011) Log Message ../WebCore: WebCore part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851 Crash when loading a document in an editable WebView that has a subframe with an unstyled body Reviewed by Darin Adler. No new tests. I tried to make a test in DumpRenderTree with an editable WebView, but was unsuccessful in getting the crash to happen in that instance. * editing/Editor.cpp: (WebCore::Editor::applyEditingStyleToElement): Add a nil check that exits early, in addition to the ASSERT. ../WebKit/mac: WebKit part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851 Crash when loading a document in an editable WebView that has a subframe with an unstyled body Reviewed by Darin Adler. * WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Only call applyEditingStyleToBodyElement for the main frame. There's no need to apply break-word, space, and after-white-space properties to subframes in the editable document. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/Editor.cpp trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm Diff Modified: trunk/Source/WebCore/ChangeLog (90289 => 90290) --- trunk/Source/WebCore/ChangeLog 2011-07-01 22:43:29 UTC (rev 90289) +++ trunk/Source/WebCore/ChangeLog 2011-07-01 23:02:41 UTC (rev 90290) @@ -1,3 +1,15 @@ +2011-07-01 Adele Peterson + +Reviewed by Darin Adler. + +WebCore part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851 + Crash when loading a document in an editable WebView that has a subframe with an unstyled body + +No new tests. I tried to make a test in DumpRenderTree with an editable WebView, +but was unsuccessful in getting the crash to happen in that instance. + +* editing/Editor.cpp: (WebCore::Editor::applyEditingStyleToElement): Add a nil check that exits early, in addition to the ASSERT. + 2011-07-01 Levi Weintraub Switch overflow and collapsedMargins to new layout types Modified: trunk/Source/WebCore/editing/Editor.cpp (90289 => 90290) --- trunk/Source/WebCore/editing/Editor.cpp 2011-07-01 22:43:29 UTC (rev 90289) +++ trunk/Source/WebCore/editing/Editor.cpp 2011-07-01 23:02:41 UTC (rev 90290) @@ -2883,6 +2883,8 @@ CSSStyleDeclaration* style = element->style(); ASSERT(style); +if (!style) +return; ExceptionCode ec = 0; style->setProperty(CSSPropertyWordWrap, "break-word", false, ec); Modified: trunk/Source/WebKit/mac/ChangeLog (90289 => 90290) --- trunk/Source/WebKit/mac/ChangeLog 2011-07-01 22:43:29 UTC (rev 90289) +++ trunk/Source/WebKit/mac/ChangeLog 2011-07-01 23:02:41 UTC (rev 90290) @@ -1,3 +1,14 @@ +2011-07-01 Adele Peterson + +Reviewed by Darin Adler. + +WebKit part of fix for https://bugs.webkit.org/show_bug.cgi?id=63851 + Crash when loading a document in an editable WebView that has a subframe with an unstyled body + +* WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): +Only call applyEditingStyleToBodyElement for the main frame. There's no need to apply break-word, +space, and after-white-space properties to subframes in the editable document. + 2011-07-01 Andy Estes Reviewed by Mark Rowe. Modified: trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm (90289 => 90290) --- trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm 2011-07-01 22:43:29 UTC (rev 90289) +++ trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm 2011-07-01 23:02:41 UTC (rev 90290) @@ -220,7 +220,7 @@ } WebView *webView = [webFrame webView]; -if ([webView isEditable]) +if ([webView mainFrame] == webFrame && [webView isEditable]) core(webFrame)->editor()->applyEditingStyleToBodyElement(); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes