Source/WebCore: Contained div with right 0 sometimes overlaps parent div
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2012 19:54:29 +0000 (19:54 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2012 19:54:29 +0000 (19:54 +0000)
commite5c2a4c9173c5da6f54eb584ebe9b845317f7392
tree293e8ef1cec854038121fe65c8621fc9582307f5
parent1b9e28d2ed7f2a8571d2abe41d0d1cd0dfcbc5fc
Source/WebCore: Contained div with right 0 sometimes overlaps parent div
https://bugs.webkit.org/show_bug.cgi?id=91521

Reviewed by Levi Weintraub.

Due to unnecessary rounding in clientLogicalWidth and clientLogicalHeight
we lost precision when computing the width and position of render boxes.
Change clientLogicalWidth/Height to return values with subpixel precision
to avoid this.

Test: fast/sub-pixel/position-right-aligns-with-container.html

* rendering/RenderBox.h:
(WebCore::RenderBox::clientLogicalWidth):
(WebCore::RenderBox::clientLogicalHeight):
Remove unnecessary rounding.

Source/WebKit2: Add a ChromeClient method to send diagnostic logging messages from WebCore to the client.
https://bugs.webkit.org/show_bug.cgi?id=92340

Reviewed by Anders Carlsson.

Pipe the ChromeClient logDiagnosticMessage() function through WebKit2 to a new bundle class
InjectedBundlePageDiagnosticLoggingClient, to be implemented by the client.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetDiagnosticLoggingClient): Added.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Added.
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Added.
(InjectedBundlePageDiagnosticLoggingClient):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::logDiagnosticMessage):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleDiagnosticLoggingClient):

Add a convenience class to retrieve the diagnostic message keys:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Added.
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Added.
(InjectedBundlePageDiagnosticLoggingClient):

Add the InjectedBundlePageDiagnosticLoggingClient.cpp,h files.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* win/WebKit2.vcproj:
* WebKit2.xcodeproj/project.pbxproj:

Tools: [nrwt] get rid of --skip-pixel-test-if-no-baseline
https://bugs.webkit.org/show_bug.cgi?id=92377

Reviewed by Adam Barth.

Remove the option and all code paths that handled it.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.should_run_as_pixel_test):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options):
(parse_args):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.test_repeat_each):

LayoutTests: Contained div with right 0 sometimes overlaps parent div
https://bugs.webkit.org/show_bug.cgi?id=91521

Reviewed by Levi Weintraub.

Add test for elements positioned based on the right edge and update two
existing tests that where affected by the rounding.

* fast/sub-pixel/position-right-aligns-with-container-expected.html: Added.
* fast/sub-pixel/position-right-aligns-with-container.html: Added.
* platform/chromium-linux/svg/custom/svg-fonts-in-html-expected.png:
* platform/chromium-win/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt:
* platform/chromium-win/svg/custom/svg-fonts-in-html-expected.txt:
* platform/mac-lion/Skipped:
* platform/mac-snowleopard/Skipped:
* platform/mac-wk2/Skipped:
* platform/mac/Skipped:
* platform/qt-4.8/Skipped:
* platform/qt-5.0-wk2/Skipped:
* platform/qt/Skipped:
* platform/win-wk2/Skipped:
* platform/win-xp/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:
* platform/wk2/Skipped:
Mark new subpixel test as skipped on platforms that do not enable
subpixel layout.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/sub-pixel/position-right-aligns-with-container-expected.html [new file with mode: 0644]
LayoutTests/fast/sub-pixel/position-right-aligns-with-container.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/custom/svg-fonts-in-html-expected.png
LayoutTests/platform/chromium-win/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt
LayoutTests/platform/chromium-win/svg/custom/svg-fonts-in-html-expected.txt
LayoutTests/platform/mac-lion/Skipped
LayoutTests/platform/mac-snowleopard/Skipped
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt-4.8/Skipped
LayoutTests/platform/qt-5.0-wk2/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win-wk2/Skipped
LayoutTests/platform/win-xp/Skipped
LayoutTests/platform/win/Skipped
LayoutTests/platform/wincairo/Skipped
LayoutTests/platform/wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.h
Source/WebKit2/ChangeLog
Tools/ChangeLog