WebKit-https.git
8 years ago[Qt][WK2] Crash on window resize if WebProcess is closed/crashed
commit-queue@webkit.org [Sat, 16 Feb 2013 01:42:13 +0000 (01:42 +0000)]
[Qt][WK2] Crash on window resize if WebProcess is closed/crashed
https://bugs.webkit.org/show_bug.cgi?id=109216

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2013-02-15
Reviewed by Benjamin Poulain.

Only make calls into DrawingAreaProxy pointer after checking its state.

When the WebProcess was closed or crashed, WebKit::WebPageProxy will set
its DrawingAreaProxy pointer to null. Resize events on UIProcess/client will
try to access the object to update the geometry and forward this information
into the WebProcess. This would create a crash scenario that is fixed by this patch.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didRelaunchProcess):
(QQuickWebViewLegacyPrivate::updateViewportSize):

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

8 years agoCalling DOM Element.attributes shouldn't force creation of ElementData.
akling@apple.com [Sat, 16 Feb 2013 01:39:19 +0000 (01:39 +0000)]
Calling DOM Element.attributes shouldn't force creation of ElementData.
<http://webkit.org/b/109976>

Reviewed by Darin Adler.

Don't create ElementData for an Element unnecessarily just because someone calls .attributes on it.
Previously, JS like this would create empty ElementData when 'element' has no attributes:

    for (i = 0; i < element.attributes.length; ++i)
        doStuff(element.attributes[i]);

Make NamedNodeMap::length() short-circuit and return 0 if !Element::hasAttributes().

* dom/Element.cpp:
(WebCore::Element::attributes):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::length):

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

8 years ago[V8] An "EvenTarget" type in IDL should be converted to EventTarget*, not to Node*
haraken@chromium.org [Sat, 16 Feb 2013 01:24:03 +0000 (01:24 +0000)]
[V8] An "EvenTarget" type in IDL should be converted to EventTarget*, not to Node*
https://bugs.webkit.org/show_bug.cgi?id=109895

Reviewed by Adam Barth.

Currently an "EventTarget" type in IDL is converted to Node*.
This is wrong because there are non-Node interfaces that inherit
a EventTarget. We should convert an "EventTarget" type to EventTarget*.
This will fix FIXMEs in CodeGeneratorV8.pm.

* bindings/scripts/CodeGeneratorV8.pm:
(GetNativeType):
(JSValueToNative):

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

8 years agoREGRESSION (r142505?): Crashes in WebCore::ScrollingStateNode::appendChild when using...
simon.fraser@apple.com [Sat, 16 Feb 2013 01:20:38 +0000 (01:20 +0000)]
REGRESSION (r142505?): Crashes in WebCore::ScrollingStateNode::appendChild when using back/forward buttons
https://bugs.webkit.org/show_bug.cgi?id=109826
<rdar://problem/13216100>

Source/WebCore:

Reviewed by Beth Dakin.

Fix a crash when going Back on some pages with fixed position elements.

When a page was being restored from the page cache, and a layout from
FrameLoader::commitProvisionalLoad() caused us to try to register the fixed
position layer before the main scrolling layer, we'd crash trying to dereference
the root node.

Fix by bailing from ScrollingStateTree::attachNode() if we can't find the parent
node.

Test: platform/mac-wk2/tiled-drawing/null-parent-back-crash.html

* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::stateNodeForID):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):

LayoutTests:

Reviewed by Beth Dakin.

Test having a page with an iframe that navigates forwards then back.

* platform/mac-wk2/tiled-drawing/null-parent-back-crash.html: Added.

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

8 years agoConstrain fixed layers to the viewport, not the document
simon.fraser@apple.com [Sat, 16 Feb 2013 01:05:20 +0000 (01:05 +0000)]
Constrain fixed layers to the viewport, not the document
https://bugs.webkit.org/show_bug.cgi?id=109646

Source/WebCore:

Reviewed by Beth Dakin.

It's bad to constrain position:fixed compositing layers to the
document rect, because their bounds will change every time the scroll
position changes, and we're not good currently at synchronizing scrolling
thread layer updates with main thread layer updates, so jiggles ensue.

Fix by constraining position:fixed layers to the viewport.

Test: compositing/geometry/limit-layer-bounds-fixed.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):

LayoutTests:

Reviewed by Beth Dakin.

Test with a big fixed element in a compositing layer.

* compositing/geometry/limit-layer-bounds-fixed-expected.txt: Added.
* compositing/geometry/limit-layer-bounds-fixed.html: Added.

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

8 years agoAdd a CDMClient class which allows the CDM to query for the currently attached MediaP...
jer.noble@apple.com [Sat, 16 Feb 2013 01:03:29 +0000 (01:03 +0000)]
Add a CDMClient class which allows the CDM to query for the currently attached MediaPlayer.
https://bugs.webkit.org/show_bug.cgi?id=109702

Reviewed by Eric Carlson.

Some CDM implementations will need to work closely with an associated
MediaPlayer in order to generate key requests and provide keys. Add a
client protocol to be implemented by the MediaKeys object which can
provide access to the associated MediaPlayer if present.

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::CDM): Initialize the m_client ivar.
(WebCore::CDM::mediaPlayer): Pass to the client, if present.
* Modules/encryptedmedia/CDM.h:
(WebCore::CDM::client): Simple getter.
(WebCore::CDM::setClient): Simple setter.
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::MediaKeys): Initialize the m_mediaElement ivar
    and call setClient() on the passed in CDM.
(WebCore::MediaKeys::setMediaElement): Simple setter.
(WebCore::MediaKeys::cdmMediaPlayer): Retrieve the MediaPlayer from
    the m_mediaElement if present.
* Modules/encryptedmedia/MediaKeys.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement): Call setMediaKeys(0)
    to clear the mediaElement in any associated MediaKeys.
(WebCore::HTMLMediaElement::setMediaKeys): Clear the mediaElement on
    any associated MediaKeys, and set the mediaElement on the newly
    associated MediaKeys.

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

8 years agoAdd HashMap::isValidKey and HashSet::isValidValue
andersca@apple.com [Sat, 16 Feb 2013 01:01:03 +0000 (01:01 +0000)]
Add HashMap::isValidKey and HashSet::isValidValue
https://bugs.webkit.org/show_bug.cgi?id=109977

Reviewed by Sam Weinig and Darin Adler.

Source/WebKit2:

Just call HashMap::isValidKey directly.

* UIProcess/WebProcessProxy.cpp:
(WebKit::generatePageID):
Initialize the id to 0 and use prefix increment.

(WebKit::WebProcessProxy::webFrame):
(WebKit::WebProcessProxy::canCreateFrame):
(WebKit::WebProcessProxy::didDestroyFrame):

Source/WTF:

Add helper functions for determining whether keys are valid, i.e. if
they are _not_ empty or deleted according to the hash traits.

* wtf/HashMap.h:
* wtf/HashSet.h:

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

8 years agodrop-shadow filter with overflow:hidden child misbehaves
simon.fraser@apple.com [Sat, 16 Feb 2013 00:55:44 +0000 (00:55 +0000)]
drop-shadow filter with overflow:hidden child misbehaves
https://bugs.webkit.org/show_bug.cgi?id=109783

Source/WebCore:

Reviewed by Dean Jackson.

The change in r112745 was not sufficient; it failed to account
for descendant layers that needed to not clipping to avoid artefacts
with filters like drop-shadow.

Test: css3/filters/filter-repaint-shadow-layer-child.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents): Remove the useClipRect bool.
Replace it with a clipToDirtyRect member on the LayerPaintingInfo, which
gets passed to descendants. Remove some "Restore the clip" comments that added
nothing.
* rendering/RenderLayer.h:
(WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
(LayerPaintingInfo):

LayoutTests:

Reviewed by Dean Jackson.

* css3/filters/filter-repaint-shadow-layer-child-expected.html: Added.
* css3/filters/filter-repaint-shadow-layer-child.html: Added.

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

8 years agoUnreviewed, rolling out r143066.
commit-queue@webkit.org [Sat, 16 Feb 2013 00:52:07 +0000 (00:52 +0000)]
Unreviewed, rolling out r143066.
http://trac.webkit.org/changeset/143066
https://bugs.webkit.org/show_bug.cgi?id=109986

Broke the Apple Lion build (among others). (Requested by
ddkilzer on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-15

* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::attachWrapper):
* accessibility/mac/WebAccessibilityObjectWrapper.h:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper unregisterUniqueIdForUIElement]):
(-[WebAccessibilityObjectWrapper detach]):
(-[WebAccessibilityObjectWrapper accessibilityObject]):
(-[WebAccessibilityObjectWrapper attachmentView]):
(CFAutoreleaseHelper):
(AXObjectIsTextMarker):
(AXObjectIsTextMarkerRange):
(AXTextMarkerRange):
(AXTextMarkerRangeStart):
(AXTextMarkerRangeEnd):
(SearchKeyEntry):
(createAccessibilitySearchKeyMap):
(accessibilitySearchKeyForString):
(textMarkerForVisiblePosition):
(-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]):
(visiblePositionForTextMarker):
(-[WebAccessibilityObjectWrapper visiblePositionForTextMarker:]):
(visiblePositionForStartOfTextMarkerRange):
(visiblePositionForEndOfTextMarkerRange):
(textMarkerRangeFromMarkers):
(AXAttributedStringRangeIsValid):
(AXAttributeStringSetFont):
(CreateCGColorIfDifferent):
(AXAttributeStringSetColor):
(AXAttributeStringSetNumber):
(AXAttributeStringSetStyle):
(AXAttributeStringSetBlockquoteLevel):
(AXAttributeStringSetSpelling):
(AXAttributeStringSetHeadingLevel):
(AXAttributeStringSetElement):
(AXAttributedStringAppendText):
(nsStringForReplacedNode):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
(textMarkerRangeFromVisiblePositions):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
(-[WebAccessibilityObjectWrapper accessibilityActionNames]):
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]):
(-[WebAccessibilityObjectWrapper renderWidgetChildren]):
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
(convertToVector):
(convertToNSArray):
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
(-[WebAccessibilityObjectWrapper position]):
(createAccessibilityRoleMap):
(roleValueToNSString):
(-[WebAccessibilityObjectWrapper role]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper scrollViewParent]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
(-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
(-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
(-[WebAccessibilityObjectWrapper accessibilityIsIgnored]):
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]):
(-[WebAccessibilityObjectWrapper accessibilityPerformIncrementAction]):
(-[WebAccessibilityObjectWrapper accessibilityPerformDecrementAction]):
(-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(rendererForView):
(-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
(-[WebAccessibilityObjectWrapper accessibilityActionDescription:]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]):
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):
(-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
(-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
(-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper accessibilitySupportsOverriddenAttributes]):
(-[WebAccessibilityObjectWrapper accessibilityShouldUseUniqueId]):
(-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.h: Removed.
* accessibility/mac/WebAccessibilityObjectWrapperMac.m: Removed.

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

8 years agoChange MouseRelatedEvent to use LayoutPoint::scale
eae@chromium.org [Sat, 16 Feb 2013 00:33:06 +0000 (00:33 +0000)]
Change MouseRelatedEvent to use LayoutPoint::scale
https://bugs.webkit.org/show_bug.cgi?id=109979

Reviewed by Dimitri Glazkov.

Change MouseRelatedEvent::MouseRelatedEvent to use LayoutPoint::
scale to adjust location and scroll offset for scale factor and
zooming.

No new tests, no change in functionality.

* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):

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

8 years ago[WK2] Write a test to simulate crashed WebProcess followed by Window resize
benjamin@webkit.org [Sat, 16 Feb 2013 00:22:08 +0000 (00:22 +0000)]
[WK2] Write a test to simulate crashed WebProcess followed by Window resize
https://bugs.webkit.org/show_bug.cgi?id=109842

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2013-02-15
Reviewed by Benjamin Poulain.

This new test will kill WebProcess, followed by next resizing the Window. It helps to
identify if the port is testing for WebPageProxy data members state (e.g. DrawingArea, Frames)
before making calls into them.

* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp: Added.
(TestWebKitAPI):
(TestWebKitAPI::didFinishLoad):
(TestWebKitAPI::didCrash):
(TestWebKitAPI::TEST):

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

8 years agoAX: Split WebAccessibilityObjectWrapper so code can be shared with iOS
cfleizach@apple.com [Sat, 16 Feb 2013 00:17:50 +0000 (00:17 +0000)]
AX: Split WebAccessibilityObjectWrapper so code can be shared with iOS
https://bugs.webkit.org/show_bug.cgi?id=109849

Reviewed by David Kilzer.

Split up the WebAccessibilityObjectWrapper so that iOS can share more
code with MacOS. I imagine over time, more code will move into this base class,
but for now this will be a good start.

A base class called WebAccessibilityObjectWrapper now exists, and Mac has a subclass
of that. iOS will be able to do the same.

* WebCore.xcodeproj/project.pbxproj:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::attachWrapper):
* accessibility/mac/WebAccessibilityObjectWrapper.h:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper detach]):
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper accessibilityObject]):
(-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
(-[WebAccessibilityObjectWrapper titleTagShouldBeUsedInDescriptionField]):
(-[WebAccessibilityObjectWrapper accessibilityTitle]):
(-[WebAccessibilityObjectWrapper accessibilityDescription]):
(-[WebAccessibilityObjectWrapper accessibilityHelpText]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.h: Added.
* accessibility/mac/WebAccessibilityObjectWrapperMac.m: Added.
(std):
(-[WebAccessibilityObjectWrapperMac detach]):
(-[WebAccessibilityObjectWrapperMac attachmentView]):
(CFAutoreleaseHelper):
(AXObjectIsTextMarker):
(AXObjectIsTextMarkerRange):
(AXTextMarkerRange):
(AXTextMarkerRangeStart):
(AXTextMarkerRangeEnd):
(SearchKeyEntry):
(createAccessibilitySearchKeyMap):
(accessibilitySearchKeyForString):
(textMarkerForVisiblePosition):
(-[WebAccessibilityObjectWrapperMac textMarkerForVisiblePosition:]):
(visiblePositionForTextMarker):
(-[WebAccessibilityObjectWrapperMac visiblePositionForTextMarker:]):
(visiblePositionForStartOfTextMarkerRange):
(visiblePositionForEndOfTextMarkerRange):
(textMarkerRangeFromMarkers):
(AXAttributedStringRangeIsValid):
(AXAttributeStringSetFont):
(CreateCGColorIfDifferent):
(AXAttributeStringSetColor):
(AXAttributeStringSetNumber):
(AXAttributeStringSetStyle):
(AXAttributeStringSetBlockquoteLevel):
(AXAttributeStringSetSpelling):
(AXAttributeStringSetHeadingLevel):
(AXAttributeStringSetElement):
(AXAttributedStringAppendText):
(nsStringForReplacedNode):
(-[WebAccessibilityObjectWrapperMac doAXAttributedStringForTextMarkerRange:]):
(textMarkerRangeFromVisiblePositions):
(-[WebAccessibilityObjectWrapperMac textMarkerRangeFromVisiblePositions:endPosition:]):
(-[WebAccessibilityObjectWrapperMac accessibilityActionNames]):
(-[WebAccessibilityObjectWrapperMac additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapperMac accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapperMac visiblePositionRangeForTextMarkerRange:]):
(-[WebAccessibilityObjectWrapperMac renderWidgetChildren]):
(-[WebAccessibilityObjectWrapperMac remoteAccessibilityParentObject]):
(convertToVector):
(convertToNSArray):
(-[WebAccessibilityObjectWrapperMac textMarkerRangeForSelection]):
(-[WebAccessibilityObjectWrapperMac position]):
(createAccessibilityRoleMap):
(roleValueToNSString):
(-[WebAccessibilityObjectWrapperMac role]):
(-[WebAccessibilityObjectWrapperMac subrole]):
(-[WebAccessibilityObjectWrapperMac roleDescription]):
(-[WebAccessibilityObjectWrapperMac scrollViewParent]):
(-[WebAccessibilityObjectWrapperMac titleTagShouldBeUsedInDescriptionField]):
(-[WebAccessibilityObjectWrapperMac accessibilityTitle]):
(-[WebAccessibilityObjectWrapperMac accessibilityDescription]):
(-[WebAccessibilityObjectWrapperMac accessibilityHelpText]):
(-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapperMac accessibilityFocusedUIElement]):
(-[WebAccessibilityObjectWrapperMac accessibilityHitTest:]):
(-[WebAccessibilityObjectWrapperMac accessibilityIsAttributeSettable:]):
(-[WebAccessibilityObjectWrapperMac accessibilityIsIgnored]):
(-[WebAccessibilityObjectWrapperMac accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapperMac accessibilityPerformPressAction]):
(-[WebAccessibilityObjectWrapperMac accessibilityPerformIncrementAction]):
(-[WebAccessibilityObjectWrapperMac accessibilityPerformDecrementAction]):
(-[WebAccessibilityObjectWrapperMac accessibilityPerformShowMenuAction]):
(-[WebAccessibilityObjectWrapperMac accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapperMac accessibilityPerformAction:]):
(-[WebAccessibilityObjectWrapperMac accessibilitySetValue:forAttribute:]):
(rendererForView):
(-[WebAccessibilityObjectWrapperMac _accessibilityParentForSubview:]):
(-[WebAccessibilityObjectWrapperMac accessibilityActionDescription:]):
(-[WebAccessibilityObjectWrapperMac doAXAttributedStringForRange:]):
(-[WebAccessibilityObjectWrapperMac _convertToNSRange:]):
(-[WebAccessibilityObjectWrapperMac _indexForTextMarker:]):
(-[WebAccessibilityObjectWrapperMac _textMarkerForIndex:]):
(-[WebAccessibilityObjectWrapperMac doAXRTFForRange:]):
(-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapperMac accessibilitySupportsOverriddenAttributes]):
(-[WebAccessibilityObjectWrapperMac accessibilityShouldUseUniqueId]):
(-[WebAccessibilityObjectWrapperMac accessibilityIndexOfChild:]):
(-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeCount:]):
(-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeValues:index:maxCount:]):
([WebAccessibilityObjectWrapperMac accessibilitySetShouldRepostNotifications:]):
(-[WebAccessibilityObjectWrapperMac accessibilityPostedNotification:]):

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

8 years agoTypo fix after r143064.
ossy@webkit.org [Fri, 15 Feb 2013 23:58:53 +0000 (23:58 +0000)]
Typo fix after r143064.

* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::sendOutgoingMessage):

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

8 years agoOne more buildfix after r143052.
ossy@webkit.org [Fri, 15 Feb 2013 23:47:43 +0000 (23:47 +0000)]
One more buildfix after r143052.

* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::sendOutgoingMessage):

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

8 years agoWin EWS script, credentials passed in.
roger_fong@apple.com [Fri, 15 Feb 2013 23:14:34 +0000 (23:14 +0000)]
Win EWS script, credentials passed in.

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

8 years agoUnreviewed buildfix after r143052 for Qt/GTK/EFL ports.
ossy@webkit.org [Fri, 15 Feb 2013 23:14:31 +0000 (23:14 +0000)]
Unreviewed buildfix after r143052 for Qt/GTK/EFL ports.

* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::encode):
* Platform/win/SharedMemoryWin.cpp:
(WebKit::SharedMemory::Handle::encode):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode):
* Shared/WebBatteryStatus.cpp:
(WebKit::WebBatteryStatus::Data::encode):
* Shared/WebNetworkInfo.cpp:
(WebKit::WebNetworkInfo::Data::encode):
* Shared/efl/LayerTreeContextEfl.cpp:
(WebKit::LayerTreeContext::encode):
* Shared/gtk/LayerTreeContextGtk.cpp:
(WebKit::LayerTreeContext::encode):
* Shared/qt/LayerTreeContextQt.cpp:
(WebKit::LayerTreeContext::encode):
* Shared/qt/QtNetworkReplyData.cpp:
(WebKit::QtNetworkReplyData::encode):
* Shared/qt/QtNetworkRequestData.cpp:
(WebKit::QtNetworkRequestData::encode):
* Shared/soup/PlatformCertificateInfo.cpp:
(WebKit::PlatformCertificateInfo::encode):

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

8 years agoRemove support for RVCT version less than 4.0
commit-queue@webkit.org [Fri, 15 Feb 2013 23:12:26 +0000 (23:12 +0000)]
Remove support for RVCT version less than 4.0
https://bugs.webkit.org/show_bug.cgi?id=109390

The 4.0 version of the RVCT compiler was
released in 2008.

Remove support for version older then 4.0 of RVCT,
and keep the support for newer RVCT versions.

Patch by Laszlo Gombos <l.gombos@samsung.com> on 2013-02-15
Reviewed by Zoltan Herczeg.

* WTF.gypi: Remove StringExtras.cpp.
* WTF.vcproj/WTF.vcproj: Remove StringExtras.cpp.
* WTF.vcxproj/WTF.vcxproj: Remove StringExtras.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Remove StringExtras.cpp.
* WTF.xcodeproj/project.pbxproj: Remove StringExtras.cpp.
* wtf/CMakeLists.txt: Remove StringExtras.cpp.
* wtf/Compiler.h: Remove tests for RVCT_VERSION_AT_LEAST(3, 0, 0, 0).
* wtf/Float32Array.h: Remove a quirk introduced for RVCT version <=2.2 .
* wtf/Float64Array.h: Ditto.
* wtf/Int16Array.h: Ditto.
* wtf/Int32Array.h: Ditto.
* wtf/Int8Array.h: Ditto.
* wtf/MathExtras.h: Remove a quirk needed for RVCT version  <= 3.0.
* wtf/Platform.h: Remove test for RVCT 4.0. Remove OS(RVCT).
* wtf/StringExtras.cpp: Removed.
* wtf/StringExtras.h: Remove a quirk introduced for RVCT version < 4.0.
* wtf/Uint16Array.h: Remove a quirk introduced for RVCT version <= 2.2.
* wtf/Uint32Array.h: Ditto.
* wtf/Uint8Array.h: Ditto.
* wtf/Uint8ClampedArray.h: Ditto.

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

8 years agoRenderQuote should not mark renderers as needing layout during layout
esprehn@chromium.org [Fri, 15 Feb 2013 23:11:47 +0000 (23:11 +0000)]
RenderQuote should not mark renderers as needing layout during layout
https://bugs.webkit.org/show_bug.cgi?id=109876

Reviewed by Ojan Vafai.

Source/WebCore:

Marking RenderQuotes as needing pref width recalcs and layouts during a
layout is dangerous since an ancestor may mark itself as having completed
layout, but then some subtree still thinks it needs layout.

Instead, since the only time we create RenderQuote instances is inside
PseudoElement, we can call attachQuote inside PseudoElement::attach during
the regular tree mutating cycle. We can then use RenderQuote::styleDidChange
to update the kind of quotes on normal style changes.

This makes RenderQuote behave much more similarly to DOM nodes and means
we no longer need to set dirty bits during layout.

Test: fast/css-generated-content/quote-layout-focus-crash.html

* dom/PseudoElement.cpp:
(WebCore::PseudoElement::attach): Now call attachQuote().
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::~RenderQuote):
(WebCore::RenderQuote::willBeRemovedFromTree):
(WebCore::RenderQuote::styleDidChange):
(WebCore::RenderQuote::updateText):
(WebCore::RenderQuote::attachQuote):
(WebCore::RenderQuote::detachQuote):
(WebCore::RenderQuote::updateDepth):
* rendering/RenderQuote.h:
(RenderQuote):

LayoutTests:

* fast/block/float/float-not-removed-from-pre-block-expected.txt:
* fast/css-generated-content/quote-layout-focus-crash-expected.txt: Added.
* fast/css-generated-content/quote-layout-focus-crash.html: Added.

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

8 years agoUnreviewed. Modify Win EWS script.
roger_fong@apple.com [Fri, 15 Feb 2013 23:07:44 +0000 (23:07 +0000)]
Unreviewed. Modify Win EWS script.

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

8 years agoAdd myself (sadrul@chromium.org) as committer.
sadrul@chromium.org [Fri, 15 Feb 2013 23:07:02 +0000 (23:07 +0000)]
Add myself (sadrul@chromium.org) as committer.

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

8 years agoDFG SpeculativeJIT64 should be more precise about when it's dealing with a cell ...
fpizlo@apple.com [Fri, 15 Feb 2013 22:57:55 +0000 (22:57 +0000)]
DFG SpeculativeJIT64 should be more precise about when it's dealing with a cell (even though it probably doesn't matter)
https://bugs.webkit.org/show_bug.cgi?id=109625

Reviewed by Mark Hahnenberg.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compile):

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

8 years agoIndexedDB: Stub out SharedBuffer version of get()
alecflett@chromium.org [Fri, 15 Feb 2013 22:48:00 +0000 (22:48 +0000)]
IndexedDB: Stub out SharedBuffer version of get()
https://bugs.webkit.org/show_bug.cgi?id=108993

Reviewed by Darin Fisher.

All asynchronous get()-like calls go through WebIDBCallbacks,
so this includes both get() and cursor callbacks.

* public/WebIDBCallbacks.h:
(WebKit::WebIDBCallbacks::onSuccess):
(WebKit::WebIDBCallbacks::onSuccessWithPrefetch):

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

8 years agoUnreviewed, rolling out r143044.
commit-queue@webkit.org [Fri, 15 Feb 2013 22:47:35 +0000 (22:47 +0000)]
Unreviewed, rolling out r143044.
http://trac.webkit.org/changeset/143044
https://bugs.webkit.org/show_bug.cgi?id=109974

broke windows build (Requested by kling on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-15

* dom/DocumentSharedObjectPool.cpp:
(WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
* dom/Element.cpp:
(WebCore::sizeForShareableElementDataWithAttributeCount):
(WebCore::ShareableElementData::ShareableElementData):
(WebCore::ShareableElementData::~ShareableElementData):
(WebCore::UniqueElementData::UniqueElementData):
* dom/Element.h:
(WebCore::ShareableElementData::immutableAttributeArray):
(ShareableElementData):
(WebCore::ElementData::attributeItem):

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

8 years agoMake most ArgumentEncoder::encode member functions private
andersca@apple.com [Fri, 15 Feb 2013 22:27:33 +0000 (22:27 +0000)]
Make most ArgumentEncoder::encode member functions private
https://bugs.webkit.org/show_bug.cgi?id=109973

Reviewed by Sam Weinig.

Make the encode overloads private; the stream operator should be used instead.

* Platform/CoreIPC/ArgumentEncoder.h:
(ArgumentEncoder):
* Platform/CoreIPC/Arguments.h:
(CoreIPC::Arguments1::encode):
(CoreIPC::Arguments2::encode):
(CoreIPC::Arguments3::encode):
(CoreIPC::Arguments4::encode):
(CoreIPC::Arguments5::encode):
(CoreIPC::Arguments6::encode):
(CoreIPC::Arguments7::encode):
(CoreIPC::Arguments8::encode):
(CoreIPC::Arguments10::encode):
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::createSyncMessageEncoder):
* Platform/CoreIPC/MessageEncoder.cpp:
(CoreIPC::MessageEncoder::MessageEncoder):
* Scripts/webkit2/messages.py:
(generate_message_handler):
* Scripts/webkit2/messages_unittest.py:
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode):
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::EncoderAdapter):
(WebKit::EncoderAdapter::encodeBytes):
(WebKit::EncoderAdapter::encodeBool):
(WebKit::EncoderAdapter::encodeUInt16):
(WebKit::EncoderAdapter::encodeUInt32):
(WebKit::EncoderAdapter::encodeUInt64):
(WebKit::EncoderAdapter::encodeInt32):
(WebKit::EncoderAdapter::encodeInt64):
(WebKit::EncoderAdapter::encodeFloat):
(WebKit::EncoderAdapter::encodeDouble):
(WebKit::EncoderAdapter::encodeString):

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

8 years agoEnable the preload scanner on the background parser thread
abarth@webkit.org [Fri, 15 Feb 2013 22:14:31 +0000 (22:14 +0000)]
Enable the preload scanner on the background parser thread
https://bugs.webkit.org/show_bug.cgi?id=108027

Reviewed by Tony Gentilcore.

The patch causes us to pass all the fast/preloader tests with the
threaded parser enabled.

This patch wires up the BackgroundHTMLParser to the
TokenPreloadScanner.  Currently, we bail out of preload scanning if we
encounter a document.write becaues we don't know how to rewind the
preload scanner, but that's something we can tune in the future.

The BackgroundHTMLParser delivers the preloads to the
HTMLDocumentParser together with the token stream. If the
HTMLDocumentParser isn't able to use the token stream immediately, it
kicks off the preloads.

* html/parser/BackgroundHTMLParser.cpp:
(WebCore::checkThatPreloadsAreSafeToSendToAnotherThread):
(WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::resumeFrom):
(WebCore::BackgroundHTMLParser::pumpTokenizer):
(WebCore::BackgroundHTMLParser::sendTokensToMainThread):
* html/parser/BackgroundHTMLParser.h:
(Configuration):
    - We need to add a struct for the create function because the
      number of arguments exceeds the limits of Functional.h.
(BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::create):
* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::scanCommon):
(WebCore::CSSPreloadScanner::scan):
(WebCore::CSSPreloadScanner::emitRule):
    - We need to use a new string here so that the string is safe to
      send to another thread.
* html/parser/CSSPreloadScanner.h:
(CSSPreloadScanner):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
(WebCore::HTMLDocumentParser::startBackgroundParser):
    - Following the example of the XSSAuditor, we create the
      TokenPreloadScanner on the main thread and then send it to the
      background thread for operation.
* html/parser/HTMLDocumentParser.h:
(WebCore):
(ParsedChunk):
* html/parser/HTMLParserOptions.h:
(HTMLParserOptions):
    - We need to add a default constructor so that the
      HTMLDocumentParser can create an empty
      BackgroundHTMLParser::Configuration struct.
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::scan):
(WebCore::TokenPreloadScanner::scanCommon):
(WebCore::HTMLPreloadScanner::scan):
* html/parser/HTMLPreloadScanner.h:
(TokenPreloadScanner):
(WebCore::TokenPreloadScanner::isSafeToSendToAnotherThread):
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::HTMLResourcePreloader::takeAndPreload):
(WebCore):
* html/parser/HTMLResourcePreloader.h:
(WebCore::PreloadRequest::PreloadRequest):
(WebCore):
(HTMLResourcePreloader):

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

8 years agoAdd a synchronous GetValues message to StorageManager
andersca@apple.com [Fri, 15 Feb 2013 22:01:04 +0000 (22:01 +0000)]
Add a synchronous GetValues message to StorageManager
https://bugs.webkit.org/show_bug.cgi?id=109968

Reviewed by Sam Weinig.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::dispatchWorkQueueMessageReceiverMessage):
Handle synchronous messages.

(CoreIPC::Connection::processIncomingMessage):
Check for work queue message receivers before doing any other processing.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getValues):
Add empty stub.

* UIProcess/Storage/StorageManager.h:
* UIProcess/Storage/StorageManager.messages.in:
Add GetValues message.

* WebProcess/Storage/StorageAreaProxy.cpp:
(WebKit::StorageAreaProxy::loadValuesIfNeeded):
Send the GetValues message.

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

8 years agoAdd CString operators for comparison with const char*
ch.dumez@sisa.samsung.com [Fri, 15 Feb 2013 21:53:07 +0000 (21:53 +0000)]
Add CString operators for comparison with const char*
https://bugs.webkit.org/show_bug.cgi?id=109947

Reviewed by Darin Adler.

Source/WTF:

Add operators to WTF::CString for equality/inequality comparison
with const char* strings. This avoids constructing a CString
from a const char* in such cases, which is can be expensive as
it would copy it and call strlen().

* wtf/text/CString.cpp:
(WTF::operator==): Use memcmp instead of strncmp to compare the
CString buffers as we know they are the same size and we don't
want to scan for terminating null byte.
(WTF):
* wtf/text/CString.h:
(WTF):
(WTF::operator!=):

Tools:

Add tests for WTF::CString's comparison operators.

* TestWebKitAPI/Tests/WTF/CString.cpp:
(TEST):

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

8 years agoBuild fix after r143030. We need to keep updatedRange around until createMarkupIntern...
rniwa@webkit.org [Fri, 15 Feb 2013 21:50:46 +0000 (21:50 +0000)]
Build fix after r143030. We need to keep updatedRange around until createMarkupInternal returns.

* editing/markup.cpp:
(WebCore::createMarkup):

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

8 years agoIndexedDB: fix chromium windows bustage
alecflett@chromium.org [Fri, 15 Feb 2013 21:48:52 +0000 (21:48 +0000)]
IndexedDB: fix chromium windows bustage
https://bugs.webkit.org/show_bug.cgi?id=109970

Unreviewed build fix for Chromium Windows.

* tests/IDBDatabaseBackendTest.cpp:

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

8 years agoAdd platform support for -webkit-background-blend-mode to CG context
commit-queue@webkit.org [Fri, 15 Feb 2013 21:43:50 +0000 (21:43 +0000)]
Add platform support for -webkit-background-blend-mode to CG context
https://bugs.webkit.org/show_bug.cgi?id=108549

Patch by Rik Cabanier <cabanier@adobe.com> on 2013-02-15
Reviewed by Dean Jackson.

Source/WebCore:

Tests: css3/compositing/effect-background-blend-mode-stacking.html
       css3/compositing/effect-background-blend-mode.html

This patch adds support for blending on background images to the Core Graphics port of WebKit.

* platform/graphics/CrossfadeGeneratedImage.cpp: Added interface change for blending.
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h: Added interface change for blending.
(CrossfadeGeneratedImage):
* platform/graphics/GeneratedImage.h: Added interface change for blending.
(GeneratedImage):
* platform/graphics/GeneratorGeneratedImage.cpp: Added interface change for blending.
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h: Added interface change for blending.
(GeneratorGeneratedImage):
* platform/graphics/GraphicsContext.cpp: Added interface change for blending and passes blend mode to image object.
(WebCore::GraphicsContext::drawTiledImage):
(WebCore::GraphicsContext::blendModeOperation):
(WebCore):
* platform/graphics/GraphicsContext.h: Added interface change for blending.
(GraphicsContext):
* platform/graphics/Image.cpp: Added interface change for blending and passed it to graphics layer.
(WebCore::Image::drawTiled):
* platform/graphics/Image.h: Added interface change for blending.
(Image):
* platform/graphics/cg/ImageCG.cpp: Added interface change for blending and passed it to OS.
(WebCore::Image::drawPattern):
* rendering/RenderBoxModelObject.cpp: Passed blend mode when drawing background images.
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* platform/graphics/cairo/ImageCairo.cpp: Added interface change for blending.
(WebCore::Image::drawPattern):
* platform/graphics/qt/ImageQt.cpp: Added interface change for blending.
(WebCore::Image::drawPattern):
* platform/graphics/skia/ImageSkia.cpp: Added interface change for blending.
(WebCore::Image::drawPattern):
* rendering/RenderBoxModelObject.cpp: Added interface change for blending.
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* svg/graphics/SVGImageForContainer.cpp: Added interface change for blending.
(WebCore::SVGImageForContainer::drawPattern):
* svg/graphics/SVGImageForContainer.h: Added interface change for blending.

Source/WebKit:

Fixed build issue.

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

Source/WebKit/win:

Fixed build issue.

* WebKit.vcproj/WebKitExports.def.in:

LayoutTests:

Added tests for background images.

* css3/compositing/effect-background-blend-mode-expected.png: Added.
* css3/compositing/effect-background-blend-mode-expected.txt: Added.
* css3/compositing/effect-background-blend-mode-stacking-expected.png: Added.
* css3/compositing/effect-background-blend-mode-stacking-expected.txt: Added.
* css3/compositing/effect-background-blend-mode-stacking.html: Added.
* css3/compositing/effect-background-blend-mode.html: Added.
* css3/compositing/resources/ducky.png: Added.
* platform/chromium/TestExpectations:
* platform/mac/css3/compositing: Added.
* platform/mac/css3/compositing/effect-background-blend-mode-expected.png: Added.
* platform/mac/css3/compositing/effect-background-blend-mode-stacking-expected.png: Added.

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

8 years agoClamp span value in RenderTableCell::parse[Col|Row]SpanFromDOM
eae@chromium.org [Fri, 15 Feb 2013 21:35:57 +0000 (21:35 +0000)]
Clamp span value in RenderTableCell::parse[Col|Row]SpanFromDOM
https://bugs.webkit.org/show_bug.cgi?id=109878

Source/WebCore:

Reviewed by Abhishek Arya.

Test: fast/table/colspan-huge-number.html

Clamp colspan and rowspan values to their respective maximum
supported values.

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::parseColSpanFromDOM):
(WebCore::RenderTableCell::parseRowSpanFromDOM):

LayoutTests:

Reviewed by Abhishek Arya.

Add test for handling of very large colspan value.

* fast/table/colspan-huge-number-expected.txt: Added.
* fast/table/colspan-huge-number.html: Added.

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

8 years agoShareableElementData should use zero-length array for storage.
akling@apple.com [Fri, 15 Feb 2013 21:30:17 +0000 (21:30 +0000)]
ShareableElementData should use zero-length array for storage.
<http://webkit.org/b/109959>

Reviewed by Anders Carlsson.

Use a zero-length Attribute array instead of always casting from void* to an array.
It was done this way originally because I didn't know we could sidestep the MSVC
build error with some #pragma hackery.

* dom/DocumentSharedObjectPool.cpp:
(WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
* dom/Element.cpp:
(WebCore::sizeForShareableElementDataWithAttributeCount):
(WebCore::ShareableElementData::ShareableElementData):
(WebCore::ShareableElementData::~ShareableElementData):
(WebCore::UniqueElementData::UniqueElementData):
* dom/Element.h:
(ShareableElementData):
(WebCore::ElementData::attributeItem):

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

8 years agoImplement RenderGrid::computeIntrinsicLogicalWidths
ojan@chromium.org [Fri, 15 Feb 2013 21:18:20 +0000 (21:18 +0000)]
Implement RenderGrid::computeIntrinsicLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=109881

Reviewed by Tony Chang.

For now this is not observable due to the FIXMEs for unimplemented bits
of computePreferredLogicalWidths. But, soon, I'll be removing the computePreferredLogicalWidths
override entirely and instead use RenderBlock's, which will also address the
RenderGrid FIXMEs.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
const_cast the usages of m_grid. Alternately, we could stack allocate it, but there's disagreement on
whether that's the right choice. See https://bugs.webkit.org/show_bug.cgi?id=109880.

(WebCore::RenderGrid::computePreferredLogicalWidths):
* rendering/RenderGrid.h:

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

8 years agoFlexbox should ignore firstLine pseudo element.
commit-queue@webkit.org [Fri, 15 Feb 2013 21:16:39 +0000 (21:16 +0000)]
Flexbox should ignore firstLine pseudo element.
https://bugs.webkit.org/show_bug.cgi?id=104485

Patch by Xueqing Huang <huangxueqing@baidu.com> on 2013-02-15
Reviewed by Tony Chang.

Source/WebCore:

Spec[1] said that "None of the properties defined in this module
apply to '::first-line' or '::first-letter' pseudo-elements." and
css2[2] define "The :first-line pseudo-element can only be attached
to a block container element."
[1]http://dev.w3.org/csswg/css3-flexbox/#display-flex
[2]http://www.w3.org/TR/CSS2/selector.html#first-line-pseudo

tests:
css3/flexbox/flexbox-ignore-firstLine.html
css3/flexbox/flexitem-firstLine-valid.html
css3/flexbox/inline-flexbox-ignore-firstLine.html

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

LayoutTests:

Spec[1] said that "None of the properties defined in this module
apply to '::first-line' or '::first-letter' pseudo-elements." and
css2[2] define "The :first-line pseudo-element can only be attached
to a block container element."
[1]http://dev.w3.org/csswg/css3-flexbox/#display-flex
[2]http://www.w3.org/TR/CSS2/selector.html#first-line-pseudo

some case by Kenny Lu <kanghaol@oupeng.com>
* css3/flexbox/flex-item-firstLine-valid-expected.txt: Added.
* css3/flexbox/flex-item-firstLine-valid.html: Added.
* css3/flexbox/flexbox-ignore-firstLine-expected.txt: Added.
* css3/flexbox/flexbox-ignore-firstLine.html: Added.
* css3/flexbox/inline-flexbox-ignore-firstLine-expected.txt: Added.
* css3/flexbox/inline-flexbox-ignore-firstLine.html: Added.

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

8 years agoUnreviewed, rolling out parts of r142731.
mrobinson@webkit.org [Fri, 15 Feb 2013 21:05:33 +0000 (21:05 +0000)]
Unreviewed, rolling out parts of r142731.
http://trac.webkit.org/changeset/142731
https://bugs.webkit.org/show_bug.cgi?id=109672

This patch broke the GTK+ gyp build. Roll out the changes there,
since they were actually unnecessary.

* gyp/Configuration.gypi.in:
* gyp/Dependencies.gyp:
* gyp/JavaScriptCore.gyp:
* gyp/WTF.gyp:

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

8 years agoA storage area should know its storage type
andersca@apple.com [Fri, 15 Feb 2013 21:03:03 +0000 (21:03 +0000)]
A storage area should know its storage type
https://bugs.webkit.org/show_bug.cgi?id=109964

Reviewed by Andreas Kling.

* WebProcess/Storage/StorageAreaProxy.cpp:
(WebKit::StorageAreaProxy::StorageAreaProxy):
(WebKit::StorageAreaProxy::disabledByPrivateBrowsingInFrame):
* WebProcess/Storage/StorageAreaProxy.h:
(StorageAreaProxy):
* WebProcess/Storage/StorageNamespaceProxy.cpp:
(WebKit::StorageNamespaceProxy::storageType):
(WebKit):
* WebProcess/Storage/StorageNamespaceProxy.h:
(StorageNamespaceProxy):

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

8 years agoIndexedDB: Implement SharedBuffer version of put()
alecflett@chromium.org [Fri, 15 Feb 2013 21:01:49 +0000 (21:01 +0000)]
IndexedDB: Implement SharedBuffer version of put()
https://bugs.webkit.org/show_bug.cgi?id=109092

Reviewed by Adam Barth.

Source/WebCore:

Switch IDBDatabaseBackendInterface::put over
to SharedBuffer, to avoid buffer copies of the value.

No new tests, this is a refactor.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::putRecord):
* Modules/indexeddb/IDBBackingStore.h:
(WebCore):
(IDBBackingStore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::PutOperation::create):
(WebCore::PutOperation::PutOperation):
(PutOperation):
(WebCore::IDBDatabaseBackendImpl::put):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
(WebCore):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::put):

Source/WebKit/chromium:

Implement SharedBuffer/WebData version of
IDBDatabaseBackendInterface::put, and put
temporary scaffolding in until chrome is ready.

* src/IDBDatabaseBackendProxy.cpp:
(WebKit::IDBDatabaseBackendProxy::put):
* src/IDBDatabaseBackendProxy.h:
(IDBDatabaseBackendProxy):
* src/WebIDBDatabaseImpl.cpp:
(WebKit::WebIDBDatabaseImpl::put):
(WebKit):
* src/WebIDBDatabaseImpl.h:
(WebIDBDatabaseImpl):
* tests/IDBDatabaseBackendTest.cpp:

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

8 years agoRebaseline 7 SVG tests after r142765.
pdr@google.com [Fri, 15 Feb 2013 20:56:45 +0000 (20:56 +0000)]
Rebaseline 7 SVG tests after r142765.

Unreviewed rebaseline of test expectations.

* platform/chromium-linux/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png:
* platform/chromium-linux/svg/as-image/img-preserveAspectRatio-support-2-expected.png:
* platform/chromium-linux/svg/as-image/svg-image-change-content-size-expected.png:
* platform/chromium-linux/svg/wicd/test-scalable-background-image1-expected.png:
* platform/chromium-linux/svg/wicd/test-scalable-background-image2-expected.png:
* platform/chromium-mac-lion/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png:
* platform/chromium-mac-lion/svg/as-image/img-preserveAspectRatio-support-2-expected.png:
* platform/chromium-mac-lion/svg/as-image/svg-image-change-content-size-expected.png:
* platform/chromium-mac-lion/svg/wicd/test-scalable-background-image1-expected.png:
* platform/chromium-mac-lion/svg/wicd/test-scalable-background-image2-expected.png:
* platform/chromium-mac-snowleopard/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png:
* platform/chromium-mac-snowleopard/svg/as-image/svg-image-change-content-size-expected.png:
* platform/chromium-mac-snowleopard/svg/wicd/test-scalable-background-image1-expected.png:
* platform/chromium-mac-snowleopard/svg/wicd/test-scalable-background-image2-expected.png:
* platform/chromium-mac/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png:
* platform/chromium-mac/svg/as-image/img-preserveAspectRatio-support-2-expected.png:
* platform/chromium-mac/svg/as-image/svg-image-change-content-size-expected.png:
* platform/chromium-mac/svg/as-image/svg-non-integer-scaled-image-expected.png:
* platform/chromium-mac/svg/wicd/test-scalable-background-image1-expected.png:
* platform/chromium-mac/svg/wicd/test-scalable-background-image2-expected.png:
* platform/chromium-win/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png:
* platform/chromium-win/svg/as-image/img-preserveAspectRatio-support-2-expected.png:
* platform/chromium-win/svg/as-image/svg-image-change-content-size-expected.png:
* platform/chromium-win/svg/as-image/svg-non-integer-scaled-image-expected.png:
* platform/chromium-win/svg/wicd/test-scalable-background-image1-expected.png:
* platform/chromium-win/svg/wicd/test-scalable-background-image2-expected.png:
* platform/chromium/TestExpectations:

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

8 years ago[chromium] Mark inspector/profiler/heap-snapshot-get-profile-crash.html flaky crasher
enne@google.com [Fri, 15 Feb 2013 20:50:00 +0000 (20:50 +0000)]
[chromium] Mark inspector/profiler/heap-snapshot-get-profile-crash.html flaky crasher
https://bugs.webkit.org/show_bug.cgi?id=109963

Unreviewed gardening.

* platform/chromium/TestExpectations:

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

8 years agoImplement StorageAreaProxy::length
andersca@apple.com [Fri, 15 Feb 2013 20:49:08 +0000 (20:49 +0000)]
Implement StorageAreaProxy::length
https://bugs.webkit.org/show_bug.cgi?id=109962

Reviewed by Andreas Kling.

Source/WebCore:

Export a symbol needed by WebKit2.

* WebCore.exp.in:

Source/WebKit2:

* WebProcess/Storage/StorageAreaProxy.cpp:
(WebKit::StorageAreaProxy::length):
Load the values if needed and then return the length.

(WebKit::StorageAreaProxy::disabledByPrivateBrowsingInFrame):
Add helper function.

(WebKit::StorageAreaProxy::loadValuesIfNeeded):
Just allocate the hash map for now.

* WebProcess/Storage/StorageAreaProxy.h:
(StorageAreaProxy):

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

8 years agowebkit-patch suggest-reviewers should limit itself to 5 reviewers
zandobersek@gmail.com [Fri, 15 Feb 2013 20:45:54 +0000 (20:45 +0000)]
webkit-patch suggest-reviewers should limit itself to 5 reviewers
https://bugs.webkit.org/show_bug.cgi?id=107528

Reviewed by Eric Seidel.

* Scripts/webkitpy/common/checkout/checkout.py:
(Checkout.suggested_reviewers): Iterate through the sorted commit info list,
scraping reviewers from the commit information and in the end producing a list
of reviewers that's sorted from the most to least recent activity of any reviewer
that has reviewed or authored patches for the changed files.
* Scripts/webkitpy/tool/commands/queries.py:
(SuggestReviewers): Use the SuggestReviewers step instead of reimplementing much of
the same logic.
(SuggestReviewers._prepare_state): Force the reviewer suggestion because the option
defaults to False.
* Scripts/webkitpy/tool/steps/suggestreviewers.py:
(SuggestReviewers.run): Only list the first five suggested reviewers, now printed out
on a single line.  Only ask for CC-ing the suggested reviewers to the bug if the
bug ID is located in the command's state.

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

8 years ago[chromium] WebInputEventBuilders should not reverse page scale
aelias@chromium.org [Fri, 15 Feb 2013 20:35:33 +0000 (20:35 +0000)]
[chromium] WebInputEventBuilders should not reverse page scale
https://bugs.webkit.org/show_bug.cgi?id=109901

Reviewed by James Robinson.

Though in theory logical that if WebInputEvent -> PlatformEvent
conversions divide by page scale, then the reverse builders should
multiply, in reality the only user of the reverse builders is
plugins which expect the same coordinate space as WebCore.

* src/WebInputEventConversion.cpp:
(WebKit::updateWebMouseEventFromWebCoreMouseEvent):
(WebKit::WebMouseEventBuilder::WebMouseEventBuilder):
(WebKit::addTouchPoints):
(WebKit::WebGestureEventBuilder::WebGestureEventBuilder):
* tests/WebInputEventConversionTest.cpp:
(WebCore::TEST):

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

8 years agoRemove const from a bunch of StorageArea member functions
andersca@apple.com [Fri, 15 Feb 2013 20:05:57 +0000 (20:05 +0000)]
Remove const from a bunch of StorageArea member functions
https://bugs.webkit.org/show_bug.cgi?id=109957

Reviewed by Beth Dakin.

Source/WebCore:

StorageArea is an abstract base class, and its subclasses might want to mutate the object
when certain member functions are called so remove const from all member functions.

* storage/StorageArea.h:
(WebCore):
(StorageArea):
(WebCore::StorageArea::~StorageArea):
(WebCore::StorageArea::incrementAccessCount):
(WebCore::StorageArea::decrementAccessCount):
(WebCore::StorageArea::closeDatabaseIfIdle):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::canAccessStorage):
(WebCore::StorageAreaImpl::length):
(WebCore::StorageAreaImpl::key):
(WebCore::StorageAreaImpl::getItem):
(WebCore::StorageAreaImpl::contains):
(WebCore::StorageAreaImpl::memoryBytesUsedByCache):
* storage/StorageAreaImpl.h:
(StorageAreaImpl):

Source/WebKit/chromium:

Update for WebCore changes.

* src/StorageAreaProxy.cpp:
(WebCore::StorageAreaProxy::length):
(WebCore::StorageAreaProxy::key):
(WebCore::StorageAreaProxy::getItem):
(WebCore::StorageAreaProxy::contains):
(WebCore::StorageAreaProxy::canAccessStorage):
(WebCore::StorageAreaProxy::memoryBytesUsedByCache):
* src/StorageAreaProxy.h:
(StorageAreaProxy):

Source/WebKit2:

Update for WebCore changes.

* WebProcess/Storage/StorageAreaProxy.cpp:
(WebKit::StorageAreaProxy::length):
(WebKit::StorageAreaProxy::key):
(WebKit::StorageAreaProxy::getItem):
(WebKit::StorageAreaProxy::contains):
(WebKit::StorageAreaProxy::canAccessStorage):
(WebKit::StorageAreaProxy::memoryBytesUsedByCache):
* WebProcess/Storage/StorageAreaProxy.h:
(StorageAreaProxy):

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

8 years agoDeleteButtonController::enable and disable should be called via a RAII object
rniwa@webkit.org [Fri, 15 Feb 2013 19:59:41 +0000 (19:59 +0000)]
DeleteButtonController::enable and disable should be called via a RAII object
https://bugs.webkit.org/show_bug.cgi?id=109550

Reviewed by Enrica Casucci.

Added DeleteButtonControllerDisableScope, a friend class of DeleteButtonController,
and made DeleteButtonController::enable/disable private.

* dom/ContainerNode.cpp:
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapply):
(WebCore::EditCommandComposition::reapply):
(WebCore::CompositeEditCommand::apply):
* editing/DeleteButtonController.h:
(WebCore):
(DeleteButtonController):
(DeleteButtonControllerDisableScope):
(WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope):
(WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope):
* editing/markup.cpp:
(WebCore::createMarkup):
(WebCore::createFragmentFromNodes):

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

8 years agoRebaseline 4 svg/zoom/page tests after r142765
pdr@google.com [Fri, 15 Feb 2013 19:58:06 +0000 (19:58 +0000)]
Rebaseline 4 svg/zoom/page tests after r142765

Unreviewed rebaseline of test expectations.

* platform/chromium-linux/svg/zoom/page/zoom-background-images-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png:
* platform/chromium-mac-lion/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-mac-snowleopard/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-background-images-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-background-images-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png:
* platform/chromium/TestExpectations:

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

8 years agoSource/WebCore: Add code from other branch.
mvujovic@adobe.com [Fri, 15 Feb 2013 19:54:53 +0000 (19:54 +0000)]
Source/WebCore: Add code from other branch.

[CSS Shaders] Parse src property in @-webkit-filter at-rules
https://bugs.webkit.org/show_bug.cgi?id=109770

Reviewed by Dean Jackson.

This patch implements the parsing for the CSS src property in @-webkit-filter at-rules.

The Filter Effects spec [1] specifies its syntax:
    src: [ <uri> [format(<string>)]?]#

In practice, it can look like:
    src: url(shader.vs) format('x-shader/x-vertex'),
         url(shader.fs) format('x-shader/x-fragment');

This src property is similar to the src property in CSS font-face rules, but a little
different. The CSS Fonts spec [2] specifies:
    src: [ <uri> [format(<string>#)]? | <font-face-name> ]#
    The syntax for a <font-face-name> is a unique font face name enclosed by "local("
    and ")".

Unlike the filter src property, the font face src property accepts the local function
[e.g. src: local("SomeFont");]. Also, the font face src property accepts a list of strings
instead of just one string in its format function.

[1]: https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#custom-filter-src
[2]: http://www.w3.org/TR/css3-fonts/#src-desc

Tests: css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html
       css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html

* css/CSSGrammar.y.in:
    Set (and unset) a flag called "m_inFilterRule", which tells us if we are in a
    @-webkit-filter at-rule or in a @font-face at-rule when we encounter a src property.
    We parse the two variants of the src property separately so that we can create different
    objects (WebKitCSSShaderValue vs. CSSFontFaceSrcValue) and because their syntax is a
    little different.
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFilterRuleSrcUriAndFormat):
    Parses a URI and format pair found in the @-webkit-filter src property.
(WebCore::CSSParser::parseFilterRuleSrc):
    Parse the @-webkit-filter src property.
* css/CSSParser.h:
(CSSParser):
* css/WebKitCSSShaderValue.cpp:
(WebCore::WebKitCSSShaderValue::customCssText):
    WebKitCSSShaderValue now has an m_format member, which needs to be included in its
    cssText.
(WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
* css/WebKitCSSShaderValue.h:
(WebCore::WebKitCSSShaderValue::format):
(WebCore::WebKitCSSShaderValue::setFormat):
(WebKitCSSShaderValue):

LayoutTests: [CSS Shaders] Parse src property in @-webkit-filter at-rules
https://bugs.webkit.org/show_bug.cgi?id=109770

Reviewed by Dean Jackson.

Add positive and negative parsing tests for the @-webkit-filter src property.

* css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid-expected.txt: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid-expected.txt: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html: Added.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-src-property-invalid.js: Added.
(testInvalidSrcProperty):
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-src-property-valid.js: Added.
(testSrcProperty):

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

8 years agoMerged the global function cache into the source code cache
ggaren@apple.com [Fri, 15 Feb 2013 19:54:09 +0000 (19:54 +0000)]
Merged the global function cache into the source code cache
https://bugs.webkit.org/show_bug.cgi?id=108660

Reviewed by Sam Weinig.

Responding to review comments by Darin Adler.

../JavaScriptCore:

* runtime/CodeCache.h:
(JSC::SourceCodeKey::SourceCodeKey): Don't initialize m_name and m_flags
in the hash table deleted value because they're meaningless.

../WTF:

* wtf/HashTraits.h: Added a using directive to simplify client code.

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

8 years agoRebaseline 4 tests after r142765
pdr@google.com [Fri, 15 Feb 2013 19:53:17 +0000 (19:53 +0000)]
Rebaseline 4 tests after r142765

Unreviewed rebaseline of test expectations.

* platform/chromium-linux/css2.1/20110323/background-intrinsic-004-expected.png:
* platform/chromium-linux/css2.1/20110323/background-intrinsic-005-expected.png:
* platform/chromium-linux/svg/as-border-image/svg-as-border-image-expected.png:
* platform/chromium-linux/svg/as-image/same-image-two-instances-expected.png:
* platform/chromium-mac-lion/css2.1/20110323/background-intrinsic-004-expected.png:
* platform/chromium-mac-lion/css2.1/20110323/background-intrinsic-005-expected.png:
* platform/chromium-mac-lion/svg/as-border-image/svg-as-border-image-expected.png:
* platform/chromium-mac-snowleopard/css2.1/20110323/background-intrinsic-004-expected.png:
* platform/chromium-mac-snowleopard/css2.1/20110323/background-intrinsic-005-expected.png:
* platform/chromium-mac/css2.1/20110323/background-intrinsic-004-expected.png:
* platform/chromium-mac/css2.1/20110323/background-intrinsic-005-expected.png:
* platform/chromium-mac/svg/as-border-image/svg-as-border-image-expected.png:
* platform/chromium-mac/svg/as-image/same-image-two-instances-expected.png:
* platform/chromium-win/css2.1/20110323/background-intrinsic-004-expected.png:
* platform/chromium-win/css2.1/20110323/background-intrinsic-005-expected.png:
* platform/chromium-win/svg/as-border-image/svg-as-border-image-expected.png:
* platform/chromium-win/svg/as-image/same-image-two-instances-expected.png:
* platform/chromium/TestExpectations:

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

8 years agoUnreviewed. Add myself as a committer.
pablof@motorola.com [Fri, 15 Feb 2013 19:50:33 +0000 (19:50 +0000)]
Unreviewed. Add myself as a committer.

* Scripts/webkitpy/common/config/committers.py:

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

8 years agoDFG AbstractState should filter operands to NewArray more precisely
fpizlo@apple.com [Fri, 15 Feb 2013 19:47:44 +0000 (19:47 +0000)]
DFG AbstractState should filter operands to NewArray more precisely
https://bugs.webkit.org/show_bug.cgi?id=109900

Reviewed by Mark Hahnenberg.

NewArray for primitive indexing types speculates that the inputs are the appropriate
primitives. Now, the CFA filters the abstract state accordingly, as well.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):

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

8 years agoRebaseline 3 tests after r142765
pdr@google.com [Fri, 15 Feb 2013 19:46:32 +0000 (19:46 +0000)]
Rebaseline 3 tests after r142765

Unreviewed rebaseline of test expectations.

* platform/chromium-linux/fast/backgrounds/size/contain-and-cover-expected.png:
* platform/chromium-linux/fast/backgrounds/size/contain-and-cover-zoomed-expected.png:
* platform/chromium-linux/fast/writing-mode/block-level-images-expected.png:
* platform/chromium-mac/fast/backgrounds/size/contain-and-cover-expected.png:
* platform/chromium-mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.png:
* platform/chromium-mac/fast/writing-mode/block-level-images-expected.png:
* platform/chromium-win-xp/fast/backgrounds/size/contain-and-cover-zoomed-expected.png: Added.
* platform/chromium-win/fast/backgrounds/size/contain-and-cover-expected.png:
* platform/chromium-win/fast/backgrounds/size/contain-and-cover-zoomed-expected.png:
* platform/chromium-win/fast/writing-mode/block-level-images-expected.png:
* platform/chromium/TestExpectations:

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

8 years agoGet Win EWS startup script checked into tree so we can make changes to all the EWS...
roger_fong@apple.com [Fri, 15 Feb 2013 19:17:32 +0000 (19:17 +0000)]
Get Win EWS startup script checked into tree so we can make changes to all the EWS bots more easily.

* EWSTools/start-queue-win.sh: Added.

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

8 years agoCrash occurs at WebCore::TextTrackList::length() when enabling closed captions in...
eric.carlson@apple.com [Fri, 15 Feb 2013 19:15:33 +0000 (19:15 +0000)]
Crash occurs at WebCore::TextTrackList::length() when enabling closed captions in movie
https://bugs.webkit.org/show_bug.cgi?id=109886

Reviewed by Dean Jackson.

Source/WebCore:

No new tests, media/media-captions.html does not crash with this change.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Early return when
    m_textTracks is NULL.

LayoutTests:

* platform/mac/TestExpectations: Remove media/media-captions.html.

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

8 years agoTokenPreloadScanner should be able to scan CompactHTMLTokens
abarth@webkit.org [Fri, 15 Feb 2013 19:11:38 +0000 (19:11 +0000)]
TokenPreloadScanner should be able to scan CompactHTMLTokens
https://bugs.webkit.org/show_bug.cgi?id=109861

Reviewed by Eric Seidel.

This patch moves the main scanning logic for the TokenPreloadScanner to
a templated scanCommon routine that can scan either an HTMLToken or a
CompactHTMLToken. This patch will let the BackgroundHTMLParser preload
scan its CompactHTMLTokens.

* html/parser/CSSPreloadScanner.cpp:
(WebCore):
(WebCore::CSSPreloadScanner::scanCommon):
(WebCore::CSSPreloadScanner::scan):
* html/parser/CSSPreloadScanner.h:
(CSSPreloadScanner):
    - Tweak the CSSPreloadScanner API slightly to make it easier to
      call from templated code.
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::tagIdFor):
(WebCore):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
(TokenPreloadScanner::StartTagScanner):
(WebCore::TokenPreloadScanner::scan):
(WebCore::TokenPreloadScanner::scanCommon):
(WebCore::TokenPreloadScanner::updatePredictedBaseURL):
(WebCore::HTMLPreloadScanner::scan):
* html/parser/HTMLPreloadScanner.h:
(TokenPreloadScanner):

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

8 years agoWebKit shouldn't accept "none, none" in transition shorthand property.
alexis@webkit.org [Fri, 15 Feb 2013 19:06:30 +0000 (19:06 +0000)]
WebKit shouldn't accept "none, none" in transition shorthand property.
https://bugs.webkit.org/show_bug.cgi?id=108751

Reviewed by Dean Jackson.

Source/WebCore:

http://dev.w3.org/csswg/css3-transitions/#transition-shorthand-property
specifies that if there is more than one transition defined in the
shorthand and any of them has a value of 'none' then the declaration is
invalid. This patch fixes the problem by passing a parsing context to
track if a keyword has been set for the transition-property and if so
then use it to invalidate or not the declaration.

Test: transitions/transitions-parsing.html

* css/CSSParser.cpp:
(AnimationParseContext):
(WebCore::AnimationParseContext::AnimationParseContext):
(WebCore::AnimationParseContext::commitFirstAnimation): track whether
it's the first <single-transition/animation> or not defined in the
shorthand.
(WebCore::AnimationParseContext::hasCommittedFirstAnimation):
(WebCore::AnimationParseContext::commitAnimationPropertyKeywordInShorthand):
In the shorthand as soon as a keyword has been found then the parsing
is 'finished', if any other animation/transition declaration part of
the shorthand are with a keyword then it's invalid.
(WebCore::AnimationParseContext::animationPropertyKeywordInShorthandAllowed):
(WebCore::AnimationParseContext::hasSeenAnimationPropertyKeyword):
(WebCore::AnimationParseContext::sawAnimationPropertyKeyword):
(WebCore):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseAnimationProperty):
* css/CSSParser.h:
(WebCore):

LayoutTests:

Extend exisiting tests to cover the bug. Modify old tests with invalid declarations.

* fast/css/transform-inline-style-expected.txt:
* fast/css/transform-inline-style-remove-expected.txt:
* fast/css/transform-inline-style-remove.html:
* fast/css/transform-inline-style.html:
* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:

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

8 years agoYarr: Use OwnPtr to make pattern/disjunction/character-class ownership clearer.
akling@apple.com [Fri, 15 Feb 2013 18:56:27 +0000 (18:56 +0000)]
Yarr: Use OwnPtr to make pattern/disjunction/character-class ownership clearer.
<http://webkit.org/b/109218>

Reviewed by Benjamin Poulain.

- Let classes that manage lifetime of other objects hold on to them with OwnPtr instead of raw pointers.
- Placed some strategic Vector::shrinkToFit(), ::reserveInitialCapacity() and ::swap().

668 kB progression on Membuster3.

* yarr/YarrInterpreter.cpp:
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):
(ByteCompiler):
* yarr/YarrInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
(BytecodePattern):
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
(JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
(JSC::Yarr::YarrGenerator::opCompileBody):
* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::charClass):
(JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
(JSC::Yarr::YarrPatternConstructor::reset):
(JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
(JSC::Yarr::YarrPatternConstructor::copyDisjunction):
(JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
(JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::YarrPatternConstructor::optimizeBOL):
(JSC::Yarr::YarrPatternConstructor::containsCapturingTerms):
(JSC::Yarr::YarrPatternConstructor::optimizeDotStarWrappedExpressions):
* yarr/YarrPattern.h:
(JSC::Yarr::PatternDisjunction::addNewAlternative):
(PatternDisjunction):
(YarrPattern):
(JSC::Yarr::YarrPattern::reset):
(JSC::Yarr::YarrPattern::newlineCharacterClass):
(JSC::Yarr::YarrPattern::digitsCharacterClass):
(JSC::Yarr::YarrPattern::spacesCharacterClass):
(JSC::Yarr::YarrPattern::wordcharCharacterClass):
(JSC::Yarr::YarrPattern::nondigitsCharacterClass):
(JSC::Yarr::YarrPattern::nonspacesCharacterClass):
(JSC::Yarr::YarrPattern::nonwordcharCharacterClass):

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

8 years agoUnbreak webkit-patch -- can't have both Committer and Contributor entry with same...
akling@apple.com [Fri, 15 Feb 2013 18:55:06 +0000 (18:55 +0000)]
Unbreak webkit-patch -- can't have both Committer and Contributor entry with same e-mail address.

* Scripts/webkitpy/common/config/committers.py:

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

8 years agoUnreviewed. Add myself as a committer.
jdiggs@igalia.com [Fri, 15 Feb 2013 18:33:39 +0000 (18:33 +0000)]
Unreviewed. Add myself as a committer.

* Scripts/webkitpy/common/config/committers.py:

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

8 years agoNRWT: ML Debug Test bot is timing out after cleaning up ports
rniwa@webkit.org [Fri, 15 Feb 2013 18:29:49 +0000 (18:29 +0000)]
NRWT: ML Debug Test bot is timing out after cleaning up ports
https://bugs.webkit.org/show_bug.cgi?id=109912

Reviewed by Simon Fraser.

Added more debug messgaes to diagnose the issue.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run):

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

8 years agoElementData: Move leafy things out of the base class.
akling@apple.com [Fri, 15 Feb 2013 18:28:12 +0000 (18:28 +0000)]
ElementData: Move leafy things out of the base class.
<http://webkit.org/b/109888>

Reviewed by Antti Koivisto.

- Moved functions for mutating/adding/removing attributes into UniqueElementData.
  Attempts to modify shared element data will now fail at compile-time.

- Removed mutableAttributeVector() and have call sites access the vector directly.

- Move immutableAttributeArray() to ShareableElementData.

- Move some function bodies from Element.h to Element.cpp since all clients are in there.

* dom/Element.cpp:
(WebCore::Element::addAttributeInternal):
(WebCore::ShareableElementData::ShareableElementData):
(WebCore::UniqueElementData::makeShareableCopy):
(WebCore::UniqueElementData::addAttribute):
(WebCore::UniqueElementData::removeAttribute):
(WebCore::ElementData::reportMemoryUsage):
(WebCore::UniqueElementData::getAttributeItem):
(WebCore::UniqueElementData::attributeItem):
* dom/Element.h:
(ElementData):
(WebCore::ShareableElementData::immutableAttributeArray):
(ShareableElementData):
(UniqueElementData):
(WebCore::ElementData::length):
(WebCore::ElementData::attributeItem):

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

8 years agoUnreviewed. Add myself as a committer.
csaavedra@igalia.com [Fri, 15 Feb 2013 18:27:49 +0000 (18:27 +0000)]
Unreviewed. Add myself as a committer.

* Scripts/webkitpy/common/config/committers.py:

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

8 years agoUnreviewed. Update Yi Shen, Antonio Gomes and Laszlo Gombos'
ch.dumez@sisa.samsung.com [Fri, 15 Feb 2013 18:24:08 +0000 (18:24 +0000)]
Unreviewed. Update Yi Shen, Antonio Gomes and Laszlo Gombos'
emails on their behalf.

* Scripts/webkitpy/common/config/committers.py:

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

8 years agoUnreviewed EFL gardening.
sudarsana.nagineni@linux.intel.com [Fri, 15 Feb 2013 17:53:14 +0000 (17:53 +0000)]
Unreviewed EFL gardening.

Skip failing tests on EFL wk1 and wk2 bots.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

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

8 years ago[CSS Exclusions] Enable shape-inside support for circles
commit-queue@webkit.org [Fri, 15 Feb 2013 17:31:39 +0000 (17:31 +0000)]
[CSS Exclusions] Enable shape-inside support for circles
https://bugs.webkit.org/show_bug.cgi?id=109713

Patch by Hans Muller <hmuller@adobe.com> on 2013-02-15
Reviewed by Dirk Schulze.

Source/WebCore:

Removed the test that disabled circle values for shape-inside.
The remaining support for circles, which is based on rounded rectangles
whose width/height is equal to their radiusX/radiusY, has not changed.

Test: fast/exclusions/shape-inside/shape-inside-circle.html

* rendering/ExclusionShapeInsideInfo.h:
(WebCore::ExclusionShapeInsideInfo::isEnabledFor): Now only disallows ellipse.

LayoutTests:

Added a test for circle shape-inside values.

* fast/exclusions/shape-inside/shape-inside-circle-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-circle.html: Added.

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

8 years ago[Soup] Leverage new soup_cookie_jar_get_cookie_list() API
ch.dumez@sisa.samsung.com [Fri, 15 Feb 2013 17:09:46 +0000 (17:09 +0000)]
[Soup] Leverage new soup_cookie_jar_get_cookie_list() API
https://bugs.webkit.org/show_bug.cgi?id=109931

Reviewed by Kenneth Rohde Christiansen.

In several cases, the CookieJarSoup implementation was retrieving / copying ALL the
cookies using soup_cookie_jar_all_cookies() and then using soup_cookie_applies_to_uri()
to filter out cookies it is not interested in. This was inefficient.

In libsoup 2.40, soup_cookie_jar_get_cookie_list() was introduced to retrieve only the
cookies that apply to a given URI. This patch leverages this new API in CookieJarSoup's
getRawCookies() and deleteCookie(). This way, only the cookies we are interested in
are retrieved and copied. Libsoup does not need to iterate over all the cookies itself
because it keeps the cookies in a hash table using the host names as key.

No new tests, no behavior change.

* platform/network/soup/CookieJarSoup.cpp:
(WebCore::getRawCookies):
(WebCore::deleteCookie):

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

8 years ago[EFL][WK2] Use C API inside BatteryProvider and NetworkInfoProvider
commit-queue@webkit.org [Fri, 15 Feb 2013 17:09:32 +0000 (17:09 +0000)]
[EFL][WK2] Use C API inside BatteryProvider and NetworkInfoProvider
https://bugs.webkit.org/show_bug.cgi?id=107821

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-02-15
Reviewed by Anders Carlsson.

BatteryProvider and NetworkInfoProvider should use C API
instead of accessing the internal C++ classes directly.

* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
* UIProcess/efl/BatteryProvider.cpp:
(BatteryProvider::~BatteryProvider):
(BatteryProvider::create):
(BatteryProvider::BatteryProvider):
(BatteryProvider::didChangeBatteryStatus):
* UIProcess/efl/BatteryProvider.h:
(BatteryProvider):
* UIProcess/efl/NetworkInfoProvider.cpp:
(NetworkInfoProvider::create):
(NetworkInfoProvider::NetworkInfoProvider):
(NetworkInfoProvider::~NetworkInfoProvider):
* UIProcess/efl/NetworkInfoProvider.h:
(NetworkInfoProvider):

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

8 years ago[WK2][EFL]REGRESSION (r141978): ewk_view_type_check api test failing
mikhail.pozdnyakov@intel.com [Fri, 15 Feb 2013 17:07:40 +0000 (17:07 +0000)]
[WK2][EFL]REGRESSION (r141978): ewk_view_type_check api test failing
https://bugs.webkit.org/show_bug.cgi?id=109038

Reviewed by Anders Carlsson.

EFL API is defensive by its nature and expects graceful handling of wrong function arguments
whereas webkit implementation code does not. This patch adds new 'toEwkViewChecked' function,
which provides handling of wrong arguments, to be used within EFL API layer code.

* UIProcess/API/efl/EwkView.cpp:
(toEwkView):

    EwkView* toEwkView(const Ewk_View_Smart_Data* smartData) is not exported anymore
    as it's used within EwkView class only.

(EwkView::handleTouchMove):
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_view.cpp:
(toEwkViewChecked):

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

8 years agoWeb Inspector: Added an option to split Elements and Sources sidebars in two panes.
commit-queue@webkit.org [Fri, 15 Feb 2013 17:05:09 +0000 (17:05 +0000)]
Web Inspector: Added an option to split Elements and Sources sidebars in two panes.
https://bugs.webkit.org/show_bug.cgi?id=109298.

Patch by Vladislav Kaznacheev <kaznacheev@chromium.org> on 2013-02-15
Reviewed by Vsevolod Vlasov.

Introduced the "Split sidebar" context menu option that splits the horizontal sidebar into two panes.
The width split ratio is 1:1 by default and is preserved when the Inspector window is resized.
Elements sidebar is split into two tabbed panes, Sources sidebar is split into a pane stack and a tabbed pane.

No new tests.

* inspector/front-end/DOMBreakpointsSidebarPane.js:
(WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype._reattachBody):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.get this):
(WebInspector.ElementsPanel):
(WebInspector.ElementsPanel.prototype._sidebarContextMenuEventFired):
(WebInspector.ElementsPanel.prototype._populateContextMenuForSidebar.toggleSetting):
(WebInspector.ElementsPanel.prototype.get _arrangeSidebarPanes.get this):
(WebInspector.ElementsPanel.prototype.addExtensionSidebarPane):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
(WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
(WebInspector.ScriptsPanel.prototype._contextMenuEventFired):
(WebInspector.ScriptsPanel.prototype._sidebarContextMenuEventFired):
(WebInspector.ScriptsPanel.prototype._populateContextMenuForSidebar.toggleSetting):
(WebInspector.ScriptsPanel.prototype.get _arrangeSidebarPanes.get this):
* inspector/front-end/SidebarPane.js:
(WebInspector.SidebarPane):
(WebInspector.SidebarPane.prototype.expand):
(WebInspector.SidebarPane.prototype.onContentReady):
(WebInspector.SidebarPane.prototype._setExpandCallback):
(WebInspector.SidebarPane.prototype.wasShown):
(WebInspector.SidebarPaneTitle):
(WebInspector.SidebarPaneTitle.prototype._expand):
(WebInspector.SidebarPaneTitle.prototype._collapse):
(WebInspector.SidebarPaneTitle.prototype._toggleExpanded):
(WebInspector.SidebarPaneTitle.prototype._onTitleKeyDown):
(WebInspector.SidebarPaneStack):
(WebInspector.SidebarPaneStack.prototype.addPane):
(WebInspector.SidebarTabbedPane):
(WebInspector.SidebarTabbedPane.prototype.addPane):
* inspector/front-end/SidebarView.js:
* inspector/front-end/SplitView.js:
(WebInspector.SplitView):
(WebInspector.SplitView.prototype.get mainElement):
(WebInspector.SplitView.prototype.get sidebarElement):

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

8 years agoWeb Inspector: Several consecutive Backspace or Delete strikes should not be marked...
vsevik@chromium.org [Fri, 15 Feb 2013 16:53:55 +0000 (16:53 +0000)]
Web Inspector: Several consecutive Backspace or Delete strikes should not be marked as undoable state.
https://bugs.webkit.org/show_bug.cgi?id=109915

Reviewed by Pavel Feldman.

Source/WebCore:

Extracted _isEditRangeUndoBoundary() and _isEditRangeAdjacentToLastCommand() in TextEditorModel
to detect if markUndoableState() call is needed before and after editRange.

* inspector/front-end/TextEditorModel.js:
(WebInspector.TextRange.prototype.immediatelyPrecedes):
(WebInspector.TextRange.prototype.immediatelyFollows):
(WebInspector.TextEditorModel.endsWithBracketRegex.):

LayoutTests:

* inspector/editor/text-editor-undo-redo-expected.txt:
* inspector/editor/text-editor-undo-redo.html:

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

8 years ago[EFL][WK2] Have WebView subclass PageClient
ch.dumez@sisa.samsung.com [Fri, 15 Feb 2013 16:49:14 +0000 (16:49 +0000)]
[EFL][WK2] Have WebView subclass PageClient
https://bugs.webkit.org/show_bug.cgi?id=109684

Reviewed by Anders Carlsson.

Stop constructing the PageClient in EwkView. PageClient is an internal
class and we should not use it directly in our Ewk implementation.
Instead, have WebView subclass PageClient. The PageClient implementation
just calls WebView methods otherwise.

* PlatformEfl.cmake:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::setSize):
* UIProcess/API/efl/EwkView.h:
(WebKit):
(EwkView):
(EwkView::webView):
* UIProcess/API/efl/ewk_view.cpp:
* UIProcess/efl/PageClientBase.cpp: Removed.
* UIProcess/efl/PageClientBase.h: Removed.
* UIProcess/efl/PageClientDefaultImpl.cpp: Removed.
* UIProcess/efl/PageClientDefaultImpl.h: Removed.
* UIProcess/efl/PageClientLegacyImpl.cpp: Removed.
* UIProcess/efl/PageClientLegacyImpl.h: Removed.
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didCommitLoadForFrame):
* UIProcess/efl/PageViewportControllerClientEfl.h:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::viewWidget):
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::WebView):
(WebKit::WebView::~WebView):
(WebKit::WebView::initialize):
(WebKit):
(WebKit::WebView::evasObject):
(WebKit::WebView::setThemePath):
(WebKit::WebView::setDrawsBackground):
(WebKit::WebView::drawsBackground):
(WebKit::WebView::setDrawsTransparentBackground):
(WebKit::WebView::drawsTransparentBackground):
(WebKit::WebView::suspendActiveDOMObjectsAndAnimations):
(WebKit::WebView::resumeActiveDOMObjectsAndAnimations):
(WebKit::WebView::didCommitLoad):
(WebKit::WebView::updateViewportSize):
(WebKit::WebView::didChangeContentsSize):
(WebKit::WebView::createDrawingAreaProxy):
(WebKit::WebView::setViewNeedsDisplay):
(WebKit::WebView::displayView):
(WebKit::WebView::scrollView):
(WebKit::WebView::viewSize):
(WebKit::WebView::isViewWindowActive):
(WebKit::WebView::isViewFocused):
(WebKit::WebView::isViewVisible):
(WebKit::WebView::isViewInWindow):
(WebKit::WebView::processDidCrash):
(WebKit::WebView::didRelaunchProcess):
(WebKit::WebView::pageClosed):
(WebKit::WebView::toolTipChanged):
(WebKit::WebView::setCursor):
(WebKit::WebView::setCursorHiddenUntilMouseMoves):
(WebKit::WebView::registerEditCommand):
(WebKit::WebView::clearAllEditCommands):
(WebKit::WebView::canUndoRedo):
(WebKit::WebView::executeUndoRedo):
(WebKit::WebView::screenToWindow):
(WebKit::WebView::windowToScreen):
(WebKit::WebView::doneWithKeyEvent):
(WebKit::WebView::doneWithTouchEvent):
(WebKit::WebView::createPopupMenuProxy):
(WebKit::WebView::createContextMenuProxy):
(WebKit::WebView::createColorChooserProxy):
(WebKit::WebView::setFindIndicator):
(WebKit::WebView::enterAcceleratedCompositingMode):
(WebKit::WebView::exitAcceleratedCompositingMode):
(WebKit::WebView::updateAcceleratedCompositingMode):
(WebKit::WebView::didCommitLoadForMainFrame):
(WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
(WebKit::WebView::customRepresentationZoomFactor):
(WebKit::WebView::setCustomRepresentationZoomFactor):
(WebKit::WebView::flashBackingStoreUpdates):
(WebKit::WebView::findStringInCustomRepresentation):
(WebKit::WebView::countStringMatchesInCustomRepresentation):
(WebKit::WebView::updateTextInputState):
(WebKit::WebView::handleDownloadRequest):
(WebKit::WebView::convertToDeviceSpace):
(WebKit::WebView::convertToUserSpace):
(WebKit::WebView::didChangeViewportProperties):
(WebKit::WebView::pageDidRequestScroll):
(WebKit::WebView::didRenderFrame):
(WebKit::WebView::pageTransitionViewportReady):
* UIProcess/efl/WebView.h:
(WebKit):
(WebView):
(WebKit::WebView::pageRef):
(WebKit::WebView::page):
(WebKit::WebView::canScrollView):

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

8 years agoFix inconsistency in WebGLRenderingContext.idl for getAttribLocation
aandrey@chromium.org [Fri, 15 Feb 2013 16:26:41 +0000 (16:26 +0000)]
Fix inconsistency in WebGLRenderingContext.idl for getAttribLocation
https://bugs.webkit.org/show_bug.cgi?id=109892

Reviewed by Kentaro Hara.

* html/canvas/WebGLRenderingContext.idl:

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

8 years agoUnreviewed EFL gardening.
sudarsana.nagineni@linux.intel.com [Fri, 15 Feb 2013 16:21:35 +0000 (16:21 +0000)]
Unreviewed EFL gardening.

Skip failing WebGL conformance tests added in r142851.

* platform/efl-wk2/TestExpectations:

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

8 years agoUnreviewed build fix.
kov@webkit.org [Fri, 15 Feb 2013 16:12:53 +0000 (16:12 +0000)]
Unreviewed build fix.

* Source/autotools/SetupLibtool.m4: Move AR_FLAGS definition so it comes before dolt
and libtool initialization, thus having an effect once again.

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

8 years agoWeb Inspector: [Canvas] show replay log grouped by draw calls
aandrey@chromium.org [Fri, 15 Feb 2013 15:56:51 +0000 (15:56 +0000)]
Web Inspector: [Canvas] show replay log grouped by draw calls
https://bugs.webkit.org/show_bug.cgi?id=109592

Reviewed by Pavel Feldman.

Source/WebCore:

Show canvas capturing log grouped by drawing calls.
Drive-by: extended Array.prototype with a handy peekLast function.
Drive-by: removed code dups in few places.
* inspector/front-end/CanvasProfileView.js:
(WebInspector.CanvasProfileView):
(WebInspector.CanvasProfileView.prototype.dispose):
(WebInspector.CanvasProfileView.prototype._onReplayStepClick):
(WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
(WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
(WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
(WebInspector.CanvasProfileView.prototype._replayTraceLog):
(WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
(WebInspector.CanvasProfileView.prototype._selectedCallIndex):
(WebInspector.CanvasProfileView.prototype._selectedDrawCallGroupIndex):
(WebInspector.CanvasProfileView.prototype._appendCallNode):
* inspector/front-end/DataGrid.js:
(WebInspector.DataGrid.prototype.setColumnVisible):
(WebInspector.DataGridNode.prototype.set hasChildren):
(WebInspector.DataGridNode.prototype.set revealed):
(WebInspector.DataGridNode.prototype.get leftPadding):
* inspector/front-end/externs.js:
(Array.prototype.peekLast):
* inspector/front-end/utilities.js:

LayoutTests:

A test to dump canvas replay log.

* inspector/profiler/canvas2d/canvas-replay-log-grid-expected.txt: Added.
* inspector/profiler/canvas2d/canvas-replay-log-grid.html: Added.

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

8 years agoWeb Inspector: highlight record revealed in Timeline
yurys@chromium.org [Fri, 15 Feb 2013 15:47:28 +0000 (15:47 +0000)]
Web Inspector: highlight record revealed in Timeline
https://bugs.webkit.org/show_bug.cgi?id=109930

Reviewed by Pavel Feldman.

Revealed timeline record is now highlighted with yellow background
that fades out in 2 seconds.

* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._revealRecord):
(WebInspector.TimelinePanel.prototype._refreshRecords):
(WebInspector.TimelinePanel.prototype._clearRecordHighlight):
* inspector/front-end/timelinePanel.css:
(.highlighted-timeline-record):
(@-webkit-keyframes timeline_record_highlight):
(to):

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

8 years agoWeb Inspector: Pass original selection to textModel to correctly restore it after...
vsevik@chromium.org [Fri, 15 Feb 2013 15:45:50 +0000 (15:45 +0000)]
Web Inspector: Pass original selection to textModel to correctly restore it after undo.
https://bugs.webkit.org/show_bug.cgi?id=109911

Reviewed by Pavel Feldman.

Source/WebCore:

We can distinguish backspace pressed with and without selection now.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
(WebInspector.DefaultTextEditor.WordMovementController.prototype._handleCtrlBackspace):
* inspector/front-end/TextEditorModel.js:
(WebInspector.TextEditorCommand):
(WebInspector.TextEditorModel.endsWithBracketRegex.):

LayoutTests:

* inspector/editor/text-editor-undo-redo-expected.txt:
* inspector/editor/text-editor-undo-redo.html:

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

8 years ago[Qt] Restore URL Scheme Delegates after QtWebProcess crash
commit-queue@webkit.org [Fri, 15 Feb 2013 15:33:57 +0000 (15:33 +0000)]
[Qt] Restore URL Scheme Delegates after QtWebProcess crash
https://bugs.webkit.org/show_bug.cgi?id=108808

When the QtWebProcess crashes, the registered URL Scheme
Delegates are not properly restored over IPC in the newly
launched process instance.

Patch by Milian Wolff <milian.wolff@kdab.com> on 2013-02-15
Reviewed by Simon Hausmann.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didRelaunchProcess):
(QQuickWebViewPrivate::updateSchemeDelegates):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):

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

8 years ago[BlackBerry] Remove redundant requireAuth parameter of NetworkJob::notifyAuthReceived
commit-queue@webkit.org [Fri, 15 Feb 2013 15:25:41 +0000 (15:25 +0000)]
[BlackBerry] Remove redundant requireAuth parameter of NetworkJob::notifyAuthReceived
https://bugs.webkit.org/show_bug.cgi?id=109855

Patch by Joe Mason <jmason@rim.com> on 2013-02-15
Reviewed by Yong Li.

Internal PR: 296697
Internally Reviewed By: Leo Yang

Code cleanup: The requireAuth parameter of NetworkJob::notifyAuthReceived is redundant as its value
can be determined from "result" - if result is AuthResultRetry, requireAuth is false, otherwise it
is true.

No new tests as there is no behaviour change.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyAuthReceived):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):

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

8 years agoUnreviewed chromium rebaselines for r142947.
atwilson@chromium.org [Fri, 15 Feb 2013 14:56:50 +0000 (14:56 +0000)]
Unreviewed chromium rebaselines for r142947.

* platform/chromium-mac/media/track/track-cue-rendering-vertical-expected.png:

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

8 years agoWeb Inspector: Redo in text editor should always collapse selection to end.
vsevik@chromium.org [Fri, 15 Feb 2013 14:55:52 +0000 (14:55 +0000)]
Web Inspector: Redo in text editor should always collapse selection to end.
https://bugs.webkit.org/show_bug.cgi?id=109907

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/front-end/TextEditorModel.js:
(WebInspector.TextEditorModel.endsWithBracketRegex.):

LayoutTests:

* inspector/editor/text-editor-undo-redo-expected.txt:

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

8 years agoUnreviewed EFL gardening.
sudarsana.nagineni@linux.intel.com [Fri, 15 Feb 2013 14:53:58 +0000 (14:53 +0000)]
Unreviewed EFL gardening.

Skip failing tests after r142947.

* platform/efl/TestExpectations:

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

8 years agoUnreviewed chromium expectations changes for r142947.
atwilson@chromium.org [Fri, 15 Feb 2013 14:42:46 +0000 (14:42 +0000)]
Unreviewed chromium expectations changes for r142947.

* platform/chromium-mac-lion/media/audio-repaint-expected.png:
* platform/chromium-mac-lion/media/controls-after-reload-expected.png:
* platform/chromium-mac-lion/media/controls-strict-expected.png:
* platform/chromium-mac-lion/media/controls-styling-expected.png:
* platform/chromium-mac-lion/media/controls-styling-strict-expected.png:
* platform/chromium-mac-lion/media/controls-without-preload-expected.png:
* platform/chromium-mac-lion/media/media-document-audio-repaint-expected.png:
* platform/chromium-mac-lion/media/track/track-cue-rendering-horizontal-expected.png: Added.
* platform/chromium-mac-lion/media/video-controls-rendering-expected.png:
* platform/chromium-mac-lion/media/video-display-toggle-expected.png:
* platform/chromium-mac-lion/media/video-playing-and-pause-expected.png:
* platform/chromium-mac-snowleopard/media/audio-repaint-expected.png:
* platform/chromium-mac-snowleopard/media/controls-after-reload-expected.png:
* platform/chromium-mac-snowleopard/media/controls-strict-expected.png:
* platform/chromium-mac-snowleopard/media/controls-styling-expected.png:
* platform/chromium-mac-snowleopard/media/controls-styling-strict-expected.png:
* platform/chromium-mac-snowleopard/media/controls-without-preload-expected.png:
* platform/chromium-mac-snowleopard/media/media-document-audio-repaint-expected.png:
* platform/chromium-mac-snowleopard/media/track/track-cue-rendering-horizontal-expected.png:
* platform/chromium-mac-snowleopard/media/video-controls-rendering-expected.png:
* platform/chromium-mac-snowleopard/media/video-display-toggle-expected.png:
* platform/chromium-mac-snowleopard/media/video-playing-and-pause-expected.png:
* platform/chromium-mac/media/audio-repaint-expected.png:
* platform/chromium-mac/media/controls-after-reload-expected.png:
* platform/chromium-mac/media/controls-strict-expected.png:
* platform/chromium-mac/media/controls-styling-expected.png:
* platform/chromium-mac/media/controls-styling-strict-expected.png:
* platform/chromium-mac/media/controls-without-preload-expected.png:
* platform/chromium-mac/media/media-document-audio-repaint-expected.png:
* platform/chromium-mac/media/track/track-cue-rendering-horizontal-expected.png:
* platform/chromium-mac/media/video-controls-rendering-expected.png:
* platform/chromium-mac/media/video-display-toggle-expected.png:
* platform/chromium-mac/media/video-playing-and-pause-expected.png:
* platform/chromium-mac/media/video-zoom-controls-expected.txt:
* platform/chromium-win/media/audio-repaint-expected.png:
* platform/chromium-win/media/controls-after-reload-expected.png:
* platform/chromium-win/media/controls-strict-expected.png:
* platform/chromium-win/media/controls-styling-expected.png:
* platform/chromium-win/media/controls-styling-strict-expected.png:
* platform/chromium-win/media/controls-without-preload-expected.png:
* platform/chromium-win/media/media-document-audio-repaint-expected.png:
* platform/chromium-win/media/track/track-cue-rendering-horizontal-expected.png:
* platform/chromium-win/media/video-controls-rendering-expected.png:
* platform/chromium-win/media/video-display-toggle-expected.png:
* platform/chromium-win/media/video-playing-and-pause-expected.png:
* platform/chromium/TestExpectations:

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

8 years ago[Qt] Unreviewed gardening. Skip failing tests.
kadam@inf.u-szeged.hu [Fri, 15 Feb 2013 14:38:13 +0000 (14:38 +0000)]
[Qt] Unreviewed gardening. Skip failing tests.

* platform/qt/TestExpectations:
* platform/qt/fast/replaced/width100percent-image-expected.png: Added after r142931.
* platform/qt/fast/replaced/width100percent-image-expected.txt: Added after r142931.
* platform/qt/tables/mozilla_expected_failures/bugs/bug85016-expected.png: Added after r142931.
* platform/qt/tables/mozilla_expected_failures/bugs/bug85016-expected.txt: Added after r142931.

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

8 years agoUnreviewed EFL gardening.
sudarsana.nagineni@linux.intel.com [Fri, 15 Feb 2013 14:20:54 +0000 (14:20 +0000)]
Unreviewed EFL gardening.

Rebaselining after r142931 and r142759.

* platform/efl/fast/replaced/width100percent-image-expected.png:
* platform/efl/fast/replaced/width100percent-image-expected.txt:
* platform/efl/svg/dom/SVGLengthList-basics-expected.txt: Removed.
* platform/efl/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* platform/efl/tables/mozilla_expected_failures/bugs/bug85016-expected.txt:

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

8 years ago[v8] persistent handle dispose before last use
commit-queue@webkit.org [Fri, 15 Feb 2013 14:15:53 +0000 (14:15 +0000)]
[v8] persistent handle dispose before last use
https://bugs.webkit.org/show_bug.cgi?id=109927

Patch by Dan Carney <dcarney@google.com> on 2013-02-15
Reviewed by Jochen Eisinger.

No new tests. No change in functionality.

* bindings/v8/ScriptWrappable.h:
(WebCore::ScriptWrappable::weakCallback):

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

8 years agoPagePopupController.formatMonth should support short month format
keishi@webkit.org [Fri, 15 Feb 2013 14:05:04 +0000 (14:05 +0000)]
PagePopupController.formatMonth should support short month format
https://bugs.webkit.org/show_bug.cgi?id=109530

Reviewed by Kent Tamura.

Source/WebCore:

PagePopupController.formatMonth should support short month format so we
can use it in the new calendar picker.

Tested by LocaleMacTest::formatMonth.

* page/PagePopupController.cpp:
(WebCore::PagePopupController::formatMonth): Take an extra bool argument to switch to short month format.
* page/PagePopupController.h:
(PagePopupController):
* page/PagePopupController.idl:
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::shortMonthFormat):
(WebCore):
* platform/text/LocaleICU.h:
(LocaleICU):
* platform/text/LocaleNone.cpp:
(WebCore::shortMonthFormat):
(WebCore):
* platform/text/PlatformLocale.cpp:
(WebCore::DateTimeStringBuilder::visitField):
(WebCore::Locale::formatDateTime):
* platform/text/PlatformLocale.h:
(Locale):
* platform/text/mac/LocaleMac.h:
(LocaleMac):
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::shortMonthFormat):
(WebCore):
* platform/text/win/LocaleWin.cpp:
(WebCore::LocaleWin::shortMonthFormat): Windows doesn't have a short
month format so we just replace MMMM with MMM.
(WebCore):
* platform/text/win/LocaleWin.h:
(LocaleWin):

Source/WebKit/chromium:

* tests/LocaleMacTest.cpp:
(LocaleMacTest::formatMonth):
(TEST_F):

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

8 years agoAdd setValue and closePopup methods to PagePopupController
keishi@webkit.org [Fri, 15 Feb 2013 13:36:51 +0000 (13:36 +0000)]
Add setValue and closePopup methods to PagePopupController
https://bugs.webkit.org/show_bug.cgi?id=109897

Reviewed by Kent Tamura.

.:

* ManualTests/forms/calendar-picker.html: Added mock setValue and closePopup implementation.
* ManualTests/forms/color-suggestion-picker.html: Ditto.

Source/WebCore:

The new calendar picker (Bug 109439) needs to set a value without
closing the popup. We can't do that with the existing
setValueAndClosePopup.

No new tests. Existing calendar picker and color suggestion picker tests
that closing and setting values work properly.

* Resources/pagepopups/pickerCommon.js:
(Picker.prototype.submitValue): Stop using setValueAndClosePopup.
(Picker.prototype.handleCancel): Ditto.
* page/PagePopupClient.h:
(PagePopupClient):
* page/PagePopupController.cpp:
(WebCore::PagePopupController::setValue): Sets value to element without closing popup.
(WebCore):
(WebCore::PagePopupController::closePopup): Just closes popup.
* page/PagePopupController.h:
(PagePopupController):
* page/PagePopupController.idl:

Source/WebKit/blackberry:

* WebCoreSupport/ColorPickerClient.cpp:
(WebCore::ColorPickerClient::setValue): Added empty implementation.
(WebCore):
* WebCoreSupport/ColorPickerClient.h:
(ColorPickerClient):
* WebCoreSupport/DatePickerClient.cpp:
(WebCore::DatePickerClient::setValue): Ditto.
(WebCore):
* WebCoreSupport/DatePickerClient.h:
(DatePickerClient):
* WebCoreSupport/SelectPopupClient.cpp:
(WebCore::SelectPopupClient::setValue): Ditto.
(WebCore):
* WebCoreSupport/SelectPopupClient.h:
(SelectPopupClient):

Source/WebKit/chromium:

* src/ColorChooserPopupUIController.cpp:
(WebKit::ColorChooserPopupUIController::setValue):
(WebKit):
* src/ColorChooserPopupUIController.h:
(ColorChooserPopupUIController):
* src/DateTimeChooserImpl.cpp:
(WebKit::DateTimeChooserImpl::setValueAndClosePopup): Use setValue and closePopup.
(WebKit):
(WebKit::DateTimeChooserImpl::setValue):
(WebKit::DateTimeChooserImpl::closePopup):
* src/DateTimeChooserImpl.h:
(DateTimeChooserImpl):

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

8 years agoUnreviewed EFL WK1 gardening.
gyuyoung.kim@samsung.com [Fri, 15 Feb 2013 13:18:25 +0000 (13:18 +0000)]
Unreviewed EFL WK1 gardening.

EFL WK1 doesn't support WebGL conformance tests which were added by r142847.

* platform/efl-wk1/TestExpectations: Skipped WebGL conformance tests.

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

8 years agoUnreviewed chromium expectations update for r142955.
atwilson@chromium.org [Fri, 15 Feb 2013 13:04:52 +0000 (13:04 +0000)]
Unreviewed chromium expectations update for r142955.

* platform/chromium-mac/svg/filters/filter-hidden-content-expected.png: Added.
* platform/chromium-win/svg/filters/filter-hidden-content-expected.png: Renamed from LayoutTests/platform/chromium-linux/svg/filters/filter-hidden-content-expected.png.
* platform/chromium/svg/filters/filter-hidden-content-expected.txt: Renamed from LayoutTests/platform/chromium-linux/svg/filters/filter-hidden-content-expected.txt.

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

8 years ago[CSS Regions] RenderRegion should inherit from RenderBlock
mihnea@adobe.com [Fri, 15 Feb 2013 13:00:03 +0000 (13:00 +0000)]
[CSS Regions] RenderRegion should inherit from RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=74132

Reviewed by Julien Chaffraix.

Source/WebCore:

Change the base class for RenderRegion to be RenderBlock instead of RenderReplaced.
Per spec http://dev.w3.org/csswg/css3-regions/#the-flow-from-property, a region is a non-replaced block container.
This change is covered by the existing regions tests (in fast/region and fast/repaint).

The RenderFlowThread object is a self-painting layer (it requires layer and is positioned).
Because of that, the RenderFlowThread object is responsible for painting its children,
the collected objects. When the RenderRegion::paintObject is called during paint, it delegates painting
of content collected inside the flow thread to the associated RenderFlowThread object.
Since we do not want to paint the flow thread content multiple times (for each paint phase
in which the RenderRegion::paintObject is called), we allow RenderFlowThread painting only for
selection and foreground paint phases.

* rendering/RenderBox.cpp: Clean-up the code from regions specific stuff, now that the regions are render blocks.
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderLayerBacking.cpp: A region should always render content from its associated flow thread,
even when it does not have children of its own.
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
* rendering/RenderMultiColumnSet.cpp: Make changes to match the new inheritance for RenderRegion.
(WebCore::RenderMultiColumnSet::paint):
(WebCore::RenderMultiColumnSet::paintColumnRules):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::paintObject):
(WebCore::RenderRegion::styleDidChange):
(WebCore::RenderRegion::layoutBlock):
(WebCore::RenderRegion::insertedIntoTree):
(WebCore::RenderRegion::willBeRemovedFromTree):
(WebCore::RenderRegion::computePreferredLogicalWidths): Use this method instead of min/maxPreferredLogicalWidth.
(WebCore::RenderRegion::updateLogicalHeight):
* rendering/RenderRegion.h: For now, assume the region is not allowed to have children.
When we will implement the processing model for pseudo-elements http://dev.w3.org/csswg/css3-regions/#processing-model,
we will have to remove this function. By having this function return false i was able to leave some tests unchanged.

LayoutTests:

Fix tests that were failing after the inheritance change.

* fast/regions/flows-dependency-dynamic-remove.html: As a block, an empty region can self collapse,
which was not possible for a replaced element. I used '-webkit-margin-collapse: separate' to prevent
margins self collapsing for body and avoid recreating the expectations.
I want regions margins to be able to self collapse, just like the other block elements.
* fast/regions/flows-dependency-same-flow.html: Ditto.

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

8 years agoWeb Inspector: implement smart braces functionality
commit-queue@webkit.org [Fri, 15 Feb 2013 12:30:27 +0000 (12:30 +0000)]
Web Inspector: implement smart braces functionality
https://bugs.webkit.org/show_bug.cgi?id=109200

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-02-15
Reviewed by Pavel Feldman.

Source/WebCore:

- implement SmartBraceController which will handle character insertions
and override them if brace character was inserted. Additionally it
should handle Backspace key and override it if a cursor is located
inside of a bracket pair.
- guard smart brace functionality via experiment checkbox.

New test: inspector/editor/text-editor-smart-braces.html

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
(WebInspector.TextEditorMainPanel.prototype._handleKeyPress):
(WebInspector.TextEditorMainPanel.SmartBraceController):
(WebInspector.TextEditorMainPanel.SmartBraceController.prototype.registerShortcuts):
(WebInspector.TextEditorMainPanel.SmartBraceController.prototype.registerCharOverrides):
(WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleBackspace):
(WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleBracePairInsertion):
(WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleClosingBraceOverride):
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):

Tools:

Fix eventSender.keyDown implementation to correctly process opening
round brace symbol.

* DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
(WebTestRunner):
(WebTestRunner::EventSender::keyDown):

LayoutTests:

* inspector/editor/text-editor-smart-braces-expected.txt: Added.
* inspector/editor/text-editor-smart-braces.html: Added.
* platform/efl/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

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

8 years ago[CSS Regions][Mac] fast/regions/full-screen-video-from-region.html hits an assertion...
commit-queue@webkit.org [Fri, 15 Feb 2013 12:28:19 +0000 (12:28 +0000)]
[CSS Regions][Mac] fast/regions/full-screen-video-from-region.html hits an assertion in RenderFlowThread::removeRenderBoxRegionInfo
https://bugs.webkit.org/show_bug.cgi?id=106075

Patch by Andrei Bucur <abucur@adobe.com> on 2013-02-15
Reviewed by Tony Chang.

Source/WebCore:

The crash is caused by two issues.

The first problem is how a block inside a flow thread determines if the children needs relayout or not.
When the region chain is invalidated, the information is lost so we need to return true, even for the
enclosing RenderFlowThread. Because the video renderer is the first child of the flow thread this doesn't
happen.

The patch implements this behaviour by inspecting both if the region chain has changed and
if the block has no range computed yet.

The second problem is RenderMedia not inheriting from RenderBlock. The logic of child relayout doesn't apply
to it. In the test case, when the full screen button is pressed, the region changes width to fill the viewport,
the chain is invalidated and the box info hash map is cleared. When the video is laid out again (after fixing
the first issue) it has the same size so the controls don't do a layout. They remain without box info inside
the flow thread, thus causing the assertion.

The patch forces the controls to relayout if the region chain was invalidated. We can't use the
logicalWidthChangedInRegions method because it is block specific. This will be fixed in a later patch.

Tests: No new tests. fast/regions/full-screen-video-from-region.html no longer crashes.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::logicalWidthChangedInRegions):
* rendering/RenderFlowThread.h: Renamed pageLogicalHeightChanged to pageLogicalSizeChanged.
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):

LayoutTests:

Removed the crash/fail expectation for fast/regions/full-screen-video-from-region.html.

* platform/mac/TestExpectations:

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

8 years agoUnreviewed chromium expectation changes after r142931.
atwilson@chromium.org [Fri, 15 Feb 2013 12:25:13 +0000 (12:25 +0000)]
Unreviewed chromium expectation changes after r142931.

* platform/chromium-mac-lion/fast/replaced/width100percent-image-expected.png:
* platform/chromium-mac-lion/fast/replaced/width100percent-image-expected.txt: Copied from LayoutTests/platform/chromium-mac/fast/replaced/width100percent-image-expected.txt.
* platform/chromium-mac-lion/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* platform/chromium-mac-snowleopard/fast/replaced/width100percent-image-expected.png:
* platform/chromium-mac-snowleopard/fast/replaced/width100percent-image-expected.txt: Copied from LayoutTests/platform/chromium-mac/fast/replaced/width100percent-image-expected.txt.
* platform/chromium-mac-snowleopard/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* platform/chromium-mac/fast/replaced/width100percent-image-expected.png:
* platform/chromium-mac/fast/replaced/width100percent-image-expected.txt:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug85016-expected.txt: Removed.
* platform/chromium-win/fast/replaced/width100percent-image-expected.png:
* platform/chromium-win/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* tables/mozilla_expected_failures/bugs/bug85016-expected.txt: Renamed from LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug85016-expected.txt.

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Fri, 15 Feb 2013 12:18:43 +0000 (12:18 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Adding expectations for tests that need checking after r142947.
* platform/gtk/fast/replaced/width100percent-image-expected.txt: Added. Rebaselining after r142931.
* platform/gtk/tables/mozilla_expected_failures/bugs/bug85016-expected.txt: Ditto.

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

8 years agoSource/WebCore: [CoordGfx] Regression from r135212: big layers with transform animati...
allan.jensen@digia.com [Fri, 15 Feb 2013 12:09:08 +0000 (12:09 +0000)]
Source/WebCore: [CoordGfx] Regression from r135212: big layers with transform animations sometime fail to render tiles
https://bugs.webkit.org/show_bug.cgi?id=109179

Reviewed by Jocelyn Turcotte.

Fix adjustForContentsRect logic for AC layers that are higher or wider than the visible rect.

Force updates of the visible rect while it is animating, and until we have done one last update after
it stops animating.

Test: compositing/transitions/transform-on-large-layer.html

* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::adjustForContentsRect):
(WebCore::TiledBackingStore::computeCoverAndKeepRect):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::computePixelAlignment):
(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):

LayoutTests: [CoordGfx] Regression from r135212: big layers with transform animations sometime fail to render tiles.
https://bugs.webkit.org/show_bug.cgi?id=109179

Reviewed by Jocelyn Turcotte.

Test of a large layer with an animated transform. Skipped on WK1 due to resize event not firing in DRT.

* compositing/transitions/transform-on-large-layer-expected.html: Added.
* compositing/transitions/transform-on-large-layer.html: Added.
* platform/mac/TestExpectations:
* platform/qt-5.0-wk1/TestExpectations:

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

8 years agoUnreviewed, rolling out r142876.
commit-queue@webkit.org [Fri, 15 Feb 2013 11:40:27 +0000 (11:40 +0000)]
Unreviewed, rolling out r142876.
http://trac.webkit.org/changeset/142876
https://bugs.webkit.org/show_bug.cgi?id=109920

Broke relative URL linkification in the computed styles pane
(Requested by apavlov on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-15

* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):

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

8 years agoSimplify hitTestResultAtPoint and nodesFromRect APIs
allan.jensen@digia.com [Fri, 15 Feb 2013 10:46:33 +0000 (10:46 +0000)]
Simplify hitTestResultAtPoint and nodesFromRect APIs
https://bugs.webkit.org/show_bug.cgi?id=95720

.:

Reviewed by Julien Chaffraix.

Update exported symbols.

* Source/autotools/symbols.filter:

Source/WebCore:

Reviewed by Julien Chaffraix.

The existing API was overloaded and could be simplified by passing all the bool arguments in
a HitTestRequest argument. This should also help clarify the call as the enum values explicitely
state what they do.

* WebCore.exp.in:
* WebCore.order:
* dom/Document.cpp:
(WebCore::Document::nodesFromRect):
* dom/Document.h:
(Document):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::createContextMenu):
* page/DragController.cpp:
(WebCore::DragController::canProcessDrag):
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleGestureEvent):
(WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
(WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
(WebCore::EventHandler::handleTouchEvent):
* page/EventHandler.h:
(WebCore):
(EventHandler):
* page/FocusController.cpp:
(WebCore::updateFocusCandidateIfNeeded):
* page/Frame.cpp:
(WebCore::Frame::visiblePositionForPoint):
(WebCore::Frame::documentAtPoint):
* page/TouchDisambiguation.cpp:
(WebCore::findGoodTouchTargets):
* rendering/HitTestRequest.h:
(WebCore::HitTestRequest::allowsFrameScrollbars):
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):

Source/WebKit/blackberry:

Reviewed by Julien Chaffraix.

Update calls to new API.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::contextNode):
(BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint):
(BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
(BlackBerry::WebKit::WebPage::nodeAtDocumentPoint):
(BlackBerry::WebKit::WebPagePrivate::hitTestResult):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):

Source/WebKit/chromium:

Reviewed by Julien Chaffraix.

Update calls to new API.

* src/ContextMenuClientImpl.cpp:
(WebKit::selectMisspelledWord):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::characterIndexForPoint):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::isRectTopmost):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleMouseDown):
(WebKit::WebViewImpl::computeBlockBounds):
(WebKit::WebViewImpl::bestTouchLinkNode):
(WebKit::WebViewImpl::hitTestResultForWindowPos):

Source/WebKit/efl:

Reviewed by Julien Chaffraix.

Update calls to new API.

* ewk/ewk_frame.cpp:
(ewk_frame_hit_test_new):

Source/WebKit/mac:

Reviewed by Julien Chaffraix.

Update calls to new API.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::actionDictionary):
* WebView/WebFrame.mm:
(-[WebFrame elementAtPoint:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView elementAtPoint:allowShadowContent:]):

Source/WebKit/qt:

Reviewed by Julien Chaffraix.

Update calls to new API.

* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameAdapter::hitTestContent):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::TouchAdjuster::findCandidatePointForTouch):
(QWebPageAdapter::handleSoftwareInputPanel):
(QWebPageAdapter::updatePositionDependentMenuActions):

Source/WebKit/win:

Reviewed by Julien Chaffraix.

Update calls to new API.

* WebActionPropertyBag.cpp:
(WebActionPropertyBag::Read):
* WebKit.vcproj/WebKitExports.def.in:
* WebView.cpp:
(WebView::handleContextMenuEvent):
(WebView::elementAtPoint):

Source/WebKit/wx:

Reviewed by Julien Chaffraix.

Update calls to new API.

* WebFrame.cpp:
(WebKit::WebFrame::HitTest):

Source/WebKit2:

Reviewed by Julien Chaffraix and Maciej Stachowiak.

Update calls to new API and update exported symbols.

* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::hitTest):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleContextMenuEvent):
(WebKit::WebPage::highlightPotentialActivation):
(WebKit::WebPage::findZoomableAreaForPoint):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::characterIndexForPoint):
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::shouldDelayWindowOrderingEvent):
(WebKit::WebPage::acceptsFirstMouse):

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

8 years agoWeb Inspector: make component-based compile-front-end happy
pfeldman@chromium.org [Fri, 15 Feb 2013 10:37:39 +0000 (10:37 +0000)]
Web Inspector: make component-based compile-front-end happy
https://bugs.webkit.org/show_bug.cgi?id=109798

Reviewed by Vsevolod Vlasov.

* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setVariableValue):
* inspector/InspectorDebuggerAgent.h:
(InspectorDebuggerAgent):
* inspector/compile-front-end.py:
* inspector/front-end/AuditResultView.js:
* inspector/front-end/CPUProfileView.js:
* inspector/front-end/DataGrid.js:
* inspector/front-end/InspectorFrontendAPI.js:
(InspectorFrontendAPI.loadTimelineFromURL):

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

8 years agoWeb Inspector: Implement tracking of active stylesheets in the frontend
apavlov@chromium.org [Fri, 15 Feb 2013 10:29:12 +0000 (10:29 +0000)]
Web Inspector: Implement tracking of active stylesheets in the frontend
https://bugs.webkit.org/show_bug.cgi?id=105828

Reviewed by Pavel Feldman.

Source/WebCore:

- This change introduces the CSS.styleSheetAdded() and CSS.styleSheetRemoved() events
that update the frontend with all active stylesheet changes in the inspected page.
As such, fetching stylesheet headers from the backend manually is no longer needed,
and many asynchronous methods have been turned into normal accessors.
- One notable change to the stylesheet binding process is that when a via-inspector stylesheet
is created, it is instantly reported through the instrumentation, and the viaInspectorStyleSheet() method
is [indirectly] called recursively from bindStyleSheet(). Thus, the actual creation and registration
of the respective InspectorStyleSheet have been moved into bindStyleSheet(),
which relies upon the m_creatingViaInspectorStyleSheet flag.

Test: inspector/styles/stylesheet-tracking.html

* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Instrumented.
* inspector/Inspector.json: Add events, update the CSS domain description.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::enable): Push all existing stylesheet headers into the frontend.
(WebCore::InspectorCSSAgent::activeStyleSheetsUpdated): Push added/removed stylesheet into the frontend.
(WebCore::InspectorCSSAgent::getAllStyleSheets): Slightly refactored to make use of collectAllStyleSheets().
(WebCore::InspectorCSSAgent::collectAllStyleSheets): Added to collect InspectorStyleSheets rather than headers.
(WebCore::InspectorCSSAgent::collectStyleSheets):
(WebCore::InspectorCSSAgent::bindStyleSheet): Binds via-inspector stylesheets, too.
(WebCore::InspectorCSSAgent::unbindStyleSheet): Now we can unbind stylesheets upon their removal from the document.
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet): Modifies m_creatingViaInspectorStyleSheet when necessary.
(WebCore::InspectorCSSAgent::detectOrigin): Modified to make use of m_creatingViaInspectorStyleSheet.
(WebCore::InspectorCSSAgent::buildObjectForRule): Removed extraneous bound InspectorStyleSheet 0-check.
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp: Instrumentation of active stylesheet set updates.
(WebCore::InspectorInstrumentation::activeStyleSheetsUpdatedImpl):
* inspector/InspectorInstrumentation.h: Ditto.
(WebCore::InspectorInstrumentation::activeStyleSheetsUpdated):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel.prototype.styleSheetHeaders):
(WebInspector.CSSStyleModel.prototype._styleSheetAdded): Added.
(WebInspector.CSSStyleModel.prototype._styleSheetRemoved): Added.
(WebInspector.CSSStyleModel.prototype.viaInspectorResourceForRule):
(WebInspector.CSSStyleModelResourceBinding.prototype._setHeaderForStyleSheetId):
(WebInspector.CSSStyleModelResourceBinding.prototype.resourceURLForStyleSheetId):
(WebInspector.CSSStyleModelResourceBinding.prototype.styleSheetIdForResource):
(WebInspector.CSSStyleModelResourceBinding.prototype._headerKey): Calculate the (frameID + URL) key for CSSStyleSheetHeader.
(WebInspector.CSSStyleModelResourceBinding.prototype._createInspectorResource):
(WebInspector.CSSStyleModelResourceBinding.prototype._inspectorResource):
(WebInspector.CSSStyleModelResourceBinding.prototype._reset):
(WebInspector.CSSDispatcher.prototype.styleSheetAdded): Added.
(WebInspector.CSSDispatcher.prototype.styleSheetRemoved): Added.
* inspector/front-end/SASSSourceMapping.js: Get rid of async implementations.
(WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
* inspector/front-end/StylesSidebarPane.js: Ditto.
(WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
* inspector/front-end/StylesSourceMapping.js: Ditto.
(WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):

LayoutTests:

* inspector/styles/resources/stylesheet-tracking.css: Added.
* inspector/styles/stylesheet-tracking-expected.txt: Added.
* inspector/styles/stylesheet-tracking.html: Added.

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

8 years agoImplement the -webkit-margin-collapse properties correct rendering
commit-queue@webkit.org [Fri, 15 Feb 2013 10:22:27 +0000 (10:22 +0000)]
Implement the -webkit-margin-collapse properties correct rendering
https://bugs.webkit.org/show_bug.cgi?id=108168

Patch by Andrei Bucur <abucur@adobe.com> on 2013-02-15
Reviewed by David Hyatt.

Source/WebCore:

The patch implements the correct behavior for the -webkit-margin-collapse properties:
- a value of "discard" on a margin will truncate all the margins collapsing with it;
- a value of "separate" will prevent the margin to collapse;
- a value of "collapse" is the default collapse behavior.

The implementation is aware of multiple writing-modes:
- if the writing mode of a child is parallel with the writing mode of the container and has the same direction,
the -webkit-margin-collapse properties on the child are left as is;
- if the writing mode of a child is parallel with the writing mode of the container but has a different direction,
the -webkit-margin-collapse properties on the child are reversed;
- if the writing mode of a child is perpendicular on the writing mode of the container,
the -webkit-margin-collapse properties on the child are ignored;

I. The "discard" value implementation
There are two new bits (before and after) added on the RenderBlockRareData structure specifying if the margins
of the block will be discarded or not. We can't rely only on the value from style() because
it's possible a block to discard it's margins because it has collapsed with a children that
specified "discard" for -webkit-margin-collapse. However, the bits are set only if it is
required.
Another bit is added on the MarginInfo structure specifying if the margin has to be discarded or not. When
collapsing at the before side of a block it will hold information if the container block needs to discard
or not. If the collapsing happens between siblings/with after side of the container it will tell if the previous
child discards the margin or not. The self collapsing blocks are a special case. If any of its margins
discards then both its margins discard and all the other margins collapsing with it.
To ensure an optimal behavior it is asserted margin values can't be set on the MarginInfo object if the
discard flag is active. If this happens it may indicate someone ignored the possibility of the margin being
discarded altogether and incorrectly updated the margin values.
Float clearing also needs to change because it may force margins to stop collapsing. If this happens the discard
flags and margins needs to be restored to their values before the collapse.

II. The "separate" value implementation
The implementation for separate was not changed too much. I've added new accessor methods for the property
that take writing mode into consideration and I've removed some code that didn't work correctly in layoutBlockChild.
The problem was the marginInfo structure was cleared if the child was specifying the "separate" value for before.
This is wrong because you lose the margin information of the previous child/before side.

Tests: fast/block/margin-collapse/webkit-margin-collapse-container.html
       fast/block/margin-collapse/webkit-margin-collapse-floats.html
       fast/block/margin-collapse/webkit-margin-collapse-siblings-bt.html
       fast/block/margin-collapse/webkit-margin-collapse-siblings.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::MarginInfo::MarginInfo):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::collapseMargins):
(WebCore::RenderBlock::clearFloatsIfNeeded):
(WebCore::RenderBlock::marginBeforeEstimateForChild):
(WebCore::RenderBlock::estimateLogicalTopPosition):
(WebCore::RenderBlock::setCollapsedBottomMargin):
(WebCore::RenderBlock::handleAfterSideOfBlock):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::setMustDiscardMarginBefore):
(WebCore):
(WebCore::RenderBlock::setMustDiscardMarginAfter):
(WebCore::RenderBlock::mustDiscardMarginBefore):
(WebCore::RenderBlock::mustDiscardMarginAfter):
(WebCore::RenderBlock::mustDiscardMarginBeforeForChild):
(WebCore::RenderBlock::mustDiscardMarginAfterForChild):
(WebCore::RenderBlock::mustSeparateMarginBeforeForChild):
(WebCore::RenderBlock::mustSeparateMarginAfterForChild):
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::initMaxMarginValues):
(MarginInfo):
(WebCore::RenderBlock::MarginInfo::setPositiveMargin):
(WebCore::RenderBlock::MarginInfo::setNegativeMargin):
(WebCore::RenderBlock::MarginInfo::setPositiveMarginIfLarger):
(WebCore::RenderBlock::MarginInfo::setNegativeMarginIfLarger):
(WebCore::RenderBlock::MarginInfo::setMargin):
(WebCore::RenderBlock::MarginInfo::setCanCollapseMarginAfterWithChildren):
(WebCore::RenderBlock::MarginInfo::setDiscardMargin):
(WebCore::RenderBlock::MarginInfo::discardMargin):
(WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
(WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault):
(RenderBlockRareData):
* rendering/style/RenderStyle.h:

LayoutTests:

Four new tests covering the -webkit-margin-collapse property basic behavior: collapsing
between a block container and its children, collapsing between sibling boxes in both TTB
and BTT direction. The last test verifies if a container's before margin correctly resets
the discard value after a clear of the child that initally caused it.

* fast/block/margin-collapse/webkit-margin-collapse-container-expected.html: Added.
* fast/block/margin-collapse/webkit-margin-collapse-container.html: Added.
* fast/block/margin-collapse/webkit-margin-collapse-floats-expected.html: Added.
* fast/block/margin-collapse/webkit-margin-collapse-floats.html: Added.
* fast/block/margin-collapse/webkit-margin-collapse-siblings-bt-expected.html: Added.
* fast/block/margin-collapse/webkit-margin-collapse-siblings-bt.html: Added.
* fast/block/margin-collapse/webkit-margin-collapse-siblings-expected.html: Added.
* fast/block/margin-collapse/webkit-margin-collapse-siblings.html: Added.

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