commit-queue@webkit.org [Mon, 26 Aug 2013 10:07:28 +0000 (10:07 +0000)]
[Qt] Remove the fix in QWebPage::javaScriptConsoleMessage introduced by (r61433)
https://bugs.webkit.org/show_bug.cgi?id=119791
Source/WebKit/qt:
Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-26
Reviewed by Jocelyn Turcotte.
* WidgetApi/qwebpage.cpp:
(QWebPage::javaScriptConsoleMessage): Removed hack specific to DRT, introduced by
(r61433).
Tools:
Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-26
Reviewed by Jocelyn Turcotte.
Load empty url to send onunload event to currently running page. onunload event is
mandatory for LayoutTests/plugins/open-and-close-window-with-plugin.html and
LayoutTests/plugins/geturlnotify-during-document-teardown.html.
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebPage::~WebPage):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154593
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 08:43:51 +0000 (08:43 +0000)]
[GTK] Silence MiniBrowser compile warnings due to recent GTK+ deprecations
https://bugs.webkit.org/show_bug.cgi?id=120290
Reviewed by Philippe Normand.
* MiniBrowser/gtk/GNUmakefile.am: Add
-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6 compile option.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154592
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 08:04:40 +0000 (08:04 +0000)]
[GTK] Add missing initializer for pluginLoadPolicy in WKPageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=120289
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView): Add initializer for pluginLoadPolicy
and rename the comment of the previous one as
pluginLoadPolicy_deprecatedForUseWithV2.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154591
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 26 Aug 2013 07:53:10 +0000 (07:53 +0000)]
[GTK] Add WillLoad test files to the TestWebKitAPI/TestWebKit2 program
https://bugs.webkit.org/show_bug.cgi?id=120288
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/GNUmakefile.am: Add the WillLoad.cpp build target that should be compiled
into the TestWebKit2 program. The InjectedBundle counterpart file is added to the build as well.
These unit tests are at the moment failing in debug configurations, so it would be nice to
have the GTK builds report these failures as well.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154590
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 07:47:55 +0000 (07:47 +0000)]
[GTK] webkitCredentialGetCredential returns a temporary in g_return_val_if_fail
https://bugs.webkit.org/show_bug.cgi?id=120287
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitCredential.cpp:
(webkitCredentialGetCredential): Use ASSERT() instead of
g_return_val_if_fail() since this is a private function.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154589
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 07:45:16 +0000 (07:45 +0000)]
[GTK] Fix compile warning in WebKitDOMCustom
https://bugs.webkit.org/show_bug.cgi?id=120286
Reviewed by Philippe Normand.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_item_type): Add return 0.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154588
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryuan.choi@samsung.com [Mon, 26 Aug 2013 06:20:42 +0000 (06:20 +0000)]
[EFL] EWebLauncher is executed as full screen with device pixel ratio
https://bugs.webkit.org/show_bug.cgi?id=120282
Reviewed by Gyuyoung Kim.
* EWebLauncher/main.c:
Use double instead of float for device_pixel_ratio which is passed to ECORE_GETOPT_VALUE_DOUBLE.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154587
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Mon, 26 Aug 2013 06:05:05 +0000 (06:05 +0000)]
JSHTMLFormElement::canGetItemsForName needlessly allocates a Vector
https://bugs.webkit.org/show_bug.cgi?id=120277
Reviewed by Sam Weinig.
Added HTMLFormElement::hasNamedElement and used it in JSHTMLFormElement::canGetItemsForName.
This required fixing a bug in HTMLFormElement::getNamedElements that the first call to getNamedElements
after replacing an element A with another element B of the same name caused it to erroneously append A
to namedItems via the aliases mapping. Because getNamedElements used to be always called in pairs, this
wrong behavior was never visible to the Web. Fixed the bug by not adding the old element to namedItem
when namedItem's size is 1.
Also renamed m_elementAliases to m_pastNamesMap along with related member functions.
No new tests are added since there should be no Web exposed behavioral change.
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::canGetItemsForName):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elementFromPastNamesMap):
(WebCore::HTMLFormElement::addElementToPastNamesMap):
(WebCore::HTMLFormElement::hasNamedElement):
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLFormElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154586
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Mon, 26 Aug 2013 02:21:32 +0000 (02:21 +0000)]
RenderLayerBacking::renderer() should return a reference.
<https://webkit.org/b/120280>
Reviewed by Anders Carlsson.
It's just a forwarding call to RenderLayer::renderer() which already returns a reference.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154585
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Mon, 26 Aug 2013 02:08:33 +0000 (02:08 +0000)]
Add toSVGMissingGlyphElement(), and use it.
https://bugs.webkit.org/show_bug.cgi?id=120197
Reviewed by Andreas Kling.
As a step to clean-up static_cast<SVGXXX>, toSVGMissingGlyphElement() is added to clean-up
static_cast<SVGMissingGlyphElement*>.
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::firstMissingGlyphElement):
(WebCore::SVGFontElement::ensureGlyphCache):
* svg/SVGMissingGlyphElement.h:
(WebCore::toSVGMissingGlyphElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154584
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Mon, 26 Aug 2013 01:02:34 +0000 (01:02 +0000)]
RenderLayer::renderer() should return a reference.
<https://webkit.org/b/120276>
Reviewed by Anders Carlsson.
RenderLayer is always created with a renderer, so make renderer() (and m_renderer) references.
Nuked an assortment of useless null checks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154583
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sun, 25 Aug 2013 21:43:39 +0000 (21:43 +0000)]
Improve srcset's layout tests
https://bugs.webkit.org/show_bug.cgi?id=120274
Moved srcset's tests to use js-test-pre, and output text with clear PASS/FAILED statements.
Added expected.txt files to the test directory, since there shouldn't be any platform variance in the results.
For some of the tests, added an equivalent 1x/2x test, to make sure the feature behaves on both DPRs.
Added preload tests on the "change-dynamically" tests, to make sure the 'src' resource is not loaded when it shouldn't.
Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-25
Reviewed by Andreas Kling.
* fast/hidpi/image-srcset-change-dynamically-from-js-1x-expected.txt: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-1x.html: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-2x.html: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js.html: Removed.
* fast/hidpi/image-srcset-data-src-expected.txt: Added.
* fast/hidpi/image-srcset-data-src.html:
* fast/hidpi/image-srcset-data-srcset-expected.txt: Added.
* fast/hidpi/image-srcset-data-srcset.html:
* fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt: Added.
* fast/hidpi/image-srcset-invalid-inputs-correct-src.html:
* fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt: Added.
* fast/hidpi/image-srcset-invalid-inputs-except-one.html:
* fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt: Added.
* fast/hidpi/image-srcset-remove-dynamically-from-js.html:
* fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt: Added.
* fast/hidpi/image-srcset-same-alternative-for-both-attributes.html:
* fast/hidpi/image-srcset-simple-1x-expected.txt: Added.
* fast/hidpi/image-srcset-simple-1x.html: Added.
* fast/hidpi/image-srcset-simple-2x-expected.txt: Added.
* fast/hidpi/image-srcset-simple-2x.html: Added.
* fast/hidpi/image-srcset-simple.html: Removed.
* fast/hidpi/image-srcset-src-selection-1x-expected.txt: Added.
* fast/hidpi/image-srcset-src-selection-1x.html: Added.
* fast/hidpi/image-srcset-src-selection-2x-expected.txt: Added.
* fast/hidpi/image-srcset-src-selection-2x.html: Added.
* fast/hidpi/image-srcset-src-selection.html: Removed.
* fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Added.
* fast/hidpi/image-srcset-viewport-modifiers.html:
* platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-data-src-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-data-srcset-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-simple-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-src-selection-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154582
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Sun, 25 Aug 2013 21:30:10 +0000 (21:30 +0000)]
Element child and descendant iterators
https://bugs.webkit.org/show_bug.cgi?id=120248
Reviewed by Sam Weinig and Andreas Kling.
Add iterators for Element children and descendants.
To iterate over element children:
#include "ChildIterator.h"
for (auto it = elementChildren(this).begin(), end = elementChildren(this).end(); it != end; ++it) {
Element& element = *it;
...
for (auto it = childrenOfType<HTMLAreaElement>(this).begin(), end = childrenOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
HTMLAreaElement& area = *it;
...
To iteratate over element descendants in pre-order:
#include "DescendantIterator.h"
for (auto it = elementDescendants(this).begin(), end = elementDescendants(this).end(); it != end; ++it) {
Element& element = *it;
...
for (auto it = descendantsOfType<HTMLAreaElement>(this).begin(), end = descendantsOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
HTMLAreaElement& area = *it;
...
The iterators assert against DOM mutations and event dispatch while iterating in debug builds.
They are compatible with C++11 range-based for loops. In the future we can use
for (auto& element : elementChildren(this))
...
etc.
The patch all uses the new iterators in a few places.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
(WebCore::siblingWithAriaRole):
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* dom/ChildIterator.h: Added.
(WebCore::ChildIterator::operator*):
(WebCore::ChildIterator::operator->):
(WebCore::::ChildIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::ChildIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementChildren):
(WebCore::childrenOfType):
* dom/DescendantIterator.h: Added.
(WebCore::DescendantIterator::operator*):
(WebCore::DescendantIterator::operator->):
(WebCore::::DescendantIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::DescendantIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementDescendants):
(WebCore::descendantsOfType):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
(WebCore::Document::childrenChanged):
(WebCore::Document::attach):
(WebCore::Document::detach):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
* editing/markup.cpp:
(WebCore::completeURLs):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::textTrackModeChanged):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154581
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 25 Aug 2013 21:22:06 +0000 (21:22 +0000)]
RenderObject::document() should return a reference.
<https://webkit.org/b/120272>
Reviewed by Antti Koivisto.
There's always a Document. We were allocated in someone's arena, after all.
Various null checks and assertions neutralized.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154580
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 25 Aug 2013 19:43:55 +0000 (19:43 +0000)]
BUILD FIX (r154578): Return Vector<String>() from Pasteboard::types() for iOS
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::types): Return Vector<String>() instead of
ListHashSet<String>() after r154578.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154579
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 17:24:02 +0000 (17:24 +0000)]
Make JavaScript binding for Clipboard::types more normal
https://bugs.webkit.org/show_bug.cgi?id=120271
Reviewed by Anders Carlsson.
* bindings/js/JSClipboardCustom.cpp:
(WebCore::JSClipboard::types): Make a simple custom binding. Only needed because
there is a special value, null, this can return.
* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Return Vector<String> instead of ListHashSet<String>.
* dom/Clipboard.h: Ditto.
* platform/Pasteboard.h: Ditto.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/efl/PasteboardEfl.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::types): Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::types): Ditto.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::types): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154578
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 25 Aug 2013 14:21:44 +0000 (14:21 +0000)]
Unreviewed rollout of r154571. Broke internal iOS build.
Reopened: No need for clearTimers function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120265
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::destroy):
* page/Frame.cpp:
(WebCore::Frame::clearTimers):
* page/Frame.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154577
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 10:28:51 +0000 (10:28 +0000)]
No need for hasData in Clipboard
https://bugs.webkit.org/show_bug.cgi?id=120269
Reviewed by Andreas Kling.
This simple forwarder does not belong in the Clipboard class.
The drag code that uses it already works directly with Pasteboard.
* dom/Clipboard.cpp: Removed hasData.
* dom/Clipboard.h: Ditto.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Call through the pasteboard.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154576
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 10:15:43 +0000 (10:15 +0000)]
Source/WebCore: No need for documentTypeString function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120262
Reviewed by Andreas Kling.
* WebCore.exp.in: Removed export of Frame::documentTypeString.
* editing/markup.cpp:
(WebCore::documentTypeString): Added. Replaces the old Frame member function.
Makes more sense to have this here since it is both called by and calls code
in this file; somehow this function was left behind.
(WebCore::createFullMarkup): Changed to call the new function.
* editing/markup.h: Added documentTypeString function. Has to be exported
because LegacyWebArchive uses it; might be worth fixing that later.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Changed to call the new function.
(WebCore::LegacyWebArchive::createFromSelection): Ditto.
* page/Frame.cpp: Removed Frame::documentTypeString.
* page/Frame.h: Ditto.
Source/WebKit/mac: Frame should not have a documentTypeString member function
https://bugs.webkit.org/show_bug.cgi?id=120262
Reviewed by Andreas Kling.
* WebView/WebFrame.mm: Removed _stringWithDocumentTypeStringAndMarkupString:
internal method, which was not used anywhere in WebKit. Internal methods are
only for use within WebKit, as opposed to public and private methods that can
be used outside.
* WebView/WebFrameInternal.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154575
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 10:00:37 +0000 (10:00 +0000)]
Clipboard is in DOM directory, but ClipboardMac is in platform directory
https://bugs.webkit.org/show_bug.cgi?id=120267
Reviewed by Andreas Kling.
This file is almost gone; has just one function in it. Move it for now, and later
we can delete it entirely.
* WebCore.xcodeproj/project.pbxproj: Updated for new file location.
* dom/ClipboardMac.mm: Moved from Source/WebCore/platform/mac/ClipboardMac.mm.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154574
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 09:54:09 +0000 (09:54 +0000)]
No need for notifyChromeClientWheelEventHandlerCountChanged in Frame
https://bugs.webkit.org/show_bug.cgi?id=120264
Reviewed by Andreas Kling.
* dom/Document.cpp:
(WebCore::Document::createRenderTree): Renamed attach to this.
This made it practical to remove a comment that says the same thing and
also helps make the purpose of the function considerably more clear,
although the relationship to the attached and detach functions is now
less clear; should fix that soon.
(WebCore::pageWheelEventHandlerCountChanged): Added. Contains the code
from Frame::notifyChromeClientWheelEventHandlerCountChanged, minus some
assertions that were only needed because the function was passed a frame
rather than a page.
(WebCore::Document::didBecomeCurrentDocumentInFrame): Added. Contains
most of the code from Frame::setDocument. Looking at before and after,
we can see that most of the work is within the document class and matches
up with other code already in this class. Added FIXMEs about many problems
spotted in the code.
(WebCore::Document::topDocument): Added FIXME and tweaked formatting.
(WebCore::wheelEventHandlerCountChanged): Moved the call to the
pageWheelEventHandlerCountChanged in here from the two call sites.
Also added a FIXME.
(WebCore::Document::didAddWheelEventHandler): Removed the call to
notifyChromeClientWheelEventHandlerCountChanged, since that's now handled
inside wheelEventHandlerCountChanged.
(WebCore::Document::didRemoveWheelEventHandler): Ditto.
* dom/Document.h: Renamed attach to createRenderTree, made it private,
and added a new didBecomeCurrentDocumentInFrame function.
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::createRenderTree): Renamed from attach.
* loader/PlaceholderDocument.h: Did the rename and made the function a
private override.
* page/Frame.cpp:
(WebCore::Frame::setDocument): Moved most of this function out of here
into the new Document::didBecomeCurrentDocumentInFrame function.
Also deleted notifyChromeClientWheelEventHandlerCountChanged.
* page/Frame.h: Deleted notifyChromeClientWheelEventHandlerCountChanged.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154573
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 09:51:42 +0000 (09:51 +0000)]
No need for dispatchVisibilityStateChangeEvent function
https://bugs.webkit.org/show_bug.cgi?id=120261
Reviewed by Andreas Kling.
* dom/Document.cpp: Removed dispatchVisibilityStateChangeEvent.
* dom/Document.h: Ditto.
* page/Frame.cpp: Ditto.
* page/Frame.h: Ditto.
* page/Page.cpp:
(WebCore::Page::setVisibilityState): Put all the logic for dispatching the
visibility state change event. Nothing here requires any special information
about the internals of Frame or Document.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154572
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 09:33:29 +0000 (09:33 +0000)]
No need for clearTimers function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120265
Reviewed by Andreas Kling.
* history/CachedFrame.cpp:
(WebCore::clearTimers): Added. Moved here from Frame.
(WebCore::CachedFrame::CachedFrame): Call above function.
(WebCore::CachedFrame::destroy): Ditto.
* page/Frame.cpp: Removed the two clearTimers functions.
* page/Frame.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154571
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sun, 25 Aug 2013 09:27:30 +0000 (09:27 +0000)]
[gdb] Remove the pretty printer for KURLGooglePrivate
https://bugs.webkit.org/show_bug.cgi?id=120263
Reviewed by Benjamin Poulain.
Remove the pretty printer for the WebCore::KURLGooglePrivate structure that
was usable inside the gdb debugger. The structure was remove from the codebase
along with the GoogleURL backend for KURL.
* gdb/webkit.py:
(JSCJSStringPrinter.to_string):
(add_pretty_printers):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154570
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sun, 25 Aug 2013 08:02:51 +0000 (08:02 +0000)]
FloatTypedArrayAdaptor::toJSValue should almost certainly not use jsNumber() since that attempts int conversions
https://bugs.webkit.org/show_bug.cgi?id=120228
Source/JavaScriptCore:
Reviewed by Oliver Hunt.
It turns out that there were three problems:
- Using jsNumber() meant that we were converting doubles to integers and then
possibly back again whenever doing a set() between floating point arrays.
- Slow-path accesses to double typed arrays were slower than necessary because
of the to-int conversion attempt.
- The use of JSValue as an intermediate for converting between differen types
in typedArray.set() resulted in worse code than I had previously expected.
This patch solves the problem by using template double-dispatch to ensure that
that C++ compiler sees the simplest possible combination of casts between any
combination of typed array types, while still preserving JS and typed array
conversion semantics. Conversions are done as follows:
SourceAdaptor::convertTo<TargetAdaptor>(value)
Internally, convertTo() calls one of three possible methods on TargetAdaptor,
with one method for each of int32_t, uint32_t, and double. This means that the
C++ compiler will at worst see a widening cast to one of those types followed
by a narrowing conversion (not necessarily a cast - may have clamping or the
JS toInt32() function).
This change doesn't just affect typedArray.set(); it also affects slow-path
accesses to typed arrays as well. This patch also adds a bunch of new test
coverage.
This change is a ~50% speed-up on typedArray.set() involving floating point
types.
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/GenericTypedArrayView.h:
(JSC::GenericTypedArrayView::set):
* runtime/JSDataViewPrototype.cpp:
(JSC::setData):
* runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):
(JSC::JSGenericTypedArrayView::setIndexQuickly):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::setWithSpecificType):
(JSC::::set):
* runtime/ToNativeFromValue.h: Added.
(JSC::toNativeFromValue):
* runtime/TypedArrayAdaptors.h:
(JSC::IntegralTypedArrayAdaptor::toJSValue):
(JSC::IntegralTypedArrayAdaptor::toDouble):
(JSC::IntegralTypedArrayAdaptor::toNativeFromInt32):
(JSC::IntegralTypedArrayAdaptor::toNativeFromUint32):
(JSC::IntegralTypedArrayAdaptor::toNativeFromDouble):
(JSC::IntegralTypedArrayAdaptor::convertTo):
(JSC::FloatTypedArrayAdaptor::toJSValue):
(JSC::FloatTypedArrayAdaptor::toDouble):
(JSC::FloatTypedArrayAdaptor::toNativeFromInt32):
(JSC::FloatTypedArrayAdaptor::toNativeFromUint32):
(JSC::FloatTypedArrayAdaptor::toNativeFromDouble):
(JSC::FloatTypedArrayAdaptor::convertTo):
(JSC::Uint8ClampedAdaptor::toJSValue):
(JSC::Uint8ClampedAdaptor::toDouble):
(JSC::Uint8ClampedAdaptor::toNativeFromInt32):
(JSC::Uint8ClampedAdaptor::toNativeFromUint32):
(JSC::Uint8ClampedAdaptor::toNativeFromDouble):
(JSC::Uint8ClampedAdaptor::convertTo):
LayoutTests:
Reviewed by Oliver Hunt.
Add coverage for three things:
- Typed array accesses with corner-case values.
- Typed array set() (i.e. copy) between arrays of different types.
- Performance of typedArray.set() involving different types.
This required some changes to our test harnesses, since they previously
couldn't consistently do numerical array comparisons in a reliable way.
* fast/js/regress/Float32Array-to-Float64Array-set-expected.txt: Added.
* fast/js/regress/Float32Array-to-Float64Array-set.html: Added.
* fast/js/regress/Float64Array-to-Int16Array-set-expected.txt: Added.
* fast/js/regress/Float64Array-to-Int16Array-set.html: Added.
* fast/js/regress/Int16Array-to-Int32Array-set-expected.txt: Added.
* fast/js/regress/Int16Array-to-Int32Array-set.html: Added.
* fast/js/regress/script-tests/Float32Array-to-Float64Array-set.js: Added.
* fast/js/regress/script-tests/Float64Array-to-Int16Array-set.js: Added.
* fast/js/regress/script-tests/Int16Array-to-Int32Array-set.js: Added.
* fast/js/resources/js-test-pre.js:
(areNumbersEqual):
(areArraysEqual):
(isResultCorrect):
* fast/js/resources/standalone-pre.js:
(areNumbersEqual):
(areArraysEqual):
(isTypedArray):
(isResultCorrect):
(stringify):
(shouldBe):
* fast/js/script-tests/typed-array-access.js: Added.
(bitsToString):
(bitsToValue):
(valueToBits):
(roundTrip):
* fast/js/script-tests/typed-array-set-different-types.js: Added.
(MyRandom):
(.reference):
(.usingConstruct):
* fast/js/typed-array-access-expected.txt: Added.
* fast/js/typed-array-access.html: Added.
* fast/js/typed-array-set-different-types-expected.txt: Added.
* fast/js/typed-array-set-different-types.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154569
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryuan.choi@samsung.com [Sun, 25 Aug 2013 07:20:47 +0000 (07:20 +0000)]
Unreviewed EFL gardening.
* platform/efl/TestExpectations:
Unskipped some accessibility tests which are already passed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154568
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sun, 25 Aug 2013 07:06:47 +0000 (07:06 +0000)]
Unreviewed GTK build fix after r154565.
* UIProcess/API/gtk/tests/TestInspector.cpp: Include the Vector header.
* UIProcess/API/gtk/tests/TestResources.cpp: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154567
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryuan.choi@samsung.com [Sun, 25 Aug 2013 05:32:14 +0000 (05:32 +0000)]
Unreviewed build fix after r154560
* page/FrameTree.cpp:
(WebCore::FrameTree::scopedChild):
Use tree(). instead of tree()->.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154566
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Sun, 25 Aug 2013 04:39:20 +0000 (04:39 +0000)]
Save three bytes per CStringBuffer object
https://bugs.webkit.org/show_bug.cgi?id=120040
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/
894ae8eafdb64912aefd8f9c809f4ccda84f3b89
sizeof(CStringBuffer) was rounded up to 8 on account of struct size and
alignment rules. This is clearly not what was intended.
* wtf/text/CString.cpp:
(WTF::CStringBuffer::createUninitialized):
* wtf/text/CString.h:
(WTF::CStringBuffer::data):
(WTF::CStringBuffer::mutableData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154565
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Sun, 25 Aug 2013 04:33:16 +0000 (04:33 +0000)]
[Windows] Another attempt to fix the Windows bots. Need to retain older
QuickTime player features for external builders.
* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib32/WebKitSystemInterface.lib:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154564
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sun, 25 Aug 2013 04:20:04 +0000 (04:20 +0000)]
Unreviewed, fix build-webkit --ftl-jit in the case that you have your own llvm directory. We need to
prune 'libgtest' and friends from the llvm build, since WebKit builds its own and none of the llvm
libraries depend on libgtest anyway.
* Scripts/copy-webkitlibraries-to-product-directory:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154563
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Sun, 25 Aug 2013 04:19:43 +0000 (04:19 +0000)]
<https://webkit.org/b/120102> Inline SelectorQuery's execution traits
Reviewed by Sam Weinig.
For some reason, clang does not always inline the trait. The operations are so simple
that it shows up in profile.
Force the inlining to match the original speed.
* dom/SelectorQuery.cpp:
(WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154562
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Sun, 25 Aug 2013 04:17:06 +0000 (04:17 +0000)]
Remove a useless #include from StyledElement
https://bugs.webkit.org/show_bug.cgi?id=120245
Reviewed by Andreas Kling.
* dom/StyledElement.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154561
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 03:41:04 +0000 (03:41 +0000)]
Move Frame::inScope into FrameTree
https://bugs.webkit.org/show_bug.cgi?id=120257
Reviewed by Sam Weinig.
* page/Frame.cpp: Removed inScope.
* page/Frame.h: Ditto.
* page/FrameTree.cpp:
(WebCore::inScope): Moved it here.
(WebCore::FrameTree::scopedChild): Changed to call new function.
(WebCore::FrameTree::scopedChildCount): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154560
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 25 Aug 2013 03:08:24 +0000 (03:08 +0000)]
BUILD FIX: Include HTMLPlugInImageElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
Fixes the following build failure for iOS:
In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:28:
In file included from Source/WebCore/accessibility/AXObjectCache.cpp:42:
In file included from Source/WebCore/accessibility/AccessibilityMediaControls.h:36:
In file included from Source/WebCore/html/shadow/MediaControlElements.h:34:
In file included from Source/WebCore/html/shadow/MediaControlElementTypes.h:37:
Source/WebCore/html/HTMLMediaElement.h:324:23: error: unknown type name 'PluginCreationOption'
void updateWidget(PluginCreationOption);
^
* html/HTMLMediaElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154559
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 02:28:06 +0000 (02:28 +0000)]
Frame::tree should return a reference instead of a pointer
https://bugs.webkit.org/show_bug.cgi?id=120259
Reviewed by Andreas Kling.
Source/WebCore:
* page/Frame.h:
(WebCore::Frame::tree): Return a reference instead of a pointer.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::childFrameGetter):
(WebCore::indexGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::setLocation):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* dom/Document.cpp:
(WebCore::canAccessAncestor):
(WebCore::Document::adoptNode):
(WebCore::Document::canNavigate):
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):
(WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::setDesignMode):
(WebCore::Document::parentDocument):
(WebCore::Document::initSecurityContext):
(WebCore::Document::initContentSecurityPolicy):
(WebCore::Document::requestFullScreenForElement):
(WebCore::Document::webkitExitFullscreen):
(WebCore::Document::didRemoveTouchEventHandler):
* dom/TreeScope.cpp:
(WebCore::focusedFrameOwnerElement):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::hasFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
(WebCore::InspectorCanvasAgent::frameNavigated):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::documents):
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::mainResource):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDecoderIfNeeded):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::allChildrenAreComplete):
(WebCore::FrameLoader::allAncestorsAreComplete):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::outgoingReferrer):
(WebCore::FrameLoader::updateFirstPartyForCookies):
(WebCore::FrameLoader::setFirstPartyForCookies):
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::prepareForCachedPageRestore):
(WebCore::FrameLoader::subframeIsLoading):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::closeAndRemoveChild):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::numPendingOrLoadingRequests):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::findFrameForNavigation):
(WebCore::FrameLoader::effectiveSandboxFlags):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveDocumentState):
(WebCore::HistoryController::saveDocumentAndScrollState):
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItemTree):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
(WebCore::HistoryController::currentFramesMatchItem):
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleFormSubmission):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::isMainLoadProgressing):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::checkInsecureContent):
* loader/icon/IconController.cpp:
(WebCore::IconController::urlsForTypes):
(WebCore::IconController::startLoader):
* page/Chrome.cpp:
(WebCore::canRunModalIfDuringPageDismissal):
(WebCore::Chrome::windowScreenDidChange):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::length):
(WebCore::DOMWindow::name):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::parent):
(WebCore::DOMWindow::top):
(WebCore::DOMWindow::open):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollRecursively):
(WebCore::EventHandler::logicalScrollRecursively):
(WebCore::EventHandler::handleMouseMoveEvent):
* page/FocusController.cpp:
(WebCore::FocusController::setContainingWindowIsVisible):
* page/Frame.cpp:
(WebCore::parentPageZoomFactor):
(WebCore::parentTextZoomFactor):
(WebCore::Frame::setPrinting):
(WebCore::Frame::shouldUsePrintingLayout):
(WebCore::Frame::dispatchVisibilityStateChangeEvent):
(WebCore::Frame::willDetachPage):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::deviceOrPageScaleFactorChanged):
(WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
(WebCore::Frame::isURLAllowed):
* page/FrameTree.cpp:
(WebCore::FrameTree::~FrameTree):
(WebCore::FrameTree::setName):
(WebCore::FrameTree::transferChild):
(WebCore::FrameTree::appendChild):
(WebCore::FrameTree::actuallyAppendChild):
(WebCore::FrameTree::removeChild):
(WebCore::FrameTree::uniqueChildName):
(WebCore::FrameTree::scopedChild):
(WebCore::FrameTree::scopedChildCount):
(WebCore::FrameTree::childCount):
(WebCore::FrameTree::child):
(WebCore::FrameTree::find):
(WebCore::FrameTree::isDescendantOf):
(WebCore::FrameTree::traverseNext):
(WebCore::FrameTree::traversePreviousWithWrap):
(WebCore::FrameTree::deepLastChild):
(WebCore::FrameTree::top):
(printFrames):
(showFrameTree):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::hasCompositedContentIncludingDescendants):
(WebCore::FrameView::hasCompositingAncestor):
(WebCore::FrameView::flushCompositingStateIncludingSubframes):
(WebCore::FrameView::updateCanBlitOnScrollRecursively):
(WebCore::FrameView::setIsOverlapped):
(WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
(WebCore::FrameView::serviceScriptedAnimations):
(WebCore::FrameView::updateBackgroundRecursively):
(WebCore::FrameView::parentFrameView):
(WebCore::FrameView::paintContentsForSnapshot):
(WebCore::FrameView::setTracksRepaints):
(WebCore::FrameView::notifyWidgetsInAllFrames):
* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* page/Page.cpp:
(WebCore::networkStateChanged):
(WebCore::Page::~Page):
(WebCore::Page::renderTreeSize):
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
(WebCore::Page::refreshPlugins):
(WebCore::Page::takeAnyMediaCanStartListener):
(WebCore::incrementFrame):
(WebCore::Page::setDefersLoading):
(WebCore::Page::setMediaVolume):
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore::Page::didMoveOnscreen):
(WebCore::Page::willMoveOffscreen):
(WebCore::Page::setIsInWindow):
(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):
(WebCore::Page::userStyleSheetLocationChanged):
(WebCore::Page::allVisitedStateChanged):
(WebCore::Page::visitedStateChanged):
(WebCore::Page::setDebugger):
(WebCore::Page::setMemoryCacheClientCallsEnabled):
(WebCore::Page::setMinimumTimerInterval):
(WebCore::Page::setTimerAlignmentInterval):
(WebCore::Page::dnsPrefetchingStateChanged):
(WebCore::Page::collectPluginViews):
(WebCore::Page::storageBlockingStateChanged):
(WebCore::Page::privateBrowsingStateChanged):
(WebCore::Page::checkSubframeCountConsistency):
(WebCore::Page::suspendActiveDOMObjectsAndAnimations):
(WebCore::Page::resumeActiveDOMObjectsAndAnimations):
(WebCore::Page::captionPreferencesChanged):
* page/PageGroup.cpp:
(WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* page/PageThrottler.cpp:
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
* page/Settings.cpp:
(WebCore::setImageLoadingSettings):
(WebCore::Settings::setTextAutosizingFontScaleFactor):
* page/SpatialNavigation.cpp:
(WebCore::rectToAbsoluteCoordinates):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::suspendAnimations):
(WebCore::AnimationControllerPrivate::resumeAnimations):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
* plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
(WebCore::PluginView::load):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::targetFrame):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentScale):
(WebCore::SVGSVGElement::setCurrentScale):
* testing/Internals.cpp:
(WebCore::Internals::formControlStateOfPreviousHistoryItem):
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
(WebCore::Internals::numberOfScrollableAreas):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
Use tree(). instead of tree()->.
Source/WebKit/blackberry:
* Api/WebPage.cpp:
(BlackBerry::WebKit::closeURLRecursively):
(BlackBerry::WebKit::enableCrossSiteXHRRecursively):
(BlackBerry::WebKit::WebPagePrivate::setScreenOrientation):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::createFrame):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::convertPointToFrame):
(BlackBerry::WebKit::DOMSupport::incrementFrame):
Use tree(). instead of tree()->.
Source/WebKit/efl:
* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::clearFrameName):
(DumpRenderTreeSupportEfl::frameChildren):
(DumpRenderTreeSupportEfl::frameParent):
* ewk/ewk_frame.cpp:
(_ewk_frame_children_iterator_next):
(ewk_frame_child_find):
(ewk_frame_name_get):
(ewk_frame_child_add):
* ewk/ewk_view.cpp:
(ewk_view_frame_create):
Use tree(). instead of tree()->.
Source/WebKit/gtk:
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::getFrameChildren):
(DumpRenderTreeSupportGtk::clearMainFrameName):
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::createFrame):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_get_name):
(webkit_web_frame_get_parent):
(webkit_web_frame_find_frame):
* webkit/webkitwebview.cpp:
(webkit_web_view_set_highlight_text_matches):
Use tree(). instead of tree()->.
Source/WebKit/mac:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::performRequest):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView loadPluginRequest:]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(applyAppleDictionaryApplicationQuirkNonInlinePart):
(WebFrameLoaderClient::prepareForDataSourceReplacement):
(WebFrameLoaderClient::createFrame):
* WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
(-[WebFrame _unmarkAllBadGrammar]):
(-[WebFrame _unmarkAllMisspellings]):
(-[WebFrame _atMostOneFrameHasSelection]):
(-[WebFrame _findFrameWithSelection]):
(-[WebFrame _drawRect:contentsOnly:]):
(-[WebFrame _isDescendantOfFrame:]):
(-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
(-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
(-[WebFrame name]):
(-[WebFrame findFrameNamed:]):
(-[WebFrame parentFrame]):
(-[WebFrame childFrames]):
* WebView/WebView.mm:
(-[WebView _attachScriptDebuggerToAllFrames]):
(-[WebView _detachScriptDebuggerFromAllFrames]):
(-[WebView _clearMainFrameName]):
(-[WebView _isUsingAcceleratedCompositing]):
(-[WebView _isSoftwareRenderable]):
(-[WebView setHostWindow:]):
(incrementFrame):
Use tree(). instead of tree()->.
Source/WebKit/qt:
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::clearFrameName):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(drtDescriptionSuitableForTestResult):
(WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
(WebCore::FrameLoaderClientQt::dispatchDidFinishDocumentLoad):
(WebCore::FrameLoaderClientQt::postProgressStartedNotification):
(WebCore::FrameLoaderClientQt::didPerformFirstNavigation):
(WebCore::FrameLoaderClientQt::createFrame):
* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameData::QWebFrameData):
(QWebFrameAdapter::load):
(QWebFrameAdapter::uniqueName):
(QWebFrameAdapter::childFrames):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::findText):
Use tree(). instead of tree()->.
Source/WebKit/win:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::createFrame):
* WebFrame.cpp:
(WebFrame::name):
(WebFrame::findFrameNamed):
(WebFrame::parentFrame):
(EnumChildFrames::EnumChildFrames):
(EnumChildFrames::Next):
(EnumChildFrames::Skip):
(EnumChildFrames::Reset):
(WebFrame::isDescendantOfFrame):
(WebFrame::unmarkAllMisspellings):
(WebFrame::unmarkAllBadGrammar):
* WebView.cpp:
(WebView::initWithFrame):
(incrementFrame):
(WebView::clearMainFrameName):
Use tree(). instead of tree()->.
Source/WebKit/wince:
* WebView.cpp:
(WebView::createFrame):
Use tree(). instead of tree()->.
Source/WebKit2:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest):
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createFrame):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::searchWithSpotlight):
* WebProcess/WebPage/FindController.cpp:
(WebKit::frameWithSelection):
(WebKit::FindController::rectsForTextMatches):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::init):
(WebKit::WebFrame::contentsAsString):
(WebKit::WebFrame::name):
(WebKit::WebFrame::childFrames):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::clearMainFrameName):
(WebKit::WebPage::setDrawsBackground):
(WebKit::WebPage::setDrawsTransparentBackground):
(WebKit::WebPage::setWindowResizerSize):
(WebKit::frameWithSelection):
(WebKit::WebPage::unmarkAllMisspellings):
(WebKit::WebPage::unmarkAllBadGrammar):
(WebKit::pageContainsAnyHorizontalScrollbars):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
Use tree(). instead of tree()->.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154558
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sun, 25 Aug 2013 01:53:55 +0000 (01:53 +0000)]
[mac] link against libz in a more civilized manner
https://bugs.webkit.org/show_bug.cgi?id=120258
Reviewed by Darin Adler.
* Configurations/JavaScriptCore.xcconfig: Removed “-lz” from OTHER_LDFLAGS_BASE.
* JavaScriptCore.xcodeproj/project.pbxproj: Added libz.dylib to the JavaScriptCore target’s
Link Binary With Libraries build phase.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154557
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 25 Aug 2013 00:07:47 +0000 (00:07 +0000)]
Merge Document::viewportSize() logic into RenderView::viewportSize().
<https://webkit.org/b/120254>
Reviewed by Darin Adler.
RenderView can just ask FrameView (the viewport) about its size directly, no need for
a weirdly-placed method on Document.
* dom/Document.cpp:
* rendering/RenderView.cpp:
(WebCore::RenderView::viewportSize):
* rendering/RenderView.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154556
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sat, 24 Aug 2013 23:40:49 +0000 (23:40 +0000)]
RetainPtr lacks move constructor for case when argument is a RetainPtr of a different type
https://bugs.webkit.org/show_bug.cgi?id=120255
Reviewed by Andreas Kling.
Source/WTF:
* wtf/RetainPtr.h: Added missing move constructor, modeled on the other move constructor,
and the one from RetPtr.
Tools:
* TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: Added four tests covering move assignment and construction.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154555
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 24 Aug 2013 22:50:46 +0000 (22:50 +0000)]
RenderObject::frame() should return a reference.
<https://webkit.org/b/120251>
Reviewed by Darin Adler.
There is now always a Frame, and we can get to it by walking this path:
RenderObject -> Document -> RenderView -> FrameView -> Frame
Removed the customary horde of null checks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154554
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Sat, 24 Aug 2013 20:32:41 +0000 (20:32 +0000)]
Make the world build.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154553
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Sat, 24 Aug 2013 20:07:17 +0000 (20:07 +0000)]
REGRESSION(r154498): Crashes on EFL, GTK, Qt on release configurations
https://bugs.webkit.org/show_bug.cgi?id=120246
Reviewed by Antti Koivisto.
Undestroy all the platforms that don't use the global new overload
* wtf/Compression.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154552
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sat, 24 Aug 2013 20:04:11 +0000 (20:04 +0000)]
Unreviewed, rolling out r154545.
http://trac.webkit.org/changeset/154545
https://bugs.webkit.org/show_bug.cgi?id=120252
Broke WebKit2 API tests (Requested by andersca on #webkit).
* GNUmakefile.list.am:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebExtensions.cpp:
(beforeAll):
* UIProcess/API/gtk/tests/WebExtensionTest.cpp:
(methodCallCallback):
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
(webkit_frame_get_javascript_global_context):
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Removed.
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Removed.
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Removed.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageCreate):
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154551
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Sat, 24 Aug 2013 18:58:36 +0000 (18:58 +0000)]
Web Inspector: Breakpoints in the editors gutter should have a contextmenu
https://bugs.webkit.org/show_bug.cgi?id=120169
Reviewed by Timothy Hatcher.
Updated CodeMirror now has a gutterContextMenu event. Use that to give
breakpoint related context menus. Add, Edit, Enable/Disable, Delete, and
Reveal in Debugger Navigation Sidebar.
* Localizations/en.lproj/localizedStrings.js:
"Add Breakpoint", and "Reveal in Debugger Navigation Sidebar".
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
Show a context menu when clicking on the gutter for 0 breakpoints,
1 breakpoint, or >1 breakpoints. The only tricky handler is addBreakpoint,
since that must update the TextEditor for the new breakpoint info.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype._gutterContextMenu):
Send to delegate if the delegate implements textEditorGutterContextMenu.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154550
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 24 Aug 2013 18:27:32 +0000 (18:27 +0000)]
RenderLayer::compositor() should return a reference.
<https://webkit.org/b/120250>
Reviewed by Anders Carlsson.
It was already converting from a reference to a pointer.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154549
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sat, 24 Aug 2013 17:55:44 +0000 (17:55 +0000)]
Eliminate a useless comparison in srcset's candidate selection algorithm
https://bugs.webkit.org/show_bug.cgi?id=120235
Source/WebCore:
There is no point in comparing the last item in the candidates vector to the DPR, since it will be returned anyway. Therefore, the
iteration on the candidates vector now skips the last candidate.
Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-24
Reviewed by Andreas Kling.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):
LayoutTests:
Removed MIME types from the test's output, since they're irrelevant for the test, and make it fragile.
Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-24
Reviewed by Andreas Kling.
* fast/hidpi/image-srcset-fraction-expected.txt:
* fast/hidpi/image-srcset-fraction.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154548
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 24 Aug 2013 16:39:53 +0000 (16:39 +0000)]
Don't treat NSLocalizedDescriptionKey and NSLocalizedRecoverySuggestionErrorKey as NSLocalized macros
https://bugs.webkit.org/show_bug.cgi?id=120249
Reviewed by Andreas Kling.
* Scripts/extract-localizable-strings:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154547
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 24 Aug 2013 16:33:15 +0000 (16:33 +0000)]
RenderObject::view() should return a reference.
<https://webkit.org/b/120247>
Reviewed by Antti Koivisto.
Now that the lifetime and accessibility characteristics of RenderView are well-defined,
we can make RenderObject::view() return a reference, exposing a plethora of unnecessary
null checks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154546
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Sat, 24 Aug 2013 12:02:04 +0000 (12:02 +0000)]
[GTK] Add WebKit2 API for isolated worlds
https://bugs.webkit.org/show_bug.cgi?id=103377
Reviewed by Anders Carlsson.
* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestWebExtensions.cpp:
(testWebExtensionWindowObjectCleared):
(scriptDialogCallback):
(runJavaScriptInIsolatedWorldFinishedCallback):
(testWebExtensionIsolatedWorld):
(beforeAll):
* UIProcess/API/gtk/tests/WebExtensionTest.cpp:
(echoCallback):
(windowObjectCleared):
(getWebPage):
(methodCallCallback):
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
(webkit_frame_get_javascript_context_for_script_world): New public
method to tget the JavaScript execution context for a given script
world.
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Added.
(scriptWorlds): Global WebKitScriptWorld map.
(_WebKitScriptWorldPrivate::~_WebKitScriptWorldPrivate):
(webkitScriptWorldGet): Get the WebKitScriptWorld wrapping the
given injected bundle script world.
(webkitScriptWorldGetInjectedBundleScriptWorld): Get the injected
bundle script world wrapped by the given WebKitScriptWorld.
(webkitScriptWorldWindowObjectCleared): Emit
WebKitScriptWorld::window-object-cleared signal.
(webkitScriptWorldCreate): Create a new WebKitScriptWorld wrapping
the given injected bundle script world.
(createDefaultScriptWorld): Create the default WebKitScriptWorld
wrapping the normal world.
(webkit_script_world_get_default): Return the default WebKitScriptWorld.
(webkit_script_world_new): Create a new isolated WebKitScriptWorld.
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(didClearWindowObjectForFrame): Call webkitScriptWorldWindowObjectCleared().
(webkitWebPageCreate): Add implementation for callback
didClearWindowObjectForFrame in injected bundle loader client.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
Include WebKitScriptWorld.h.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154545
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Sat, 24 Aug 2013 11:54:54 +0000 (11:54 +0000)]
Unreviewed. Fix GTK+ build after r154541.
* Source/autotools/symbols.filter: Export symbols required by
libWebCoreInternal.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154544
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sat, 24 Aug 2013 11:24:10 +0000 (11:24 +0000)]
Web Inspector: Cleanup Inspector Agents a bit
https://bugs.webkit.org/show_bug.cgi?id=120218
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-08-24
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/
8693dcb8ba42a5c225f516c664fb0f453c8ba6f0.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::elementForId):
* inspector/InspectorStyleSheet.cpp:
(ParsedStyleSheet::ParsedStyleSheet):
(WebCore::InspectorStyle::setPropertyText):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::InspectorStyleSheet::inlineStyleSheetText):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154543
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 24 Aug 2013 11:21:22 +0000 (11:21 +0000)]
Let Document keep its RenderView during render tree detach.
<https://webkit.org/b/120233>
Reviewed by Antti Koivisto.
Instead of having "Document::renderer() == NULL" signify that the render tree is being
torn down, give Document an explicit flag for this instead.
This way, we can keep Document's RenderView in place during tree detach.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::detach):
* dom/Document.h:
(WebCore::Document::renderTreeBeingDestroyed):
* rendering/RenderObject.h:
(WebCore::RenderObject::documentBeingDestroyed):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154542
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Sat, 24 Aug 2013 11:09:26 +0000 (11:09 +0000)]
Tighten before/after pseudo element accessors
https://bugs.webkit.org/show_bug.cgi?id=120204
Reviewed by Andreas Kling.
We have generic looking Element::pseudoElement(PseudoID) which only returns before/after pseudo elements.
Switch to Element::before/afterPseudoElement(), similarly for setters.
* WebCore.exp.in:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::styledNode):
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::beforeOrAfterPseudeoElement):
(WebCore::Element::computedStyle):
(WebCore::Element::updatePseudoElement):
(WebCore::Element::createPseudoElementIfNeeded):
(WebCore::Element::updateBeforePseudoElement):
(WebCore::Element::updateAfterPseudoElement):
(WebCore::Element::beforePseudoElement):
(WebCore::Element::afterPseudoElement):
(WebCore::Element::setBeforePseudoElement):
(WebCore::Element::setAfterPseudoElement):
(WebCore::disconnectPseudoElement):
(WebCore::Element::clearBeforePseudoElement):
(WebCore::Element::clearAfterPseudoElement):
(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::beforePseudoElement):
(WebCore::ElementRareData::afterPseudoElement):
(WebCore::ElementRareData::hasPseudoElements):
(WebCore::ElementRareData::~ElementRareData):
(WebCore::ElementRareData::clearBeforePseudoElement):
(WebCore::ElementRareData::clearAfterPseudoElement):
(WebCore::ElementRareData::setBeforePseudoElement):
(WebCore::ElementRareData::setAfterPseudoElement):
Move detach logic to Element. ElementRareData should not implement semantics.
* dom/Node.cpp:
(WebCore::Node::pseudoAwarePreviousSibling):
(WebCore::Node::pseudoAwareNextSibling):
(WebCore::Node::pseudoAwareFirstChild):
(WebCore::Node::pseudoAwareLastChild):
* dom/NodeRenderingTraversal.cpp:
(WebCore::NodeRenderingTraversal::nextSiblingSlow):
(WebCore::NodeRenderingTraversal::previousSiblingSlow):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeCounterValuesFromChildren):
(WebCore::counterValueForElement):
* style/StyleResolveTree.cpp:
(WebCore::Style::attachRenderTree):
(WebCore::Style::resolveTree):
* testing/Internals.cpp:
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154541
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Sat, 24 Aug 2013 08:44:44 +0000 (08:44 +0000)]
[GTK] Expose WebKitFrame in WebKit2GTK+ web extensions API
https://bugs.webkit.org/show_bug.cgi?id=119743
Reviewed by Anders Carlsson.
Source/WebKit2:
* GNUmakefile.list.am: Add new files to compilation.
* Shared/APIClientTraits.cpp: Update for new interface version.
* Shared/APIClientTraits.h: Ditto.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add WebKitFrame
section.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new public
symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_frame_get_type.
* UIProcess/API/gtk/tests/FrameTest.cpp: Added.
(WebKitFrameTest::create):
(WebKitFrameTest::webPageFromArgs):
(WebKitFrameTest::testMainFrame):
(WebKitFrameTest::testURI):
(WebKitFrameTest::testJavaScriptContext):
(WebKitFrameTest::runTest):
(registerTests):
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new test files.
* UIProcess/API/gtk/tests/TestFrame.cpp: Added.
(webkitFrameTestRun):
(testWebKitFrameMainFrame):
(testWebKitFrameURI):
(testWebKitFrameJavaScriptContext):
(beforeAll):
(afterAll):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add
willDestroyFrame callback to the injected bundle loader client, to
notify the client when a frame is about to be destroyed.
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Added.
(webkit_frame_class_init):
(webkitFrameCreate):
(webkit_frame_is_main_frame):
(webkit_frame_get_uri):
(webkit_frame_get_javascript_global_context):
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitFrameGetOrCreate): Helper function to create a WebKitFrame
wrapping the given WebFrame or returning the wrapper if it already
exists.
(willDestroyFrame): Remove the WebKitFrame wrapping the given
WebFrame if it exists.
(webkitWebPageCreate): Add willDestroyFrame implementation to
injected bundle loader client.
(webkit_web_page_get_main_frame): Return the main frame of the
page.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
Include WebKitFrame.h.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): New
callback to be called when a frame is about to be destroyed.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::frameLoaderDestroyed): Call
willDestroyFrame callback of injected bundle loader client.
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): Add
willDestroyFrame callback.
Tools:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage): Add
willDestroyFrame.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154540
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Sat, 24 Aug 2013 07:41:52 +0000 (07:41 +0000)]
Revert accidental change.
Not reviewed.
* WebProcess/com.apple.WebProcess.sb.in:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154539
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrowe@apple.com [Sat, 24 Aug 2013 04:07:20 +0000 (04:07 +0000)]
<https://webkit.org/b/120141> Make RetainPtr work with ARC.
Have RetainPtr store the object its managing as a CFTypeRef and manage its lifetime with
CFRetain / CFRelease. This is necessary to have explicit control over the lifetime of
Objective-C objects when automatic reference counting is in use. Two helper methods are
introduced to convert between the pointer type that the RetainPtr manages and the CFTypeRef
that the pointer is stored as. For CF types and Objective-C types with ARC disabled,
these methods are simply casts. For Objective-C types under ARC they need to use the
special bridging casts to keep the compiler happy.
Reviewed by Anders Carlsson.
* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr): Use the helper methods to convert to and from the storage
types when necessary.
(WTF::RetainPtr::~RetainPtr): Ditto.
(WTF::RetainPtr::get): Ditto.
(WTF::RetainPtr::operator->): Ditto.
(WTF::RetainPtr::operator PtrType): Ditto.
(WTF::::RetainPtr): Ditto.
(WTF::::clear): Ditto.
(WTF::::leakRef): Ditto.
(WTF::=): Ditto.
(WTF::RetainPtr::fromStorageTypeHelper): Use crazy template magic to determine whether to use
a bridging cast or not depending on the desired return type.
(WTF::RetainPtr::fromStorageType):
(WTF::RetainPtr::toStorageType): Overloading is sufficient here.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154538
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrowe@apple.com [Sat, 24 Aug 2013 04:07:07 +0000 (04:07 +0000)]
Revert r153637.
It didn't work with ARC like it said it would. We'll need to take a slightly different approach.
Rubber-stamped by Anders Carlsson.
* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr):
(WTF::RetainPtr::~RetainPtr):
(WTF::RetainPtr::operator UnspecifiedBoolType):
(WTF::::RetainPtr):
(WTF::::clear):
(WTF::=):
(WTF::adoptCF):
(WTF::adoptNS):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154537
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Sat, 24 Aug 2013 00:30:38 +0000 (00:30 +0000)]
[Windows] Forgot to check in the header as well!
* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154536
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Sat, 24 Aug 2013 00:30:00 +0000 (00:30 +0000)]
Improve scrolling behavior in iTunes
https://bugs.webkit.org/show_bug.cgi?id=120241
<rdar://problem/
14825344>
Reviewed by Sam Weinig.
When vertically scrolling a page with horizontally scrollable overflow areas,
vertical scroll gestures would be interrupted when wheel events with non-zero
X deltas were intercepted by the overflow areas.
Fix by storing a small history of wheel events deltas and using
it to determine of the scroll gesture is primarily vertical or horizontal.
When this is detected, avoid dispatching scroll events on the on the
non-dominant axis.
Currently this behavior is conditionalized to only apply in iTunes.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::recordWheelEventDelta):
(WebCore::deltaIsPredominantlyVertical):
(WebCore::EventHandler::dominantScrollGestureDirection):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::defaultWheelEventHandler):
* page/EventHandler.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsITunes):
* platform/RuntimeApplicationChecks.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154535
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Sat, 24 Aug 2013 00:28:19 +0000 (00:28 +0000)]
[Windows] Unreviewed build correction.
* win/lib32/WebKitSystemInterface.lib: Update with new API for r132545.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154534
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
psolanki@apple.com [Sat, 24 Aug 2013 00:13:49 +0000 (00:13 +0000)]
MediaQuery::expressions() should return a reference
<https://webkit.org/b/120215>
Reviewed by Anders Carlsson.
m_expressions is never NULL so we can just return a reference.
* css/MediaList.cpp:
(WebCore::reportMediaQueryWarningIfNeeded):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* css/MediaQuery.h:
(WebCore::MediaQuery::expressions):
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::eval):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154533
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Fri, 23 Aug 2013 23:57:01 +0000 (23:57 +0000)]
Build fix after r154515.
* dom/ElementTraversal.h:
(WebCore::Traversal<ElementType>::firstChild):
(WebCore::Traversal<ElementType>::lastChild):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154532
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Fri, 23 Aug 2013 23:19:21 +0000 (23:19 +0000)]
Simplify some Settings access where we have a Frame in reach.
<http://webkit.org/b/120239>
Reviewed by Anders Carlsson.
In three cases where we can grab at a Frame, we can reach all the way to some Settings
without having to use pointers.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMap):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154531
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Fri, 23 Aug 2013 23:15:03 +0000 (23:15 +0000)]
Rebaseline after r154518. Also fix the test to expect "0" instead of "-0".
Reviewed by Gavin Barraclough.
* fast/js/dfg-div-by-neg1-and-then-or-zero-interesting-reg-alloc-expected.txt:
* fast/js/script-tests/dfg-div-by-neg1-and-then-or-zero-interesting-reg-alloc.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154530
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Fri, 23 Aug 2013 23:00:38 +0000 (23:00 +0000)]
REGRESSION (r150516): Media controls are messed up on right-to-left webpages
https://bugs.webkit.org/show_bug.cgi?id=120234
Reviewed by Dan Bernstein.
Source/WebCore:
Test: media/video-rtl.html
Make the media control panel explicitly direction:ltr. The captions menu and captions
display are unaffected, so rtl content will continue to appear rtl there.
* css/mediaControls.css:
(audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
LayoutTests:
* media/video-rtl-expected.html: Added.
* media/video-rtl.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154529
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bdakin@apple.com [Fri, 23 Aug 2013 22:57:07 +0000 (22:57 +0000)]
REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in
Adobe Reader
https://bugs.webkit.org/show_bug.cgi?id=120240
-and corresponding-
<rdar://problem/
14634453>
Reviewed by Anders Carlsson.
Source/WebCore:
This patch makes it so that we don’t use the infinite rect for the PDF context,
and it adds WebCoreSystemInterface API to find out if the current content is the
PDF context.
* WebCore.exp.in:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::clipOut):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Source/WebKit/mac:
Hook up new WebSystemInterface API to find out if the current context is the PDF
context.
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Source/WebKit2:
Hook up new WebSystemInterface API to find out if the current context is the PDF
context.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
WebKitLibraries:
* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154528
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Fri, 23 Aug 2013 22:44:15 +0000 (22:44 +0000)]
[Mac] some track language tags are not recognized
https://bugs.webkit.org/show_bug.cgi?id=119643
Source/WebCore:
Reviewed by Jere Noble.
No new tests, existing tests updated.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode from settings
if possible.
(WebCore::HTMLMediaElement::configureTextTrackGroup): Don't enable a default track when preferences
say captions should be disabled. Don't disable an already visible track if we don't find
a match unless preferences say captions should be disabled. m_forcedOrAutomaticSubtitleTrackLanguage ->
m_subtitleTrackLanguage.
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): If the language of the primary
audio track changes, only kick off a text track recalc if caption preference are set to "automatic".
* html/HTMLMediaElement.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Initialize m_characteristicsChanged
and m_delayCharacteristicsChangedNotification.
(WebCore::MediaPlayerPrivateAVFoundation::setHasVideo): Call characteristicsChanged.
(WebCore::MediaPlayerPrivateAVFoundation::setHasAudio): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::setHasClosedCaptions): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::characteristicsChanged): New, allows us to coalesce
calls to the media player when we know several characteristics may change.
(WebCore::MediaPlayerPrivateAVFoundation::setDelayCharacteristicsChangedNotification): Enable or
disable notification delay.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
a track may have changed so we may have a new language.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
QuickTime language code.
LayoutTests:
Reviewed by Jer Noble.
Explicitly set caption mode to "Automatic" so the track 'default' attribute works.
* media/track/text-track-cue-is-reachable.html:
* media/track/text-track-is-reachable.html:
* media/track/track-active-cues.html:
* media/track/track-cue-overlap-snap-to-lines-not-set.html:
* media/track/track-cue-rendering-horizontal.html:
* media/track/track-cue-rendering-vertical.html:
* media/track/track-kind.html:
* media/track/track-large-timestamp.html:
* media/track/track-mode.html:
* media/track/track-text-track-cue-list.html:
* media/track/track-webvtt-tc000-empty.html:
* media/track/track-webvtt-tc002-bom.html:
* media/track/track-webvtt-tc010-no-timings.html:
* media/track/track-webvtt-tc027-empty-cue.html:
* media/track/track-webvtt-tc028-unsupported-markup.html:
* media/track/track-word-breaking.html:
* media/video-test.js:
(setCaptionDisplayMode):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154527
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Fri, 23 Aug 2013 22:35:35 +0000 (22:35 +0000)]
[Windows] Unreviewed build correction. Need to force environment variable
to be escaped when running nmake command.
* WebCore.vcxproj/WebCoreGenerated.make:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154526
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Fri, 23 Aug 2013 22:00:06 +0000 (22:00 +0000)]
Use ElementTraversal some more
https://bugs.webkit.org/show_bug.cgi?id=120226
Reviewed by Darin Adler.
More traversal with tighter typing.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
(WebCore::siblingWithAriaRole):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* dom/ContainerNode.cpp:
(WebCore::willRemoveChild):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
(WebCore::ChildFrameDisconnector::collectFrameOwners):
(WebCore::ChildFrameDisconnector::disconnect):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::textTrackModeChanged):
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
(WebCore::HTMLObjectElement::containsJavaApplet):
* html/HTMLParamElement.h:
(WebCore::isHTMLParamElement):
(WebCore::HTMLParamElement):
* html/HTMLSourceElement.h:
(WebCore::isHTMLSourceElement):
(WebCore::HTMLSourceElement):
* svg/SVGFontFaceElement.h:
(WebCore::isSVGFontFaceElement):
(WebCore::SVGFontFaceElement):
(WebCore::toSVGFontFaceElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154525
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 23 Aug 2013 21:58:17 +0000 (21:58 +0000)]
Web Inspector: Fix js minification of updated CodeMirror
https://bugs.webkit.org/show_bug.cgi?id=120231
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-08-23
Reviewed by Andy Estes.
Workaround a jsmin issue with "return //.test();" lines when
minifying JavaScript in production builds.
* Scripts/copy-user-interface-resources.sh:
* UserInterface/External/CodeMirror/codemirror.js:
(window.CodeMirror):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154524
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 23 Aug 2013 20:50:01 +0000 (20:50 +0000)]
Failure building with python3
https://bugs.webkit.org/show_bug.cgi?id=106645
Patch by Laszlo Papp <lpapp@kde.org> on 2013-08-23
Reviewed by Benjamin Poulain.
Use print functions instead of python statements to be compatible with python 3.X and 2.7 as well.
Archlinux has been using python3 and that is what causes issues while packaging QtWebKit along with Qt5.
* disassembler/udis86/itab.py:
(UdItabGenerator.genInsnTable):
* disassembler/udis86/ud_opcode.py:
(UdOpcodeTables.print_table):
* disassembler/udis86/ud_optable.py:
(UdOptableXmlParser.parseDef):
(UdOptableXmlParser.parse):
(printFn):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154521
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Fri, 23 Aug 2013 20:46:04 +0000 (20:46 +0000)]
[Windows] Unreviewed build correction after r154513.
* WTF.vcxproj/build-generated-files.sh: Variable was missing '$' character.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154520
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Fri, 23 Aug 2013 20:43:13 +0000 (20:43 +0000)]
Cut down repeated code in RefPtr and RetainPtr by using copy/move-and-swap for assignment operators
https://bugs.webkit.org/show_bug.cgi?id=120223
Reviewed by Anders Carlsson.
* wtf/RefPtr.h: Switch to copy-and-swap in the assignment operators. The move ones already were done
that way.
* wtf/RetainPtr.h: Ditto, except for the move ones too.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154519
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Fri, 23 Aug 2013 20:40:34 +0000 (20:40 +0000)]
Incorrect TypedArray#set behavior
https://bugs.webkit.org/show_bug.cgi?id=83818
Source/JavaScriptCore:
Reviewed by Oliver Hunt and Mark Hahnenberg.
This was so much fun! typedArray.set() is like a memmove on steroids, and I'm
not smart enough to figure out optimal versions for *all* of the cases. But I
did come up with optimal implementations for most of the cases, and I wrote
spec-literal code (i.e. copy via a transfer buffer) for the cases I'm not smart
enough to write optimal code for.
* runtime/JSArrayBufferView.h:
(JSC::JSArrayBufferView::hasArrayBuffer):
* runtime/JSArrayBufferViewInlines.h:
(JSC::JSArrayBufferView::buffer):
(JSC::JSArrayBufferView::existingBufferInButterfly):
(JSC::JSArrayBufferView::neuter):
(JSC::JSArrayBufferView::byteOffset):
* runtime/JSGenericTypedArrayView.h:
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::setWithSpecificType):
(JSC::::set):
(JSC::::existingBuffer):
LayoutTests:
Reviewed by Oliver Hunt and Mark Hahnenberg.
Made it possible for shouldBe() to compare typed arrays to each other and to any array-like
object.
Added a bunch of tests for different kinds of overlapping typedArray.set()'s.
For sanity, also added the reduced test case from the bug. Interestingly, though, that test
case already passed on trunk - probably by luck (we had incidentally changed the default
copy direction from one that happened to not work to one that happened to be fine, but only
for this test).
* fast/js/jsc-test-list:
* fast/js/resources/js-test-pre.js:
(isTypedArray):
(isResultCorrect):
(stringify):
(shouldBe):
* fast/js/script-tests/typed-array-copy.js: Added.
* fast/js/script-tests/typedarray-set-destination-smaller-than-source.js: Added.
* fast/js/script-tests/typedarray-set-overlapping-elements-of-same-size.js: Added.
* fast/js/script-tests/typedarray-set-same-type-memmove.js: Added.
(arraysEqual):
* fast/js/script-tests/typedarray-set-source-smaller-than-destination.js: Added.
* fast/js/typed-array-copy-expected.txt: Added.
* fast/js/typed-array-copy.html: Added.
* fast/js/typedarray-set-destination-smaller-than-source-expected.txt: Added.
* fast/js/typedarray-set-destination-smaller-than-source.html: Added.
* fast/js/typedarray-set-overlapping-elements-of-same-size-expected.txt: Added.
* fast/js/typedarray-set-overlapping-elements-of-same-size.html: Added.
* fast/js/typedarray-set-same-type-memmove-expected.txt: Added.
* fast/js/typedarray-set-same-type-memmove.html: Added.
* fast/js/typedarray-set-source-smaller-than-destination-expected.txt: Added.
* fast/js/typedarray-set-source-smaller-than-destination.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154518
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Fri, 23 Aug 2013 20:35:09 +0000 (20:35 +0000)]
Let Document keep its RenderView during render tree attach.
<https://webkit.org/b/120224>
Reviewed by Antti Koivisto.
Remove prehistoric code that cleared Document's renderer pointer during tree attach.
* dom/Document.cpp:
(WebCore::Document::attach):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154517
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Fri, 23 Aug 2013 20:30:23 +0000 (20:30 +0000)]
Add more validation logic to CompressibleVector
https://bugs.webkit.org/show_bug.cgi?id=120227
Reviewed by Brent Fulgham.
Add a pile of assertions to try on catch whatever is going wrong
in the windows environment or other platforms.
* wtf/Compression.cpp:
(WTF::GenericCompressedData::create):
(WTF::GenericCompressedData::decompress):
* wtf/Compression.h:
(WTF::CompressedVector::decompress):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154516
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Fri, 23 Aug 2013 20:23:35 +0000 (20:23 +0000)]
Reduce use of Node in HTMLTableRowsCollection, and use modern traversal idiom
https://bugs.webkit.org/show_bug.cgi?id=120222
Reviewed by Antti Koivisto.
* html/HTMLTableRowElement.h:
(WebCore::isHTMLTableRowElement): Added.
(WebCore::isElementOfType<HTMLTableRowElement>): Added.
(WebCore::toHTMLTableRowElement): Added.
* html/HTMLTableRowsCollection.cpp:
(WebCore::assertRowIsInTable): Refactored a bit. Changed #if as Andy Estes
requested during rewview and got rid of local variables.
(WebCore::HTMLTableRowsCollection::rowAfter): Moved a ocmment in here.
Changed code to traverse elements instead of nodes, and used the Traversal<>
template to eliminate some loops entirely.
(WebCore::HTMLTableRowsCollection::lastRow): Ditto.
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Changed argument
type from Node to HTMLTableElement.
(WebCore::HTMLTableRowsCollection::create): Added an assertion for the value
of the collection type argument, and added the typecast here needed for the
change above.
(WebCore::HTMLTableRowsCollection::virtualItemAfter): Removed the assertion
here that was a subset of the assertion we now have inside the rowAfter function.
* html/HTMLTableRowsCollection.h: Added FINAL. Made single-argument constructor
explicit.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154515
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 23 Aug 2013 20:23:06 +0000 (20:23 +0000)]
LayoutTests/http/tests/media/video-throttled-load.cgi issue on range support
https://bugs.webkit.org/show_bug.cgi?id=120219
Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-08-23
Reviewed by Eric Carlson.
Properly count bytes when handling range requests.
* http/tests/media/video-throttled-load.cgi:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154514
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
alex.christensen@flexsim.com [Fri, 23 Aug 2013 20:16:25 +0000 (20:16 +0000)]
Re-separating Win32 and Win64 builds.
https://bugs.webkit.org/show_bug.cgi?id=120178
Reviewed by Brent Fulgham.
Source/JavaScriptCore:
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make:
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make:
Pass PlatformArchitecture as a command line parameter to bash scripts.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh:
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh:
* JavaScriptCore.vcxproj/build-generated-files.sh:
Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
Source/WebCore:
* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
Pass PlatformArchitecture as a command line parameter to bash scripts
and use PlatformArchitecture to determine which directory to delete
while cleaning (obj32 or obj64).
* WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
Export PlatformArchitecture to be used by make and cmd scripts.
* WebCore.vcxproj/build-generated-files.sh:
Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64).
Source/WebKit:
* WebKit.vcxproj/WebKit/WebKitPostBuild.cmd:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorBuildCmd.cmd:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPostBuild.cmd:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPreBuild.cmd:
Use PlatformArchitecture to determine correct object directory (obj32 or obj64).
Source/WTF:
* WTF.vcxproj/WTFGenerated.make:
Pass PlatformArchitecture as a command line parameter to bash scripts.
* WTF.vcxproj/build-generated-files.sh:
Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
WebKitLibraries:
* win/tools/vsprops/common.props:
Export PlatformArchitecture to be used by make and cmd scripts.
Use PlatformArchitecture to determine correct build directory
(lib32/bin32/obj32 or lib64/bin64/obj64).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154513
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Fri, 23 Aug 2013 20:14:36 +0000 (20:14 +0000)]
http/tests/cache/partitioned-cache.html breaks subsequent cookie tests
https://bugs.webkit.org/show_bug.cgi?id=120212
Updating test results for a last minute change that moved lines.
* http/tests/cache/partitioned-cache-expected.txt:
* platform/qt/http/tests/cache/partitioned-cache-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154512
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 23 Aug 2013 20:08:42 +0000 (20:08 +0000)]
Move TestWebKitAPI_LIBRARIES before platform specific cmake include
https://bugs.webkit.org/show_bug.cgi?id=120220
Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-08-23
Reviewed by Martin Robinson.
* TestWebKitAPI/CMakeLists.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154511
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Fri, 23 Aug 2013 19:41:54 +0000 (19:41 +0000)]
build-jsc --ftl-jit should work
https://bugs.webkit.org/show_bug.cgi?id=120194
Reviewed by Oliver Hunt.
Source/JavaScriptCore:
* Configurations/Base.xcconfig: CPPFLAGS should include FEATURE_DEFINES
* Configurations/JSC.xcconfig: The 'jsc' tool includes headers where field layout may depend on FEATURE_DEFINES
* Configurations/ToolExecutable.xcconfig: All other tools include headers where field layout may depend on FEATURE_DEFINES
* ftl/FTLLowerDFGToLLVM.cpp: Build fix
(JSC::FTL::LowerDFGToLLVM::compilePutStructure):
(JSC::FTL::LowerDFGToLLVM::compilePhantomPutStructure):
Source/WTF:
* wtf/LLVMHeaders.h: I don't know what went wrong here. If HAVE(LLVM), then we need those headers!
Tools:
* Scripts/build-jsc: Need to pass the feature flag to xcodebuild
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154509
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Fri, 23 Aug 2013 19:31:29 +0000 (19:31 +0000)]
[Windows] Refactor WebFrame to compose with WebFrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=120092
Reviewed by Anders Carlsson.
Revise WebFrame implementation on Windows to no longer subclass from
WebFrameLoaderClient, instead using a fully-functional WebFrameLoaderClient
as a helper object to perform the tasks, as is done in the other
ports. This is a step towards completing
https://bugs.webkit.org/show_bug.cgi?id=119964.
* WebCoreSupport/WebFrameLoaderClient.cpp: Add a new 'private data'
object to house the policy delegate and function.
(WebFrameLoaderClient::WebFramePolicyListenerPrivate::WebFramePolicyListenerPrivate):
Create the new private data object.
(WebFrameLoaderClient::WebFramePolicyListenerPrivate::~WebFramePolicyListenerPrivate):
Destroy the new private data object.
(WebFrameLoaderClient::WebFrameLoaderClient): Moved from WebFrame.cpp
(WebFrameLoaderClient::frameLoaderDestroyed): Ditto
(WebFrameLoaderClient::makeRepresentation): Ditto
(WebFrameLoaderClient::forceLayoutForNonHTML): Ditto
(WebFrameLoaderClient::setCopiesOnScroll): Ditto
(WebFrameLoaderClient::detachedFromParent2): Ditto
(WebFrameLoaderClient::detachedFromParent3): Ditto
(WebFrameLoaderClient::convertMainResourceLoadToDownload): Ditto
(WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Ditto
(WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Ditto
(WebFrameLoaderClient::dispatchDidFailLoad): Ditto
(WebFrameLoaderClient::dispatchDecidePolicyForResponse): Ditto
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto
(WebFrameLoaderClient::dispatchUnableToImplementPolicy): Ditto
(WebFrameLoaderClient::dispatchWillSendSubmitEvent): Ditto
(WebFrameLoaderClient::dispatchWillSubmitForm): Ditto
(WebFrameLoaderClient::startDownload): Ditto
(WebFrameLoaderClient::willChangeTitle): Ditto
(WebFrameLoaderClient::didChangeTitle): Ditto
(WebFrameLoaderClient::cancelledError): Ditto
(WebFrameLoaderClient::blockedError): Ditto
(WebFrameLoaderClient::cannotShowURLError): Ditto
(WebFrameLoaderClient::interruptedForPolicyChangeError): Ditto
(WebFrameLoaderClient::cannotShowMIMETypeError): Ditto
(WebFrameLoaderClient::fileDoesNotExistError): Ditto
(WebFrameLoaderClient::pluginWillHandleLoadError): Ditto
(WebFrameLoaderClient::shouldFallBack): Ditto
(WebFrameLoaderClient::canHandleRequest): Ditto
(WebFrameLoaderClient::canShowMIMEType): Ditto
(WebFrameLoaderClient::canShowMIMETypeAsHTML): Ditto
(WebFrameLoaderClient::representationExistsForURLScheme): Ditto
(WebFrameLoaderClient::generatedMIMETypeForURLScheme): Ditto
(WebFrameLoaderClient::frameLoadCompleted): Ditto
(WebFrameLoaderClient::saveViewStateToItem): Ditto
(WebFrameLoaderClient::restoreViewState): Ditto
(WebFrameLoaderClient::provisionalLoadStarted): Ditto
(WebFrameLoaderClient::didFinishLoad): Ditto
(WebFrameLoaderClient::prepareForDataSourceReplacement): Ditto
(WebFrameLoaderClient::userAgent): Ditto
(WebFrameLoaderClient::objectContentType): Ditto
(WebFrameLoaderClient::createJavaAppletWidget): Ditto
(WebFrameLoaderClient::overrideMediaType): Ditto
(WebFrameLoaderClient::documentElementAvailable): Ditto
(WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): Ditto
(WebFrameLoaderClient::registerForIconNotification): Ditto
(WebFrameLoaderClient::didPerformFirstNavigation): Ditto
(WebFrameLoaderClient::createNetworkingContext): Ditto
(WebFrameLoaderClient::shouldAlwaysUsePluginDocument): Ditto
(WebFrameLoaderClient::revertToProvisionalState): Ditto
(WebFrameLoaderClient::setMainFrameDocumentReady): Ditto
(WebFrameLoaderClient::cancelPolicyCheck): Ditto
(WebFrameLoaderClient::setUpPolicyListener): Ditto
(WebFrameLoaderClient::receivedPolicyDecision): Ditto
* WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient::webFrame): Add accessor method
* WebDataSource.cpp:
(WebDataSource::representation): Loader client is now
a WebFrameLoaderClient (not a WebFrame).
(WebDataSource::webFrame): Ditto
* WebElementPropertyBag.cpp:
(WebElementPropertyBag::Read): Loader client is now
a WebFrameLoaderClient (not a WebFrame)
* WebFrame.cpp:
(kit): Revise for WebFrameLoaderClient use.
(WebFrame::WebFramePrivate::WebFramePrivate): Remove
WebFramePolicyListener and FramePolicyFunction, since
they are no longer needed here. They were moved to
the WebFrameLoaderClient object.
(WebFrame::WebFrame): No longer inheriting from
WebFramePolicyListener.
(WebFrame::init): Frame::create now needs to be supplied
with a new WebFramePolicyListener, rather than 'this'
* WebFrame.h:
* WebFramePolicyListener.cpp:
(WebFramePolicyListener::receivedPolicyDecision): Loader
client is now a WebFramePolicyClient, not a WebFrame.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154508
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Fri, 23 Aug 2013 19:31:11 +0000 (19:31 +0000)]
[Windows] Unreviewed build correction after r154498.
* WTF.vcxproj/WTF.vcxproj.filters: Adjust files so they show up
in the proper folders.
* WTF.vcxproj/WTFCommon.props: Add search path for zlib header and
include link directive.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154507
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
msaboff@apple.com [Fri, 23 Aug 2013 19:31:03 +0000 (19:31 +0000)]
regexp-match-reify-before-putbyval is not a JSRegress test
https://bugs.webkit.org/show_bug.cgi?id=120181
Reviewed by Geoffrey Garen.
Moved and re-baselined regexp-match-reify-before-putbyval test into fast/js.
* fast/js/regexp-match-reify-before-putbyval-expected.txt: Copied from LayoutTests/fast/js/regress/regexp-match-reify-before-putbyval-expected.txt.
* fast/js/regexp-match-reify-before-putbyval.html: Copied from LayoutTests/fast/js/regress/regexp-match-reify-before-putbyval.html.
* fast/js/regress/regexp-match-reify-before-putbyval-expected.txt: Removed.
* fast/js/regress/regexp-match-reify-before-putbyval.html: Removed.
* fast/js/regress/script-tests/regexp-match-reify-before-putbyval.js: Removed.
* fast/js/script-tests/regexp-match-reify-before-putbyval.js: Copied from LayoutTests/fast/js/regress/script-tests/regexp-match-reify-before-putbyval.js.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154506
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Fri, 23 Aug 2013 19:17:58 +0000 (19:17 +0000)]
http/tests/cache/partitioned-cache.html breaks subsequent cookie tests
https://bugs.webkit.org/show_bug.cgi?id=120212
Reviewed by Tim Horton.
The test never deleted its localhost cookie, so subsequent third party cookie
relaxing tests saw the existing cookie and failed.
There is no need to use cookies in this test, and it's actually slightly incorrect,
as the network layer may refuse to use a cached result simply because cookies changed,
and then we wouldn't test 3rd party data blocking.
* platform/qt/http/tests/cache/partitioned-cache-expected.txt:
* http/tests/cache/partitioned-cache-expected.txt: Updated results. It took me
a long time to understand what the test was doing, so made it a bit more self-descriptive.
* http/tests/cache/partitioned-cache.html: Tabs to spaces.
* http/tests/cache/resources/echo-cookie.cgi: Removed.
* http/tests/cache/resources/partitioned-cache-echo-state.php: Added.
* http/tests/cache/resources/partitioned-cache-loader.html:
Changed to use a local file on the server to modify resource content.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154505
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Fri, 23 Aug 2013 19:02:07 +0000 (19:02 +0000)]
RenderView::compositor() should return a reference.
<https://webkit.org/b/120217>
Reviewed by Beth Dakin.
The RenderLayerCompositor is lazily constructed by compositor() and never returns null.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154504
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 23 Aug 2013 18:41:33 +0000 (18:41 +0000)]
Unreviewed, rolling out r153534.
http://trac.webkit.org/changeset/153534
https://bugs.webkit.org/show_bug.cgi?id=120216
Too many tests failing just WinEWS bots (Requested by rfong on
#webkit).
* Scripts/webkitpy/common/config/ews.json:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154503
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
alex.christensen@flexsim.com [Fri, 23 Aug 2013 18:34:27 +0000 (18:34 +0000)]
Unreviewed. Added my webkit.org email address.
Patch by Alex Christensen <alex.christensen@flexsim.com> on 2013-08-23
* Scripts/webkitpy/common/config/contributors.json:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154502
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Fri, 23 Aug 2013 18:26:52 +0000 (18:26 +0000)]
Attempt to appease windows bot.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154501
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
betravis@adobe.com [Fri, 23 Aug 2013 18:10:31 +0000 (18:10 +0000)]
<https://webkit.org/b/119864> [CSS Shapes] Remove extraneous window.internals calls in layout tests
Reviewed by Alexandru Chiculita.
Removing calls to window.internals.settings.setCSSShapesEnabled from these files, as
CSS Shapes is enabled by default in test builds.
* fast/regions/shape-inside/shape-inside-on-additional-regions.html:
* fast/regions/shape-inside/shape-inside-on-first-region-block-content.html:
* fast/regions/shape-inside/shape-inside-on-first-region-inline-content.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-basic-overflow-shape-top-offset.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-polygon-with-adjustment-expected.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-polygon-with-adjustment.html:
* fast/regions/shape-inside/shape-inside-on-regions-expected.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-basic-overflow-shape-top-offset.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-polygon-with-adjustment-expected.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-polygon-with-adjustment.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content.html:
* fast/regions/shape-inside/shape-inside-on-regions.html:
* fast/regions/shape-inside/shape-inside-on-second-region-block-content.html:
* fast/regions/shape-inside/shape-inside-on-second-region-inline-content.html:
* fast/regions/shape-inside/shape-inside-recursive-layout.html:
* fast/regions/shape-inside/shape-inside-with-region-borders.html:
* fast/regions/shape-inside/shape-inside-with-region-padding.html:
* fast/shapes/css-shapes-disabled.html:
* fast/shapes/parsing/script-tests/parsing-shape-inside.js:
* fast/shapes/parsing/script-tests/parsing-shape-lengths.js:
* fast/shapes/parsing/script-tests/parsing-shape-margin.js:
* fast/shapes/parsing/script-tests/parsing-shape-outside.js:
* fast/shapes/parsing/script-tests/parsing-shape-padding.js:
* fast/shapes/resources/multi-segment-polygon.js:
* fast/shapes/resources/simple-polygon.js:
* fast/shapes/resources/simple-rectangle.js:
* fast/shapes/shape-inside/shape-inside-animation.html:
* fast/shapes/shape-inside/shape-inside-bottom-edge.html:
* fast/shapes/shape-inside/shape-inside-box-sizing.html:
* fast/shapes/shape-inside/shape-inside-circle-padding.html:
* fast/shapes/shape-inside/shape-inside-circle.html:
* fast/shapes/shape-inside/shape-inside-coincident-vertices-expected.html:
* fast/shapes/shape-inside/shape-inside-coincident-vertices.html:
* fast/shapes/shape-inside/shape-inside-collinear-vertices-expected.html:
* fast/shapes/shape-inside/shape-inside-collinear-vertices.html:
* fast/shapes/shape-inside/shape-inside-counterclockwise-polygon-expected.html:
* fast/shapes/shape-inside/shape-inside-counterclockwise-polygon.html:
* fast/shapes/shape-inside/shape-inside-dynamic-nested-expected.html:
* fast/shapes/shape-inside/shape-inside-dynamic-nested.html:
* fast/shapes/shape-inside/shape-inside-dynamic-shape.html:
* fast/shapes/shape-inside/shape-inside-dynamic-text.html:
* fast/shapes/shape-inside/shape-inside-ellipse-padding.html:
* fast/shapes/shape-inside/shape-inside-ellipse.html:
* fast/shapes/shape-inside/shape-inside-empty.html:
* fast/shapes/shape-inside/shape-inside-first-fit-001-horizontal.html:
* fast/shapes/shape-inside/shape-inside-first-fit-001-vertical.html:
* fast/shapes/shape-inside/shape-inside-first-fit-002.html:
* fast/shapes/shape-inside/shape-inside-first-fit-003.html:
* fast/shapes/shape-inside/shape-inside-first-fit-004-expected.html:
* fast/shapes/shape-inside/shape-inside-first-fit-004.html:
* fast/shapes/shape-inside/shape-inside-first-fit-reflex.html:
* fast/shapes/shape-inside/shape-inside-inline-elements.html:
* fast/shapes/shape-inside/shape-inside-multiple-blocks-vertical.html:
* fast/shapes/shape-inside/shape-inside-multiple-blocks.html:
* fast/shapes/shape-inside/shape-inside-on-nested-container-with-unresolved-height.html:
* fast/shapes/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html:
* fast/shapes/shape-inside/shape-inside-overflow-fixed-dimensions.html:
* fast/shapes/shape-inside/shape-inside-overflow.html:
* fast/shapes/shape-inside/shape-inside-partial-fill-001.html:
* fast/shapes/shape-inside/shape-inside-partial-fill-002.html:
* fast/shapes/shape-inside/shape-inside-percentage-auto.html:
* fast/shapes/shape-inside/shape-inside-percentage.html:
* fast/shapes/shape-inside/shape-inside-polygon-layout.html:
* fast/shapes/shape-inside/shape-inside-polygon-padding-001.html:
* fast/shapes/shape-inside/shape-inside-polygon-padding-002.html:
* fast/shapes/shape-inside/shape-inside-polygon-padding-003.html:
* fast/shapes/shape-inside/shape-inside-polygon-rectangle.html:
* fast/shapes/shape-inside/shape-inside-polygon-zoom.html:
* fast/shapes/shape-inside/shape-inside-rectangle-padding.html:
* fast/shapes/shape-inside/shape-inside-rectilinear-polygon-001-expected.html:
* fast/shapes/shape-inside/shape-inside-rectilinear-polygon-001.html:
* fast/shapes/shape-inside/shape-inside-rectilinear-polygon-002-expected.html:
* fast/shapes/shape-inside/shape-inside-rectilinear-polygon-002.html:
* fast/shapes/shape-inside/shape-inside-rectilinear-polygon-003-expected.html:
* fast/shapes/shape-inside/shape-inside-rectilinear-polygon-003.html:
* fast/shapes/shape-inside/shape-inside-rectilinear-polygon-004-expected.html:
* fast/shapes/shape-inside/shape-inside-rectilinear-polygon-004.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon16-expected.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon16.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon8-expected.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon8.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-001.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-fit-001-expected.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-fit-001.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-fit-002-expected.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-fit-002.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-fit-003-expected.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-fit-003.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-large-radius-expected.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-large-radius.html:
* fast/shapes/shape-inside/shape-inside-rounded-rectangle-padding.html:
* fast/shapes/shape-inside/shape-inside-shape-logical-top.html:
* fast/shapes/shape-inside/shape-inside-sibling-block-dimension-change-needs-relayout-expected.html:
* fast/shapes/shape-inside/shape-inside-sibling-block-dimension-change-needs-relayout.html:
* fast/shapes/shape-inside/shape-inside-text.html:
* fast/shapes/shape-inside/shape-inside-vertical-text.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-diamond-margin-polygon.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-bottom.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154500
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Fri, 23 Aug 2013 18:01:03 +0000 (18:01 +0000)]
Re-sort xcode project file
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154499
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Fri, 23 Aug 2013 17:53:11 +0000 (17:53 +0000)]
Support in memory compression of rarely used data
https://bugs.webkit.org/show_bug.cgi?id=120143
Reviewed by Gavin Barraclough.
Source/JavaScriptCore:
Include zlib in LD_FLAGS and make UnlinkedCodeBlock make use of CompressibleVector. This saves ~200k on google maps.
* Configurations/JavaScriptCore.xcconfig:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
(JSC::UnlinkedCodeBlock::addExpressionInfo):
* bytecode/UnlinkedCodeBlock.h:
Source/WTF:
Adds a set of utility functions to wrap the use of zlib over a generic
type or a Vector<> as well as adding CompressibleVector that wraps
either a Vector<> or compressed data.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/CheckedArithmetic.h:
* wtf/Compression.cpp: Added.
(WTF::zAlloc):
(WTF::zFree):
(WTF::GenericCompressedData::create):
(WTF::GenericCompressedData::decompress):
* wtf/Compression.h: Added.
(WTF::GenericCompressedData::compressedSize):
(WTF::GenericCompressedData::originalSize):
(WTF::GenericCompressedData::GenericCompressedData):
(WTF::CompressedVector::create):
(WTF::CompressedVector::decompress):
(WTF::CompressedVector::size):
(WTF::CompressibleVector::CompressibleVector):
(WTF::CompressibleVector::shrinkToFit):
(WTF::CompressibleVector::size):
(WTF::CompressibleVector::operator[]):
(WTF::CompressibleVector::at):
(WTF::CompressibleVector::begin):
(WTF::CompressibleVector::end):
(WTF::CompressibleVector::data):
(WTF::CompressibleVector::decompressIfNecessary):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154498
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 23 Aug 2013 17:41:26 +0000 (17:41 +0000)]
Fix srcset's image candidate algorithm when DPR exceeds all candidates
https://bugs.webkit.org/show_bug.cgi?id=120168
Source/WebCore:
When the DPR exceeded the 'x' qualifier of all image candidates, none was chosen.
From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
Fixed by returning the last one in the list of candidates sorted by their qualifier, in case none of them is equal or greater than
DPR.
Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-23
Reviewed by Andreas Kling.
Test: fast/hidpi/image-srcset-fraction.html
* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):
LayoutTests:
From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
This test verifies that when all the candidates' qualifiers are smaller than the DPR, the highest one is returned.
Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-23
Reviewed by Andreas Kling.
* fast/hidpi/image-srcset-fraction-expected.txt: Added.
* fast/hidpi/image-srcset-fraction.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154497
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cfleizach@apple.com [Fri, 23 Aug 2013 17:24:52 +0000 (17:24 +0000)]
<https://webkit.org/b/113895> Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
Reviewed by Darin Adler.
Source/WebCore:
Don't support the ARIA expanded attribute unless the value is one of the defined ARIA values (true/false).
Test: platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsARIAExpanded):
LayoutTests:
* platform/mac/accessibility/aria-expanded-not-exposed-when-undefined-expected.txt: Added.
* platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154496
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Fri, 23 Aug 2013 17:20:47 +0000 (17:20 +0000)]
<https://webkit.org/b/119945> Some cleanup for PasteboardIOS
Reviewed by Andreas Kling.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::setFrame): Moved this function up near the
create functions and constructors.
(WebCore::documentFragmentWithRTF): Tweaked formatting.
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
Ditto.
(WebCore::utiTypeFromCocoaType): Changed to use early return and removed
an unneeded local variable.
(WebCore::cocoaTypeFromHTMLClipboardType): Renamed the quaint qType and
pbType local variables, and tweaked formatting.
(WebCore::Pasteboard::clear): Tweaked comment.
(WebCore::Pasteboard::readString): Tweaked formatting.
(WebCore::addHTMLClipboardTypesForCocoaType): Tweaked formatting.
(WebCore::Pasteboard::writeString): Streamlined logic and tweaked formatting
(WebCore::Pasteboard::types): Renamed pbType to just type.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154495
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bjonesbe@adobe.com [Fri, 23 Aug 2013 16:58:18 +0000 (16:58 +0000)]
Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing
https://bugs.webkit.org/show_bug.cgi?id=119816
Reviewed by David Hyatt.
This is a port from Blink of
https://src.chromium.org/viewvc/blink?revision=155885&view=revision
Original Patch by Eric Seidel
Original comments:
"It seemed to me that template specifications would be clearer than an
if. They also allow for compile-time error checking were a 3rd type
of float to come into existance in CSS4. :p
For any unfamiliar with this method, this the object used for
performing a search on a RedBlackTree in WTF.
We create one of these adaptors, specifying that we want to search for
values in a specific (logical) Y interval, and this adaptor is called
back for any values in the RBTree cooresponding to that interval
range.
The job of this adaptor is to collect the various values we care
about, including the left or right-most offset of the floats in that
Y-range as well as what the last (document order) float seen in that
range.
It also collects the remaining available height for the block but I'm
less clear on how that parameter is used."
Note that in addition to the original change, I have made the
updateOffsetIfNeeded and rangesIntersect methods inline, as this was
shown to be a performance win in
https://src.chromium.org/viewvc/blink?revision=156064&view=revision
and it seemed a rather trivial change to be subject to a separate
patch when porting.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
* rendering/RenderBlock.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154494
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Fri, 23 Aug 2013 16:56:31 +0000 (16:56 +0000)]
WebCore fails to link due to changes in Objective-C++ ABI in trunk clang
<http://webkit.org/b/120183>
<rdar://problem/
14764114>
Reviewed by Eric Carlson.
The trunk version of clang made an ABI change for Objective-C++
parameters that caused WebCore to fail to link. The short-term
fix is to change the parameter type from id<protocol> to just id
and add an ASSERT that the parameter still conforms to the
protocol.
* platform/DragData.h:
(DragDataRef): Change typedef from id<NSDragInfo> to id.
* platform/mac/DragDataMac.mm:
(WebCore::DragData::DragData): Add ASSERT that checks that the
DragDataRef object implements the NSDragInfo protocol.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154493
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Fri, 23 Aug 2013 16:51:13 +0000 (16:51 +0000)]
[WK2] Assertion failures when loading XSL stylesheets with NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=120186
<rdar://problem/
14080273>
Reviewed by Brady Eidson.
Covered by many existing tests.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously): Pass frame ID and page ID.
They are mostly needed for authentication, which is not supported with sync requests,
but it will be supported some day.
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::webFrameLoaderClient):
Added a way to get frame loader client from WebKit NetworkingContext subclass.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154490
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Fri, 23 Aug 2013 16:50:38 +0000 (16:50 +0000)]
RenderLayerCompositor::m_renderView should be a reference.
<https://webkit.org/b/120210>
Reviewed by Antti Koivisto.
The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
By making m_renderView a reference, we flush out some unnecessary null checks.
We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
so we don't have to make those blocks conditional anymore, reducing ambiguity.
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::compositor):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154489
268f45cc-cd09-0410-ab3c-
d52691b4dbfc