WebKit-https.git
6 years agoREGRESSION (iOS 8): PDFs embedded in <object>/<embed> tag don't load at all
timothy_horton@apple.com [Wed, 11 Feb 2015 21:36:22 +0000 (21:36 +0000)]
REGRESSION (iOS 8): PDFs embedded in <object>/<embed> tag don't load at all
https://bugs.webkit.org/show_bug.cgi?id=141457
<rdar://problem/18221851>

Reviewed by Alexey Proskuryakov.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType):
On iOS, if we don't know what to do with a PDF-in-object, treat it as an image.

* TestExpectations:
* fast/replaced/pdf-as-object-and-embed-expected.html: Added.
* fast/replaced/pdf-as-object-and-embed.html: Added.
* platform/ios-simulator-wk2/TestExpectations:
Add a test that ensures that WebKit2 on iOS treats <object>, <embed>,
and <img> the same when rendering a PDF.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoImprove the showFrameTree() output slightly
simon.fraser@apple.com [Wed, 11 Feb 2015 20:34:15 +0000 (20:34 +0000)]
Improve the showFrameTree() output slightly
https://bugs.webkit.org/show_bug.cgi?id=141482

Reviewed by Zalan Bujtas.

Have showFrameTree() show the Frame's RenderView so it can be correlated with
layer dumps, and show styleRecalc and needsLayout state.

* page/FrameTree.cpp:
(printFrames):
* page/FrameView.cpp:
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): Add an explanatory
comment about why we don't walk the Frame tree.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179947 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoMake run-jsc-stress-tests --remote work with make-based runner
ossy@webkit.org [Wed, 11 Feb 2015 20:31:24 +0000 (20:31 +0000)]
Make run-jsc-stress-tests --remote work with make-based runner
https://bugs.webkit.org/show_bug.cgi?id=141079

Reviewed by Darin Adler.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests): Pass through the --shell-runner and --make-runner arguments.
* Scripts/run-jsc-stress-tests: Made the make-based runner the default runner,
except for remote testing on Darwin. Unified runShellTestRunner and runMakeTestRunner
to avoid code duplication.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179946 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoStop using WebCore.exp.in on Mac and iOS.
achristensen@apple.com [Wed, 11 Feb 2015 20:29:32 +0000 (20:29 +0000)]
Stop using WebCore.exp.in on Mac and iOS.
https://bugs.webkit.org/show_bug.cgi?id=141413

Reviewed by Dan Bates.

* Configurations/Base.xcconfig:
Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
* platform/PlatformExportMacros.h:
Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179945 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoDiv having contentEditable and display:flex cannot be edited if it is empty.
changseok.oh@collabora.com [Wed, 11 Feb 2015 20:13:03 +0000 (20:13 +0000)]
Div having contentEditable and display:flex cannot be edited if it is empty.
https://bugs.webkit.org/show_bug.cgi?id=141218

Reviewed by Ryosuke Niwa.

Source/WebCore:

RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
in an editable area is recalculated whenever an inner value of div is changed. If the inner value
is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
having "display : flex" goes weird and VisibleSelection is empty accordingly.

Test: fast/events/key-events-in-editable-flexbox.html

* dom/Position.cpp:
(WebCore::Position::isCandidate):

LayoutTests:

This tests if an editable flexbox can be reedited after erasing all texts in it.

* fast/events/key-events-in-editable-flexbox-expected.txt: Added.
* fast/events/key-events-in-editable-flexbox.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179944 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[CMake] Don't set flag fuse-ld on the C/C++ compiler flags, but on the linker flags.
clopez@igalia.com [Wed, 11 Feb 2015 20:12:36 +0000 (20:12 +0000)]
[CMake] Don't set flag fuse-ld on the C/C++ compiler flags, but on the linker flags.
https://bugs.webkit.org/show_bug.cgi?id=141481

Reviewed by Csaba Osztrogonác.

* Source/cmake/OptionsCommon.cmake: Move -fuse-ld=gold to the linker flags.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179943 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoActivate ReliefLogger of a memory pressure handler for linux system.
changseok.oh@collabora.com [Wed, 11 Feb 2015 20:09:13 +0000 (20:09 +0000)]
Activate ReliefLogger of a memory pressure handler for linux system.
https://bugs.webkit.org/show_bug.cgi?id=123611

Reviewed by Anders Carlsson.

Source/WebCore:

Put more logs for the time when a system goes under memory pressure or viceversa.

No new tests since no engine behavior changed.

* platform/linux/MemoryPressureHandlerLinux.cpp:
(WebCore::MemoryPressureHandler::waitForMemoryPressureEvent): Wait a memory pressure event
from cgroup in a seperated thread. Once a pressure event happens, respondToMemoryPressure()
would be called to get back some resources.
(WebCore::MemoryPressureHandler::install): Install memoryPressureHandler module
to make it work.

Source/WebKit2:

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
Make the parameter, shouldEnableMemoryPressureReliefLogging shareable with COCOA else systems.
(WebKit::WebProcessCreationParameters::encode): ditto.
(WebKit::WebProcessCreationParameters::decode): ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess): Set shouldEnableMemoryPressureReliefLogging
to true for linux system.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Pass the shouldEnableMemoryPressureReliefLogging value
to MemoryPressureHandler::ReliefLogger::setLoggingEnabled().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoFinal preparations to switch to WEBCORE_EXPORT.
achristensen@apple.com [Wed, 11 Feb 2015 19:44:07 +0000 (19:44 +0000)]
Final preparations to switch to WEBCORE_EXPORT.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
Export the vtable and a function.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179941 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoperformance.now can crash if accessed from a window that has navigated
weinig@apple.com [Wed, 11 Feb 2015 18:36:38 +0000 (18:36 +0000)]
performance.now can crash if accessed from a window that has navigated
<rdar://problem/16892506>
https://bugs.webkit.org/show_bug.cgi?id=141478

Reviewed by Alexey Proskuryakov.

Test: fast/performance/performance-now-crash-on-navigated-window.html

* page/Performance.cpp:
(WebCore::Performance::now):
Check for a null frame, which can happen when the window has been navigated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoperformance.now can crash if accessed from a window that has navigated
weinig@apple.com [Wed, 11 Feb 2015 18:33:14 +0000 (18:33 +0000)]
performance.now can crash if accessed from a window that has navigated
<rdar://problem/16892506>
https://bugs.webkit.org/show_bug.cgi?id=141478

Reviewed by Alexey Proskuryakov.

* fast/performance/performance-now-crash-on-navigated-window-expected.txt: Added.
* fast/performance/performance-now-crash-on-navigated-window.html: Added.
* fast/performance/resources: Added.
* fast/performance/resources/initialFrame.html: Added.
* fast/performance/resources/secondFrame.html: Added.
Add test for calling performance.now() on from a navigated window.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179936 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoVersioning.
bshafiei@apple.com [Wed, 11 Feb 2015 18:09:53 +0000 (18:09 +0000)]
Versioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179935 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoURL::setUser and URL::setPass don't percent encode
ap@apple.com [Wed, 11 Feb 2015 18:03:42 +0000 (18:03 +0000)]
URL::setUser and URL::setPass don't percent encode
https://bugs.webkit.org/show_bug.cgi?id=141453
rdar://problem/14844503&16551802&19623145

Reviewed by Darin Adler.

Source/WebCore:

Tests: fast/url/url-credentials-escaping.html
       http/tests/xmlhttprequest/basic-auth-credentials-escaping.html

Start adding some code that performs escaping in a way that matches the URL Standard.
Right now, it's only used where we failed to do any escaping at all, and over time,
we'll be moving towards a new implementation.

* html/URLUtils.h:
(WebCore::URLUtils<T>::username):
(WebCore::URLUtils<T>::password):
* platform/URL.cpp:
(WebCore::isSchemeFirstChar):
(WebCore::URL::user):
(WebCore::URL::pass):
(WebCore::URL::encodedUser):
(WebCore::URL::encodedPass):
(WebCore::URL::setUser):
(WebCore::URL::setPass):
(WebCore::encodeWithURLEscapeSequences):
* platform/URL.h:

LayoutTests:

* fast/url/url-credentials-escaping-expected.txt: Added.
* fast/url/url-credentials-escaping.html: Added.
This change is most directly testable via URL API.

* http/tests/xmlhttprequest/basic-auth-credentials-escaping-expected.txt: Added.
* http/tests/xmlhttprequest/basic-auth-credentials-escaping.html: Added.
Verify that this doesn't break XMLHttpRequest authentication.

* fast/dom/DOMURL/invalid-url-getters-expected.txt: Removed.
* fast/dom/DOMURL/invalid-url-getters.html: Removed.
* fast/dom/DOMURL/url-origin-expected.txt:
* fast/dom/DOMURL/url-origin.html:
Removed tests for invalid URLs, there is no such thing with URL API.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179933 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK][EFL] Suppress a warning of unused params
utatane.tea@gmail.com [Wed, 11 Feb 2015 17:58:33 +0000 (17:58 +0000)]
[GTK][EFL] Suppress a warning of unused params
https://bugs.webkit.org/show_bug.cgi?id=141474

Reviewed by Darin Adler.

Drop unused argument name, `directoryName`.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179932 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agorun-jsc-stress tests should detect the number of processors on the remote machine too
ossy@webkit.org [Wed, 11 Feb 2015 17:11:22 +0000 (17:11 +0000)]
run-jsc-stress tests should detect the number of processors on the remote machine too
https://bugs.webkit.org/show_bug.cgi?id=141196

Reviewed by Darin Adler.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests): Pass through the --child-processes argument.
* Scripts/run-jsc-stress-tests: Added determineNumberOfProcessors function
to detect the number of local and remote processors with the same algorithm.
Additionally introduced $numChildProcesses to emphasize it isn't necessarily
same as $numProcessors.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179931 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agorun-jsc-stress-tests should pass JSC_timeout to remote hosts
ossy@webkit.org [Wed, 11 Feb 2015 17:10:01 +0000 (17:10 +0000)]
run-jsc-stress-tests should pass JSC_timeout to remote hosts
https://bugs.webkit.org/show_bug.cgi?id=141164

Reviewed by Darin Adler.

Additonally removed IMPORTANT_ENVS, since JSC_timeout was the only one.

* Scripts/run-jsc-stress-tests:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179930 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd a few more WEBCORE_EXPORT macros for debug and iOS builds.
achristensen@apple.com [Wed, 11 Feb 2015 17:09:33 +0000 (17:09 +0000)]
Add a few more WEBCORE_EXPORT macros for debug and iOS builds.

* page/EventHandler.h:
* page/ios/WebEventRegion.h:
* platform/sql/SQLiteDatabaseTracker.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179929 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION(r179476): It broke the !ENABLE(PICTURE_SIZES) build
darin@apple.com [Wed, 11 Feb 2015 16:41:13 +0000 (16:41 +0000)]
REGRESSION(r179476): It broke the !ENABLE(PICTURE_SIZES) build
https://bugs.webkit.org/show_bug.cgi?id=141327

Reviewed by Csaba Osztrogonác.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
Put #if around use of m_sizesAttribute.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179928 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agobmalloc buildfix on 32 bit Linux (x86/ARM)
ossy@webkit.org [Wed, 11 Feb 2015 16:12:13 +0000 (16:12 +0000)]
bmalloc buildfix on 32 bit Linux (x86/ARM)
https://bugs.webkit.org/show_bug.cgi?id=141472

Reviewed by Gyuyoung Kim.

* bmalloc/Algorithm.h:
(bmalloc::roundUpToMultipleOf):
* bmalloc/FixedVector.h:
(bmalloc::FixedVector::clear):
* bmalloc/Sizes.h:
(bmalloc::Sizes::sizeClass):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179927 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, rolling out r179921.
commit-queue@webkit.org [Wed, 11 Feb 2015 15:34:13 +0000 (15:34 +0000)]
Unreviewed, rolling out r179921.
https://bugs.webkit.org/show_bug.cgi?id=141473

caused about 30 test failures on yosemite and mavericks
(Requested by alexchristensen on #webkit).

Reverted changeset:

"Div having contentEditable and display:flex cannot be edited
if it is empty."
https://bugs.webkit.org/show_bug.cgi?id=141218
http://trac.webkit.org/changeset/179921

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Win] Unreviewed build fix.
achristensen@apple.com [Wed, 11 Feb 2015 15:05:06 +0000 (15:05 +0000)]
[Win] Unreviewed build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179925 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed GTK+ Gardening 11 February.
commit-queue@webkit.org [Wed, 11 Feb 2015 13:54:24 +0000 (13:54 +0000)]
Unreviewed GTK+ Gardening 11 February.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-02-11

* platform/gtk/TestExpectations:
* platform/gtk/editing/pasteboard/onpaste-text-html-expected.txt: Rebaselined after r179168.
* platform/gtk/fast/css/outline-auto-empty-rects-expected.txt: Added. Rebaselined after r177774.
* platform/gtk/fast/css/pseudo-invalid-form-invalidation-optimization-expected.txt: Added. Rebaselined after r177664.
* platform/gtk/fast/css/pseudo-valid-form-invalidation-optimization-expected.txt: Added. Rebaselined after r177664.
* platform/gtk/fast/forms/basic-buttons-expected.txt: Rebaselined after r178078.
* platform/gtk/fast/line-grid/line-align-right-edges-expected.txt: Rebaselined after r177128.
* platform/gtk/fast/sub-pixel/selection/selection-rect-in-sub-pixel-table-expected.txt: Added. Rebaselined after r177774.
* platform/gtk/fast/table/022-expected.txt: Added. Rebaselined after r177774.
* platform/gtk/fast/text/wbr-pre-expected.txt: Added. Rebaselined after r177774.
* platform/gtk/fast/text/whitespace/019-expected.txt: Added. Rebaselined after r177774.
* platform/gtk/fast/text/whitespace/023-expected.txt: Added. Rebaselined after r177774.
* platform/gtk/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.txt: Added. Rebaselined after r177490.
* platform/gtk/svg/custom/glyph-selection-arabic-forms-expected.txt: Added. Rebaselined after r177774.
* platform/gtk/svg/custom/glyph-selection-lang-attribute-expected.txt: Rebaselined after r177490.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179924 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[EFL][GTK] Use bmalloc instead of tcmalloc
gyuyoung.kim@samsung.com [Wed, 11 Feb 2015 12:15:23 +0000 (12:15 +0000)]
[EFL][GTK] Use bmalloc instead of tcmalloc
https://bugs.webkit.org/show_bug.cgi?id=140162

Reviewed by Carlos Garcia Campos.

.:

Add bmalloc directory to build list.

* CMakeLists.txt: Define BMALLOC_DIR directory.
* Source/CMakeLists.txt: Add bmalloc path to sub-directories list.

Source/bmalloc:

Support to use bmalloc on EFL and GTK ports.

* CMakeLists.txt: Added.
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::allocate):
    Fix unused return value caused by posix_memalign().
* bmalloc/AsyncTask.h:
* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::clear):
* bmalloc/Chunk.h:
    Change Traits::Page with Traits::PageType in order to fix
    -fpermitive build error on EFL and GTK port.
* bmalloc/EndTag.h:
(bmalloc::EndTag::operator=):
* bmalloc/Line.h: ditto.
* bmalloc/MediumTraits.h:
* bmalloc/Page.h: ditto.
* bmalloc/PerThread.h:
    EFL port doesn't support __has_include definition yet.
    Define HAVE_PTHREAD_MACHDEP_H according to check if __has_include is supported.
* bmalloc/SmallTraits.h: ditto.
* bmalloc/VMAllocate.h:
(bmalloc::vmDeallocatePhysicalPages):
(bmalloc::vmAllocatePhysicalPages):
* bmalloc/Vector.h:
(bmalloc::Vector<T>::push):
(bmalloc::Vector<T>::reallocateBuffer):

Source/WTF:

* wtf/CMakeLists.txt:
* wtf/FastMalloc.cpp:
    Enable bmalloc on GTK ports, but EFL port will enable it when bmalloc supports
    memory statistics.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179923 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK] Add default color chooser implementation using GtkColorChooserDialog
carlosgc@webkit.org [Wed, 11 Feb 2015 09:03:06 +0000 (09:03 +0000)]
[GTK] Add default color chooser implementation using GtkColorChooserDialog
https://bugs.webkit.org/show_bug.cgi?id=141392

Reviewed by Gustavo Noronha Silva.

.:

Enable INPUT_TYPE_COLOR by default for GTK+ port.

* Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createColorPicker): Call WebColorPickerGtk::create().
* UIProcess/gtk/WebColorPickerGtk.cpp: Added.
(WebKit::WebColorPickerGtk::create):
(WebKit::WebColorPickerGtk::WebColorPickerGtk):
(WebKit::WebColorPickerGtk::~WebColorPickerGtk):
(WebKit::WebColorPickerGtk::cancel): Set initial color.
(WebKit::WebColorPickerGtk::endPicker): Destroy the color chooser dialog.
(WebKit::WebColorPickerGtk::didChooseColor): Notify the client.
(WebKit::WebColorPickerGtk::colorChooserDialogRGBAChangedCallback):
Update the selected color.
(WebKit::WebColorPickerGtk::colorChooserDialogResponseCallback):
Cancel or finish the operation depending on the dialog response.
(WebKit::WebColorPickerGtk::showColorPicker): Create a
GtkColorChooserDialog to handle the color picker operation.
* UIProcess/gtk/WebColorPickerGtk.h: Added.
(WebKit::WebColorPickerGtk::initialColor):

Tools:

Enable INPUT_TYPE_COLOR by default for GTK+ port.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Unskip input color tests.

* platform/gtk/TestExpectations:
* platform/gtk/fast/forms/color/input-appearance-color-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179922 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoDiv having contentEditable and display:flex cannot be edited if it is empty.
changseok.oh@collabora.com [Wed, 11 Feb 2015 08:51:55 +0000 (08:51 +0000)]
Div having contentEditable and display:flex cannot be edited if it is empty.
https://bugs.webkit.org/show_bug.cgi?id=141218

Reviewed by Ryosuke Niwa.

Source/WebCore:

RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
in an editable area is recalculated whenever an inner value of div is changed. If the inner value
is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
having "display : flex" goes weird and VisibleSelection is empty accordingly.

Test: fast/events/key-events-in-editable-flexbox.html

* dom/Position.cpp:
(WebCore::Position::isCandidate):

LayoutTests:

This tests if an editable flexbox can be reedited after erasing all texts in it.

* fast/events/key-events-in-editable-flexbox-expected.txt: Added.
* fast/events/key-events-in-editable-flexbox.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179921 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agohttp/tests/cache/disk-cache-validation.html generates a lot of Perl errors
dburkart@apple.com [Wed, 11 Feb 2015 08:36:22 +0000 (08:36 +0000)]
http/tests/cache/disk-cache-validation.html generates a lot of Perl errors
https://bugs.webkit.org/show_bug.cgi?id=141393

Reviewed by Darin Adler.

* http/tests/cache/resources/generate-response.cgi:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179920 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, rolling out r179910.
commit-queue@webkit.org [Wed, 11 Feb 2015 08:01:19 +0000 (08:01 +0000)]
Unreviewed, rolling out r179910.
https://bugs.webkit.org/show_bug.cgi?id=141464

Caused assertions on debug bots (Requested by ap on #webkit).

Reverted changeset:

"[WK2] Add logging to validate the network cache efficacy
(Part 2)"
https://bugs.webkit.org/show_bug.cgi?id=141345
http://trac.webkit.org/changeset/179910

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179919 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, EFL gardening. Tests of fast/ruby needs to have new baseline since r172874.
gyuyoung.kim@samsung.com [Wed, 11 Feb 2015 06:16:04 +0000 (06:16 +0000)]
Unreviewed, EFL gardening. Tests of fast/ruby needs to have new baseline since r172874.

* platform/efl/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179918 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoOptimize MutableStyleProperties::removePropertiesInSet()
cdumez@apple.com [Wed, 11 Feb 2015 06:02:40 +0000 (06:02 +0000)]
Optimize MutableStyleProperties::removePropertiesInSet()
https://bugs.webkit.org/show_bug.cgi?id=141460

Reviewed by Andreas Kling.

Optimize MutableStyleProperties::removePropertiesInSet() by doing an
in-place removal of the vector properties, using the new and efficient
Vector::removalAllMatching().

I see a ~11% speed-up on CSS/CSSPropertySetterGetter.html performance
test.

This change was inspired by the following Blink revision:
https://src.chromium.org/viewvc/blink?view=rev&revision=189387

Test: PerformanceTests/CSS/CSSPropertySetterGetter.html

* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::removePropertiesInSet):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179917 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Win] Fix debug build after r179807.
achristensen@apple.com [Wed, 11 Feb 2015 05:48:18 +0000 (05:48 +0000)]
[Win] Fix debug build after r179807.
https://bugs.webkit.org/show_bug.cgi?id=141461

Reviewed by Benjamin Poulain.

* dom/TypedElementDescendantIterator.h:
Explicitly call Iterator constructor to reduce complexity when iterating descendantsOfType.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179916 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd the crash-on-failure behavior to bmalloc-based fastMalloc
darin@apple.com [Wed, 11 Feb 2015 04:54:03 +0000 (04:54 +0000)]
Add the crash-on-failure behavior to bmalloc-based fastMalloc
https://bugs.webkit.org/show_bug.cgi?id=141434

Reviewed by Alexey Proskuryakov.

* wtf/FastMalloc.cpp: Removed unneeded includes.
(WTF::fastMalloc): Added null check and CRASH.
(WTF::fastCalloc): Added overflow checking, null check, and CRASH.
(WTF::fastRealloc): Added null check and CRASH.
(WTF::fastMallocSize): Added FIXME comment.
(WTF::fastMallocGoodSize): Added FIXME comment.
(WTF::fastAlignedMalloc): Added null check and CRASH.
(WTF::tryFastMalloc): Changed to call bmalloc directly instead of
calling fastMalloc, since fastMalloc will now crash on failure.
(WTF::tryFastRealloc): Changed to call bmalloc directly instead of
calling fastRealloc, since fastRealloc will now crash on failure.
(WTF::tryFastCalloc): Added overflow checking.
(WTF::fastMallocStatistics): Added FIXME comment.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179915 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed EFL gardening. Some tests of imported/mozilla/svg/ have been failed since...
gyuyoung.kim@samsung.com [Wed, 11 Feb 2015 04:01:43 +0000 (04:01 +0000)]
Unreviewed EFL gardening. Some tests of imported/mozilla/svg/ have been failed since r177330.
Mark those tests to ImageOnlyFailure.

* platform/efl/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179914 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoNew perf dashboard shouldn't always show outliners
rniwa@webkit.org [Wed, 11 Feb 2015 02:45:43 +0000 (02:45 +0000)]
New perf dashboard shouldn't always show outliners
https://bugs.webkit.org/show_bug.cgi?id=141445

Reviewed by Chris Dumez.

Use the simple moving average with an average difference envelope to compute the y-axis range to show
to avoid expanding it spuriously to show one off outlier.

* public/v2/app.js:
(App.Pane): Don't show the full y-axis range by default.
(App.Pane._computeChartData): Use the first strategies for the moving average and the enveloping if
one is not specified by the user but without showing them in the charts.
(App.Pane._computeMovingAverage): Takes moving average and enveloping strategies as arguments instead
of retrieving via chosenMovingAverageStrategy and chosenEnvelopingStrategy.

(App.ChartsController._parsePaneList): Added showFullYAxis as a query string argument to each pane.
(App.ChartsController._serializePaneList): Ditto.

* public/v2/chart-pane.css: Added a CSS rule for when y-axis is clickable.

* public/v2/index.html: Pass in showFullYAxis as an argument to the main interactive chart.

* public/v2/interactive-chart.js:
(App.InteractiveChartComponent._constructGraphIfPossible): Add an event listener on y-axis labels when
the chart is interactive so that toggle showFullYAxis. Also hide the moving average and/or the envelope
if they are not specified by the user (i.e. only used to adjust y-axis range).
(App.InteractiveChartComponent._updateDomain): Don't exit early if y-axis domains are different even if
x-axis domain remained the same. Without this change, the charts would never redraw.
(App.InteractiveChartComponent._minMaxForAllTimeSeries): Use the moving average instead of the current
time series to compute the y-axis range if showFullYAxis is false. When showFullYAxis is true, expand
y-axis all the way down to 0 or the minimum value in the current time series whichever is smaller.

* public/v2/js/statistics.js:
(Statistics.MovingAverageStrategies): Use a wider window in Simple Moving Average by default.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179913 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSplit FTL::JSCall into the part that knows about call inline caching and the part...
fpizlo@apple.com [Wed, 11 Feb 2015 02:41:20 +0000 (02:41 +0000)]
Split FTL::JSCall into the part that knows about call inline caching and the part that interacts with LLVM patchpoints
https://bugs.webkit.org/show_bug.cgi?id=141455

Reviewed by Mark Lam.

The newly introduced FTL::JSCallBase can be used to build other things, like the FTL portion
of https://bugs.webkit.org/show_bug.cgi?id=141332.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::specializationKindFor):
(JSC::CallLinkInfo::specializationKind):
* ftl/FTLJSCall.cpp:
(JSC::FTL::JSCall::JSCall):
(JSC::FTL::JSCall::emit): Deleted.
(JSC::FTL::JSCall::link): Deleted.
* ftl/FTLJSCall.h:
* ftl/FTLJSCallBase.cpp: Added.
(JSC::FTL::JSCallBase::JSCallBase):
(JSC::FTL::JSCallBase::emit):
(JSC::FTL::JSCallBase::link):
* ftl/FTLJSCallBase.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179912 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: Better handle unknown release versions
commit-queue@webkit.org [Wed, 11 Feb 2015 02:39:31 +0000 (02:39 +0000)]
Web Inspector: Better handle unknown release versions
https://bugs.webkit.org/show_bug.cgi?id=141454

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-10
Reviewed by Timothy Hatcher.

* UserInterface/Base/Platform.js:
If given an unknown Mac OS X version, at least parse
the version number in WebInspector.Platform.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179911 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[WK2] Add logging to validate the network cache efficacy (Part 2)
cdumez@apple.com [Wed, 11 Feb 2015 02:31:49 +0000 (02:31 +0000)]
[WK2] Add logging to validate the network cache efficacy (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=141345
Source/WebCore:

Reviewed by Antti Koivisto.

Add a few more diagnostic logging keys for the network cache efficacy
logging.

Source/WebKit2:

<rdar://problem/19632080>

Reviewed by Antti Koivisto.

Add diagnostic logging messages to validate the network cache efficacy.
The following 4 messages are added:
- networkCache / retrieval / success
- networkCache / retrieval / unhandledRequestFailure
- networkCache / retrieval / noLongerInCacheFailure
- networkCache / retrieval / unusableCachedEntryFailure

The messages are sent via IPC from the NetworkProcess to the UIProcess,
where the WebPageProxy code already handles diagnostic messages sent by
the WebProcess.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179910 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoClients need the ability to hook into immediate action lifecycle
conrad_shultz@apple.com [Wed, 11 Feb 2015 02:08:49 +0000 (02:08 +0000)]
Clients need the ability to hook into immediate action lifecycle
https://bugs.webkit.org/show_bug.cgi?id=141449

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Expose new methods.

* UIProcess/API/mac/WKView.mm:
(-[WKView _prepareForImmediateActionAnimation]):
(-[WKView _cancelImmediateActionAnimation]):
(-[WKView _completeImmediateActionAnimation]):
Stub implementations.

* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
Send -_prepareForImmediateActionAnimation.
(-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
Send -_cancelImmediateActionAnimation.
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
Send -_completeImmediateActionAnimation.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179909 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, rolling out r179896.
commit-queue@webkit.org [Wed, 11 Feb 2015 01:42:19 +0000 (01:42 +0000)]
Unreviewed, rolling out r179896.
https://bugs.webkit.org/show_bug.cgi?id=141452

broke linking debug builds (Requested by thorton on #webkit).

Reverted changeset:

"Stop using WebCore.exp.in on Mac and iOS."
https://bugs.webkit.org/show_bug.cgi?id=141413
http://trac.webkit.org/changeset/179896

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179907 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago<rdar://problem/19770264> Starting a navigation gesture dismisses the keyboard
mitz@apple.com [Wed, 11 Feb 2015 00:54:20 +0000 (00:54 +0000)]
<rdar://problem/19770264> Starting a navigation gesture dismisses the keyboard

Reviewed by Tim Horton.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture): Reordered the view hierarchy changes,
such that m_liveSwipeView will not momentarily move out of the window, because that causes
the window’s first responder to be set to nil (if it was a descendant of m_liveSwipView).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179904 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoFix bindings tests after r179886.
achristensen@apple.com [Wed, 11 Feb 2015 00:19:37 +0000 (00:19 +0000)]
Fix bindings tests after r179886.

* bindings/scripts/test/ObjC/DOMFloat64Array.h:
* bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
* bindings/scripts/test/ObjC/DOMTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
* bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
* bindings/scripts/test/ObjC/DOMTestEventTarget.h:
* bindings/scripts/test/ObjC/DOMTestException.h:
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
* bindings/scripts/test/ObjC/DOMTestInterface.h:
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
* bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
* bindings/scripts/test/ObjC/DOMTestNode.h:
* bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestTypedefs.h:
* bindings/scripts/test/ObjC/DOMattribute.h:
* bindings/scripts/test/ObjC/DOMreadonly.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179903 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION(?): inspector/css/selector-dynamic-specificity.html sometimes crashes
ap@apple.com [Wed, 11 Feb 2015 00:10:40 +0000 (00:10 +0000)]
REGRESSION(?): inspector/css/selector-dynamic-specificity.html sometimes crashes
https://bugs.webkit.org/show_bug.cgi?id=141118

* platform/mac-wk2/TestExpectations: Skpping the test, I'm concerned that it may
be affecting other tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179899 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, fix build.
fpizlo@apple.com [Wed, 11 Feb 2015 00:06:03 +0000 (00:06 +0000)]
Unreviewed, fix build.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179898 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoStop using WebCore.exp.in on Mac and iOS.
achristensen@apple.com [Wed, 11 Feb 2015 00:00:53 +0000 (00:00 +0000)]
Stop using WebCore.exp.in on Mac and iOS.
https://bugs.webkit.org/show_bug.cgi?id=141413

Reviewed by Dan Bates.

* Configurations/Base.xcconfig:
Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
* platform/PlatformExportMacros.h:
Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179896 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd another assertion to help track down crash in DocumentLoader::stopLoadingForPolic...
cdumez@apple.com [Tue, 10 Feb 2015 23:59:09 +0000 (23:59 +0000)]
Add another assertion to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
https://bugs.webkit.org/show_bug.cgi?id=141447
<rdar://problem/13811738>

Reviewed by Alexey Proskuryakov.

Add another assertion to help track down crash in
DocumentLoader::stopLoadingForPolicyChange().

The trace seems to hint that frameLoader() returns null when
stopLoadingForPolicyChange() is called. frameLoader() can only return
null after DocumentLoader::detachFromFrame() has been called.
Also, stopLoadingForPolicyChange() here is called from the
DocumentLoader::continueAfterContentPolicy() policy callback which
requires m_waitingForContentPolicy to be true. Therefore, we should
assert that m_waitingForContentPolicy is false when m_frame is cleared
in DocumentLoader::detachFromFrame().

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::detachFromFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179895 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: Make collapsed sidebars undraggable
commit-queue@webkit.org [Tue, 10 Feb 2015 23:27:27 +0000 (23:27 +0000)]
Web Inspector: Make collapsed sidebars undraggable
https://bugs.webkit.org/show_bug.cgi?id=140664

Patch by Nikita Vasilyev <nvasilyev@apple.com> on 2015-02-10
Reviewed by Timothy Hatcher.

* UserInterface/Views/Sidebar.css:
(.sidebar.collapsed):
(.sidebar.collapsed.right > .resizer): Deleted.
(.sidebar.collapsed.left > .resizer): Deleted.
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar):
(WebInspector.Sidebar.prototype._resizerMouseDown):
(WebInspector.Sidebar.prototype._resizerMouseMoved):
(WebInspector.Sidebar.prototype._resizerDoubleClicked): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179889 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoop_call_varargs should only load the length once
fpizlo@apple.com [Tue, 10 Feb 2015 23:16:36 +0000 (23:16 +0000)]
op_call_varargs should only load the length once
https://bugs.webkit.org/show_bug.cgi?id=141440
rdar://problem/19761683

Reviewed by Michael Saboff.

Refactors the pair of calls that set up the varargs frame so that the first call returns the
length, and the second call uses the length returned by the first one. It turns out that this
gave me an opportunity to shorten a lot of the code.

* interpreter/Interpreter.cpp:
(JSC::sizeFrameForVarargs):
(JSC::loadVarargs):
(JSC::setupVarargsFrame):
(JSC::setupVarargsFrameAndSetThis):
* interpreter/Interpreter.h:
(JSC::calleeFrameForVarargs):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileSetupVarargsFrame):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileSetupVarargsFrame):
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/SetupVarargsFrame.cpp:
(JSC::emitSetVarargsFrame):
(JSC::emitSetupVarargsFrameFastCase):
* jit/SetupVarargsFrame.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/Arguments.cpp:
(JSC::Arguments::copyToArguments):
* runtime/Arguments.h:
* runtime/JSArray.cpp:
(JSC::JSArray::copyToArguments):
* runtime/JSArray.h:
* runtime/VM.h:
* tests/stress/call-varargs-length-effects.js: Added.
(foo):
(bar):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179887 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd more WEBCORE_EXPORT macros for iOS.
achristensen@apple.com [Tue, 10 Feb 2015 23:07:47 +0000 (23:07 +0000)]
Add more WEBCORE_EXPORT macros for iOS.
https://bugs.webkit.org/show_bug.cgi?id=141430

Reviewed by Tim Horton.

* bindings/objc/WebScriptObject.h:
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
* dom/Event.h:
* dom/Node.h:
* editing/FrameSelection.h:
* html/HTMLFormControlElement.h:
* html/HTMLMediaSession.h:
* page/Frame.h:
* page/FrameView.h:
* platform/ScrollView.h:
* platform/ios/PasteboardIOS.mm:
* platform/ios/wak/WAKAppKitStubs.h:
* platform/ios/wak/WAKClipView.h:
* platform/ios/wak/WAKScrollView.h:
* platform/ios/wak/WAKView.h:
* platform/ios/wak/WAKWindow.h:
* platform/ios/wak/WAKWindow.mm:
* platform/ios/wak/WKContentObservation.h:
* platform/ios/wak/WKGraphics.h:
* platform/ios/wak/WebCoreThread.h:
* platform/ios/wak/WebCoreThread.mm:
* platform/ios/wak/WebCoreThreadRun.h:
* platform/ios/wak/WebCoreThreadSystemInterface.h:
* platform/network/ios/QuickLook.h:
* platform/text/TextBreakIterator.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179886 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoHit testing is misplaced when selecting on wikipedia page.
enrica@apple.com [Tue, 10 Feb 2015 23:02:22 +0000 (23:02 +0000)]
Hit testing is misplaced when selecting on wikipedia page.
https://bugs.webkit.org/show_bug.cgi?id=141410
rdar://problem/19768211

Reviewed by Simon Fraser.

When loading a new document into the same WebPage object, we need
to clear the assisted node, since there is no guarantee that the
node will be blurred. The bug was caused by the use of a stale
assisted node to constrain the point where the gesture occurs.
The node was still valid, since the previous page was in the cache.
I've added a ASSERT to check that, when constraining the point to
node rectangle, the node is in the same document as the one we
are performing hit test on. When the frame is detached, we clear
the assisted node if the node is part of the document is the frame
being detached.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::constrainPoint):
(WebKit::WebPage::resetAssistedNodeForFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179885 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agotext-underline-position: under is broken
hyatt@apple.com [Tue, 10 Feb 2015 22:35:54 +0000 (22:35 +0000)]
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.
text-underline-position: under is broken
https://bugs.webkit.org/show_bug.cgi?id=141400
<rdar://problem/18569583>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/text/text-underline-position-under.html

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalBottom):
(WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
* rendering/InlineFlowBox.h:
Switch to using the bottom to compute the offset. Using the top is incorrect, since
the heights of boxes can vary.

Fix a bug where the y() of the box was being used instead of the logical value, making the result
wrong for vertical text.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom):
(WebCore::RootInlineBox::maxLogicalTop): Deleted.
Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
since the old code just ignored the root's placement.

* rendering/RootInlineBox.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Call the bottom function now instead of the top.

LayoutTests:

* fast/text/text-underline-position-under-expected.html: Added.
* fast/text/text-underline-position-under.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179883 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoCrash in JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq
msaboff@apple.com [Tue, 10 Feb 2015 21:59:54 +0000 (21:59 +0000)]
Crash in JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq
https://bugs.webkit.org/show_bug.cgi?id=139398

Reviewed by Filip Pizlo.

Due to CFA analysis, the CompareStrictEq node was determined to be unreachable, but later
was determined to be reachable.  When we go to lower to LLVM, the edges for the CompareStrictEq
node are UntypedUse which we can't compile.  Fixed this by checking that the IR before
lowering can still be handled by the FTL.

Had to add GetArgument as a node that the FTL can compile as the SSA conversion phase converts
a SetArgument to a GetArgument.  Before this change FTL::canCompile() would never see a GetArgument
node.  With the check right before lowering, we see this node.

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl): Added a final FTL::canCompile() check before lowering
to verify that after all the transformations we still have valid IR for the FTL.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile): Added GetArgument as a node the FTL can compile.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179882 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed build fix.
rniwa@webkit.org [Tue, 10 Feb 2015 21:56:29 +0000 (21:56 +0000)]
Unreviewed build fix.

* public/v2/app.js:
(set get App.Pane.Ember.Object.extend):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179881 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd assertion to help track down WebCore::DocumentLoader::stopLoadingForPolicyChange...
cdumez@apple.com [Tue, 10 Feb 2015 21:44:01 +0000 (21:44 +0000)]
Add assertion to help track down WebCore::DocumentLoader::stopLoadingForPolicyChange() crash
https://bugs.webkit.org/show_bug.cgi?id=141441
<rdar://problem/13811738>

Reviewed by Alexey Proskuryakov.

Add assertion to help track down a crash in
WebCore::DocumentLoader::stopLoadingForPolicyChange().

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::~DocumentLoader):
Make sure the DocumentLoader is not waiting for a content policy
response when it is destroyed. If this were to happen, then the
lambda function passed to PolicyChecker::checkContentPolicy()
would outlive the DocumentLoader. This is an issue because
that lambda function captures [this], which is the DocumentLoader.
This would cause DocumentLoader::continueAfterContentPolicy() to
be called after the DocumentLoader has been destroyed, which would
explain the crash.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179880 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: CSS Pretty Printing: still fails fails to put space between rgb(....
commit-queue@webkit.org [Tue, 10 Feb 2015 21:41:53 +0000 (21:41 +0000)]
Web Inspector: CSS Pretty Printing: still fails fails to put space between rgb(...) and numbers in minified gradients
https://bugs.webkit.org/show_bug.cgi?id=141411

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-10
Reviewed by Timothy Hatcher.

* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* UserInterface/Views/CodeMirrorFormatters.js:
Token actually was "number m-css" so we should check token strings
more robustly, like elsewhere in the formatters.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179879 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoNew perf dashboard should have the ability to overlay moving average with an envelope
rniwa@webkit.org [Tue, 10 Feb 2015 21:39:41 +0000 (21:39 +0000)]
New perf dashboard should have the ability to overlay moving average with an envelope
https://bugs.webkit.org/show_bug.cgi?id=141438

Reviewed by Andreas Kling.

This patch adds three kinds of moving average strategies and two kinds of enveloping strategies:

Simple Moving Average - The moving average x̄_i of x_i is computed as the arithmetic mean of values
from x_(i - n) though x_(i + m) where n is a non-negative integer and m is a positive integer. It takes
n, backward window size, and m, forward window size, as an argument.

Cumulative Moving Average - x̄_i is computed as the arithmetic mean of all values x_0 though x_i.
That is, x̄_1 = x_1 and x̄_i = ((i - 1) * M_(i - 1) + x_i) / i for all i > 1.

Exponential Moving Average - x̄_i is computed as the weighted average of x_i and x̄_(i - 1) with α as
an argument specifying x_i's weight. To be precise, x̄_1 = x_1 and x̄_i = α * x_i + (α - 1) x̄_(i-1).

Average Difference - The enveloping delta d is computed as the arithmetic mean of the difference
between each x_i and x̄_i.

Moving Average Standard Deviation - d is computed like the standard deviation except the deviation
for each term is measured from the moving average instead of the sample arithmetic mean. i.e. it uses
the average of (x_i - x̄_i)^2 as the "sample variance" instead of the conventional (x_i - x̄)^2 where
x̄ is the sample mean of all x_i's. This change was necessary since our time series is non-stationary.

Each strategy is cloned for an App.Pane instance so that its parameterList can be configured per pane.
The configuration of the currently chosen strategies is saved in the query string for convenience.

Also added the "stat pane" to choose a moving average strategy and a enveloping strategy in each pane.

* public/v2/app.css: Specify the fill color for all SVG groups in the pane toolbar icons.

* public/v2/app.js:
(App.Pane._fetch): Delegate the creation of 'chartData' to _computeChartData.
(App.Pane.updateStatisticsTools): Added. Clones moving average and enveloping strategies for this pane.
(App.Pane._cloneStrategy): Added. Clones a strategy for a new pane.
(App.Pane._configureStrategy): Added. Finds and configures a strategy from the configuration retrieved
from the query string via ChartsController.
(App.Pane._computeChartData): Added. Creates chartData from fetchedData.
(App.Pane._computeMovingAverage): Added. Computes the moving average and the envelope.
(App.Pane._executeStrategy): Added.
(App.Pane._updateStrategyConfigIfNeeded): Pushes the strategy configurations to the query string via
ChartsController.
(App.ChartsController._parsePaneList): Merged the query string arguments for the range and point
selections, and added two new arguments for the moving average and the enveloping configurations.
(App.ChartsController._serializePaneList): Ditto.
(App.ChartsController._scheduleQueryStringUpdate): Observes strategy configurations.
(App.PaneController.actions.toggleBugsPane): Hides the stat pane.
(App.PaneController.actions.toggleSearchPane): Hides the stat pane.
(App.PaneController.actions.toggleStatPane): Added.

* public/v2/chart-pane.css: Added CSS rules for the new stat pane. Also added .foreground class for the
current (as opposed to baseline and target) time series for when it's the most foreground graph without
moving average and its envelope overlapping on top of it.

* public/v2/index.html: Added the templates for the stat pane and the corresponding icon (Σ).

* public/v2/interactive-chart.js:
(App.InteractiveChartComponent.chartDataDidChange): Unset _totalWidth and _totalHeight to avoid exiting
early inside _updateDimensionsIfNeeded when chartData changes after the initial layout.
(App.InteractiveChartComponent.didInsertElement): Attach event listeners here instead of inside
_constructGraphIfPossible since that could be called multiple times on the same SVG element.
(App.InteractiveChartComponent._constructGraphIfPossible): Clear down the old SVG element we created
but don't bother removing individual paths and circles. Added the code to show the moving average time
series when there is one. Also add "foreground" class on SVG elements for the current time series when
we're not showing the moving average. chart-pane.css has been updated to "dim down" the current time
series when "foreground" is not set.
(App.InteractiveChartComponent._minMaxForAllTimeSeries): Take the moving average time series into
account when computing the y-axis range.
(App.InteractiveChartComponent._brushChanged): Removed 'selectionIsLocked' argument as it's useless.

* public/v2/js/statistics.js:
(Statistics.MovingAverageStrategies): Added.
(Statistics.EnvelopingStrategies): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179878 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION (r168046): Crash in WebCore::InlineBox::renderer / WebCore::RenderFlowThre...
zalan@apple.com [Tue, 10 Feb 2015 20:27:40 +0000 (20:27 +0000)]
REGRESSION (r168046): Crash in WebCore::InlineBox::renderer / WebCore::RenderFlowThread::checkLinesConsistency
https://bugs.webkit.org/show_bug.cgi?id=133462

Reviewed by David Hyatt.

RenderFlowThread::m_lineToRegionMap stores pointers to the root inlineboxes in the block flow.
Normally root inlineboxes remove themselves from this map in their dtors. However when collapsing an anonymous block,
we detach the inline tree first and destroy them after. The detached root boxes can't access
the flowthread containing block and we end up with dangling pointers in this map.
Call removeFlowChildInfo() before detaching the subtree to ensure proper pointer removal.

Source/WebCore:

Test: fast/multicol/newmulticol/crash-when-switching-to-floating.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseAnonymousBoxChild):

LayoutTests:

* fast/multicol/newmulticol/crash-when-switching-to-floating-expected.txt: Added.
* fast/multicol/newmulticol/crash-when-switching-to-floating.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179877 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRemove unused DFG::SpeculativeJIT::calleeFrameOffset().
fpizlo@apple.com [Tue, 10 Feb 2015 19:48:56 +0000 (19:48 +0000)]
Remove unused DFG::SpeculativeJIT::calleeFrameOffset().

Rubber stamped by Michael Saboff.

Not only was this not used, I believe that the math was wrong. The callee frame doesn't
actually land past m_nextMachineLocal; instead it lands just below wherever we put SP and
that decision is made elsewhere. Also, it makes no sense to subtract 1 from
m_nextMachineLocal when trying to deduce the number of in-use stack slots.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::calleeFrameOffset): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179875 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Cocoa] NSData over retain in WKBrowsingContextController loadData
commit-queue@webkit.org [Tue, 10 Feb 2015 19:11:44 +0000 (19:11 +0000)]
[Cocoa] NSData over retain in WKBrowsingContextController loadData
https://bugs.webkit.org/show_bug.cgi?id=141437

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-10
Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
API::Data::createWithoutCopying will automatically do the retaining / releasing for us.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179874 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoParser::parseVarDeclarationList gets the wrong JSToken for the last identifier
saambarati1@gmail.com [Tue, 10 Feb 2015 19:01:41 +0000 (19:01 +0000)]
Parser::parseVarDeclarationList gets the wrong JSToken for the last identifier
https://bugs.webkit.org/show_bug.cgi?id=141272

Reviewed by Oliver Hunt.

This patch fixes a bug where the wrong text location would be
assigned to a variable declaration inside a ForIn/ForOf loop.
It also fixes a bug in the type profiler where the type profiler
emits the wrong text offset for a ForIn loop's variable declarator
when it's not a pattern node.

* bytecompiler/NodesCodegen.cpp:
(JSC::ForInNode::emitLoopHeader):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVarDeclarationList):
* tests/typeProfiler/loop.js:
(testForIn):
(testForOf):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179873 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS] Gardening: fast/loader/subframe-navigate-during-main-frame-load.html crashes...
ddkilzer@apple.com [Tue, 10 Feb 2015 17:28:03 +0000 (17:28 +0000)]
[iOS] Gardening: fast/loader/subframe-navigate-during-main-frame-load.html crashes running all tests

* platform/ios-simulator-wk2/TestExpectations: Mark
fast/loader/subframe-navigate-during-main-frame-load.html as
flakey.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179872 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRender: properly update body's background image
a.obzhirov@samsung.com [Tue, 10 Feb 2015 17:05:05 +0000 (17:05 +0000)]
Render: properly update body's background image
https://bugs.webkit.org/show_bug.cgi?id=140183

When HTML and BODY renderers are both composited the
skipBodyBackground condition should also take into account
if the HTML's layer can draw its contents.

Patch by Julien Isorce <j.isorce@samsung.com> on 2015-02-10
Reviewed by Darin Adler.

Source/WebCore:

Test: animations/animation-background-image.html

* rendering/RenderBox.cpp:
(WebCore::skipBodyBackground): Do not skip
if document's layer cannot draw its content.
Previously both body and html did not paint the background
when they are both composited.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::contentChanged): Also redisplay
the content.

LayoutTests:

* compositing/backgrounds/background-image-with-negative-zindex-expected.html: Added.
* compositing/backgrounds/background-image-with-negative-zindex.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179871 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[WK2] Add support for registering url schemes to bypass Content Security Policy.
commit-queue@webkit.org [Tue, 10 Feb 2015 16:01:30 +0000 (16:01 +0000)]
[WK2] Add support for registering url schemes to bypass Content Security Policy.
https://bugs.webkit.org/show_bug.cgi?id=140736

Patch by Zhuo Li <zachli@apple.com> on 2015-02-10
Reviewed by Anders Carlsson.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):
* UIProcess/WebProcessPool.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsBypassingContentSecurityPolicy):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179870 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS] don't get out of sync when interrupt/resume calls are not balanced
eric.carlson@apple.com [Tue, 10 Feb 2015 15:47:51 +0000 (15:47 +0000)]
[iOS] don't get out of sync when interrupt/resume calls are not balanced
https://bugs.webkit.org/show_bug.cgi?id=141310

Reviewed by Jer Noble.

Source/WebCore:

No new tests, updated media/video-interruption-with-resume-allowing-play.html.

* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::beginInterruption): Count interruptions.
(WebCore::MediaSession::endInterruption): Ignore calls when m_interruptionCount is already zero.
* platform/audio/MediaSession.h:

LayoutTests:

* media/video-interruption-with-resume-allowing-play-expected.txt:
* media/video-interruption-with-resume-allowing-play.html: Updated to test unbalanced calls
    to begin/end interruption.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179869 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed GTK Gardening.
commit-queue@webkit.org [Tue, 10 Feb 2015 14:42:26 +0000 (14:42 +0000)]
Unreviewed GTK Gardening.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-02-10

* platform/gtk/TestExpectations:
* platform/gtk/fast/css/font-face-in-media-rule-expected.txt: Added. Rebaselined after r177774.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179868 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[EFL] Use a variable to set flicking time instead of hardcoding
commit-queue@webkit.org [Tue, 10 Feb 2015 08:24:53 +0000 (08:24 +0000)]
[EFL] Use a variable to set flicking time instead of hardcoding
https://bugs.webkit.org/show_bug.cgi?id=138950

Patch by Sanghyup Lee <sh53.lee@samsung.com> on 2015-02-10
Reviewed by Gyuyoung Kim.

Currently time of flick gesture animation is hardcoded as one second.
This patch added a static variable to increase readability.

* UIProcess/API/efl/GestureRecognizer.cpp:
(WebKit::GestureHandler::GestureHandler):
(WebKit::GestureHandler::flickAnimatorCallback):
(WebKit::GestureHandler::handleFlick):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179867 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK] GMutexLocker build issue
carlosgc@webkit.org [Tue, 10 Feb 2015 08:16:23 +0000 (08:16 +0000)]
[GTK] GMutexLocker build issue
https://bugs.webkit.org/show_bug.cgi?id=141381

Reviewed by Žan Doberšek.

Source/WebCore:

Use always WTF::GMutexLocker because newer glib versions have a
GMutexLocker in the public API.

* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::provideInput):
(WebCore::AudioSourceProviderGStreamer::handleAudioBuffer):
(WebCore::AudioSourceProviderGStreamer::clearAdapters):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkTimeoutCallback):
(webkitVideoSinkRender):
(unlockSampleMutex):
(webkitVideoSinkUnlockStop):
(webkitVideoSinkStart):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcGetProperty):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcNeedDataCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcEnoughDataCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):

Source/WTF:

Remove using WTF::GMutexLocker from the header, since newer glib
versions have a GMutexLocker in the public API.

* wtf/gobject/GMutexLocker.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179866 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoJSC's Type Profiler doesn't profile the type of the looping variable in ForOf/ForIn...
saambarati1@gmail.com [Tue, 10 Feb 2015 07:40:53 +0000 (07:40 +0000)]
JSC's Type Profiler doesn't profile the type of the looping variable in ForOf/ForIn loops
https://bugs.webkit.org/show_bug.cgi?id=141241

Reviewed by Filip Pizlo.

Type information is now recorded for ForIn and ForOf statements.
It was an oversight to not have these statements profiled before.

* bytecompiler/NodesCodegen.cpp:
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
* tests/typeProfiler/loop.js: Added.
(testForIn):
(testForOf):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179865 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Win] Activate media tests. (Unreviewed)
bfulgham@apple.com [Tue, 10 Feb 2015 07:09:31 +0000 (07:09 +0000)]
[Win] Activate media tests. (Unreviewed)

* platform/win/TestExpectations: Activate tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179864 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoDFG::StackLayoutPhase should always set the scopeRegister to VirtualRegister() becaus...
fpizlo@apple.com [Tue, 10 Feb 2015 04:46:53 +0000 (04:46 +0000)]
DFG::StackLayoutPhase should always set the scopeRegister to VirtualRegister() because the DFG doesn't do anything to make its value valid
https://bugs.webkit.org/show_bug.cgi?id=141412

Reviewed by Michael Saboff.

StackLayoutPhase was attempting to ensure that the register that
CodeBlock::scopeRegister() points to is the right one for the DFG. But the DFG did nothing
else to maintain the validity of the scopeRegister(). It wasn't captured as far as I can
tell. StackLayoutPhase didn't explicitly mark it live. PreciseLocalClobberize didn't mark
it as being live. So, by the time we got here the register referred to by
CodeBlock::scopeRegister() would have been junk. Moreover, CodeBlock::scopeRegister() was
not used for DFG code blocks, and was hardly ever used outside of bytecode generation.

So, this patch just removes the code to manipulate this field and replaces it with an
unconditional setScopeRegister(VirtualRegister()). Setting it to the invalid register
ensures that any attempst to read the scopeRegister in a DFG or FTL frame immediately
punts.

* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179863 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoVarargs frame set-up should be factored out for use by other JITs
fpizlo@apple.com [Tue, 10 Feb 2015 03:27:43 +0000 (03:27 +0000)]
Varargs frame set-up should be factored out for use by other JITs
https://bugs.webkit.org/show_bug.cgi?id=141388

Reviewed by Michael Saboff.

Previously the code that dealt with varargs always assumed that we were setting up a varargs call
frame by literally following the execution semantics of op_call_varargs. This isn't how it'll
happen once the DFG and FTL do varargs calls, or when varargs calls get inlined. The DFG and FTL
don't literally execute bytecode; for example their stack frame layout has absolutely nothing in
common with what the bytecode says, and that will never change.

This patch makes two changes:

Setting up the varargs callee frame can be done in smaller steps: particularly in the case of a
varargs call that gets inlined, we aren't going to actually want to set up a callee frame in
full - we just want to put the arguments somewhere, and that place will not have much (if
anything) in common with the call frame format. This patch factors that out into something called
a loadVarargs. The thing we used to call loadVarargs is now called setupVarargsFrame. This patch
also separates loading varargs from setting this, since the fact that those two things are done
together is a detail made explicit in bytecode but it's not at all required in the higher-tier
engines. In the process of factoring this code out, I found a bunch of off-by-one errors in the
various calculations. I fixed them. The distance from the caller's frame pointer to the callee
frame pointer is always:

    numUsedCallerSlots + argCount + 1 + CallFrameSize

where numUsedCallerSlots is toLocal(firstFreeRegister) - 1, which simplifies down to just
-firstFreeRegister. The code now speaks of numUsedCallerSlots rather than firstFreeRegister,
since the latter is a bytecode peculiarity that doesn't apply in the DFG or FTL. In the DFG, the
internally-computed frame size, minus the parameter slots, will be used for numUsedCallerSlots.
In the FTL, we will essentially compute numUsedCallerSlots dynamically by subtracting SP from FP.
Eventually, LLVM might give us some cleaner way of doing this, but it probably doesn't matter
very much.

The arguments forwarding optimization is factored out of the Baseline JIT: the DFG and FTL will
want to do this optimization as well, but it involves quite a bit of code. So, this code is now
factored out into SetupVarargsFrame.h|cpp, so that other JITs can use it. In the process of factoring
this code out I noticed that the 32-bit and 64-bit code is nearly identical, so I combined them.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.h:
(JSC::ExecState::r):
(JSC::ExecState::uncheckedR):
* bytecode/VirtualRegister.h:
(JSC::VirtualRegister::operator+):
(JSC::VirtualRegister::operator-):
(JSC::VirtualRegister::operator+=):
(JSC::VirtualRegister::operator-=):
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::sizeFrameForVarargs):
(JSC::loadVarargs):
(JSC::setupVarargsFrame):
(JSC::setupVarargsFrameAndSetThis):
* interpreter/Interpreter.h:
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitGetFromCallFrameHeaderPtr):
(JSC::AssemblyHelpers::emitGetFromCallFrameHeader32):
(JSC::AssemblyHelpers::emitGetFromCallFrameHeader64):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileSetupVarargsFrame):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileSetupVarargsFrame):
* jit/JITInlines.h:
(JSC::JIT::callOperation):
(JSC::JIT::emitGetFromCallFrameHeaderPtr): Deleted.
(JSC::JIT::emitGetFromCallFrameHeader32): Deleted.
(JSC::JIT::emitGetFromCallFrameHeader64): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/SetupVarargsFrame.cpp: Added.
(JSC::emitSetupVarargsFrameFastCase):
* jit/SetupVarargsFrame.h: Added.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/Arguments.cpp:
(JSC::Arguments::copyToArguments):
* runtime/Arguments.h:
* runtime/JSArray.cpp:
(JSC::JSArray::copyToArguments):
* runtime/JSArray.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179862 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUpdate WEBCORE_EXPORT to prepare to start using it.
commit-queue@webkit.org [Tue, 10 Feb 2015 01:21:38 +0000 (01:21 +0000)]
Update WEBCORE_EXPORT to prepare to start using it.
https://bugs.webkit.org/show_bug.cgi?id=141409

Patch by Alex Christensen <achristensen@webkit.org> on 2015-02-09
Reviewed by Tim Horton.

* bindings/js/JSDOMGlobalObject.h:
* bindings/objc/DOMInternal.h:
* bindings/objc/ExceptionHandlers.mm:
* bindings/objc/WebScriptObjectPrivate.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.h:
* css/StyleProperties.h:
* dom/DeviceMotionData.h:
* dom/Node.h:
* dom/Position.h:
* dom/ScriptExecutionContext.h:
* editing/Editor.h:
* editing/htmlediting.h:
* html/HTMLInputElement.h:
* html/TimeRanges.h:
* loader/FrameLoader.h:
* loader/cache/CacheValidation.h:
* loader/cache/MemoryCache.h:
* loader/icon/IconDatabase.h:
* page/DatabaseProvider.h:
* page/DiagnosticLoggingKeys.h:
* page/EventHandler.h:
* page/FrameSnapshotting.h:
* page/MainFrame.h:
* page/PageConsoleClient.h:
* page/PageOverlay.h:
* platform/CrossThreadCopier.h:
* platform/FileSystem.h:
* platform/PlatformSpeechSynthesizer.h:
* platform/RemoteCommandListener.h:
* platform/RuntimeApplicationChecks.h:
* platform/graphics/Font.h:
* platform/graphics/FontCache.h:
* platform/graphics/FontGlyphs.h:
* platform/graphics/FontRanges.h:
* platform/graphics/GeometryUtilities.h:
* platform/graphics/GlyphPage.h:
* platform/graphics/Region.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileController.h:
* platform/graphics/transforms/TransformationMatrix.h:
* platform/mac/WebCoreFullScreenWarningView.h:
* platform/network/BlobDataFileReference.h:
* platform/network/ResourceRequestBase.h:
* platform/network/ResourceResponseBase.h:
* platform/network/create-http-header-name-table:
* platform/network/mac/WebCoreURLResponse.h:
* platform/sql/SQLiteDatabaseTracker.h:
* platform/sql/SQLiteStatement.h:
* rendering/HitTestLocation.h:
* rendering/HitTestResult.h:
* storage/StorageEventDispatcher.h:
Added WEBCORE_EXPORT macros.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179861 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoCheck for self-assignment in Length::operator=(const Length&)
cdumez@apple.com [Tue, 10 Feb 2015 01:17:44 +0000 (01:17 +0000)]
Check for self-assignment in Length::operator=(const Length&)
https://bugs.webkit.org/show_bug.cgi?id=141402

Reviewed by Andreas Kling.

Check for self-assignment in Length::operator=(const Length&) as
calling memcpy() with the same source and destination addresses has
undefined behavior.

* platform/Length.h:
(WebCore::Length::operator=):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179860 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWebGL: Update 1.0.2 conformance layout tests and address new failure.
roger_fong@apple.com [Tue, 10 Feb 2015 01:02:28 +0000 (01:02 +0000)]
WebGL: Update 1.0.2 conformance layout tests and address new failure.
https://bugs.webkit.org/show_bug.cgi?id=141408.
<rdar://problem/19773236>

Reviewed by Dean Jackson.

Tests covered by updated 1.0.2 conformance tests.

* html/canvas/WebGLRenderingContextBase.cpp:
Return null string instead of empty string if parameter validation fails.
(WebCore::WebGLRenderingContextBase::getProgramInfoLog):
(WebCore::WebGLRenderingContextBase::getShaderInfoLog):
(WebCore::WebGLRenderingContextBase::getShaderSource):

* fast/canvas/webgl/bad-arguments-test-expected.txt: Removed.
* fast/canvas/webgl/bad-arguments-test.html: Removed. Redundant test case.
* webgl/1.0.2/resources/webgl_test_files/README.md:
* webgl/1.0.2/resources/webgl_test_files/conformance/attribs/gl-disabled-vertex-attrib.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/context/context-creation-and-destruction.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-debug-shaders.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/extensions/webgl-depth-texture.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/misc/bad-arguments-test.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js:
* webgl/1.0.2/resources/webgl_test_files/conformance/more/util.js:
(VBO.prototype.use):
* webgl/1.0.2/resources/webgl_test_files/conformance/rendering/multisample-corruption.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/resources/fragmentShader.frag:
* webgl/1.0.2/resources/webgl_test_files/conformance/resources/glsl-generator.js:
* webgl/1.0.2/resources/webgl_test_files/conformance/resources/vertexShader.vert:
* webgl/1.0.2/resources/webgl_test_files/conformance/resources/webgl-test-utils.js:
(WebGLTestUtils):
* webgl/1.0.2/resources/webgl_test_files/test-guidelines.md:
* webgl/1.0.2/resources/webgl_test_files/webgl-conformance-tests.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179859 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION: tryFastCalloc is no longer "try"
ap@apple.com [Tue, 10 Feb 2015 00:12:39 +0000 (00:12 +0000)]
REGRESSION: tryFastCalloc is no longer "try"
https://bugs.webkit.org/show_bug.cgi?id=141406

Reviewed by Darin Adler.

This causes crashes on some WebKit regression test bots.

* wtf/FastMalloc.cpp: (WTF::tryFastCalloc): Fix what looks like a copy/paste mistake.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179855 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoDFG call codegen should resolve the callee operand as late as possible
fpizlo@apple.com [Mon, 9 Feb 2015 23:39:57 +0000 (23:39 +0000)]
DFG call codegen should resolve the callee operand as late as possible
https://bugs.webkit.org/show_bug.cgi?id=141398

Reviewed by Mark Lam.

This is mostly a benign restructuring to help with the implementation of
https://bugs.webkit.org/show_bug.cgi?id=141332.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179851 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAvoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than...
timothy_horton@apple.com [Mon, 9 Feb 2015 23:39:41 +0000 (23:39 +0000)]
Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
https://bugs.webkit.org/show_bug.cgi?id=141353

Reviewed by Anders Carlsson.

No new tests, because there's no behavior change.

* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
(WebCore::DisplayRefreshMonitorManager::unregisterClient):
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
* platform/graphics/DisplayRefreshMonitorManager.h:
Use a Vector of RefPtr<DisplayRefreshMonitor> instead of a HashMap
from uint64_t to RefPtr<DisplayRefreshMonitor>. There's usually only one
display, so there's usually only one DisplayRefreshMonitor. Linear search
on the Vector will be faster than the hash lookup in all conceivable cases.
This also avoids the situation mentioned in the comments in DisplayRefreshMonitorManager.h
where we don't know enough about PlatformDisplayID to safely hash it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179850 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSelection flickers when trying to change size of selection.
enrica@apple.com [Mon, 9 Feb 2015 23:19:20 +0000 (23:19 +0000)]
Selection flickers when trying to change size of selection.
https://bugs.webkit.org/show_bug.cgi?id=141404
rdar://problem/18824863

Reviewed by Benjamin Poulain.

When looking for the contracted range from the current range,
we were incorrectly choosing a selection whose rectangle is empty
as a best match candidate. This was throwing off all the logic
and producing a contracted range whose rectangle was bigger than the
expanded range, therefore producing a shrink threshold larger than the
growth one.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::contractedRangeFromHandle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179847 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: Uncaught exception when reporting wrong backend command call signature
burg@cs.washington.edu [Mon, 9 Feb 2015 23:19:20 +0000 (23:19 +0000)]
Web Inspector: Uncaught exception when reporting wrong backend command call signature
https://bugs.webkit.org/show_bug.cgi?id=141401

Reviewed by Joseph Pecoraro.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Command.prototype._invokeWithArguments): Fix wrong variable name.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179846 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
jer.noble@apple.com [Mon, 9 Feb 2015 22:57:14 +0000 (22:57 +0000)]
[Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
https://bugs.webkit.org/show_bug.cgi?id=141399

Reviewed by Eric Carlson.

Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
the requested value even if time is not progressing.

We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
estimation, means we should probably turn it off for iOS and Yosemite.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179843 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWebGL 2: Texture call format, internal format, and type validation.
roger_fong@apple.com [Mon, 9 Feb 2015 20:50:15 +0000 (20:50 +0000)]
WebGL 2: Texture call format, internal format, and type validation.
https://bugs.webkit.org/show_bug.cgi?id=141318.
<rdar://problem/19733828>

Reviewed by Brent Fulgham.

Tests will be covered by WebGL2 conformance tests.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Add missing ExceptionCode argument.
(WebCore::WebGL2RenderingContext::copyTexImage2D): Validate texture formats based on GLES3 spec.
(WebCore::WebGL2RenderingContext::texSubImage2DBase): Validate using internal format from texture target.
(WebCore::WebGL2RenderingContext::texSubImage2DImpl): Validate using internal format from texture target.
(WebCore::WebGL2RenderingContext::texSubImage2D): Validate using internal format from texture target.
(WebCore::WebGL2RenderingContext::validateTexFuncParameters): Do extra validation for copyTexImage2D.
(WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Validate internal format, format and type combination.
(WebCore::WebGL2RenderingContext::validateTexFuncData): Validate new data types.
This method now accepts an internal format argument.
(WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
Helper method to convert internal format to base internal format.
* html/canvas/WebGL2RenderingContext.h:

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::copyTexImage2D): Moved from WebGLRenderingContextBase.
(WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto.
(WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
(WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
(WebCore::WebGLRenderingContext::validateTexFuncParameters): Ditto.
(WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): Ditto.
(WebCore::WebGLRenderingContext::validateTexFuncData): Ditto.
* html/canvas/WebGLRenderingContext.h:

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImage2DBase):
(WebCore::WebGLRenderingContextBase::validateTexFunc):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::copyTexImage2D): Deleted.
(WebCore::WebGLRenderingContextBase::texSubImage2DBase): Deleted.
(WebCore::WebGLRenderingContextBase::texSubImage2DImpl): Deleted.
(WebCore::WebGLRenderingContextBase::texSubImage2D): Deleted.
(WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType): Deleted.
(WebCore::WebGLRenderingContextBase::validateTexFuncParameters): Deleted.
(WebCore::WebGLRenderingContextBase::validateTexFuncData): Deleted.
* html/canvas/WebGLRenderingContextBase.h: Modify validation type enums to differentiate between CopyImage, TexImage and TexSubImage calls.
(WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder):  Moved from WebGLRenderingContextBase.
(WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Ditto.
(WebCore::clip1D): Ditto.
(WebCore::clip2D): Ditto.
* platform/graphics/GraphicsContext3D.h: Rename a typo'ed enum.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179842 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: [Win] OBJID_CLIENT comparisons broken in 64-bit builds
bfulgham@apple.com [Mon, 9 Feb 2015 20:27:51 +0000 (20:27 +0000)]
AX: [Win] OBJID_CLIENT comparisons broken in 64-bit builds
https://bugs.webkit.org/show_bug.cgi?id=141391
<rdar://problem/19767342>

Reviewed by Anders Carlsson.

* WebView.cpp:
(WebView::onGetObject): Cast lParam as LONG to ensure proper word size for
comparison against OBJID_CLIENT.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179841 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoDFG should only have two mechanisms for describing effectfulness of nodes; previously...
fpizlo@apple.com [Mon, 9 Feb 2015 19:57:41 +0000 (19:57 +0000)]
DFG should only have two mechanisms for describing effectfulness of nodes; previously there were three
https://bugs.webkit.org/show_bug.cgi?id=141369

Reviewed by Michael Saboff.

We previously used the NodeMightClobber and NodeClobbersWorld NodeFlags to describe
effectfulness.  Starting over a year ago, we introduced a more powerful mechanism - the
DFG::clobberize() function.  Now we only have one remaining client of the old NodeFlags,
and everyone else uses DFG::clobberize().  We should get rid of those NodeFlags and
finally switch everyone over to DFG::clobberize().

Unfortunately there is still another place where effectfulness of nodes is described: the
AbstractInterpreter. This is because the AbstractInterpreter has special tuning both for
compile time performance and there are places where the AI is more precise than
clobberize() because of its flow-sensitivity.

This means that after this change there will be only two places, rather than three, where
the effectfulness of a node has to be described:

- DFG::clobberize()
- DFG::AbstractInterpreter

* dfg/DFGClobberize.cpp:
(JSC::DFG::clobbersWorld):
* dfg/DFGClobberize.h:
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteLength):
(JSC::DFG::FixupPhase::convertToGetArrayLength):
(JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteOffset):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::isPredictedNumerical): Deleted.
(JSC::DFG::Graph::byValIsPure): Deleted.
(JSC::DFG::Graph::clobbersWorld): Deleted.
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToConstant):
(JSC::DFG::Node::convertToGetLocalUnlinked):
(JSC::DFG::Node::convertToGetByOffset):
(JSC::DFG::Node::convertToMultiGetByOffset):
(JSC::DFG::Node::convertToPutByOffset):
(JSC::DFG::Node::convertToMultiPutByOffset):
* dfg/DFGNodeFlags.cpp:
(JSC::DFG::dumpNodeFlags):
* dfg/DFGNodeFlags.h:
* dfg/DFGNodeType.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179840 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, rolling out r179494.
commit-queue@webkit.org [Mon, 9 Feb 2015 19:53:28 +0000 (19:53 +0000)]
Unreviewed, rolling out r179494.
https://bugs.webkit.org/show_bug.cgi?id=141395

Caused slowdown in a WebKit client test scenario (Requested by
kling on #webkit).

Reverted changeset:

"[Cocoa] Make decoded image data purgeable ASAP."
https://bugs.webkit.org/show_bug.cgi?id=140298
http://trac.webkit.org/changeset/179494

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179839 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negativ...
jer.noble@apple.com [Mon, 9 Feb 2015 19:45:54 +0000 (19:45 +0000)]
[WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
https://bugs.webkit.org/show_bug.cgi?id=140955

Reviewed by Eric Carlson.

Source/WebCore:

Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html
       webaudio/audiobuffersource-negative-playbackrate.html

Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of
start() to set the initial playback position at the end of the play range if the rate of playback
is negtive.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32].
(WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max"
    for clarity. Add a non-interpolated and interpolated render step for negative playback.
(WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02.
(WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback.
(WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative.

LayoutTests:

* webaudio/audiobuffersource-negative-playbackrate-expected.txt: Added.
* webaudio/audiobuffersource-negative-playbackrate-interpolated-expected.txt: Added.
* webaudio/audiobuffersource-negative-playbackrate-interpolated-loop-expected.txt: Added.
* webaudio/audiobuffersource-negative-playbackrate-interpolated-loop.html: Added.
* webaudio/audiobuffersource-negative-playbackrate-interpolated.html:
* webaudio/audiobuffersource-negative-playbackrate-loop-expected.txt: Added.
* webaudio/audiobuffersource-negative-playbackrate-loop.html: Added.
* webaudio/audiobuffersource-negative-playbackrate.html:
* webaudio/resources/audiobuffersource-testing.js:
(createRamp):

Get rid of extra HRTF padding as it's now unnecessary.

* webaudio/resources/note-grain-on-testing.js:
(createSignalBuffer):
(verifyStartAndEndFrames):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179838 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS] Gardening: css3/masking/mask-repeat-space-padding.html
ddkilzer@apple.com [Mon, 9 Feb 2015 18:59:44 +0000 (18:59 +0000)]
[iOS] Gardening: css3/masking/mask-repeat-space-padding.html

* platform/ios-simulator-wk2/TestExpectations: Remove
expectation since this is covered in
platform/ios-simulator/TestExpectations as an ImageOnlyFailure.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179837 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS] Gardening for editing/execCommand/remove-list-item-1.html
ddkilzer@apple.com [Mon, 9 Feb 2015 18:53:03 +0000 (18:53 +0000)]
[iOS] Gardening for editing/execCommand/remove-list-item-1.html

* platform/ios-simulator-wk1/TestExpectations:
(editing/execCommand/remove-list-item-1.html): Mark as flakey.
When run (with or without --run-singly), this test always passes
the first time, but fails all subsequent times due to
EDITING DELEGATE: shouldChangeSelectedDOMRange:range
running in a different order.
* platform/ios-simulator-wk2/editing/execCommand/remove-list-item-1-expected.txt: Update.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179836 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION (r179771): [iOS] Gardening for compositing/layer-creation/subpixel-adjacen...
ddkilzer@apple.com [Mon, 9 Feb 2015 18:22:00 +0000 (18:22 +0000)]
REGRESSION (r179771): [iOS] Gardening for compositing/layer-creation/subpixel-adjacent-layers-overlap.html

Test recently added for:
Convert the compositing overlap map to use LayoutRects
<http://webkit.org/b/141346>

* platform/ios-simulator/compositing/layer-creation/subpixel-adjacent-layers-overlap-expected.txt:
Add platform-specific results for ios-simulator.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179832 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoFix the !ENABLE(DFG_JIT) build
ossy@webkit.org [Mon, 9 Feb 2015 18:07:46 +0000 (18:07 +0000)]
Fix the !ENABLE(DFG_JIT) build
https://bugs.webkit.org/show_bug.cgi?id=141387

Reviewed by Darin Adler.

* jit/Repatch.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179831 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agorun-jsc-stress-tests shell test runner should run tests in fixed order
ossy@webkit.org [Mon, 9 Feb 2015 17:52:18 +0000 (17:52 +0000)]
run-jsc-stress-tests shell test runner should run tests in fixed order
https://bugs.webkit.org/show_bug.cgi?id=141383

Reviewed by Darin Adler.

* Scripts/jsc-stress-test-helpers/shell-runner.sh:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179830 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoTry to fix build on platforms that use SVG "all in one" file (Windows).
darin@apple.com [Mon, 9 Feb 2015 17:15:28 +0000 (17:15 +0000)]
Try to fix build on platforms that use SVG "all in one" file (Windows).

* svg/SVGAElement.cpp: Don't do "using namespace HTMLNames;" outside of
function boundaries, because that will be inherited by other files.
(WebCore::SVGAElement::isURLAttribute): Use XLinkNames directly here
instead of using HTMLNames implicitly.

* svg/SVGElement.cpp: Don't do "using namespace HTMLNames;" outside of
function boundaries, because that will be inherited by other files.
(WebCore::populateAttributeNameToCSSPropertyIDMap): Instead do it in here.
(WebCore::populateAttributeNameToAnimatedPropertyTypeMap): And here.
(WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): And here.
(WebCore::SVGElement::parseAttribute): And use HTMLNames directly here
instead of implicitly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179829 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION(r179705): 2nd-level inspector availability no longer controlled by Develop...
burg@cs.washington.edu [Mon, 9 Feb 2015 16:37:41 +0000 (16:37 +0000)]
REGRESSION(r179705): 2nd-level inspector availability no longer controlled by DeveloperExtrasEnabled user default
https://bugs.webkit.org/show_bug.cgi?id=141343

Reviewed by Timothy Hatcher.

The regression was caused by the switch to using WKWebViewConfiguration and
its default WebPreferences object, which is used to populate the inspector page's
Settings object. This WebPreferences is initialized with no identifier, so
only preferences in the FOR_EACH_WEBKIT_DEBUG_*_PREFERENCE macros are populated
from NSUserDefaults.

The simplest fix is to move DeveloperExtrasEnabled into the DEBUG group.

Previously, each inspector level had a unique identifier such as
__WebInspectorPageGroupLevelN__, and the n+1 level inspector was enabled
by toggling __WebInspectorPageGroupLevelN__.WebKit2DeveloperExrasEnabled.
With the move to the DEBUG group, the preference becomes simply
WebKitDeveloperExtrasEnabled, which enables any level of inspector.
(This does not clash with Safari's "Show Develop Menu" preference, which uses
the key "WebKitDeveloperExtrasEnabledPreferenceKey")

* Shared/WebPreferencesDefinitions.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179828 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS] exit from fullscreen when player view controller calls delegate
eric.carlson@apple.com [Mon, 9 Feb 2015 16:22:53 +0000 (16:22 +0000)]
[iOS] exit from fullscreen when player view controller calls delegate
https://bugs.webkit.org/show_bug.cgi?id=141350

Reviewed by Jer Noble.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): New, ask delegate
    to exit from fullscreen.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179827 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoASSERTION FAILED: resolvedInitialPosition <= resolvedFinalPosition in WebCore::GridSp...
svillar@igalia.com [Mon, 9 Feb 2015 14:05:49 +0000 (14:05 +0000)]
ASSERTION FAILED: resolvedInitialPosition <= resolvedFinalPosition in WebCore::GridSpan::GridSpan
https://bugs.webkit.org/show_bug.cgi?id=141328

Reviewed by Darin Adler.

.:

Added as manual test because it involves a huge grid allocation
which is very slow on Debug bots, the only ones capable to trigger
the assertion.

* ManualTests/css-grid-layout-item-with-huge-span-crash.html: Added.

Source/WebCore:

Whenever
GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition()
was trying to place an item with span, it was completely ignoring
the resolvedInitialPosition returned by
GridResolvedPosition::resolveGridPositionAgainstOppositePosition()
and only using the finalResolvedPosition. This works with an
unlimited grid which can indefinitely grow. But if the item spans
over the grid track limits, then it might happen that the final
resolved position is placed before the initial resolved position,
something that is forbidden.

The solution is to directly use the GridSpan returned by
GridResolvedPosition::resolveGridPositionAgainstOppositePosition(), if the item
does not surpass the track limits then the returned initialResolvedPosition
is identical to the provided one, otherwise it's properly corrected to respect
track boundaries.

* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179826 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed GTK Gardening.
clopez@igalia.com [Mon, 9 Feb 2015 13:18:19 +0000 (13:18 +0000)]
Unreviewed GTK Gardening.

* platform/gtk/TestExpectations: Mark new test failing
* platform/gtk/css2.1/t1508-c527-font-00-b-expected.txt: Added. Rebaseline after r177774.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179825 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[CSS Grid Layout] Tracks' growth limits must be >= base sizes
svillar@igalia.com [Mon, 9 Feb 2015 11:34:11 +0000 (11:34 +0000)]
[CSS Grid Layout] Tracks' growth limits must be >= base sizes
https://bugs.webkit.org/show_bug.cgi?id=140540

Reviewed by Antti Koivisto.

Source/WebCore:

The track sizing algorithm is supposed to avoid those situations
but they easily (specially when we mix absolute lengths and
intrinsic lengths in min and max track sizing functions) and
frequently appear. In those cases the outcome from the algorithm
is wrong, tracks are not correctly sized.

In order to fulfill the restriction, m_usedBreadth and
m_maxBreadth are now private members of GridTrack and the class
now provides a couple of methods to modify them respecting the
growthLimit >= baseSize precondition.

Apart from that, the members and methods of GridTrack were also
renamed to match the ones used in the recent algorithm rewrite:
usedBreadth became baseSize and maxBreadth is now growthLimit.

Although the algorithm was not modified at all, this change
detected and fixed several invalid results (tracks and/or grids
bigger than expected).

* rendering/RenderGrid.cpp:
(WebCore::GridTrack::GridTrack): Renamed fields and methods. Added
assertions.
(WebCore::GridTrack::baseSize): Renamed from usedBreadth.
(WebCore::GridTrack::growthLimit): Renamed from maxBreadth.
(WebCore::GridTrack::setBaseSize):
(WebCore::GridTrack::setGrowthLimit):
(WebCore::GridTrack::growBaseSize): Renamed from growUsedBreadth.
(WebCore::GridTrack::growGrowthLimit): Renamed from growMaxBreadth.
(WebCore::GridTrack::growthLimitIsInfinite): New helper method.
(WebCore::GridTrack::growthLimitIfNotInfinite): Renamed from
maxBreadthIfNotInfinite.
(WebCore::GridTrack::isGrowthLimitBiggerThanBaseSize): New helper
method to verify ASSERTs are true.
(WebCore::GridTrack::ensureGrowthLimitIsBiggerThanBaseSize): Ditto.
(WebCore::GridTrackForNormalization::GridTrackForNormalization):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::computeNormalizedFractionBreadth):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::sortByGridTrackGrowthPotential):
(WebCore::RenderGrid::distributeSpaceToTracks):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::populateGridPositions):
(WebCore::GridTrack::growUsedBreadth): Renamed to growBaseSize.
(WebCore::GridTrack::usedBreadth): Renamed to baseSize.
(WebCore::GridTrack::growMaxBreadth): Renamed to growGrowthLimit.
(WebCore::GridTrack::maxBreadthIfNotInfinite): Renamed to
growthLimitIfNotInfinite.
* rendering/RenderGrid.h:

LayoutTests:

* fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt:
* fast/css-grid-layout/grid-content-sized-columns-resolution.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179824 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoMeasure cache size more accurately
antti@apple.com [Mon, 9 Feb 2015 11:03:06 +0000 (11:03 +0000)]
Measure cache size more accurately
https://bugs.webkit.org/show_bug.cgi?id=141378
<rdar://problem/19760224>

Reviewed by Chris Dumez.

Estimate the cache disk space usage from the actual entry sizes instead of the item count.
This prevents large cache items from making the cache grow beyond its bounds.

* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::initialize):
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::clear):
(WebKit::NetworkCacheStorage::shrinkIfNeeded):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179823 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, add new baseline since r179796.
gyuyoung.kim@samsung.com [Mon, 9 Feb 2015 08:18:20 +0000 (08:18 +0000)]
Unreviewed, add new baseline since r179796.

New baseline was added by r179796. EFL port supports the test as well.
This patch adds new baseline based on EFL port.

* platform/efl/fast/css/focus-ring-exists-for-search-field-expected.png: Added.
* platform/efl/fast/css/focus-ring-exists-for-search-field-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179822 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION(r179705): [GTK] The Web Inspector doesn't work after r179705
carlosgc@webkit.org [Mon, 9 Feb 2015 08:02:34 +0000 (08:02 +0000)]
REGRESSION(r179705): [GTK] The Web Inspector doesn't work after r179705
https://bugs.webkit.org/show_bug.cgi?id=141333

Reviewed by Žan Doberšek.

Create an initialize WebPreferences for the inspector page. This
was moved from cross-platform code to platform specific code.

* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179821 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus...
cfleizach@apple.com [Mon, 9 Feb 2015 07:09:50 +0000 (07:09 +0000)]
AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events
https://bugs.webkit.org/show_bug.cgi?id=140485

Reviewed by Anders Carlsson.

Source/WebCore:

If setting an accessibility attribute results in a modal alert being displayed, it can cause VoiceOver
to hang. A simple solution is perform the actual work after a short delay, which will ensure the call
returns without hanging.

Test: platform/mac/accessibility/setting-attributes-is-asynchronous.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):

Tools:

Implement takeFocus() as a way to set focus through accessibility wrappers.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::takeFocus):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::takeFocus):

LayoutTests:

Modify tests that relied on setting behavior and immediately checking results. Those
tests now need to retrieve results after a short timeout.

* accessibility/textarea-selected-text-range-expected.txt:
* accessibility/textarea-selected-text-range.html:
* platform/mac/accessibility/select-element-selection-with-optgroups.html:
* platform/mac/accessibility/setting-attributes-is-asynchronous-expected.txt: Added.
* platform/mac/accessibility/setting-attributes-is-asynchronous.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179820 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd parsing support for CSS Selector L4's case-insensitive attribute
benjamin@webkit.org [Mon, 9 Feb 2015 03:44:57 +0000 (03:44 +0000)]
Add parsing support for CSS Selector L4's case-insensitive attribute
https://bugs.webkit.org/show_bug.cgi?id=141373

Reviewed by Darin Adler.

Source/WebCore:

This patch adds parsing for the case-insensitive attribute value
matching of CSS Selectors Level 4: http://dev.w3.org/csswg/selectors-4/#attribute-case
Excuse of a grammar: http://dev.w3.org/csswg/selectors-4/#grammar

This patch also covers serialization for CSSOM. The serialization
is defined here: http://dev.w3.org/csswg/cssom/#serializing-selectors

Matching is completely ignored in this patch. All the simple selectors
are treated as regular attribute selectors.

Tests: fast/css/parsing-css-attribute-case-insensitive-value-1.html
       fast/css/parsing-css-attribute-case-insensitive-value-2.html
       fast/css/parsing-css-attribute-case-insensitive-value-3.html
       fast/css/parsing-css-attribute-case-insensitive-value-4.html

* css/CSSGrammar.y.in:
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::setAttributeValueMatchingIsCaseInsensitive):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::setAttributeValueMatchingIsCaseInsensitive):
(WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive):

LayoutTests:

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
Basic round-trip serialization through CSSOM.

* fast/css/parsing-css-attribute-case-insensitive-value-1-expected.txt: Added.
* fast/css/parsing-css-attribute-case-insensitive-value-1.html: Added.
Simple cases by themself and used in complex selectors.

* fast/css/parsing-css-attribute-case-insensitive-value-2-expected.txt: Added.
* fast/css/parsing-css-attribute-case-insensitive-value-2.html: Added.
Less simple cases, all kinds of valid syntax for case-insensitive attributes.

* fast/css/parsing-css-attribute-case-insensitive-value-3-expected.txt: Added.
* fast/css/parsing-css-attribute-case-insensitive-value-3.html: Added.
Cases that must be treated as invalid selectors.

* fast/css/parsing-css-attribute-case-insensitive-value-4-expected.txt: Added.
* fast/css/parsing-css-attribute-case-insensitive-value-4.html: Added.
Verify that invalid rules do not affect surrounding valid rules.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179819 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS] Skip js/dom/create-lots-of-workers.html on ios-simulator
ddkilzer@apple.com [Mon, 9 Feb 2015 02:56:05 +0000 (02:56 +0000)]
[iOS] Skip js/dom/create-lots-of-workers.html on ios-simulator

Already skipped on mac; marked as flakey on efl and gtk.

Fix tracked by:
REGRESSION: js/dom/create-lots-of-workers.html frequently crashes (sometimes in js/dom/cross-frame-bad-time.html)
<http://webkit.org/b/129758>
<rdar://problem/19760988>

* platform/ios-simulator/TestExpectations: Skip test.
* platform/mac/TestExpectations: Add comment about skipping on
ios-simulator.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179818 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRemove a few duplicate propagation steps from the DFG's PredictionPropagation phase
benjamin@webkit.org [Mon, 9 Feb 2015 02:42:22 +0000 (02:42 +0000)]
Remove a few duplicate propagation steps from the DFG's PredictionPropagation phase
https://bugs.webkit.org/show_bug.cgi?id=141363

Reviewed by Darin Adler.

* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
Some blocks were duplicated, they probably evolved separately
to the same state.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179817 268f45cc-cd09-0410-ab3c-d52691b4dbfc