⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Mar 23, 2014:

11:42 PM Changeset in webkit [166151] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Convert WebHTMLConverter to C++
https://bugs.webkit.org/show_bug.cgi?id=130655

Patch by Sam Weinig <sam@webkit.org> on 2014-03-23
Reviewed by Andreas Kling.

  • Mechanically converts the Objective-C class WebHTMLConverter, to the C++ HTMLConverter (lots of cleanup to follow).
  • Removes unused members
    • _standardFontFamily (never assigned to)
    • _textSizeMultiplier (always exactly 1)
    • _webViewTextSizeMultiplier (always exactly 0)
    • _defaultFontSize (always exactly 12, changed to be constant)
    • _minimumFontSize (always exactly 1, changed to be constant)
    • _colorsForNodes (never assigned to)
    • _indexingLimit (always exactly 0)
    • _thumbnailLimit (always exactly 0)
    • _flags.isIndexing (always false)
    • _flags.isTesting (always false)
  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::convert):
(HTMLConverter::HTMLConverter):
(HTMLConverter::~HTMLConverter):
(defaultParagraphStyle):
(_childrenForNode):
(HTMLConverter::_stringForNode):
(HTMLConverter::_getFloat):
(_webKitBundle):
(HTMLConverter::_elementIsBlockLevel):
(HTMLConverter::_elementHasOwnBackgroundColor):
(HTMLConverter::_blockLevelElementForNode):
(HTMLConverter::_colorForNode):
(HTMLConverter::_computedAttributesForElement):
(HTMLConverter::_attributesForElement):
(HTMLConverter::_newParagraphForElement):
(HTMLConverter::_newLineForElement):
(HTMLConverter::_newTabForElement):
(_WebMessageDocumentClass):
(HTMLConverter::_addAttachmentForElement):
(HTMLConverter::_addQuoteForElement):
(HTMLConverter::_addValue):
(HTMLConverter::_fillInBlock):
(HTMLConverter::_processMetaElementWithName):
(HTMLConverter::_processHeadElement):
(HTMLConverter::_enterElement):
(HTMLConverter::_addTableForElement):
(HTMLConverter::_addTableCellForElement):
(HTMLConverter::_processElement):
(HTMLConverter::_addMarkersToList):
(HTMLConverter::_exitElement):
(HTMLConverter::_processText):
(HTMLConverter::_traverseNode):
(HTMLConverter::_traverseFooterNode):
(HTMLConverter::_adjustTrailingNewline):
(HTMLConverter::_loadFromDOMRange):
(fileWrapperForURL):
(fileWrapperForElement):
(WebCore::attributedStringFromRange):
(WebCore::editingAttributedStringFromRange):

10:16 PM Changeset in webkit [166150] by jinwoo7.song@samsung.com
  • 3 edits in trunk/Source/WebCore

Remove Dead Stores from editing directory
https://bugs.webkit.org/show_bug.cgi?id=130634

Reviewed by Darin Adler.

Remove Dead Stores from editing directory which assigning a value to a variable
and never reading that value.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):

  • editing/markup.cpp:

(WebCore::createMarkupInternal):

9:51 PM Changeset in webkit [166149] by ryuan.choi@samsung.com
  • 28 edits
    1 add in trunk

Move all EFL typedefs into EflTypedefs.h.
https://bugs.webkit.org/show_bug.cgi?id=130511

Source/JavaScriptCore:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim

  • heap/HeapTimer.h: Remove EFL typedefs.

Source/WebCore:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

  • platform/FileSystem.h: Remove EFL typedefs.
  • platform/Widget.h: Ditto.
  • platform/efl/EflScreenUtilities.h: Ditto.
  • platform/graphics/Icon.h: Ditto.
  • platform/graphics/Image.h: Ditto.
  • platform/graphics/IntPoint.h: Ditto.
  • platform/graphics/IntRect.h: Ditto.
  • platform/network/NetworkStateNotifier.h: Ditto.

Source/WebKit/efl:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

  • WebCoreSupport/BatteryClientEfl.h: Remove EFL typedefs.
  • WebCoreSupport/DumpRenderTreeSupportEfl.h: Ditto.
  • WebCoreSupport/EditorClientEfl.h: Ditto.
  • WebCoreSupport/FrameNetworkingContextEfl.h: Ditto.
  • WebCoreSupport/NavigatorContentUtilsClientEfl.h: Ditto.
  • WebCoreSupport/ProgressTrackerClientEfl.h: Ditto.

Source/WebKit2:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

  • Shared/API/c/efl/WKArrayEfl.h: Remove EFL typedefs.
  • UIProcess/API/efl/EwkView.h: Ditto.

Source/WTF:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

  • wtf/Platform.h: include EflTypedefs.h.
  • wtf/efl/EflTypedefs.h: Added.
  • wtf/efl/RefPtrEfl.h: Remove EFL typedefs.

Tools:

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-23
Reviewed by Gyuyoung Kim.

  • TestWebKitAPI/PlatformWebView.h: Remove EFL typedefs.
  • WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto.
  • WebKitTestRunner/PlatformWebView.h: Ditto.
9:37 PM Changeset in webkit [166148] by jinwoo7.song@samsung.com
  • 6 edits in trunk/Source/WebKit2

[WK2] Refine WebKit2 BatteryStatus code
https://bugs.webkit.org/show_bug.cgi?id=130573

Reviewed by Anders Carlsson.

Refinements

  • Return PassRef instead of PassRefPtr in create methods
  • Use auto instead of iterator
  • UIProcess/WebBatteryManagerProxy.cpp:

(WebKit::WebBatteryManagerProxy::create):

  • UIProcess/WebBatteryManagerProxy.h:
  • UIProcess/efl/BatteryProvider.cpp:

(BatteryProvider::create):

  • UIProcess/efl/BatteryProvider.h:
  • WebProcess/Battery/WebBatteryManager.cpp:

(WebKit::WebBatteryManager::didChangeBatteryStatus):
(WebKit::WebBatteryManager::updateBatteryStatus):

3:14 PM Changeset in webkit [166147] by weinig@apple.com
  • 2 edits
    2 moves
    1 add in trunk/Source/WebCore

Move HTMLConverter from platform/mac to editing/cocoa.

Rubber-stamped by Darin Adler.

  • WebCore.xcodeproj/project.pbxproj:
  • editing/cocoa: Added.
  • editing/cocoa/HTMLConverter.h: Copied from platform/mac/HTMLConverter.h.
  • editing/cocoa/HTMLConverter.mm: Copied from platform/mac/HTMLConverter.mm.
  • platform/mac/HTMLConverter.h: Removed.
  • platform/mac/HTMLConverter.mm: Removed.
2:47 PM Changeset in webkit [166146] by weinig@apple.com
  • 3 edits in trunk/Source/WebKit/mac

Remove some unnecessary .get()s that Darin noticed.

  • WebView/WebHTMLRepresentation.mm:

(-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView attributedString]):

2:41 PM Changeset in webkit [166145] by weinig@apple.com
  • 15 edits in trunk/Source

Simplify the HTMLConverter interface (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=130654

Reviewed by Darin Adler.

../WebCore:

Switch HTMLConverter from using an Objective-C interface to C functions.

  • WebCore.exp.in:
  • editing/ios/EditorIOS.mm:

(WebCore::Editor::writeSelectionToPasteboard):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::dataSelectionForPasteboard):
(WebCore::Editor::writeSelectionToPasteboard):

  • platform/ios/PasteboardIOS.mm:
  • platform/mac/HTMLConverter.h:
  • platform/mac/HTMLConverter.mm:

(WebCore::attributedStringFromRange):
(WebCore::editingAttributedStringFromRange):

  • platform/mac/PasteboardMac.mm:

../WebKit/mac:

  • WebView/WebHTMLRepresentation.mm:

(-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView attributedSubstringFromRange:]):
(-[WebHTMLView attributedString]):
(-[WebHTMLView selectedAttributedString]):

../WebKit2:

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::performDictionaryLookupForRange):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupForRange):

2:37 PM Changeset in webkit [166144] by Darin Adler
  • 21 edits in trunk

Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
https://bugs.webkit.org/show_bug.cgi?id=130653

Reviewed by Antti Koivisto.

Source/WebCore:

  • dom/ContainerNode.cpp: Moved the post-attach callback code from here to

StyleResolveTree.h/cpp.

  • dom/ContainerNode.h: Ditto.
  • dom/Document.cpp:

(WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
PostAttachCallbackDisabler.

  • dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.
  • html/HTMLEmbedElement.cpp:

(WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
code to trigger image loads. Changed srcAttr to call updateImageLoaderWithNewURLSoon to
do the image loading logic.

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
Style::queuePostResolutionCallback and use a lambda instead of a function.
(WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
of just using wishful thinking to keep the object alive.

  • html/HTMLFrameOwnerElement.cpp:

(WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
it into a 1-liner. Changed dataAttr to use updateImageLoaderWithNewURLSoon(). Also made
it call setNeedsWidgetUpdate(true) unconditionally after checking carefully to see that's
harmless if there is no renderer. Changed classidAttr to call setNeedsWidgetUpdate(true)
unconditionally and not set m_classId.
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
instead of classId and descendantsOfType instead of getElementsByTagName.
(WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
(WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.

  • html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that

attribute in a data member. Rearranged header, making more private, and fixing some typos,
and doing a "using" instead of a function to disambiguate the inherited form functions.

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize m_needsImageReload.
(WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
first child of the shadow root is guaranteed to be an element.
(WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
scheduleUpdateForAfterStyleResolution function.
(WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
class; cleaner even though it's just an assertion.
(WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
Schedules a call to updateAfterStyleResolution when needed.
(WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
m_needsImageReload boolean in cases where no actual loading is done.
(WebCore::HTMLPlugInImageElement::removedFrom): Added. Do not delay the load event of
document once this element is removed, clears m_needsImageReload.
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
since m_needsDocumentActivationCallbacks can't be true if the old document was null.
(WebCore::is100Percent): Added helper to make function below more readable.
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
bit. The part that attracted my attention was the local variable of type RenderBox, which
was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
is a renderer of type RenderEmbeddedObject, so depend on that.
(WebCore::HTMLPlugInImageElement::setNeedsImageReload): Added. When called with true, sets
the flag and triggers a style recalculation, and lets updateAfterStyleResolution do the rest.
When called with false, reverses the effects and stops delaying the load event.

  • html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.

Marked more function members final. Made a protected imageLoader function so that
m_imageLoader can be private. Added new protected function updateImageLoaderWithNewURLSoon,
as well as other new private functions. Made m_imageLoader be std::unique_ptr instead of
OwnPtr, and added m_needsImageReload.

  • style/StyleResolveTree.cpp:

(WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
(WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
(WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
(WebCore::Style::postResolutionCallbackQueue): Added.
(WebCore::Style::queuePostResolutionCallback): Added.
(WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
of as a special case. It should not work for multiple documents across multiple pages instead of
only the outermost one.
(WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
(WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
(WebCore::Style::postResolutionCallbacksAreSuspended): Added.

  • style/StyleResolveTree.h: Added queuePostResolutionCallback and

postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
eventually become a private implementation detail.

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm: Call toHTMLPlugInImageElement instead of

doing a static_cast.

LayoutTests:

  • plugins/plugin-remove-readystatechange-expected.txt: Added a blank line; not what this

test is testing, but the different timing of loads results in this blank line.

  • plugins/plugin-remove-readystatechange.html: Updated test to use waitUntilDone/notifyDone

rather than racing. Added a computation of offsetLeft to trigger layout and adding a long
comment explaining why this is needed and potentially insufficient in the long run.

  • svg/custom/object-no-size-attributes-expected.txt: Removed expectation of an empty text

renderer from the render tree.

  • svg/custom/object-no-size-attributes.xhtml: Restructured the source so there is no text

to render. Without this, we were seeing two text renderers due to the loading timing change.

1:17 PM Changeset in webkit [166143] by weinig@apple.com
  • 5 edits in trunk/Source/WebCore

Simplify the HTMLConverter interface (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=130654

Reviewed by Dan Bernstein.

Convert WebHTMLConverter's interface to only use class methods as the first
step of simplifying the interface.

  • editing/ios/EditorIOS.mm:

(WebCore::attributedStringForRange):

  • editing/mac/EditorMac.mm:

(WebCore::attributedStringForRange):

  • platform/mac/HTMLConverter.h:
  • platform/mac/HTMLConverter.mm:

(+[WebHTMLConverter attributedStringFromRange:]):

11:56 AM Changeset in webkit [166142] by fpizlo@apple.com
  • 4 edits
    2 adds in trunk/Source/JavaScriptCore

Gotta grow the locals vectors if we are about to do SetLocals beyond the bytecode's numCalleeRegisters
https://bugs.webkit.org/show_bug.cgi?id=130650
<rdar://problem/16122966>

Reviewed by Michael Saboff.

Previously, it was only in the case of inlining that we would do SetLocal's beyond the
previously established numLocals limit. But then we added generalized op_call_varargs
handling, which results in us emitting SetLocals that didn't previously exist in the
bytecode.

This factors out the inliner's ensureLocals loop and calls it from op_call_varargs.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::ensureLocals):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parse):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub): Make this do alignment correctly.

  • runtime/Options.h:
  • tests/stress/call-varargs-from-inlined-code.js: Added.
  • tests/stress/call-varargs-from-inlined-code-with-odd-number-of-arguments.js: Added.
10:32 AM Changeset in webkit [166141] by commit-queue@webkit.org
  • 10 edits in trunk

Web Inspector: AXI: add other ARIA one-to-many relationships: owns, flowto, controls.
https://bugs.webkit.org/show_bug.cgi?id=130635

Patch by James Craig <jcraig@apple.com> on 2014-03-23
Reviewed by Timothy Hatcher.

Support for @aria-owns, @aria-controls, and @aria-flowto.

Source/WebCore:

Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

  • inspector/protocol/DOM.json:

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/DOMNode.js:
  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

LayoutTests:

  • inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
  • inspector-protocol/dom/getAccessibilityPropertiesForNode.html:
9:12 AM Changeset in webkit [166140] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit2

WebKit::resistanceForDelta() truncates 'scaleDistance' to integer value using abs()
<http://webkit.org/b/130651>

Reviewed by Darin Adler.

Fixes the following build failure with trunk clang:

WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]

double scaleDistance = abs(limit - currentScale);


WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: note: use function 'fabs' instead

double scaleDistance = abs(limit - currentScale);


fabs

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::resistanceForDelta): Use fabs() instead of abs().

8:36 AM Changeset in webkit [166139] by Simon Fraser
  • 2 edits in trunk/Source

Clean up #includes by geometry classes
https://bugs.webkit.org/show_bug.cgi?id=130645

Reviewed by Andreas Kling.

Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
classes brings in a lot of additional headers. Fix by adding a new
GeometryUtilities file so that the basic files don't need Vector,
and including GeometryUtilities.h where necessary.

Also forward declare PrintStream.h and only bring in the header
in implementation files.

Source/WebCore:

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSToStyleMap.h:
  • html/HTMLCanvasElement.cpp:
  • platform/cairo/WidgetBackingStoreCairo.h:
  • platform/graphics/FloatPoint.cpp:
  • platform/graphics/FloatPoint.h:
  • platform/graphics/FloatRect.cpp:
  • platform/graphics/FloatRect.h:
  • platform/graphics/FloatSize.cpp:
  • platform/graphics/FloatSize.h:
  • platform/graphics/GeometryUtilities.cpp: Added.

(WebCore::findSlope):
(WebCore::findIntersection):
(WebCore::unionRect):
(WebCore::mapRect):

  • platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
  • platform/graphics/IntPoint.h:
  • platform/graphics/IntRect.cpp:
  • platform/graphics/IntRect.h:
  • platform/graphics/IntSize.h:
  • platform/graphics/TextTrackRepresentation.h:
  • platform/graphics/Tile.h:
  • platform/graphics/texmap/coordinated/UpdateAtlas.h:
  • platform/gtk/WidgetBackingStoreGtkX11.h:
  • rendering/RenderBoxModelObject.cpp:
  • rendering/RenderImage.cpp:
  • rendering/RenderObject.cpp:

Source/WebKit2:

  • Shared/UpdateInfo.h:
  • UIProcess/BackingStore.h:
  • UIProcess/CoordinatedGraphics/PageViewportController.h:
  • UIProcess/FindIndicator.cpp:
  • UIProcess/mac/WKPrintingView.h:
1:36 AM Changeset in webkit [166138] by Simon Fraser
  • 32 edits
    1 copy
    1 add in trunk/Source

Clean up #includes by geometry classes
https://bugs.webkit.org/show_bug.cgi?id=130645

Reviewed by Andreas Kling.

Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
classes brings in a lot of additional headers. Fix by adding a new
GeometryUtilities file so that the basic files don't need Vector,
and including GeometryUtilities.h where necessary.

Also forward declare PrintStream.h and only bring in the header
in implementation files.

Source/WebCore:

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSToStyleMap.h:
  • html/HTMLCanvasElement.cpp:
  • platform/cairo/WidgetBackingStoreCairo.h:
  • platform/graphics/FloatPoint.cpp:
  • platform/graphics/FloatPoint.h:
  • platform/graphics/FloatRect.cpp:
  • platform/graphics/FloatRect.h:
  • platform/graphics/FloatSize.cpp:
  • platform/graphics/FloatSize.h:
  • platform/graphics/GeometryUtilities.cpp: Added.

(WebCore::findSlope):
(WebCore::findIntersection):
(WebCore::unionRect):
(WebCore::mapRect):

  • platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
  • platform/graphics/IntPoint.h:
  • platform/graphics/IntRect.cpp:
  • platform/graphics/IntRect.h:
  • platform/graphics/IntSize.h:
  • platform/graphics/TextTrackRepresentation.h:
  • platform/graphics/Tile.h:
  • platform/gtk/WidgetBackingStoreGtkX11.h:
  • rendering/RenderBoxModelObject.cpp:
  • rendering/RenderImage.cpp:
  • rendering/RenderObject.cpp:

Source/WebKit2:

  • UIProcess/BackingStore.h:
  • UIProcess/FindIndicator.cpp:
  • UIProcess/mac/WKPrintingView.h:

Mar 22, 2014:

10:40 PM Changeset in webkit [166137] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, adjust sizes for ARM64.

  • ftl/FTLInlineCacheSize.cpp:

(JSC::FTL::sizeOfCall):

9:36 PM Changeset in webkit [166136] by fpizlo@apple.com
  • 3 edits
    1 add in trunk/Source/JavaScriptCore

Protect the silent spiller/filler's desire to fill Int32Constants by making sure that we don't mark something as having a Int32 register format if it's a non-Int32 constant
https://bugs.webkit.org/show_bug.cgi?id=130649
<rdar://problem/16399949>

Reviewed by Andreas Kling.

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):

  • tests/stress/fuzz-bug-16399949.js: Added.

(tryItOut.f):
(tryItOut):

9:34 PM Changeset in webkit [166135] by fpizlo@apple.com
  • 28 edits
    1 add in trunk/Source/JavaScriptCore

Call linking slow paths should be passed a CallLinkInfo* directly so that you can create a call IC without adding it to any CodeBlocks
https://bugs.webkit.org/show_bug.cgi?id=130644

Reviewed by Andreas Kling.

This is conceptually a really simple change but it involves the following:

  • The inline part of the call IC stuffs a pointer to the CallLinkInfo into regT2.


  • CodeBlock uses a Bag of CallLinkInfos instead of a Vector.


  • Remove the significance of a CallLinkInfo's index. This means that DFG::JITCode no longer has a vector of slow path counts that shadows the CallLinkInfo vector.


  • Make CallLinkInfo have its own slowPathCount, which counts actual slow path executions and not all relinking.


This makes planting JS->JS calls inside other inline caches or stubs a lot easier, since
the CallLinkInfo and the call IC slow paths no longer rely on the call being associated
with a op_call/op_construct instruction and a machine code return PC within such an
instruction.

  • bytecode/CallLinkInfo.h:

(JSC::getCallLinkInfoCodeOrigin):

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeDFGStatuses):

  • bytecode/CallLinkStatus.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::printCallOp):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::getCallLinkInfoMap):
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex):
(JSC::CodeBlock::addCallLinkInfo):
(JSC::CodeBlock::unlinkCalls):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::stubInfoBegin):
(JSC::CodeBlock::stubInfoEnd):
(JSC::CodeBlock::callLinkInfosBegin):
(JSC::CodeBlock::callLinkInfosEnd):
(JSC::CodeBlock::byValInfo):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):

  • dfg/DFGJITCode.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addJSCall):
(JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::reifyInlinedCallFrames):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLCompile.cpp:

(JSC::FTL::fixFunctionBasedOnStackMaps):

  • ftl/FTLInlineCacheSize.cpp:

(JSC::FTL::sizeOfCall):

  • ftl/FTLJSCall.cpp:

(JSC::FTL::JSCall::JSCall):
(JSC::FTL::JSCall::emit):
(JSC::FTL::JSCall::link):

  • ftl/FTLJSCall.h:
  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::privateCompile):

  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:

(JSC::operationLinkFor):
(JSC::operationVirtualFor):
(JSC::operationLinkClosureCallFor):

  • jit/Repatch.cpp:

(JSC::linkClosureCall):

  • jit/ThunkGenerators.cpp:

(JSC::slowPathFor):
(JSC::virtualForThunkGenerator):

  • tests/stress/eval-that-is-not-eval.js: Added.
7:43 PM Changeset in webkit [166134] by commit-queue@webkit.org
  • 14 edits in trunk

Replace deprecatedIsCollapsibleWhitespace with RenderStyle::isCollapsibleWhiteSpace in TextIterator.
https://bugs.webkit.org/show_bug.cgi?id=130612.

Patch by Chang Shu <cshu@webkit.org> on 2014-03-22
Reviewed by Darin Adler.

Source/WebCore:

Some layout tests are affected by this change but the new behavior should be correct.

  • editing/TextIterator.cpp:

(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::handleTextBox):

LayoutTests:

  • accessibility/table-scope-expected.txt:
  • editing/deleting/delete-block-table-expected.txt:
  • editing/pasteboard/paste-into-anchor-text-expected.txt:
  • fast/dom/Element/offsetTop-table-cell-expected.txt:
  • fast/html/object-border-expected.txt:
  • fast/table/cell-in-row-before-misnested-text-crash-css-expected.txt:
  • fast/table/cell-in-row-before-misnested-text-crash-expected.txt:
  • fast/tokenizer/script_extra_close-expected.txt:
  • fast/xsl/mozilla-tests-expected.txt:
  • platform/mac/accessibility/aria-grid-with-strange-hierarchy-expected.txt:
  • platform/mac/accessibility/table-multi-bodies-expected.txt:
6:30 PM Changeset in webkit [166133] by fpizlo@apple.com
  • 1 edit
    1 move in trunk/Source/JavaScriptCore

Unreviewed, fix mispelled test name.

  • tests/stress/constand-folding-osr-exit.js: Removed.
  • tests/stress/constant-folding-osr-exit.js: Copied from Source/JavaScriptCore/tests/stress/constand-folding-osr-exit.js.
6:20 PM Changeset in webkit [166132] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
https://bugs.webkit.org/show_bug.cgi?id=130639

Reviewed by Darin Adler.

This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.

  • Removes gratuitous lookup of CSS properties that are known at compile time.
  • Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) that will alway yield the same results.
  • Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures but instead used the non-existent font-effect.
  • platform/mac/HTMLConverter.mm:

(HTMLConverterCaches::computedStylePropertyForElement):
(HTMLConverterCaches::inlineStylePropertyForElement):
(HTMLConverterCaches::propertyValueForNode):
(-[WebHTMLConverter _stringForNode:property:]):
(HTMLConverterCaches::floatPropertyValueForNode):
(-[WebHTMLConverter _getFloat:forNode:property:]):
(HTMLConverterCaches::isBlockElement):
(HTMLConverterCaches::elementHasOwnBackgroundColor):
(HTMLConverterCaches::colorPropertyValueForNode):
(-[WebHTMLConverter _colorForNode:property:]):
(-[WebHTMLConverter _computedAttributesForElement:]):
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
(-[WebHTMLConverter _addTableForElement:]):
(-[WebHTMLConverter _addTableCellForElement:]):
(-[WebHTMLConverter _processElement:tag:display:depth:]):
(-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
(-[WebHTMLConverter _processText:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):

6:03 PM Changeset in webkit [166131] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Fix debug build.

  • bindings/js/JSDOMBinding.h:

(WebCore::createWrapper):

6:01 PM Changeset in webkit [166130] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/Source/WebCore

Add *final* keyword to NavigatorContentUtils class
https://bugs.webkit.org/show_bug.cgi?id=130636

Reviewed by Darin Adler.

NavigatorContentUtils won't be used as a base class. So, added final keyword.

No new tests, no behavior changes.

  • Modules/navigatorcontentutils/NavigatorContentUtils.h:
5:38 PM Changeset in webkit [166129] by akling@apple.com
  • 1 edit in trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme

Revert accidental changes to WebKit.xcworkspace

5:35 PM Changeset in webkit [166128] by akling@apple.com
  • 49 edits in trunk

CREATE_DOM_WRAPPER doesn't need the ExecState.
<https://webkit.org/b/130648>

Source/JavaScriptCore:

Add a fast path from JSGlobalObject to the VM so we don't have
to dance via the Heap.

Reviewed by Darin Adler.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::vm):

Source/WebCore:

Remove the ExecState parameter from CREATE_DOM_WRAPPER and get all
that we need from the global object instead.

toJS() and toJSNewlyCreated() still take an ExecState, that needs
to be dealt with separately since some of them have scary looking
currentWorld() checks.

Reviewed by Darin Adler.

  • bindings/js/JSAudioContextCustom.cpp:

(WebCore::JSAudioContextConstructor::constructJSAudioContext):

  • bindings/js/JSBlobCustom.cpp:

(WebCore::toJS):
(WebCore::JSBlobConstructor::constructJSBlob):

  • bindings/js/JSCDATASectionCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSCSSValueCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSCanvasRenderingContextCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSDOMBinding.h:

(WebCore::createWrapper):
(WebCore::wrap):
(WebCore::createNewWrapper):

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSElementCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/JSEventCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSHTMLCollectionCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSHTMLTemplateElementCustom.cpp:

(WebCore::JSHTMLTemplateElement::content):

  • bindings/js/JSIDBAnyCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSImageDataCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSMediaStreamCapabilitiesCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSNodeCustom.cpp:

(WebCore::createWrapperInline):

  • bindings/js/JSPerformanceEntryCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSRTCIceCandidateCustom.cpp:

(WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):

  • bindings/js/JSRTCPeerConnectionCustom.cpp:

(WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):

  • bindings/js/JSRTCSessionDescriptionCustom.cpp:

(WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):

  • bindings/js/JSSVGPathSegCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSStyleSheetCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSTextCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/JSTextTrackCueCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSTouchCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/JSTouchListCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/JSTrackCustom.cpp:

(WebCore::toJS):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • dom/make_names.pl:

(printWrapperFunctions):
(printWrapperFactoryCppFile):
(printWrapperFactoryHeaderFile):

4:18 PM Changeset in webkit [166127] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix FTL build.

  • ftl/FTLJITFinalizer.cpp:
4:06 PM Changeset in webkit [166126] by msaboff@apple.com
  • 13 edits
    3 adds in trunk

toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
https://bugs.webkit.org/show_bug.cgi?id=130554

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
Did some cleanup as well. Moved the setting of the thisObject in a JSGlobalObject to
happen in finishCreation() so that it will also happen for other derived classes including
JSWorkerGlobalScopeBase.

  • API/JSContextRef.cpp:

(JSGlobalContextCreateInGroup):

  • jsc.cpp:

(GlobalObject::create):

  • API/tests/testapi.c:

(globalObject_initialize): Eliminated ASSERT that the global object we are creating matches
the result from JSContextGetGlobalObject() as that will return the proxy.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init): Removed thisValue parameter and the call to setGlobalThis() since
we now call setGlobalThis in finishCreation().

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::finishCreation):
(JSC::JSGlobalObject::setGlobalThis): Made this a private method.

Source/WebCore:

Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
Added cast from JSProxy->target() if the jsCast<>() to the native object fails
in toJSDedicatedWorkerGlobalScope() and toJSSharedWorkerGlobalScope().
The original cast is needed for access to the local side of the worker, while the JSProxy
cast is used on the remote side of a worker.

Test: fast/workers/worker-strict.html

  • bindings/js/JSWorkerGlobalScopeBase.cpp:

(WebCore::toJSDedicatedWorkerGlobalScope):
(WebCore::toJSSharedWorkerGlobalScope):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::evaluate): Changed to pass in the JSProxy and not
the WorkerGlobalScope object as the this object to script evaluation.

  • workers/DedicatedWorkerGlobalScope.idl:
  • workers/SharedWorkerGlobalScope.idl:
  • workers/WorkerGlobalScope.idl:

Added the new CustomProxyToJSObject attribute so we'll call to<{nativeClass}>() for
getting the object to use for global evaluation.

LayoutTests:

Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
New regressions tests.

  • fast/workers/resources/worker-strict.js: Added.
  • fast/workers/worker-strict-expected.txt: Added.
  • fast/workers/worker-strict.html: Added.
1:57 PM Changeset in webkit [166125] by akling@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix debug build.

  • bytecode/CodeBlock.cpp:
  • runtime/Executable.cpp:
1:02 PM Changeset in webkit [166124] by Simon Fraser
  • 9 edits in trunk/Source/WebCore

Some #include hygiene in Node/Element etc
https://bugs.webkit.org/show_bug.cgi?id=130642

Reviewed by Geoffrey Garen.

Clean up various #includes.

  • accessibility/AccessibilityObject.h:
  • bindings/js/WebCoreTypedArrayController.h:
  • dom/Element.h:
  • dom/EventListenerMap.h:
  • dom/EventTarget.h:
  • dom/Node.h:
  • rendering/RenderObject.h:
  • rendering/svg/RenderSVGRoot.h:
12:42 PM Changeset in webkit [166123] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

FloatRect.h on iOS should not suck in a system header
https://bugs.webkit.org/show_bug.cgi?id=130641

Reviewed by Geoff Garen.

Don't pull in <CoreGraphics/CGGeometry.h> from FloatRect.h.

  • platform/graphics/FloatRect.h:
12:19 PM Changeset in webkit [166122] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Fixed the iOS build.

Reviewed by Darin Adler.

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot):

11:56 AM Changeset in webkit [166121] by akling@apple.com
  • 8 edits
    1 add in trunk/Source

Cut down on JSC profiler includes in WebCore & co.
<https://webkit.org/b/130637>

Most of WebKit was pulling in JSC's profiler headers via VM.h.

Reviewed by Darin Adler.

  • dfg/DFGDisassembler.cpp:
  • dfg/DFGDisassembler.h:
  • dfg/DFGJITFinalizer.cpp:
  • jsc.cpp:
  • runtime/VM.cpp:
  • runtime/VM.h:
11:52 AM Changeset in webkit [166120] by Darin Adler
  • 41 edits in trunk/Source

Remove String::deprecatedCharacters
https://bugs.webkit.org/show_bug.cgi?id=126854

Reviewed by Sam Weinig.

Source/WebCore:

  • bindings/scripts/StaticString.pm:

(GenerateStrings): Remove the code to generate the null m_copyData16 pointer.

  • editing/TextIterator.cpp:

(WebCore::SearchBuffer::prependContext): Changed to use the new append function in
StringView.h and removed the one defined locally here.

  • editing/VisibleUnits.cpp:

(WebCore::wordBreakIteratorForMinOffsetBoundary): Use the new append function
in StringView.h instead of using deprecatedCharacters.
(WebCore::wordBreakIteratorForMaxOffsetBoundary): Ditto.
Removed an append function defined locally here and use the one in StringView.h.

  • editing/htmlediting.cpp:

(WebCore::stringWithRebalancedWhitespace): Use StringView::getCharactersWithUpconvert.

  • html/parser/HTMLToken.h:

(WebCore::HTMLToken::appendToAttributeValue): Changed to take a StringView instead
of a const String&.

  • loader/appcache/ManifestParser.cpp:

(WebCore::parseManifest): Use StringView and StringView::upconvertedCharacters.

  • page/EventSource.cpp:

(WebCore::EventSource::didReceiveData): Use the new append overload from StringView.h.
Also added a comment about incorrect use of the decode function.

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot): Use the new StringView append function.
Also use simpler new-style for loops.

  • platform/LinkHash.cpp:

(WebCore::visitedURLInline): Use the new append function and StringView::substring.
(WebCore::visitedLinkHash): Use upconvertedCharacters for the non-8-bit case.

  • platform/URL.cpp:

(WebCore::findFirstOf): Chagned to take a StringView.
(WebCore::containsOnlyASCII): Added. Works on StringView. Could move to a WTF header in
the future if it's needed elsewhere.
(WebCore::protocolIs): Added. Works on StringView. Could put in URL.h if needed elsewhere,
or consider replacing the one that takes const String& with just this one.
(WebCore::appendEncodedHostname): Changed to take a StringView and use
StringView::upconvertedCharacters.
(WebCore::findHostnamesInMailToURL): Changed to take a StringView.
(WebCore::findHostnameInHierarchicalURL): Ditto.
(WebCore::encodeHostnames): Ditto.
(WebCore::encodeRelativeString): Ditto.

  • platform/graphics/StringTruncator.cpp:

(WebCore::StringTruncator::width): Use StringView::upconvertedCharacters.

  • platform/graphics/harfbuzz/HarfBuzzShaper.cpp:

(WebCore::HarfBuzzShaper::setFontFeatures): Use indexing directly on the string instead
of on a UChar*.
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use StringView::upconvertedCharacters.

  • platform/text/TextCodecICU.cpp:

(WebCore::TextCodecICU::encode): Use a Vector<UChar> rather than a String to copy and
replace the backslashes with yen signs. Also optimize case where there are no backslashes.

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::paint): Use TextRun::setText(StringView).

  • rendering/RenderText.cpp:

(WebCore::maxWordFragmentWidth): Pass a String to RenderBlock::constructTextRun instead of
calling StringBuilder::deprecatedCharacters.

  • rendering/RenderText.h: Removed deprecatedCharacters function.
  • rendering/line/BreakingContextInlineHeaders.h: Added now-needed header include.
  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::constructTextRun): Use StringView version of TextRun constructor.

  • rendering/svg/SVGTextMetrics.cpp:

(WebCore::SVGTextMetrics::SVGTextMetrics): Take references instead of pointers.
(WebCore::SVGTextMetrics::constructTextRun): Take references instead of pointers, and don't
take a character pointer any more. Instead, extract the text and use the StringView version of
the TextRun constructor.
(WebCore::SVGTextMetrics::measureCharacterRange): Take references instead of pointers and
update for above changes.

  • rendering/svg/SVGTextMetrics.h: Updated for changes above. Also tweaked style a bit.
  • rendering/svg/SVGTextMetricsBuilder.cpp:

(WebCore::SVGTextMetricsBuilder::advanceSimpleText): Updated for SVGTextMetrics changes.
(WebCore::SVGTextMetricsBuilder::advanceComplexText): Ditto.
(WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): Ditto.
(WebCore::SVGTextMetricsBuilder::measureTextRenderer): Change code to store a character
for lastCharacter rather than storing a pointer to a character. Stop using TextRun::data16.

  • rendering/svg/SVGTextQuery.cpp:

(WebCore::SVGTextQuery::subStringLengthCallback): Updated for SVGTextMetrics changes.
(WebCore::SVGTextQuery::startPositionOfCharacterCallback): Ditto.
(WebCore::SVGTextQuery::endPositionOfCharacterCallback): Ditto.
(WebCore::calculateGlyphBoundaries): Ditto.

  • xml/XPathFunctions.cpp:

(WebCore::XPath::atomicSubstring): Added.
(WebCore::XPath::FunId::evaluate): Tweaked a bit to use a new style for loop.
Use the atomicSubstring function to avoid making a temporary String just to make an AtomicString.
That function also uses characters8/16 rather than depreccatedCharacters.

  • xml/XPathNodeSet.h: Added begin and end so this collection can be iterated with new style for loop.
  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::doWrite): Use StringView::upconvertedCharacters.
(WebCore::parseAttributes): Ditto.

Source/WebKit:

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

Removed getData16SlowCase.

Source/WebKit/ios:

  • Misc/WebNSStringDrawing.h: Added a FIXME about deleting this file; we can probably do it soon.
  • Misc/WebNSStringDrawing.mm:

(+[NSString _web_setWordRoundingEnabled:]):
(+[NSString _web_wordRoundingEnabled]):
(+[NSString _web_setWordRoundingAllowed:]):
(+[NSString _web_wordRoundingAllowed]):
(+[NSString _web_setAscentRoundingEnabled:]):
(+[NSString _web_ascentRoundingEnabled]):
(-[NSString _web_drawAtPoint:withFont:]):
(-[NSString _web_sizeWithFont:]):
(-[NSString _web_sizeWithFont:forWidth:ellipsis:]):
(-[NSString _web_sizeWithFont:forWidth:ellipsis:letterSpacing:]):
(-[NSString _web_sizeWithFont:forWidth:ellipsis:letterSpacing:resultRange:]):
(-[NSString _web_drawAtPoint:forWidth:withFont:ellipsis:]):
(-[NSString _web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:]):
(-[NSString _web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:]):
(-[NSString _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:truncationRect:measureOnly:]):
(-[NSString _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:truncationRect:]):
(-[NSString _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:]):
(-[NSString _web_drawInRect:withFont:ellipsis:alignment:]):
(-[NSString _web_sizeInRect:withFont:ellipsis:lineSpacing:]):
(-[NSString _web_sizeInRect:withFont:ellipsis:]):
(-[NSString _web_stringForWidth:withFont:ellipsis:letterSpacing:includeEmoji:]):
(-[NSString _web_sizeForWidth:withAttributes:]):
(-[NSString _web_drawAtPoint:forWidth:withAttributes:]):
(-[NSString _web_sizeInRect:withAttributes:]):
(-[NSString _web_drawInRect:withAttributes:]):
Emptied out all these functions since callers aren't really using them any more.

Source/WebKit/win:

  • WebKitStatistics.cpp:

(WebKitStatistics::comClassNameCounts): Update to not use Vector::append(String).

Source/WTF:

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::reifyString): Removed code to update 16-bit shadow.

  • wtf/text/StringBuilder.h: Removed deprecatedCharacters.

(WTF::StringBuilder::StringBuilder): Removed m_valid16BitShadowLength.
(WTF::StringBuilder::clear): Removed code to clear m_valid16BitShadowLength.
(WTF::StringBuilder::swap): Removed code to swap m_valid16BitShadowLength.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::~StringImpl): Removed code to free m_copyData16.
(WTF::StringImpl::upper): Use StringView::upconvertedCharacters for slow case.
(WTF::StringImpl::lower): Ditto.
(WTF::StringImpl::find): Use characters8/16 rather than deprecatedCharacters.
Added an 8-bit code path to one of the overloads. Might want to revisit later
to decide whether to use templates instead of copy/paste, or even use StringView
to cut down on duplicate code paths.
(WTF::StringImpl::findIgnoringCase): Ditto.
(WTF::StringImpl::sizeInBytes): Remove code to handle has16BitShadow case.
(WTF::equalIgnoringNullity): Added. To be called by the Vector template in the header.

  • wtf/text/StringImpl.h: Removed deprecatedCharacters, has16BitShadow,

upconvertCharacters, getData16SlowCase, s_hashFlagHas16BitShadow, and m_copyData16.
(WTF::equalIgnoringNullity): Changed the template function into an inline that calls
a non-inline helper function. The non-inline function handles both 8-bit and 16-bit
strings.

  • wtf/text/StringView.h:

(WTF::StringView::StringView): Added an overload so we can make one of these directly
from a StringImpl without first wrapping it in a string. Added an adapter so we can
use StringView as part of string concatenation. Added an append function so we can
append to a Vector<UChar>.

  • wtf/text/WTFString.cpp:

(WTF::String::append): Use StringView::getCharactersWithUpconvert. Also changed
single-character append so it won't always turn an 8-bit string into a 16-bit one.
(WTF::String::insert): Removed one insert overload and changed the other to use
StringView::getCharactersWithUpconvert.
(WTF::String::truncate): Changed to use StringImpl::substring.
(WTF::String::percentage): Added characters8/16 paths instead of using
deprecatedCharacters.

  • wtf/text/WTFString.h: Removed deprecatedCharacters, getCharactersWithUpconvert,

insert(UChar*, unsigned, unsigned), and the append overload for Vector<UChar>.

11:31 AM Changeset in webkit [166119] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r166118.
https://bugs.webkit.org/show_bug.cgi?id=130640

Crashing things (Requested by weinig on #webkit).

Reverted changeset:

"Switch HTMLConverter to use CSSPropertyIDs to refer to CSS
properties"
https://bugs.webkit.org/show_bug.cgi?id=130639
http://trac.webkit.org/changeset/166118

11:01 AM Changeset in webkit [166118] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
https://bugs.webkit.org/show_bug.cgi?id=130639

Reviewed by Simon Fraser.

This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.

  • Removes gratuitous lookup of CSS properties that are known at compile time.
  • Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) that will alway yield the same results.
  • Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures but instead used the non-existent font-effect.
  • platform/mac/HTMLConverter.mm:

(HTMLConverterCaches::computedStylePropertyForElement):
(HTMLConverterCaches::inlineStylePropertyForElement):
(HTMLConverterCaches::propertyValueForNode):
(-[WebHTMLConverter _stringForNode:property:]):
(HTMLConverterCaches::floatPropertyValueForNode):
(-[WebHTMLConverter _getFloat:forNode:property:]):
(HTMLConverterCaches::isBlockElement):
(HTMLConverterCaches::elementHasOwnBackgroundColor):
(HTMLConverterCaches::colorPropertyValueForNode):
(-[WebHTMLConverter _colorForNode:property:]):
(-[WebHTMLConverter _computedAttributesForElement:]):
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
(-[WebHTMLConverter _addTableForElement:]):
(-[WebHTMLConverter _addTableCellForElement:]):
(-[WebHTMLConverter _processElement:tag:display:depth:]):
(-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
(-[WebHTMLConverter _processText:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):

10:52 AM Changeset in webkit [166117] by Simon Fraser
  • 9 edits in trunk

Source/WebCore: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627
<rdar://problem/16368869>

Reviewed by Sam Weinig.

Remove the call to flushCompositingStateForThisFrame() here. We should
have always flushed before painting via other mechanisms in WebKit2 and WebKit2.
Flushing during painting is actually harmful, since we could be inside
a CA commit already, and creating or destroying layers via flushing is bad.

  • page/FrameView.cpp:

(WebCore::FrameView::willPaintContents):

Source/WebKit/mac: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627

Reviewed by Sam Weinig.

Make _flushCompositingChanges private so DRT can call it;
moved it into the Private category.

  • WebView/WebView.mm:

(-[WebView _flushCompositingChanges]):

  • WebView/WebViewPrivate.h:

Tools: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627
<rdar://problem/16368869>

Reviewed by Sam Weinig.

Fix DRT to correctly render tests with layers now that FrameView::paintContents
does not flush.

Move the -[WebView displayIfNeeded] from -[FrameLoadDelegate webView:didFinishLoadForFrame:]
into an explicit function called before dumping.

Then explicitly call _flushCompositingChanges to ensure that GraphicsLayer changes
are flushed to CA. They will be pushed to the window by snapshotting.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:

Fix weird path to IOKit.framework.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(updateDisplay):
(dump):

  • DumpRenderTree/mac/FrameLoadDelegate.mm:

(-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]): Fix parameter name.
(-[FrameLoadDelegate webView:didFinishLoadForFrame:]): Remove display call.

10:51 AM Changeset in webkit [166116] by Simon Fraser
  • 2 edits in trunk/Source/WebKit/mac

Remove duplicate line added during merging
https://bugs.webkit.org/show_bug.cgi?id=130623

Reviewed by Beth Dakin.

Remove a duplicate call to -_viewWillDrawInternal which
was added during merges.

  • WebView/WebView.mm:

(LayerFlushController::flushLayers):

9:50 AM Changeset in webkit [166115] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

Assertions in WebPage::rangeFromEditingRange when requested range location is NSNotFound
https://bugs.webkit.org/show_bug.cgi?id=130633
<rdar://problem/16397583>

Reviewed by Darin Adler.

  • UIProcess/API/mac/WKView.mm:

(-[WKView firstRectForCharacterRange:completionHandler:]):
(-[WKView firstRectForCharacterRange:actualRange:]):
Return NSZeroRect, like NSTextView does for any locations that are out of bounds.
There is no need for a round trip to WebProcess in this case.

8:16 AM Changeset in webkit [166114] by Darin Adler
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
https://bugs.webkit.org/show_bug.cgi?id=127361

Source/WebCore:

Huge numbers represented by the 'INF' value can not be used
in CSS rules, so they make the assert fail. We have to make
sure that the parsed property value is finite, otherwise
the property will be dropped.

Test: fast/css/infinite-floating-value.html

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-03-22

  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::createValue):

LayoutTests:

Added test shows that CSS rules containing huge numbers
(which are transformed into 'INF' values after parsing)
are dropped.

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-03-22
Reviewed by Darin Adler.

  • fast/css/infinite-floating-value-expected.txt: Added.
  • fast/css/infinite-floating-value.html: Added.
7:31 AM Changeset in webkit [166113] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Use pthread_stackseg_np() to find the stack bounds on OpenBSD.
https://bugs.webkit.org/show_bug.cgi?id=129965

Reviewed By Anders Carlsson.

Patch by Landry Breuil <landry@openbsd.org> on 2014-03-22

12:36 AM Changeset in webkit [166112] by matthew_hanson@apple.com
  • 2 edits in branches/safari-537.75-branch/Source/WebCore

Finish merge of r160065.

Note: See TracTimeline for information about the timeline view.