[webkit-changes] cvs commit: WebKit/WebView.subproj WebHTMLView.m
Darin
darin at opensource.apple.com
Sun Oct 9 18:29:00 PDT 2005
darin 05/10/09 18:29:00
Modified: . ChangeLog
WebView.subproj WebHTMLView.m
Log:
Reviewed by Maciej.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
Would like API to flush rendering of pending DOM changes
This was actually a Tiger regression. When AppKit added a new code path for rendering
NSView, our special hack for doing layout when we draw didn't work any more. So we
were able to fix this without adding any API.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _recursiveDisplayRectIgnoringOpacity:inContext:topView:]): Added.
Does the same thing that other _recursiveDisplay methods do.
Revision Changes Path
1.3346 +15 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3345
retrieving revision 1.3346
diff -u -r1.3345 -r1.3346
--- ChangeLog 9 Oct 2005 04:17:36 -0000 1.3345
+++ ChangeLog 10 Oct 2005 01:28:56 -0000 1.3346
@@ -1,3 +1,18 @@
+2005-10-09 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
+ Would like API to flush rendering of pending DOM changes
+
+ This was actually a Tiger regression. When AppKit added a new code path for rendering
+ NSView, our special hack for doing layout when we draw didn't work any more. So we
+ were able to fix this without adding any API.
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView _recursiveDisplayRectIgnoringOpacity:inContext:topView:]): Added.
+ Does the same thing that other _recursiveDisplay methods do.
+
2005-10-08 Alexey Proskuryakov <ap at nypop.com>
Reviewed by Maciej.
1.473 +38 -14 WebKit/WebView.subproj/WebHTMLView.m
Index: WebHTMLView.m
===================================================================
RCS file: /cvs/root/WebKit/WebView.subproj/WebHTMLView.m,v
retrieving revision 1.472
retrieving revision 1.473
diff -u -r1.472 -r1.473
--- WebHTMLView.m 6 Oct 2005 15:46:11 -0000 1.472
+++ WebHTMLView.m 10 Oct 2005 01:28:59 -0000 1.473
@@ -92,6 +92,7 @@
@interface NSView (AppKitSecretsIKnowAbout)
- (void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(BOOL)isVisibleRect rectIsVisibleRectForView:(NSView *)visibleView topView:(BOOL)topView;
- (void)_recursiveDisplayAllDirtyWithLockFocus:(BOOL)needsLockFocus visRect:(NSRect)visRect;
+- (void)_recursiveDisplayRectIgnoringOpacity:(NSRect)rect inContext:(NSGraphicsContext *)context topView:(BOOL)topView;
- (NSRect)_dirtyRect;
- (void)_setDrawsOwnDescendants:(BOOL)drawsOwnDescendants;
- (void)_propagateDirtyRectsToOpaqueAncestors;
@@ -723,9 +724,8 @@
// need to be redrawn (in case the layout causes some things to get dirtied).
- (void)_propagateDirtyRectsToOpaqueAncestors
{
- if (![[self _webView] drawsBackground]) {
+ if (![[self _webView] drawsBackground])
[self _web_layoutIfNeededRecursive];
- }
[super _propagateDirtyRectsToOpaqueAncestors];
}
@@ -737,11 +737,10 @@
BOOL wasInPrintingMode = _private->printing;
BOOL isPrinting = ![NSGraphicsContext currentContextDrawingToScreen];
if (wasInPrintingMode != isPrinting) {
- if (isPrinting) {
+ if (isPrinting)
[self _web_setPrintingModeRecursive];
- } else {
+ else
[self _web_clearPrintingModeRecursive];
- }
}
[self _web_layoutIfNeededRecursive: rect testDirtyRect:YES];
@@ -753,11 +752,10 @@
[self _restoreSubviews];
if (wasInPrintingMode != isPrinting) {
- if (wasInPrintingMode) {
+ if (wasInPrintingMode)
[self _web_setPrintingModeRecursive];
- } else {
+ else
[self _web_clearPrintingModeRecursive];
- }
}
}
@@ -773,11 +771,10 @@
// This helps when we print as part of a larger print process.
// If the WebHTMLView itself is what we're printing, then we will never have to do this.
if (wasInPrintingMode != isPrinting) {
- if (isPrinting) {
+ if (isPrinting)
[self _web_setPrintingModeRecursive];
- } else {
+ else
[self _web_clearPrintingModeRecursive];
- }
}
NSRect boundsBeforeLayout = [self bounds];
@@ -798,17 +795,44 @@
if (needToSetAsideSubviews) {
if (wasInPrintingMode != isPrinting) {
- if (wasInPrintingMode) {
+ if (wasInPrintingMode)
[self _web_setPrintingModeRecursive];
- } else {
+ else
[self _web_clearPrintingModeRecursive];
- }
}
[self _restoreSubviews];
}
}
+// Don't let AppKit even draw subviews. We take care of that.
+- (void)_recursiveDisplayRectIgnoringOpacity:(NSRect)rect inContext:(NSGraphicsContext *)context topView:(BOOL)topView
+{
+ // This helps when we print as part of a larger print process.
+ // If the WebHTMLView itself is what we're printing, then we will never have to do this.
+ BOOL wasInPrintingMode = _private->printing;
+ BOOL isPrinting = ![context isDrawingToScreen];
+ if (wasInPrintingMode != isPrinting) {
+ if (isPrinting)
+ [self _web_setPrintingModeRecursive];
+ else
+ [self _web_clearPrintingModeRecursive];
+ }
+
+ [self _web_layoutIfNeededRecursive:rect testDirtyRect:NO];
+
+ [self _setAsideSubviews];
+ [super _recursiveDisplayRectIgnoringOpacity:rect inContext:context topView:topView];
+ [self _restoreSubviews];
+
+ if (wasInPrintingMode != isPrinting) {
+ if (wasInPrintingMode)
+ [self _web_setPrintingModeRecursive];
+ else
+ [self _web_clearPrintingModeRecursive];
+ }
+}
+
- (BOOL)_insideAnotherHTMLView
{
NSView *view = self;
More information about the webkit-changes
mailing list