WebKit/ChangeLog

 12010-12-09 David Hyatt <hyatt@apple.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Need a short description and bug URL (OOPS!)
 6
 7 * WebKit.xcodeproj/project.pbxproj:
 8
192010-12-07 Simon Fraser <simon.fraser@apple.com>
210
311 Update Xcode project for newer Xcode.
73635

WebKit/WebKit.xcodeproj/project.pbxproj

16661666 isa = PBXProject;
16671667 buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
16681668 compatibilityVersion = "Xcode 2.4";
 1669 developmentRegion = English;
16691670 hasScannedForEncodings = 1;
16701671 knownRegions = (
16711672 English,
73402

WebKit/mac/ChangeLog

 12010-12-09 David Hyatt <hyatt@apple.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PgUp, PgDown should respect
 6 writing-mode. This first part of the patch just patches Mac WebKit 1 views.
 7
 8 * WebView/WebFrameView.mm:
 9 (-[WebFrameView _isVerticalDocument]):
 10 (-[WebFrameView _isFlippedDocument]):
 11 (-[WebFrameView _isRTLDocument]):
 12 (-[WebFrameView _scrollToEndOfDocument]):
 13 (-[WebFrameView _pageInBlockProgressionDirection:]):
 14 (-[WebFrameView scrollPageUp:]):
 15 (-[WebFrameView scrollPageDown:]):
 16 (-[WebFrameView scrollInBlockProgressionDirection:]):
 17
1182010-12-08 Andy Estes <aestes@apple.com>
219
320 Reviewed by Darin Adler.
73635

WebKit/mac/WebView/WebFrameView.mm

@@- (BOOL)_scrollOverflowInDirection:(Scro
529529 return frame->eventHandler()->scrollOverflow(direction, granularity);
530530}
531531
 532
 533- (BOOL)_isVerticalDocument
 534{
 535 Frame* coreFrame = [self _web_frame];
 536 if (!coreFrame)
 537 return YES;
 538 Document* document = coreFrame->document();
 539 if (!document)
 540 return YES;
 541 RenderObject* renderView = document->renderer();
 542 if (!renderView)
 543 return YES;
 544 return renderView->style()->isHorizontalWritingMode();
 545}
 546
 547- (BOOL)_isFlippedDocument
 548{
 549 Frame* coreFrame = [self _web_frame];
 550 if (!coreFrame)
 551 return YES;
 552 Document* document = coreFrame->document();
 553 if (!document)
 554 return YES;
 555 RenderObject* renderView = document->renderer();
 556 if (!renderView)
 557 return YES;
 558 return renderView->style()->isFlippedBlocksWritingMode();
 559}
 560
 561- (BOOL)_isRTLDocument
 562{
 563 Frame* coreFrame = [self _web_frame];
 564 if (!coreFrame)
 565 return YES;
 566 Document* document = coreFrame->document();
 567 if (!document)
 568 return YES;
 569 RenderObject* renderView = document->renderer();
 570 if (!renderView)
 571 return YES;
 572 return !renderView->style()->isLeftToRightDirection();
 573}
 574
532575- (BOOL)_scrollToBeginningOfDocument
533576{
534577 if ([self _scrollOverflowInDirection:ScrollUp granularity:ScrollByDocument])

@@- (BOOL)_scrollToEndOfDocument
548591 if (![self _isScrollable])
549592 return NO;
550593 NSRect frame = [[[self _scrollView] documentView] frame];
551  NSPoint point = NSMakePoint(frame.origin.x, NSMaxY(frame));
552  point.x += [[self _scrollView] scrollOrigin].x;
553  point.y += [[self _scrollView] scrollOrigin].y;
 594
 595 bool isVertical = [self _isVerticalDocument];
 596 bool isFlipped = [self _isFlippedDocument];
 597
 598 NSPoint point;
 599 if (isVertical) {
 600 if (!isFlipped)
 601 NSMakePoint(frame.origin.x, NSMaxY(frame));
 602 else
 603 NSMakePoint(frame.origin.x, NSMinY(frame));
 604 } else {
 605 if (!isFlipped)
 606 NSMakePoint(NSMaxX(frame), frame.origin.y);
 607 else
 608 NSMakePoint(NSMinX(frame), frame.origin.y);
 609 }
 610
 611 // Reset the position opposite to the block progression direction.
 612 if (isVertical)
 613 point.x += [[self _scrollView] scrollOrigin].x;
 614 else
 615 point.y += [[self _scrollView] scrollOrigin].y;
554616 return [[self _contentView] _scrollTo:&point animate:YES];
555617}
556 
 618
557619- (void)scrollToBeginningOfDocument:(id)sender
558620{
559621 if ([self _scrollToBeginningOfDocument])

@@- (BOOL)_pageHorizontally:(BOOL)left
643705 return [self _scrollHorizontallyBy:left ? -delta : delta];
644706}
645707
 708- (BOOL)_pageInBlockProgressionDirection:(BOOL)forward
 709{
 710 // Determine whether we're calling _pageVertically or _pageHorizontally.
 711 BOOL isVerticalDocument = [self _isVerticalDocument];
 712 BOOL isFlippedBlock = [self _isFlippedDocument];
 713 if (isVerticalDocument)
 714 return [self _pageVertically:isFlippedBlock ? !forward : forward];
 715 return [self _pageHorizontally:isFlippedBlock ? !forward : forward];
 716}
 717
646718- (BOOL)_scrollLineVertically:(BOOL)up
647719{
648720 if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByLine])

@@- (BOOL)_scrollLineHorizontally:(BOOL)le
669741
670742- (void)scrollPageUp:(id)sender
671743{
672  if (![self _pageVertically:YES]) {
 744 if (![self _pageInBlockProgressionDirection:YES]) {
673745 // If we were already at the top, tell the next responder to scroll if it can.
674746 [[self nextResponder] tryToPerform:@selector(scrollPageUp:) with:sender];
675747 }

@@- (void)scrollPageUp:(id)sender
677749
678750- (void)scrollPageDown:(id)sender
679751{
680  if (![self _pageVertically:NO]) {
 752 if (![self _pageInBlockProgressionDirection:NO]) {
681753 // If we were already at the bottom, tell the next responder to scroll if it can.
682754 [[self nextResponder] tryToPerform:@selector(scrollPageDown:) with:sender];
683755 }
684756}
685757
 758- (void)scrollInBlockProgressionDirection:(id)sender
 759{
 760
 761}
 762
686763- (void)scrollLineUp:(id)sender
687764{
688765 if (![self _scrollLineVertically:YES])
73402