Changeset 119528 in webkit
- Timestamp:
- Jun 5, 2012 2:56:24 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r119527 r119528 1 2012-06-05 Levi Weintraub <leviw@chromium.org> 2 3 Block selection gaps painted not properly pixel snapped 4 https://bugs.webkit.org/show_bug.cgi?id=88000 5 6 Reviewed by Ryosuke Niwa. 7 8 One new selection test and updated snowleopard expectations for a handful that improved. 9 10 Note: a couple of the RTL results appear worse, but sadly are only returning to our old pre-sub-pixel results. 11 12 * fast/sub-pixel/selection: Added. 13 * fast/sub-pixel/selection/selection-gaps-at-fractional-offsets-expected.txt: Added. 14 * fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html: Added. 15 * platform/chromium-mac-snowleopard/editing/selection/3690703-2-expected.png: 16 * platform/chromium-mac-snowleopard/editing/selection/3690703-expected.png: 17 * platform/chromium-mac-snowleopard/editing/selection/3690719-expected.png: 18 * platform/chromium-mac-snowleopard/editing/selection/selection-button-text-expected.png: 19 * platform/chromium-mac-snowleopard/editing/selection/vertical-lr-ltr-extend-line-backward-br-expected.png: 20 * platform/chromium-mac-snowleopard/editing/selection/vertical-lr-ltr-extend-line-forward-br-expected.png: 21 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-ltr-extend-line-backward-br-expected.png: 22 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-ltr-extend-line-backward-p-expected.png: 23 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.png: 24 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-ltr-extend-line-forward-br-expected.png: 25 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-ltr-extend-line-forward-p-expected.png: 26 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.png: 27 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.png: 28 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.png: 29 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.png: 30 * platform/chromium-mac-snowleopard/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.png: 31 * platform/chromium-mac-snowleopard/fast/sub-pixel: Added. 32 * platform/chromium-mac-snowleopard/fast/sub-pixel/selection: Added. 33 * platform/chromium-mac-snowleopard/fast/sub-pixel/selection/selection-gaps-at-fractional-offsets-expected.png: Added. 34 * platform/chromium-mac/fast/repaint/japanese-rl-selection-repaint-expected.png: 35 * platform/chromium-mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.png: 36 * platform/chromium/TestExpectations: 37 * platform/efl/Skipped: 38 * platform/gtk-wk2/Skipped: 39 * platform/mac-lion/Skipped: 40 * platform/mac-snowleopard/Skipped: 41 * platform/mac-wk2/Skipped: 42 * platform/mac/Skipped: 43 * platform/qt-4.8/Skipped: 44 * platform/qt/Skipped: 45 * platform/win-wk2/Skipped: 46 * platform/win-xp/Skipped: 47 * platform/win/Skipped: 48 * platform/wincairo/Skipped: 49 * platform/wk2/Skipped: 50 1 51 2012-06-05 Adam Barth <abarth@webkit.org> 2 52 -
trunk/LayoutTests/platform/chromium/TestExpectations
r119524 r119528 3746 3746 BUGWK87321 XP : fast/history/history-traversal-is-asynchronous.html = TEXT PASS 3747 3747 3748 // Need rebaselines after landing the patch on bug 88000 3749 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-ltr-extend-line-forward-wrap.html = IMAGE 3750 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-lr-ltr-extend-line-backward-br.html = IMAGE 3751 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/3690703.html = IMAGE 3752 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-ltr-extend-line-forward-br.html = IMAGE 3753 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-ltr-extend-line-backward-wrap.html = IMAGE 3754 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-rtl-extend-line-backward-p.html = IMAGE 3755 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-rtl-extend-line-backward-br.html = IMAGE 3756 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-ltr-extend-line-forward-p.html = IMAGE 3757 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-lr-ltr-extend-line-forward-br.html = IMAGE 3758 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/selection-button-text.html = IMAGE 3759 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/3690703-2.html = IMAGE 3760 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-rtl-extend-line-forward-br.html = IMAGE 3761 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/3690719.html = IMAGE 3762 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-ltr-extend-line-backward-p.html = IMAGE 3763 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-ltr-extend-line-backward-br.html = IMAGE 3764 BUGLEVI WIN LINUX LION LEOPARD : editing/selection/vertical-rl-rtl-extend-line-forward-p.html = IMAGE 3765 BUGLEVI LINUX : fast/repaint/japanese-rl-selection-repaint.html = IMAGE 3766 BUGLEVI WIN LINUX LION LEOPARD : fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html = FAIL MISSING 3767 3748 3768 // File blob tests failing after chromium r138702 3749 3769 BUGWK87356 : fast/files/read-blob-async.html = TEXT -
trunk/LayoutTests/platform/efl/Skipped
r119456 r119528 1179 1179 fast/sub-pixel/layout-boxes-with-zoom.html 1180 1180 fast/sub-pixel/size-of-box-with-zoom.html 1181 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 1181 1182 1182 1183 # This should only be a layer change -
trunk/LayoutTests/platform/gtk-wk2/Skipped
r119456 r119528 350 350 fast/sub-pixel/layout-boxes-with-zoom.html 351 351 fast/sub-pixel/size-of-box-with-zoom.html 352 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 352 353 353 354 ############################################################################### -
trunk/LayoutTests/platform/mac-lion/Skipped
r119456 r119528 108 108 fast/sub-pixel/layout-boxes-with-zoom.html 109 109 fast/sub-pixel/size-of-box-with-zoom.html 110 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 110 111 111 112 # This media test always failed on Lion -
trunk/LayoutTests/platform/mac-snowleopard/Skipped
r119456 r119528 206 206 fast/sub-pixel/layout-boxes-with-zoom.html 207 207 fast/sub-pixel/size-of-box-with-zoom.html 208 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 208 209 209 210 # Frame::findString does nothing on pages that prevent selection -
trunk/LayoutTests/platform/mac-wk2/Skipped
r119504 r119528 212 212 fast/sub-pixel/layout-boxes-with-zoom.html 213 213 fast/sub-pixel/size-of-box-with-zoom.html 214 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 214 215 215 216 # fast/events/pagehide-timeout.html, pageshow-pagehide-on-back-cached-with-frames.html, and -
trunk/LayoutTests/platform/mac/Skipped
r119515 r119528 808 808 fast/sub-pixel/layout-boxes-with-zoom.html 809 809 fast/sub-pixel/size-of-box-with-zoom.html 810 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 810 811 811 812 # media/audio-repaint.html sometimes fails on Lion Debug (Tests) -
trunk/LayoutTests/platform/qt-4.8/Skipped
r119456 r119528 88 88 fast/sub-pixel/layout-boxes-with-zoom.html 89 89 fast/sub-pixel/size-of-box-with-zoom.html 90 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 90 91 91 92 # SVG Fonts are only supported when using QRawFont, which is not -
trunk/LayoutTests/platform/qt/Skipped
r119456 r119528 224 224 fast/sub-pixel/layout-boxes-with-zoom.html 225 225 fast/sub-pixel/size-of-box-with-zoom.html 226 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 226 227 227 228 # CSS Regions support not yet enabled. http://webkit.org/b/57312 -
trunk/LayoutTests/platform/win-wk2/Skipped
r119456 r119528 945 945 fast/sub-pixel/layout-boxes-with-zoom.html 946 946 fast/sub-pixel/size-of-box-with-zoom.html 947 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 947 948 948 949 # HiDPI tests require test infrastructure enhancements -
trunk/LayoutTests/platform/win-xp/Skipped
r119456 r119528 45 45 fast/sub-pixel/layout-boxes-with-zoom.html 46 46 fast/sub-pixel/size-of-box-with-zoom.html 47 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 47 48 48 49 # REGRESSION (r83928 or before): Some tests failing assertions in MarkStack::internalAppend / MarkStack::drain -
trunk/LayoutTests/platform/win/Skipped
r119456 r119528 1747 1747 fast/sub-pixel/layout-boxes-with-zoom.html 1748 1748 fast/sub-pixel/size-of-box-with-zoom.html 1749 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html 1749 1750 1750 1751 # http://webkit.org/b/82886 -
trunk/LayoutTests/platform/wincairo/Skipped
r119456 r119528 2096 2096 fast/sub-pixel/layout-boxes-with-zoom.html 2097 2097 fast/sub-pixel/size-of-box-with-zoom.html 2098 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 2098 2099 2099 2100 #Battery Status API is not implemented. -
trunk/LayoutTests/platform/wk2/Skipped
r119456 r119528 95 95 fast/sub-pixel/layout-boxes-with-zoom.html 96 96 fast/sub-pixel/size-of-box-with-zoom.html 97 fast/sub-pixel/selection-gaps-at-fractional-offsets.html 97 98 98 99 # CONSOLE MESSAGE: line 0: SVG animation pause API missing! -
trunk/Source/WebCore/ChangeLog
r119527 r119528 1 2012-06-05 Levi Weintraub <leviw@chromium.org> 2 3 Block selection gaps painted not properly pixel snapped 4 https://bugs.webkit.org/show_bug.cgi?id=88000 5 6 Reviewed by Ryosuke Niwa. 7 8 Fixes for selection painting in both inline line heights and block gaps. We were unintentionally 9 flooring inline and block offsets in RenderBlock, but actually need to intentionally floor the 10 logical left and right values in logical(Left|Right)SelectionGap to properly align our block 11 selection gaps. This is to properly mirror the behavior in pixelSnappedLogicalRightOffsetForLine. 12 13 We were also unintentionally upcasting LayoutUnits to floats in InlineTextBox's selection painting 14 routine. Now we're properly rounding. 15 16 Test: fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html 17 18 * rendering/InlineTextBox.cpp: 19 (WebCore::InlineTextBox::paintSelection): Move paint values to integers and do proper rounding. 20 * rendering/RenderBlock.cpp: 21 (WebCore::blockDirectionOffset): Fix incorrect flooring in return value. 22 (WebCore::inlineDirectionOffset): Ditto. 23 (WebCore): Removing previous attempt to properly mirror inline box selection pixel alignment. This 24 implementation rounded the final x value instead of properly rounding our block offset then flooring 25 the offset that corresponds to the behavior in InlineTextBox. It also didn't properly pixel snap 26 the y offset and height. 27 (WebCore::RenderBlock::blockSelectionGap): Properly pixel snapping the gap rect before painting. 28 (WebCore::RenderBlock::logicalLeftSelectionGap): Correctly match InlineTextBox's selection pixel 29 alignment by flooring the logicalLeft and pixel snapping the subsequent rect. We do this in order 30 to maintain proper render tree pixel snapping while simultaneously mirroring the flooring in the 31 inline direction that occurs in InlineTextBox.cpp's alignSelectionRectToDevicePixels method. 32 (WebCore::RenderBlock::logicalRightSelectionGap): Ditto with the right. 33 1 34 2012-06-05 Adam Barth <abarth@webkit.org> 2 35 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r119367 r119528 1 2 1 // !$*UTF8*$! 3 2 { … … 337 336 14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */; }; 338 337 14E8378E09F85D4F00B85AE4 /* JSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E8378D09F85D4F00B85AE4 /* JSEvent.h */; }; 339 C6A703325C9D0B6CDCBC4D77 /* JSEventTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6A703325C9D0B6CDCBC4D78 /* JSEventTarget.cpp */; };340 5FC7DC26CFE2563200B85AE4 /* JSEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */; };341 338 14FFE31D0AE1963300136BF5 /* HTMLFrameElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 342 339 14FFE31E0AE1963300136BF5 /* HTMLFrameElementBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14FFE31C0AE1963300136BF5 /* HTMLFrameElementBase.cpp */; }; … … 1675 1672 5DFE8F560D16477B0076E937 /* ScheduledAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */; }; 1676 1673 5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA378BB0D15F64200B793D6 /* ScheduledAction.h */; }; 1674 5FC7DC26CFE2563200B85AE4 /* JSEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */; }; 1677 1675 626CDE0E1140424C001E5A68 /* SpatialNavigation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */; }; 1678 1676 626CDE0F1140424C001E5A68 /* SpatialNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 626CDE0D1140424C001E5A68 /* SpatialNavigation.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1928 1926 7E33CD01127F340D00BE8F17 /* PurgePriority.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E33CD00127F340D00BE8F17 /* PurgePriority.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1929 1927 7E37EF2E1339208800B29250 /* SubresourceLoaderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */; }; 1928 7E99AF510B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E99AF520B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp */; }; 1929 7E99AF530B13846468FB01A5 /* WindowFocusAllowedIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1930 1930 7EE6845F12D26E3800E79415 /* AuthenticationCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6844C12D26E3800E79415 /* AuthenticationCF.cpp */; }; 1931 1931 7EE6846012D26E3800E79415 /* AuthenticationCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6844D12D26E3800E79415 /* AuthenticationCF.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 5432 5432 BC8243E80D0CFD7500460C8F /* WindowFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8243E60D0CFD7500460C8F /* WindowFeatures.cpp */; }; 5433 5433 BC8243E90D0CFD7500460C8F /* WindowFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8243E70D0CFD7500460C8F /* WindowFeatures.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5434 7E99AF510B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E99AF520B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp */; };5435 7E99AF530B13846468FB01A5 /* WindowFocusAllowedIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */; settings = {ATTRIBUTES = (Private, ); }; };5436 5434 BC85F23D151915E000BC17BE /* RenderNamedFlowThread.h in Headers */ = {isa = PBXBuildFile; fileRef = BC85F23C151915E000BC17BE /* RenderNamedFlowThread.h */; }; 5437 5435 BC8AE34E12EA096A00EB3AE6 /* ScrollableArea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8AE34C12EA096A00EB3AE6 /* ScrollableArea.cpp */; }; … … 5735 5733 C5E9B67710697E1300C7BB1A /* StorageEventDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C5E9B67610697E1300C7BB1A /* StorageEventDispatcher.cpp */; }; 5736 5734 C5EBDD84105EDDEC0056816F /* StorageEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */; }; 5735 C6A703325C9D0B6CDCBC4D77 /* JSEventTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6A703325C9D0B6CDCBC4D78 /* JSEventTarget.cpp */; }; 5737 5736 C6B31B2E14F841FB0089F23F /* ScrollbarThemeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = C691614714F6EBA70046375C /* ScrollbarThemeClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5738 5737 C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */; }; … … 7257 7256 14E8378309F85D1C00B85AE4 /* JSEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEvent.cpp; sourceTree = "<group>"; }; 7258 7257 14E8378D09F85D4F00B85AE4 /* JSEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEvent.h; sourceTree = "<group>"; }; 7259 C6A703325C9D0B6CDCBC4D78 /* JSEventTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEventTarget.cpp; sourceTree = "<group>"; };7260 5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEventTarget.h; sourceTree = "<group>"; };7261 7258 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLFrameElementBase.h; sourceTree = "<group>"; }; 7262 7259 14FFE31C0AE1963300136BF5 /* HTMLFrameElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFrameElementBase.cpp; sourceTree = "<group>"; }; … … 8721 8718 5DB1BC6910715A6400EFAA49 /* TransformSourceLibxslt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformSourceLibxslt.cpp; sourceTree = "<group>"; }; 8722 8719 5DC87EEF11716DF2001C0E6D /* EmptyProtocolDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmptyProtocolDefinitions.h; sourceTree = "<group>"; }; 8720 5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEventTarget.h; sourceTree = "<group>"; }; 8723 8721 626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpatialNavigation.cpp; sourceTree = "<group>"; }; 8724 8722 626CDE0D1140424C001E5A68 /* SpatialNavigation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpatialNavigation.h; sourceTree = "<group>"; }; … … 9006 9004 7E33CD00127F340D00BE8F17 /* PurgePriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurgePriority.h; sourceTree = "<group>"; }; 9007 9005 7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SubresourceLoaderCF.cpp; path = cf/SubresourceLoaderCF.cpp; sourceTree = "<group>"; }; 9006 7E99AF520B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowFocusAllowedIndicator.cpp; sourceTree = "<group>"; }; 9007 7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowFocusAllowedIndicator.h; sourceTree = "<group>"; }; 9008 9008 7EE6844C12D26E3800E79415 /* AuthenticationCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticationCF.cpp; sourceTree = "<group>"; }; 9009 9009 7EE6844D12D26E3800E79415 /* AuthenticationCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthenticationCF.h; sourceTree = "<group>"; }; … … 12574 12574 BC8243E60D0CFD7500460C8F /* WindowFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowFeatures.cpp; sourceTree = "<group>"; }; 12575 12575 BC8243E70D0CFD7500460C8F /* WindowFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowFeatures.h; sourceTree = "<group>"; }; 12576 7E99AF520B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowFocusAllowedIndicator.cpp; sourceTree = "<group>"; };12577 7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowFocusAllowedIndicator.h; sourceTree = "<group>"; };12578 12576 BC85F23C151915E000BC17BE /* RenderNamedFlowThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderNamedFlowThread.h; sourceTree = "<group>"; }; 12579 12577 BC85F23E1519187300BC17BE /* RenderNamedFlowThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderNamedFlowThread.cpp; sourceTree = "<group>"; }; … … 12904 12902 C5F765BA14E1ECF4006C899B /* PlatformPasteboardMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformPasteboardMac.mm; sourceTree = "<group>"; }; 12905 12903 C691614714F6EBA70046375C /* ScrollbarThemeClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollbarThemeClient.h; sourceTree = "<group>"; }; 12904 C6A703325C9D0B6CDCBC4D78 /* JSEventTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEventTarget.cpp; sourceTree = "<group>"; }; 12906 12905 C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifySelectionListLevel.h; sourceTree = "<group>"; }; 12907 12906 C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModifySelectionListLevel.cpp; sourceTree = "<group>"; }; -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r117659 r119528 852 852 LayoutUnit selectionTop = root()->selectionTopAdjustedForPrecedingBlock(); 853 853 854 LayoutUnit deltaY = renderer()->style()->isFlippedLinesWritingMode() ? selectionBottom - logicalBottom() : logicalTop() - selectionTop;855 LayoutUnit selHeight = max<LayoutUnit>(ZERO_LAYOUT_UNIT, selectionBottom - selectionTop);854 int deltaY = roundToInt(renderer()->style()->isFlippedLinesWritingMode() ? selectionBottom - logicalBottom() : logicalTop() - selectionTop); 855 int selHeight = max(0, roundToInt(selectionBottom - selectionTop)); 856 856 857 857 FloatPoint localOrigin(boxOrigin.x(), boxOrigin.y() - deltaY); -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r119409 r119528 3172 3172 } 3173 3173 3174 static int blockDirectionOffset(RenderBlock* rootBlock, const LayoutSize& offsetFromRootBlock)3174 static LayoutUnit blockDirectionOffset(RenderBlock* rootBlock, const LayoutSize& offsetFromRootBlock) 3175 3175 { 3176 3176 return rootBlock->isHorizontalWritingMode() ? offsetFromRootBlock.height() : offsetFromRootBlock.width(); 3177 3177 } 3178 3178 3179 static int inlineDirectionOffset(RenderBlock* rootBlock, const LayoutSize& offsetFromRootBlock)3179 static LayoutUnit inlineDirectionOffset(RenderBlock* rootBlock, const LayoutSize& offsetFromRootBlock) 3180 3180 { 3181 3181 return rootBlock->isHorizontalWritingMode() ? offsetFromRootBlock.width() : offsetFromRootBlock.height(); … … 3383 3383 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(logicalLeft, logicalTop, logicalWidth, logicalHeight)); 3384 3384 if (paintInfo) 3385 paintInfo->context->fillRect( gapRect, selectionBackgroundColor(), style()->colorSpace());3385 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selectionBackgroundColor(), style()->colorSpace()); 3386 3386 return gapRect; 3387 }3388 3389 static inline void alignSelectionRectToDevicePixels(LayoutRect& rect)3390 {3391 LayoutUnit maxX = floorToInt(rect.maxX());3392 rect.setX(floorToInt(rect.x()));3393 rect.setWidth((maxX - rect.x()).round());3394 3387 } 3395 3388 … … 3399 3392 LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalTop; 3400 3393 LayoutUnit rootBlockLogicalLeft = max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight)); 3401 LayoutUnit rootBlockLogicalRight = min(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + logicalLeft, min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight)));3394 LayoutUnit rootBlockLogicalRight = min(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + floorToInt(logicalLeft), min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight))); 3402 3395 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft; 3403 3396 if (rootBlockLogicalWidth <= ZERO_LAYOUT_UNIT) … … 3405 3398 3406 3399 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalWidth, logicalHeight)); 3407 alignSelectionRectToDevicePixels(gapRect);3408 3400 if (paintInfo) 3409 paintInfo->context->fillRect( gapRect, selObj->selectionBackgroundColor(), selObj->style()->colorSpace());3401 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selObj->selectionBackgroundColor(), selObj->style()->colorSpace()); 3410 3402 return gapRect; 3411 3403 } … … 3415 3407 { 3416 3408 LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalTop; 3417 LayoutUnit rootBlockLogicalLeft = max(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + logicalRight, max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight)));3409 LayoutUnit rootBlockLogicalLeft = max(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + floorToInt(logicalRight), max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight))); 3418 3410 LayoutUnit rootBlockLogicalRight = min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight)); 3419 3411 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft; … … 3422 3414 3423 3415 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalWidth, logicalHeight)); 3424 alignSelectionRectToDevicePixels(gapRect);3425 3416 if (paintInfo) 3426 paintInfo->context->fillRect( gapRect, selObj->selectionBackgroundColor(), selObj->style()->colorSpace());3417 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selObj->selectionBackgroundColor(), selObj->style()->colorSpace()); 3427 3418 return gapRect; 3428 3419 }
Note: See TracChangeset
for help on using the changeset viewer.