Changeset 109944 in webkit
- Timestamp:
- Mar 6, 2012 12:08:56 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109943 r109944 1 2012-03-06 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=80351 4 InlineTextBox is using the wrong origin when calling 5 addRelevantRepaintedObject 6 -and corresponding- 7 <rdar://problem/10970221> 8 9 Reviewed by Sam Weinig. 10 11 boxOrigin represents the actual location of the text. The adjustedPaintOffset 12 (which I was using previously) will only correspond to the first line in a 13 block of lines. 14 * rendering/InlineTextBox.cpp: 15 (WebCore::InlineTextBox::paint): 16 1 17 2012-03-06 Filip Spacek <fspacek@rim.com> 2 18 -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r109273 r109944 497 497 return; 498 498 499 if (Frame* frame = renderer()->frame()) {500 if (Page* page = frame->page()) {501 // FIXME: Right now, InlineTextBoxes never call addRelevantUnpaintedObject() even though they might502 // legitimately be unpainted if they are waiting on a slow-loading web font. We should fix that, and503 // when we do, we will have to account for the fact the InlineTextBoxes do not always have unique504 // renderers and Page currently relies on each unpainted object having a unique renderer.505 if (paintInfo.phase == PaintPhaseForeground)506 page->addRelevantRepaintedObject(renderer(), IntRect(adjustedPaintOffset.x(), adjustedPaintOffset.y(), logicalWidth(), logicalHeight()));507 }508 }509 510 499 if (m_truncation != cNoTruncation) { 511 500 if (renderer()->containingBlock()->style()->isLeftToRightDirection() != isLeftToRightDirection()) { … … 572 561 if (haveSelection && !useCustomUnderlines) 573 562 paintSelection(context, boxOrigin, styleToUse, font); 563 } 564 565 if (Frame* frame = renderer()->frame()) { 566 if (Page* page = frame->page()) { 567 // FIXME: Right now, InlineTextBoxes never call addRelevantUnpaintedObject() even though they might 568 // legitimately be unpainted if they are waiting on a slow-loading web font. We should fix that, and 569 // when we do, we will have to account for the fact the InlineTextBoxes do not always have unique 570 // renderers and Page currently relies on each unpainted object having a unique renderer. 571 if (paintInfo.phase == PaintPhaseForeground) 572 page->addRelevantRepaintedObject(renderer(), IntRect(boxOrigin.x(), boxOrigin.y(), logicalWidth(), logicalHeight())); 573 } 574 574 } 575 575 -
trunk/Tools/ChangeLog
r109938 r109944 1 2012-03-06 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=80351 4 InlineTextBox is using the wrong origin when calling 5 addRelevantRepaintedObject 6 -and corresponding- 7 <rdar://problem/10970221> 8 9 Reviewed by Sam Weinig. 10 11 This test has actually been broken since revision 109273. This change makes 12 the test pass again, and it makes it specifically exercise the fix for this 13 bug. 14 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 15 * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout.cpp: 16 (TestWebKitAPI::TEST): 17 18 Adjust comments in the other tests to reflect the API changes from 109273. 19 * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails.cpp: 20 (TestWebKitAPI::TEST): 21 * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp: 22 (TestWebKitAPI::NewFirstVisuallyNonEmptyLayoutFailsTest::didCreatePage): 23 * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp: 24 (TestWebKitAPI::NewFirstVisuallyNonEmptyLayoutFramesTest::didCreatePage): 25 * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp: 26 (TestWebKitAPI::NewFirstVisuallyNonEmptyLayoutTest::didCreatePage): 27 * TestWebKitAPI/Tests/WebKit2/lots-of-text.html: Added. 28 1 29 2012-03-06 Hans Wennborg <hans@chromium.org> 2 30 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r109004 r109944 44 44 52E5CE4914D21EAB003B2BD8 /* ParentFrame_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52E5CE4814D21EAB003B2BD8 /* ParentFrame_Bundle.cpp */; }; 45 45 81B50193140F232300D9EB58 /* StringBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 81B50192140F232300D9EB58 /* StringBuilder.cpp */; }; 46 930AD402150698D00067970F /* lots-of-text.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 930AD401150698B30067970F /* lots-of-text.html */; }; 46 47 9361002914DC95A70061379D /* lots-of-iframes.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 9361002814DC957B0061379D /* lots-of-iframes.html */; }; 47 48 939BA91714103412001A01BD /* DeviceScaleFactorOnBack.mm in Sources */ = {isa = PBXBuildFile; fileRef = 939BA91614103412001A01BD /* DeviceScaleFactorOnBack.mm */; }; … … 158 159 C07E6CB213FD73930038B22B /* devicePixelRatio.html in Copy Resources */, 159 160 9361002914DC95A70061379D /* lots-of-iframes.html in Copy Resources */, 161 930AD402150698D00067970F /* lots-of-text.html in Copy Resources */, 160 162 33E79E06137B5FD900E32D99 /* mouse-move-listener.html in Copy Resources */, 161 163 F6FDDDD614241C6F004F1729 /* push-state.html in Copy Resources */, … … 213 215 81B50192140F232300D9EB58 /* StringBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringBuilder.cpp; path = WTF/StringBuilder.cpp; sourceTree = "<group>"; }; 214 216 8DD76FA10486AA7600D96B5E /* TestWebKitAPI */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TestWebKitAPI; sourceTree = BUILT_PRODUCTS_DIR; }; 217 930AD401150698B30067970F /* lots-of-text.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "lots-of-text.html"; sourceTree = "<group>"; }; 215 218 9361002814DC957B0061379D /* lots-of-iframes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "lots-of-iframes.html"; sourceTree = "<group>"; }; 216 219 939BA91614103412001A01BD /* DeviceScaleFactorOnBack.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceScaleFactorOnBack.mm; sourceTree = "<group>"; }; … … 523 526 BCBD372E125ABBE600D2C29F /* icon.png */, 524 527 9361002814DC957B0061379D /* lots-of-iframes.html */, 528 930AD401150698B30067970F /* lots-of-text.html */, 525 529 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */, 526 530 F6FDDDD514241C48004F1729 /* push-state.html */, -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout.cpp
r106577 r109944 55 55 setPageLoaderClient(webView.page()); 56 56 57 WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); 57 // This test is expected to succeed because lots-of-text.html is a large document and the relevant painted 58 // objects take up more than 10% of the view. 59 WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("lots-of-text", "html")).get()); 58 60 59 61 Util::run(&didNewFirstVisuallyNonEmptyLayoutSucceed); -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails.cpp
r106577 r109944 72 72 setPageLoaderClient(webView.page()); 73 73 74 // This test is expected to fail because simple.html is a small document and the relevant painted 75 // objects take up less than 10% of the view. 74 76 WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple", "html")).get()); 75 77 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp
r106577 r109944 42 42 virtual void didCreatePage(WKBundleRef bundle, WKBundlePageRef page) 43 43 { 44 // Set the painted objects counter to something huge that should not45 // cause didNewFirstVisuallyNonEmptyLayout to fire.46 WKBundlePageSetPaintedObjectsCounterThreshold(page, 1 000);44 // Setting the painted objects counter is necessary at this time to opt into 45 // the didNewFirstVisuallyNonEmptyLayout heuristic. 46 WKBundlePageSetPaintedObjectsCounterThreshold(page, 1); 47 47 } 48 48 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp
r106725 r109944 42 42 virtual void didCreatePage(WKBundleRef bundle, WKBundlePageRef page) 43 43 { 44 // Set the painted objects counter to something small that will45 // cause didNewFirstVisuallyNonEmptyLayout to fire.44 // Setting the painted objects counter is necessary at this time to opt into 45 // the didNewFirstVisuallyNonEmptyLayout heuristic. 46 46 WKBundlePageSetPaintedObjectsCounterThreshold(page, 1); 47 47 } -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp
r106577 r109944 42 42 virtual void didCreatePage(WKBundleRef bundle, WKBundlePageRef page) 43 43 { 44 // Set the painted objects counter to something low that should definintely45 // cause didNewFirstVisuallyNonEmptyLayout to fire.44 // Setting the painted objects counter is necessary at this time to opt into 45 // the didNewFirstVisuallyNonEmptyLayout heuristic. 46 46 WKBundlePageSetPaintedObjectsCounterThreshold(page, 1); 47 47 }
Note: See TracChangeset
for help on using the changeset viewer.