Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 669803002: Optimize for horizontal writing mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed RenderView to use hasFlippedBlocksWritingMode Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 896
897 if (!node) 897 if (!node)
898 node = m_mousePressNode.get(); 898 node = m_mousePressNode.get();
899 899
900 if (!node || !node->renderer()) 900 if (!node || !node->renderer())
901 return false; 901 return false;
902 902
903 RenderBox* curBox = node->renderer()->enclosingBox(); 903 RenderBox* curBox = node->renderer()->enclosingBox();
904 while (curBox && !curBox->isRenderView()) { 904 while (curBox && !curBox->isRenderView()) {
905 ScrollDirection physicalDirection = toPhysicalDirection( 905 ScrollDirection physicalDirection = toPhysicalDirection(
906 direction, curBox->isHorizontalWritingMode(), curBox->style()->isFli ppedBlocksWritingMode()); 906 direction, curBox->isHorizontalWritingMode(), curBox->style()->slowI sFlippedBlocksWritingMode());
pdr. 2014/10/22 18:41:58 Nearly all of these should be able to use the fast
leviw_travelin_and_unemployed 2014/10/22 18:50:27 I'm fine with doing it in a follow-up as long as w
907 907
908 // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it 908 // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it
909 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st opNode; 909 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st opNode;
910 bool didScroll = curBox->scroll(physicalDirection, granularity, delta); 910 bool didScroll = curBox->scroll(physicalDirection, granularity, delta);
911 911
912 if (didScroll && stopNode) 912 if (didScroll && stopNode)
913 *stopNode = curBox->node(); 913 *stopNode = curBox->node();
914 914
915 if (didScroll || shouldStopBubbling) { 915 if (didScroll || shouldStopBubbling) {
916 setFrameWasScrolledByUser(); 916 setFrameWasScrolledByUser();
(...skipping 2971 matching lines...) Expand 10 before | Expand all | Expand 10 after
3888 unsigned EventHandler::accessKeyModifiers() 3888 unsigned EventHandler::accessKeyModifiers()
3889 { 3889 {
3890 #if OS(MACOSX) 3890 #if OS(MACOSX)
3891 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3891 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3892 #else 3892 #else
3893 return PlatformEvent::AltKey; 3893 return PlatformEvent::AltKey;
3894 #endif 3894 #endif
3895 } 3895 }
3896 3896
3897 } // namespace blink 3897 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698