367faf7b27d7853b68ae06adc97d0dc2ba9d96c8
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-26  Bolin Hsu  <bhsu@google.com>
2
3         [Chromium] Add Android keycodes
4         https://bugs.webkit.org/show_bug.cgi?id=81950
5
6         Add the missing Android keycodes listed in the bug.
7
8         Reviewed by Adam Barth.
9
10         * platform/chromium/KeyCodeConversionAndroid.cpp:
11         (WebCore::windowsKeyCodeForKeyEvent):
12         * platform/chromium/KeyboardCodes.h:
13
14 2012-03-26  Levi Weintraub  <leviw@chromium.org>
15
16         Switch ColumnInfo::addForcedBreak to LayoutUnits
17         https://bugs.webkit.org/show_bug.cgi?id=82210
18
19         Reviewed by Eric Seidel.
20
21         Forced breaks are added by local offsets, which should be in LayoutUnits.
22
23         No new tests. No change in behavior.
24
25         * rendering/ColumnInfo.h:
26         (WebCore::ColumnInfo::addForcedBreak):
27
28 2012-03-26  Levi Weintraub  <leviw@chromium.org>
29
30         Update LayoutUnit usage in ContainerNode, Element, and ElementRareData
31         https://bugs.webkit.org/show_bug.cgi?id=82219
32
33         Reviewed by Eric Seidel.
34
35         No new tests. No change in behavior.
36
37         * dom/ContainerNode.cpp:
38         (WebCore::ContainerNode::getLowerRightCorner): linesBoundingBox returns the enclosing IntRect
39         of the contained lines. Inline's aren't bounded in LayoutUnits nor pixel snapped.
40         * dom/Element.cpp:
41         (WebCore::Element::boundsInRootViewSpace): Coordinates in root view space are akin to absolute
42         coordinates, which are always expressed in integers.
43         * dom/Element.h:
44         (Element):
45         * dom/ElementRareData.h:
46         (WebCore::defaultMinimumSizeForResizing): Using numeric_limits<LayoutUnit>::max instead of
47         INT_MAX to avoid overflowing when LayoutUnits are sub-pixel.
48
49 2012-03-26  Adam Klein  <adamk@chromium.org>
50
51         Update binding test output for V8 after r112163.
52
53         * bindings/scripts/test/V8/V8TestInterface.cpp:
54         (WebCore::V8TestInterface::constructorCallback):
55         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
56         (WebCore::V8TestNamedConstructorConstructorCallback):
57         * bindings/scripts/test/V8/V8TestObj.cpp:
58         (WebCore::V8TestObj::constructorCallback):
59         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
60         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
61
62 2012-03-26  Levi Weintraub  <leviw@chromium.org>
63
64         Update localSelectionRect to return a LayoutRect
65         https://bugs.webkit.org/show_bug.cgi?id=82183
66
67         Reviewed by Eric Seidel.
68
69         localSelectionRect returns a rectangle in the coordinate space of its renderer,
70         and therefor should remain LayoutUnits until being promoted to absolute
71         coordinates or painted. Also fixing an incorrect conversion of startPos and
72         endPos in selectionRectForRepaint.
73
74         No new tests. No change in behavior.
75
76         * rendering/InlineTextBox.cpp:
77         (WebCore::InlineTextBox::localSelectionRect): Continuing to use enclosingIntRect
78         for the value being returned from the font engine since these floating point
79         values should not be pixel snapped.
80         * rendering/InlineTextBox.h:
81         (InlineTextBox):
82         * rendering/RenderReplaced.cpp:
83         (WebCore::RenderReplaced::localSelectionRect):
84         * rendering/RenderReplaced.h:
85         (RenderReplaced):
86         * rendering/RenderText.cpp:
87         (WebCore::localQuadForTextBox):
88         (WebCore::RenderText::absoluteRectsForRange):
89         (WebCore::RenderText::absoluteQuadsForRange):
90         (WebCore::RenderText::selectionRectForRepaint): Fixing an incorrect conversion of
91         start/endPos to LayoutUnits. These values represent a range of selected characters,
92         not layout values!
93         * rendering/svg/RenderSVGInlineText.cpp:
94         (WebCore::RenderSVGInlineText::localCaretRect):
95         * rendering/svg/SVGInlineTextBox.cpp:
96         (WebCore::SVGInlineTextBox::localSelectionRect):
97         * rendering/svg/SVGInlineTextBox.h:
98         (SVGInlineTextBox):
99
100 2012-03-26  Justin Novosad  <junov@chromium.org>
101
102         [Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
103         https://bugs.webkit.org/show_bug.cgi?id=82243
104
105         Reviewed by James Robinson.
106
107         Adding null pointer check to prevent crash and texture object
108         validity check to prevent potential graphics glitch
109
110         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
111         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
112
113 2012-03-26  Adam Klein  <adamk@chromium.org>
114
115         Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
116         https://bugs.webkit.org/show_bug.cgi?id=82238
117
118         Reviewed by Adam Barth.
119
120         The setJSWrapper* methods previously featured a comment that asked
121         callers to ref the objects before passing them in. This change makes
122         that contract explicit (and allows the removal of the comment).
123
124         In addition, for ConstructorCallbacks, this change slightly reduces
125         refcount churn by passing on the initial ref via RefPtr::release().
126
127         No new tests, no change in behavior.
128
129         * bindings/scripts/CodeGeneratorV8.pm:
130         (GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
131         (GenerateNamedConstructorCallback): ditto.
132         * bindings/v8/V8DOMWindowShell.cpp:
133         (WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
134         * bindings/v8/V8DOMWrapper.cpp:
135         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
136         * bindings/v8/V8DOMWrapper.h:
137         (V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
138         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
139         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
140         * bindings/v8/V8Proxy.h:
141         (WebCore::toV8): Remove explicit ref.
142         * bindings/v8/WorkerContextExecutionProxy.cpp:
143         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
144         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
145         (WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
146         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
147         (WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
148         * bindings/v8/custom/V8WebSocketCustom.cpp:
149         (WebCore::V8WebSocket::constructorCallback): ditto.
150         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
151         (WebCore::V8XMLHttpRequest::constructorCallback): ditto.
152
153 2012-03-26  Alexey Proskuryakov  <ap@apple.com>
154
155         Remove obsolete FormDataStreamMac code
156         https://bugs.webkit.org/show_bug.cgi?id=82244
157
158         Reviewed by Brady Eidson.
159
160         * platform/network/ResourceHandle.h:
161         Removed ResourceHandle::didSendBodyDataDelegateExists().
162
163         * platform/network/mac/FormDataStreamMac.h:
164         * platform/network/mac/FormDataStreamMac.mm:
165         Removed code that was needed to call ResourceLoaderClient::didSendData() before Foundation
166         added support for it.
167
168         * platform/network/mac/ResourceHandleMac.mm:
169         (WebCore::ResourceHandle::start):
170         (WebCore::ResourceHandle::cancel):
171         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
172         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
173         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
174         We no longer need to associate streams with ResourceHandles!
175
176 2012-03-26  Adam Klein  <adamk@chromium.org>
177
178         V8RecursionScope should not hold a raw pointer to ScriptExecutionContext
179         https://bugs.webkit.org/show_bug.cgi?id=82222
180
181         Reviewed by Eric Seidel.
182
183         Instead of holding onto ScriptExecutionContext, cache the boolean value we
184         care about (context->isDocument()). This avoids problems if the
185         context goes away as a result of the script we just ran.
186
187         Test: fast/frames/subframe-load-js-url-crash.html
188
189         * bindings/v8/V8RecursionScope.cpp:
190         (WebCore::V8RecursionScope::didLeaveScriptContext): Check the cached
191         bool instead of calling into the context.
192         * bindings/v8/V8RecursionScope.h:
193         (WebCore::V8RecursionScope::V8RecursionScope): Call isDocument from
194         the constructor and cache the result.
195         (WebCore::V8RecursionScope::~V8RecursionScope): No longer need to pass
196         anything to didLeaveScriptContext since it's now a member.
197         (V8RecursionScope): Make didLeaveScriptContext a member function and
198         remove its argument. Add member bool to hold the value of isDocument.
199
200 2012-03-26  Dana Jansens  <danakj@chromium.org>
201
202         [chromium] assertion being hit in CCLayerTreeHost::updateCompositorResources
203         https://bugs.webkit.org/show_bug.cgi?id=82239
204
205         Reviewed by Adrienne Walker.
206
207         The assert is incorrect and should check the animation state on
208         the surface, not the owning layer.
209
210         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
211         (WebCore::CCLayerTreeHost::updateCompositorResources):
212
213 2012-03-26  Levi Weintraub  <leviw@chromium.org>
214
215         Correct LayoutUnit usage in RenderFieldSet and RenderMenuItem
216         https://bugs.webkit.org/show_bug.cgi?id=82179
217
218         Reviewed by Julien Chaffraix.
219
220         Correcting small misuses of ints vs LayoutUnits in RenderFieldSet and RenderMenuItem. Also
221         adding zeroLayoutUnit where necessary to fix the sub-pixel build. See below for details.
222
223         No new tests. No change in behavior.
224
225         * rendering/RenderFieldset.cpp:
226         (WebCore::RenderFieldset::paintBoxDecorations): Clip rects need to be pixel snapped to mirror
227         the actual coordinates we paint.
228         (WebCore::RenderFieldset::paintMask): Using zeroLayoutUnit for ternary operation to fix the
229         sub-pixel build.
230         * rendering/RenderMenuList.cpp:
231         (WebCore::RenderMenuList::showPopup): Correctly using an IntRect for absoluteBoundingBoxRect.
232         (WebCore::RenderMenuList::clientPaddingLeft): Correcting mismatched return type with header.
233         (WebCore::RenderMenuList::clientPaddingRight): Ditto.
234
235 2012-03-26  Dan Bernstein  <mitz@apple.com>
236
237         Tried to fix an unused parameter warning after r112154.
238
239         * rendering/RenderFlexibleBox.cpp:
240         (WebCore::RenderFlexibleBox::layoutBlock): Changed to not pass relayoutChildren to
241         layoutFlexItems.
242         (WebCore::RenderFlexibleBox::layoutFlexItems): Removed the unused relayoutChildren parameter.
243         * rendering/RenderFlexibleBox.h:
244
245 2012-03-26  Rob Arnold  <robarnold@fb.com>
246
247         SyntheticStyleCalc on an element should not force recalculation on its children
248         https://bugs.webkit.org/show_bug.cgi?id=79389
249
250         Reviewed by Simon Fraser.
251
252         No new tests. Existing tests cover correctness, not sure how to test for performance.
253
254         * dom/Element.cpp:
255         (WebCore::Element::recalcStyle):
256
257 2012-03-26  Tony Chang  <tony@chromium.org>
258
259         apply cross axis constraints before aligning children in flexbox
260         https://bugs.webkit.org/show_bug.cgi?id=82240
261
262         Reviewed by Ojan Vafai.
263
264         We weren't applying max-height constraints before aligning children.
265         This would cause center, end, stretch alignment to be wrong if we hit
266         a max-height on a flexbox.
267
268         This patch also moves the repositioning logic to happen after
269         computeLogicalHeight, which will be useful for flex-line-pack.
270
271         New test case in css3/flexbox/flex-align.html
272
273         * rendering/RenderFlexibleBox.cpp:
274         (WebCore::RenderFlexibleBox::layoutBlock):
275         (WebCore::RenderFlexibleBox::layoutFlexItems):
276         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
277         * rendering/RenderFlexibleBox.h:
278
279 2012-03-26  Anders Carlsson  <andersca@apple.com>
280
281         Find in page overlay and bouncy are not always positioned correctly
282         https://bugs.webkit.org/show_bug.cgi?id=82247
283         <rdar://problem/10866139>
284
285         Reviewed by Sam Weinig.
286
287         In WebCore, a lot of code depends on scroll position updates to happen synchronously, so
288         update the frame view scroll position before asking the scrolling thread to scroll.
289
290         * page/scrolling/ScrollingCoordinator.cpp:
291         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
292
293 2012-03-26  Nate Chapin  <japhet@chromium.org>
294
295         Simplify setting loading state in DocumentLoader
296         https://bugs.webkit.org/show_bug.cgi?id=82099
297
298         Reviewed by Adam Barth.
299
300         The logic for deciding what to return for DocumentLoader::isLoading()
301         is crazy. It's indirectly based on the ResourceLoaders that have
302         registered themselves with the DocumentLoader, but we can make that
303         relationship more direct.
304
305         * loader/DocumentLoader.cpp:
306         (WebCore::DocumentLoader::checkLoadComplete): Renamed from updateLoading, since it's not actually
307             updating anything anymore. It now calls DOMWindow::finishedLoading() if loading is in fact done.
308         (WebCore::DocumentLoader::startLoadingMainResource): The only reason this had a return value was to call
309             updateLoading() if loading failed. Just call checkLoadComplete() directly (this allows it to
310             be private, whereas updateLoading() was public).
311         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
312         * loader/DocumentLoader.h:
313         (WebCore::DocumentLoader::isLoading): Rather than holding a separate bool, return based on the presence
314             of non-multipart ResourceLoaders directly.
315         * loader/FrameLoader.cpp:
316         (WebCore::FrameLoader::isLoading): Depend on DocumentLoader::isLoading() for the activeDocumentLoader(),
317             rather than indirectly the other way around.
318         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Remove several assertions that should now be
319             absolutely identical to the remaining !pdl->isLoading().
320         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
321
322 2012-03-26  James Robinson  <jamesr@chromium.org>
323
324         Scrollable plugins not registered properly in ScrollingCoordinator
325         https://bugs.webkit.org/show_bug.cgi?id=82163
326
327         Reviewed by Anders Carlsson.
328
329         Plugins may be scrollable, so we have to add them in the non-fast scrollable region. Tested manually.
330
331         * page/scrolling/ScrollingCoordinator.cpp:
332         (WebCore::computeNonFastScrollableRegion):
333         (WebCore::ScrollingCoordinator::nonFastScrollableRegion):
334         (WebCore):
335         * page/scrolling/ScrollingCoordinator.h:
336         (ScrollingCoordinator):
337         * plugins/PluginViewBase.h:
338         (WebCore::PluginViewBase::scrollable):
339         (PluginViewBase):
340
341 2012-03-26  Joone Hur  <joone.hur@collabora.co.uk>
342
343         [GTK] Build fix for Accelerated Compositing with Clutter
344         https://bugs.webkit.org/show_bug.cgi?id=81785
345
346         Reviewed by Martin Robinson.
347
348         AcceleratedCompositingContext was introduced to isolate different accelerated 
349         compositing implementations(r104194), but the Clutter implementation doesn't 
350         build with it. This includes an initial implementation of GraphicsContext3D 
351         and fixes the build error.
352
353         * GNUmakefile.list.am:
354         * platform/graphics/clutter/DrawingBufferClutter.cpp: Added.
355         (WebCore):
356         (WebCore::DrawingBuffer::DrawingBuffer):
357         (WebCore::DrawingBuffer::~DrawingBuffer):
358         (WebCore::DrawingBuffer::platformColorBuffer):
359         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
360         * platform/graphics/clutter/GraphicsContext3DClutter.cpp: Added.
361         (WebCore):
362         (WebCore::GraphicsContext3D::create):
363         (WebCore::GraphicsContext3D::GraphicsContext3D):
364         (WebCore::GraphicsContext3D::~GraphicsContext3D):
365         (WebCore::GraphicsContext3D::getImageData):
366         (WebCore::GraphicsContext3D::paintToCanvas):
367         (WebCore::GraphicsContext3D::setContextLostCallback):
368         (WebCore::GraphicsContext3D::setErrorMessageCallback):
369         (WebCore::GraphicsContext3D::makeContextCurrent):
370         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
371         (WebCore::GraphicsContext3D::isGLES2Compliant):
372         (WebCore::GraphicsContext3D::platformLayer):
373         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Added.
374         (WebCore):
375         (WebCore::GraphicsContext3DPrivate::create):
376         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
377         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
378         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
379         (WebCore::GraphicsContext3DPrivate::platformContext):
380         (WebCore::GraphicsContext3DPrivate::paintToGraphicsLayerActor):
381         * platform/graphics/clutter/GraphicsContext3DPrivate.h: Added.
382         (WebCore):
383         (GraphicsContext3DPrivate):
384         (WebCore::GraphicsContext3DPrivate::platformLayer):
385
386 2012-03-26  Peter Rybin  <prybin@chromium.org>
387
388         Web Inspector: Expose InspectorTypeBuilder.h to other components
389         https://bugs.webkit.org/show_bug.cgi?id=82226
390
391         Reviewed by Vsevolod Vlasov.
392
393         This is a provisional commit that simplifies passing ealy warning system
394         for the main patch https://bugs.webkit.org/show_bug.cgi?id=81558
395
396         * WebCore.xcodeproj/project.pbxproj: config file is changed in Xcode UI.
397
398 2012-03-26  Antaryami Pandia  <antaryami.pandia@motorola.com>
399
400         An <area> element remains focusable even though its associated <img> is not rendered.
401         https://bugs.webkit.org/show_bug.cgi?id=71788
402
403         Reviewed by Andy Estes.
404
405         HTMLAreaElement::isFocusable() needs to consider the display and
406         visibility state.
407
408         Test: fast/events/tab-test-not-visible-imagemap.html
409
410         * html/HTMLAreaElement.cpp:
411         (WebCore::HTMLAreaElement::imageElement):
412         (WebCore::HTMLAreaElement::isFocusable):
413         * html/HTMLAreaElement.h: Make imageElement() const.
414         (HTMLAreaElement):
415
416 2012-03-26  Anton Muhin  <antonm@chromium.org>
417
418         Fix a typo in IDL
419         https://bugs.webkit.org/show_bug.cgi?id=82215
420
421         Reviewed by Adam Barth.
422
423         No new tests, just a typo fix.
424
425         * notifications/WorkerContextNotifications.idl:
426
427 2012-03-26  W. James MacLean  <wjmaclean@chromium.org>
428
429         [chromium] Change handleGestureFling() to use CCInputHandlerClient::Wheel.
430         https://bugs.webkit.org/show_bug.cgi?id=82133
431
432         Reviewed by James Robinson.
433
434         Covered by existing unit tests.
435
436         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
437         (WebCore::CCLayerTreeHostImpl::scrollBegin):
438
439 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
440
441         CSS3 calc: mixed percent/absolute for box-reflect
442         https://bugs.webkit.org/show_bug.cgi?id=82161
443
444         Reviewed by Ojan Vafai.
445
446         Tests: css3/calc/box-reflect-expected.html
447                css3/calc/box-reflect.html
448
449         * css/CSSStyleSelector.cpp:
450         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
451
452 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
453
454         CSS3 calc: mixed percent/absolute support for vertical-align
455         https://bugs.webkit.org/show_bug.cgi?id=82152
456
457         Reviewed by Ojan Vafai.
458
459         Tests: css3/calc/vertical-align-expected.html
460                css3/calc/vertical-align.html
461
462         * css/CSSStyleApplyProperty.cpp:
463         (WebCore::ApplyPropertyVerticalAlign::applyValue):
464
465 2012-03-26  Filip Spacek  <fspacek@rim.com>
466
467         [BlackBerry] Accelerated compositing updates
468         https://bugs.webkit.org/show_bug.cgi?id=82058
469
470         Reviewed by Rob Buis.
471
472         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
473         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
474         (WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread):
475         (WebCore::CanvasLayerWebKitThread::setDevice):
476         (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
477         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
478         (WebCore::CanvasLayerWebKitThread::create):
479         (CanvasLayerWebKitThread):
480         * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
481         (WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas):
482         (WebCore::InstrumentedPlatformCanvas::save):
483         (WebCore::InstrumentedPlatformCanvas::saveLayer):
484         (WebCore::InstrumentedPlatformCanvas::restore):
485         (WebCore::InstrumentedPlatformCanvas::translate):
486         (WebCore::InstrumentedPlatformCanvas::scale):
487         (WebCore::InstrumentedPlatformCanvas::rotate):
488         (WebCore::InstrumentedPlatformCanvas::skew):
489         (WebCore::InstrumentedPlatformCanvas::concat):
490         (WebCore::InstrumentedPlatformCanvas::setMatrix):
491         (WebCore::InstrumentedPlatformCanvas::clipRect):
492         (WebCore::InstrumentedPlatformCanvas::clipPath):
493         (WebCore::InstrumentedPlatformCanvas::clipRegion):
494         (WebCore::InstrumentedPlatformCanvas::clear):
495         (WebCore::InstrumentedPlatformCanvas::drawPaint):
496         (WebCore::InstrumentedPlatformCanvas::drawPoints):
497         (WebCore::InstrumentedPlatformCanvas::drawRect):
498         (WebCore::InstrumentedPlatformCanvas::drawPath):
499         (WebCore::InstrumentedPlatformCanvas::drawBitmap):
500         (WebCore::InstrumentedPlatformCanvas::drawBitmapRect):
501         (WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix):
502         (WebCore::InstrumentedPlatformCanvas::drawSprite):
503         (WebCore::InstrumentedPlatformCanvas::drawText):
504         (WebCore::InstrumentedPlatformCanvas::drawPosText):
505         (WebCore::InstrumentedPlatformCanvas::drawPosTextH):
506         (WebCore::InstrumentedPlatformCanvas::drawTextOnPath):
507         (WebCore::InstrumentedPlatformCanvas::drawPicture):
508         (WebCore::InstrumentedPlatformCanvas::drawVertices):
509         (WebCore::InstrumentedPlatformCanvas::drawData):
510         * platform/graphics/blackberry/LayerData.h:
511         (WebCore::LayerData::LayerData):
512         (WebCore::LayerData::needsTexture):
513         (LayerData):
514         * platform/graphics/blackberry/LayerTiler.cpp:
515         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
516         * platform/graphics/blackberry/LayerWebKitThread.cpp:
517         (WebCore::LayerWebKitThread::paintContents):
518         (WebCore::LayerWebKitThread::setDrawable):
519         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
520         (WebCore::loadBufferingImageData):
521         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h.
522         (WebCore):
523         (ImageBufferData):
524
525 2012-03-26  Stephen Chenney  <schenney@chromium.org>
526
527         Failure to invalidate text position attributes when DOM changes
528         https://bugs.webkit.org/show_bug.cgi?id=81464
529
530         Reviewed by Nikolas Zimmermann.
531
532         The text positioning elements data structure in RenderSVGText must be
533         updated when either the children of the corresponding element are
534         modified, or the length of the text inside the elements changes.
535         Previously, the call to clear the text positioning elements (to force
536         recomputation) was guarded by a flag. If code tried to invalidate when
537         the flag was not set, then something set the flag, the elements would
538         be invalid at use time.
539
540         This patch modifies the method that invalidates the positining
541         attributes so that the action always happens. It also renames the
542         method to more accurately reflect its function.
543
544         Test: svg/custom/delete-modified-text-in-defs-crash.svg
545
546         * rendering/svg/RenderSVGInlineText.cpp:
547         (WebCore::RenderSVGInlineText::setTextInternal): Rename textDOMChanged to invalidateTextPositioningElements
548         * rendering/svg/RenderSVGText.cpp:
549         (WebCore::RenderSVGText::invalidateTextPositioningElements): Rename
550         textDOMChanged to invalidateTextPositioningElements and remove the check against the needsPosition... flag.
551         * rendering/svg/RenderSVGText.h:
552         (RenderSVGText): Rename textDOMChanged to invalidateTextPositioningElements
553         * svg/SVGAElement.cpp:
554         (WebCore::SVGAElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
555         * svg/SVGTextContentElement.cpp:
556         (WebCore::SVGTextContentElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
557
558 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
559
560         REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
561         https://bugs.webkit.org/show_bug.cgi?id=81802
562
563         Reviewed by Dan Bernstein.
564
565         Covered by fast/forms/placeholder-set-attribute.html which should be less flaky.
566
567         Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically.
568
569         This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during
570         the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint.
571
572         * rendering/RenderTextControlSingleLine.cpp:
573         (WebCore::RenderTextControlSingleLine::layout):
574         For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint
575         on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild.
576
577 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
578
579         REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
580         https://bugs.webkit.org/show_bug.cgi?id=80531
581
582         Reviewed by Ojan Vafai.
583
584         Tested by fast/forms/textfield-overflow.html (re-enabled after this change).
585
586         The existing code would happily query layout information before calling layout (FTW!).
587         The solution is to properly layout our object, then modify some dimensions as needed while
588         marking ourself as needing layout and then layouting again.
589
590         * rendering/RenderTextControlSingleLine.cpp:
591         (WebCore::RenderTextControlSingleLine::layout):
592         Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as:
593         - layoutBlock handles automatically logical height changes.
594         - we were not modifying the logical width between layouts so we don't need to force a
595         child relayout in this case.
596
597 2012-03-26  Robin Cao  <robin.cao@torchmobile.com.cn>
598
599         [BlackBerry] Upstream LayerCompositingThread.{h, cpp}
600         https://bugs.webkit.org/show_bug.cgi?id=79873
601
602         Reviewed by Rob Buis.
603
604         Initial upstream, no new tests.
605
606         * platform/graphics/blackberry/LayerCompositingThread.cpp: Added.
607         (WebCore):
608         (WebCore::LayerCompositingThread::create):
609         (WebCore::LayerCompositingThread::LayerCompositingThread):
610         (WebCore::LayerCompositingThread::~LayerCompositingThread):
611         (WebCore::LayerCompositingThread::destroyOnCompositingThread):
612         (WebCore::LayerCompositingThread::setLayerRenderer):
613         (WebCore::LayerCompositingThread::deleteTextures):
614         (WebCore::LayerCompositingThread::setDrawTransform):
615         (WebCore::getTransformedRect):
616         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
617         (WebCore::LayerCompositingThread::drawTextures):
618         (WebCore::LayerCompositingThread::drawSurface):
619         (WebCore::LayerCompositingThread::drawMissingTextures):
620         (WebCore::LayerCompositingThread::releaseTextureResources):
621         (WebCore::LayerCompositingThread::setPluginView):
622         (WebCore::LayerCompositingThread::setMediaPlayer):
623         (WebCore::LayerCompositingThread::clearAnimations):
624         (WebCore::LayerCompositingThread::removeSublayer):
625         (WebCore::LayerCompositingThread::indexOfSublayer):
626         (WebCore::LayerCompositingThread::rootLayer):
627         (WebCore::LayerCompositingThread::removeFromSuperlayer):
628         (WebCore::LayerCompositingThread::setSublayers):
629         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
630         (WebCore::LayerCompositingThread::setVisible):
631         (WebCore::LayerCompositingThread::setNeedsCommit):
632         (WebCore::LayerCompositingThread::scheduleCommit):
633         (WebCore::LayerCompositingThread::updateAnimations):
634         (WebCore::LayerCompositingThread::hasVisibleHolePunchRect):
635         (WebCore::LayerCompositingThread::createLayerRendererSurface):
636         * platform/graphics/blackberry/LayerCompositingThread.h: Added.
637         (Graphics):
638         (WebCore):
639         (LayerCompositingThread):
640         (WebCore::LayerCompositingThread::bindContentsTexture):
641         (WebCore::LayerCompositingThread::getSublayers):
642         (WebCore::LayerCompositingThread::setSuperlayer):
643         (WebCore::LayerCompositingThread::superlayer):
644         (WebCore::LayerCompositingThread::drawTransform):
645         (WebCore::LayerCompositingThread::setDrawOpacity):
646         (WebCore::LayerCompositingThread::drawOpacity):
647         (WebCore::LayerCompositingThread::layerRendererSurface):
648         (WebCore::LayerCompositingThread::clearLayerRendererSurface):
649         (WebCore::LayerCompositingThread::setMaskLayer):
650         (WebCore::LayerCompositingThread::maskLayer):
651         (WebCore::LayerCompositingThread::setReplicaLayer):
652         (WebCore::LayerCompositingThread::replicaLayer):
653         (WebCore::LayerCompositingThread::getDrawRect):
654         (WebCore::LayerCompositingThread::getTransformedBounds):
655         (WebCore::LayerCompositingThread::hasMissingTextures):
656         (WebCore::LayerCompositingThread::isDirty):
657         (WebCore::LayerCompositingThread::isVisible):
658         (WebCore::LayerCompositingThread::setOpacity):
659         (WebCore::LayerCompositingThread::setTransform):
660         (WebCore::LayerCompositingThread::hasRunningAnimations):
661         (WebCore::LayerCompositingThread::numSublayers):
662
663 2012-03-26  Kent Tamura  <tkent@chromium.org>
664
665         Add a notification function for detaching to TextFieldDecorator
666         https://bugs.webkit.org/show_bug.cgi?id=82142
667
668         Reviewed by Dimitri Glazkov.
669
670         Add willDetach() functio to TextFieldDecorator. This will be
671         needed if a decorator opens a popup UI on handleClick(), and the
672         popup UI should be closed when the attaching text field is
673         detached.
674
675         No new tests because of no behavior changes in any platforms.
676
677         * html/shadow/TextFieldDecorationElement.cpp:
678         (WebCore::TextFieldDecorationElement::hostInput):
679         Added. A utilify function to get an HTMLInputElement*.
680         (WebCore::TextFieldDecorationElement::updateImage): Use hostInput().
681         (WebCore::TextFieldDecorationElement::customStyleForRenderer): ditto.
682         (WebCore::TextFieldDecorationElement::detach): Added. Calls TextFieldDecorator::willDetach().
683         (WebCore::TextFieldDecorationElement::defaultEventHandler): Use hostInput().
684         * html/shadow/TextFieldDecorationElement.h:
685         (TextFieldDecorator):
686         (TextFieldDecorationElement):
687
688 2012-03-26  Dan Bernstein  <mitz@apple.com>
689
690         Tried to fix the 32-bit build after r112021.
691
692         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
693         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
694
695 2012-03-26  Leo Yang  <leo.yang@torchmobile.com.cn>
696
697         [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
698         https://bugs.webkit.org/show_bug.cgi?id=82157
699
700         Reviewed by Rob Buis.
701
702         AsyncFileSystemBlackBerry is responsible for asynchronous operating
703         on file system for the blackberry porting. It's just skeleton code
704         containing no implementation yet.
705
706         No new tests because of skeleton code.
707
708         * PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on.
709         * platform/AsyncFileSystem.cpp:
710         (WebCore):
711         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added.
712         (WebCore):
713         (WebCore::AsyncFileSystem::isAvailable):
714         (WebCore::AsyncFileSystem::isValidType):
715         (WebCore::AsyncFileSystem::create):
716         (WebCore::AsyncFileSystem::openFileSystem):
717         (WebCore::AsyncFileSystem::crackFileSystemURL):
718         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
719         (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
720         (WebCore::AsyncFileSystemBlackBerry::toURL):
721         (WebCore::AsyncFileSystemBlackBerry::move):
722         (WebCore::AsyncFileSystemBlackBerry::copy):
723         (WebCore::AsyncFileSystemBlackBerry::remove):
724         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
725         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
726         (WebCore::AsyncFileSystemBlackBerry::createFile):
727         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
728         (WebCore::AsyncFileSystemBlackBerry::fileExists):
729         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
730         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
731         (WebCore::AsyncFileSystemBlackBerry::createWriter):
732         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
733         * platform/blackberry/AsyncFileSystemBlackBerry.h: Added.
734         (WebCore):
735         (AsyncFileSystemBlackBerry):
736
737 2012-03-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
738
739         [BlackBerry] CredentialBackingStore implement encryptString() and decryptString()
740         https://bugs.webkit.org/show_bug.cgi?id=82204
741
742         Reviewed by Rob Buis.
743
744         Implemented encryptedString() and decryptedString() in class CredentialBackingStore
745         by calling BlackBerry::Platform::Encryptor::encryptString() and
746         BlackBerry::Platform::Encryptor::encryptString() respectively.
747
748         No new tests.
749
750         * platform/network/blackberry/CredentialBackingStore.cpp:
751         (WebCore::CredentialBackingStore::encryptedString):
752         (WebCore::CredentialBackingStore::decryptedString):
753
754 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
755
756         Web Inspector: 'use strict' exceptions stop in inspector code
757         https://bugs.webkit.org/show_bug.cgi?id=82199
758
759         Reviewed by Yury Semikhatsky.
760
761         Accessing callee from within InjectedScript made inspector stop on handled exceptions.
762         I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]".
763
764         * inspector/InjectedScriptSource.js:
765
766 2012-03-26  Mihai Balan  <mibalan@adobe.com>
767
768         [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
769         https://bugs.webkit.org/show_bug.cgi?id=81901
770
771         Reviewed by Antti Koivisto.
772
773         Right now CSS rules position does not take into account rules that are inside a @-webkit-region
774         declaration, leading to buggy behavior where rules that appear later in the document are superseded
775         by rules that appear earlier in the document (opposite as how things should be). The fix updates
776         the "global" rules counter once the rules in a @-webkit-region declaration have been added.
777
778         Tests: fast/regions/region-style-rule-position-expected.html
779                fast/regions/region-style-rule-position.html
780
781         * css/CSSStyleSelector.cpp:
782         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
783
784 2012-03-26  Pierre Rossi  <pierre.rossi@nokia.com>
785
786         [Qt] Disable focus ring in the mobile theme.
787         https://bugs.webkit.org/show_bug.cgi?id=81934
788
789         For mobile devices intended to be used only through
790         touch, the focus rings makes little sense and feels
791         awkward.
792
793         Reviewed by Kenneth Rohde Christiansen.
794
795         No new tests. This is merely a cosmetic touch.
796
797         * platform/qt/RenderThemeQtMobile.h:
798         (RenderThemeQtMobile):
799         (WebCore::RenderThemeQtMobile::platformFocusRingColor):
800
801 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
802
803         [BlackBerry] Clean up networking code and remove WML support.
804         https://bugs.webkit.org/show_bug.cgi?id=82170
805
806         Reviewed by Rob Buis.
807
808         This just removes the WML support of BlackBerry porting, which is already 
809         removed from WebCore. No new tests needed.
810
811         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
812         (WebCore):
813         * platform/network/blackberry/DeferredData.cpp:
814         (WebCore::DeferredData::DeferredData):
815         (WebCore::DeferredData::processDeferredData):
816         * platform/network/blackberry/DeferredData.h:
817         (DeferredData):
818         (WebCore::DeferredData::hasDeferredData):
819         * platform/network/blackberry/NetworkJob.cpp:
820         * platform/network/blackberry/NetworkJob.h:
821         (NetworkJob):
822         * platform/network/blackberry/ResourceResponse.h:
823         (WebCore::ResourceResponse::ResourceResponse):
824         (ResourceResponse):
825         * platform/network/blackberry/ResourceResponseBlackBerry.cpp:
826         (WebCore::ResourceResponse::doPlatformCopyData):
827         (WebCore::ResourceResponse::doPlatformAdopt):
828
829 2012-03-26  Philip Rogers  <pdr@google.com>
830
831         Add invalid bounding box concept to SVG containers
832         https://bugs.webkit.org/show_bug.cgi?id=81104
833
834         Reviewed by Nikolas Zimmermann.
835
836         An empty <g> element needs to use an invalid bounding box because
837         an empty bounding box isn't the default state. This change
838         introduces the concept of an invalid object bounding box for
839         both RenderSVGContainer and RenderSVGRoot. Code that
840         does not explicitly check that the bounding box is valid
841         should be unaffected by this change. We use this new invalid
842         flag in computeContainerBoundingBoxes so that we do not
843         include invalid bounding boxes.
844
845         This change also contains a small fix in
846         RenderSVGContainer::toRenderSVGContainer which depended on
847         RenderSVGViewportContainer not inheriting from RenderSVGContainer,
848         which it now does.
849
850         Test: svg/custom/getBBox-empty-container.html
851
852         * rendering/svg/RenderSVGContainer.cpp:
853         (WebCore::RenderSVGContainer::RenderSVGContainer):
854         (WebCore::RenderSVGContainer::updateCachedBoundaries):
855         * rendering/svg/RenderSVGContainer.h:
856         (WebCore::RenderSVGContainer::isObjectBoundingBoxValid):
857         (RenderSVGContainer):
858         (WebCore::toRenderSVGContainer):
859         * rendering/svg/RenderSVGRoot.cpp:
860         (WebCore::RenderSVGRoot::RenderSVGRoot):
861         (WebCore::RenderSVGRoot::updateCachedBoundaries):
862         * rendering/svg/RenderSVGRoot.h:
863         (RenderSVGRoot):
864         * rendering/svg/SVGRenderSupport.cpp:
865         (WebCore):
866         (WebCore::updateObjectBoundingBox):
867         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
868         * rendering/svg/SVGRenderSupport.h:
869         (SVGRenderSupport):
870
871 2012-03-26  Alexei Filippov  <alexeif@chromium.org>
872
873         Web Inspector: Speed up the retainers build phase.
874         https://bugs.webkit.org/show_bug.cgi?id=81763
875
876         Replacing the edge iterator in retainers building phase
877         makes it run 10 times faster (400 ms vs. 4 sec).
878
879         Reviewed by Yury Semikhatsky.
880
881         * inspector/front-end/HeapSnapshot.js:
882         (WebInspector.HeapSnapshot.prototype._buildRetainers):
883
884 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
885
886         Web Inspector: Migrate InspectorCSSAgent to strict protocol types
887         https://bugs.webkit.org/show_bug.cgi?id=81923
888
889         Reviewed by Pavel Feldman.
890
891         No new tests, as this is a refactoring.
892
893         * inspector/CodeGeneratorInspector.py:
894         * inspector/InspectorCSSAgent.cpp:
895         (SelectorProfile):
896         (WebCore::SelectorProfile::toInspectorObject):
897         (WebCore::InspectorCSSAgent::clearFrontend):
898         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
899         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
900         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
901         (WebCore::InspectorCSSAgent::getAllStyleSheets):
902         (WebCore::InspectorCSSAgent::getStyleSheet):
903         (WebCore::InspectorCSSAgent::setPropertyText):
904         (WebCore::InspectorCSSAgent::toggleProperty):
905         (WebCore::InspectorCSSAgent::setRuleSelector):
906         (WebCore::InspectorCSSAgent::addRule):
907         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
908         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
909         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
910         (WebCore::InspectorCSSAgent::collectStyleSheets):
911         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
912         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
913         * inspector/InspectorCSSAgent.h:
914         (InspectorCSSAgent):
915         * inspector/InspectorStyleSheet.cpp:
916         (WebCore::buildSourceRangeObject):
917         (WebCore::buildMediaObject):
918         (WebCore::fillMediaListChain):
919         (WebCore::InspectorStyle::buildObjectForStyle):
920         (WebCore::InspectorStyle::buildArrayForComputedStyle):
921         (WebCore::InspectorStyle::styleWithProperties):
922         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
923         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
924         (WebCore::InspectorStyleSheet::buildObjectForRule):
925         (WebCore::InspectorStyleSheet::buildObjectForStyle):
926         * inspector/InspectorStyleSheet.h:
927         (WebCore::InspectorCSSId::asProtocolValue):
928         (InspectorStyle):
929         (InspectorStyleSheet):
930
931 2012-03-26  Alexander Pavlov  <apavlov@chromium.org>
932
933         Web Inspector: [REGRESSION] Workarounds for security checks when retrieving stylesheet rule lists are broken
934         https://bugs.webkit.org/show_bug.cgi?id=82191
935
936         Reviewed by Vsevolod Vlasov.
937
938         Test: http/tests/inspector/modify-cross-domain-rule.html
939
940         * inspector/InspectorStyleSheet.cpp:
941         (WebCore::asCSSRuleList):
942         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
943
944 2012-03-26  Carlos Garcia Campos  <cgarcia@igalia.com>
945
946         Unreviewed. Fix make distcheck.
947
948         * GNUmakefile.list.am: Add missing files.
949
950 2012-03-26  Jason Liu  <jason.liu@torchmobile.com.cn>
951
952         [BlackBerry] Cookies mismatch when login to gmail.
953         https://bugs.webkit.org/show_bug.cgi?id=82165
954
955         Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty
956         in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest
957         for redirection loading.
958
959         This issue didn't happen before because we used m_cookieData not the cookie header.
960         Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed.
961
962         Reviewed by George Staikos.
963
964         No new tests. It is a refactoring issue.
965
966         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
967         (WebCore::ResourceRequest::initializePlatformRequest):
968
969 2012-03-26  Alexis Menard  <alexis.menard@openbossa.org>
970
971         Increase code sharing between StylePropertySet and CSSPropertyLonghand.
972         https://bugs.webkit.org/show_bug.cgi?id=81960
973
974         Reviewed by Antti Koivisto.
975
976         Use longhands declaration from CSSPropertyLonghand in StylePropertySet in order
977         to avoid code duplication.
978
979         No new tests : refactoring only, we shouldn't have any behavior difference.
980
981         * css/CSSPropertyLonghand.cpp:
982         (WebCore::backgroundLonghand):
983         Re-order the array to match the spec default order.
984         (WebCore::webkitMaskLonghand):
985         Re-order to match the original order.
986         (WebCore::webkitTransformOriginLonghand):
987         A LayoutTest shows that a property was missing.
988         * css/StylePropertySet.cpp:
989         (WebCore::StylePropertySet::getPropertyValue):
990         (WebCore::StylePropertySet::borderSpacingValue):
991         (WebCore::StylePropertySet::get4Values):
992         (WebCore::StylePropertySet::getLayeredShorthandValue):
993         (WebCore::StylePropertySet::getShorthandValue):
994         (WebCore::StylePropertySet::getCommonValue):
995         (WebCore::StylePropertySet::asText):
996         * css/StylePropertySet.h:
997         (WebCore):
998         (StylePropertySet):
999
1000 2012-03-26  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1001
1002         [Qt] Assert in GestureTapHighlighter.
1003         https://bugs.webkit.org/show_bug.cgi?id=82187
1004
1005         Reviewed by Kenneth Rohde Christiansen.
1006
1007         Adjust the boundaries of the center-rect before performing the intersection test,
1008         since adjusting the boundary may cause a new intersection.
1009
1010         * page/GestureTapHighlighter.cpp:
1011
1012 2012-03-26  Antti Koivisto  <antti@apple.com>
1013
1014         Split MediaList into internal and CSSOM types
1015         https://bugs.webkit.org/show_bug.cgi?id=82149
1016
1017         Reviewed by Andread Kling.
1018
1019         MediaList is a CSSOM type and should not be used internally.
1020         
1021         - Use new type MediaQuerySet internally to represent a collection of media queries.
1022         - Create MediaList wrapper on-demand for CSSOM purposes only.
1023         
1024         This moves us forward in separating CSSOM from the internal stylesheet implementation.
1025         
1026         MediaQuerySet really belongs to a file of its own but that is not part of this patch.
1027         
1028         * css/CSSGrammar.y:
1029         * css/CSSImportRule.cpp:
1030         (WebCore::CSSImportRule::create):
1031         (WebCore):
1032         (WebCore::CSSImportRule::CSSImportRule):
1033         (WebCore::CSSImportRule::~CSSImportRule):
1034         (WebCore::CSSImportRule::media):
1035         (WebCore::CSSImportRule::cssText):
1036         * css/CSSImportRule.h:
1037         (WebCore):
1038         (CSSImportRule):
1039         (WebCore::CSSImportRule::mediaQueries):
1040         * css/CSSMediaRule.cpp:
1041         (WebCore::CSSMediaRule::CSSMediaRule):
1042         (WebCore::CSSMediaRule::~CSSMediaRule):
1043         (WebCore::CSSMediaRule::cssText):
1044         * css/CSSMediaRule.h:
1045         (WebCore::CSSMediaRule::create):
1046         (WebCore::CSSMediaRule::media):
1047         (WebCore::CSSMediaRule::mediaQueries):
1048         (CSSMediaRule):
1049         * css/CSSParser.cpp:
1050         (WebCore::CSSParser::parseMediaQuery):
1051         (WebCore::CSSParser::createMediaQuerySet):
1052         (WebCore::CSSParser::createImportRule):
1053         (WebCore::CSSParser::createMediaRule):
1054         (WebCore::CSSParser::updateLastMediaLine):
1055         * css/CSSParser.h:
1056         (WebCore):
1057         (CSSParser):
1058         * css/CSSStyleSelector.cpp:
1059         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1060         * css/CSSStyleSheet.cpp:
1061         (WebCore):
1062         (WebCore::CSSStyleSheet::media):
1063         (WebCore::CSSStyleSheet::setMediaQueries):
1064         * css/CSSStyleSheet.h:
1065         (WebCore):
1066         (CSSStyleSheet):
1067         (WebCore::CSSStyleSheet::mediaQueries):
1068         * css/MediaList.cpp:
1069         (WebCore):
1070         (WebCore::MediaQuerySet::MediaQuerySet):
1071         (WebCore::MediaQuerySet::~MediaQuerySet):
1072         (WebCore::parseMediaDescriptor):
1073         (WebCore::MediaQuerySet::parse):
1074         (WebCore::MediaQuerySet::add):
1075         (WebCore::MediaQuerySet::remove):
1076         (WebCore::MediaQuerySet::addMediaQuery):
1077         (WebCore::MediaQuerySet::mediaText):
1078         (WebCore::MediaQuerySet::ensureMediaList):
1079         
1080             - Use OwnPtr<> for MediaQuery ownership.
1081             - Move the appropriate functions to MediaQuerySet.
1082             - Clean up a bit to make this more readable and better aligned to WebKit style.
1083         
1084         (WebCore::MediaList::MediaList):
1085         (WebCore::MediaList::~MediaList):
1086         (WebCore::MediaList::setMediaText):
1087         (WebCore::MediaList::item):
1088         (WebCore::MediaList::deleteMedium):
1089         (WebCore::MediaList::appendMedium):
1090         * css/MediaList.h:
1091         (WebCore):
1092         (WebCore::MediaQuerySet::create):
1093         (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
1094         (MediaQuerySet):
1095         (WebCore::MediaQuerySet::queryVector):
1096         (WebCore::MediaQuerySet::lastLine):
1097         (WebCore::MediaQuerySet::setLastLine):
1098         (MediaList):
1099         (WebCore::MediaList::ref):
1100         (WebCore::MediaList::deref):
1101         (WebCore::MediaList::length):
1102         (WebCore::MediaList::mediaText):
1103         (WebCore::MediaList::queries):
1104         * css/MediaQueryEvaluator.cpp:
1105         (WebCore::MediaQueryEvaluator::eval):
1106         * css/MediaQueryEvaluator.h:
1107         (WebCore):
1108         (MediaQueryEvaluator):
1109         * css/MediaQueryList.cpp:
1110         (WebCore::MediaQueryList::create):
1111         (WebCore::MediaQueryList::MediaQueryList):
1112         * css/MediaQueryList.h:
1113         (WebCore):
1114         (MediaQueryList):
1115         * css/MediaQueryMatcher.cpp:
1116         (WebCore::MediaQueryMatcher::evaluate):
1117         (WebCore::MediaQueryMatcher::matchMedia):
1118         * css/MediaQueryMatcher.h:
1119         (WebCore):
1120         (MediaQueryMatcher):
1121         * css/StyleMedia.cpp:
1122         (WebCore::StyleMedia::matchMedium):
1123         * css/StyleSheet.cpp:
1124         (WebCore::StyleSheet::~StyleSheet):
1125         
1126             Move the media query ownership to CSSStyleSheet where it belongs.
1127         
1128         (WebCore):
1129         * css/StyleSheet.h:
1130         (WebCore::StyleSheet::media):
1131         (StyleSheet):
1132         * dom/DOMImplementation.cpp:
1133         (WebCore::DOMImplementation::createCSSStyleSheet):
1134         * dom/ProcessingInstruction.cpp:
1135         (WebCore::ProcessingInstruction::setCSSStyleSheet):
1136         * dom/StyleElement.cpp:
1137         (WebCore::StyleElement::createSheet):
1138         * html/HTMLLinkElement.cpp:
1139         (WebCore::HTMLLinkElement::process):
1140         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1141         * html/HTMLMediaElement.cpp:
1142         (WebCore::HTMLMediaElement::selectNextSourceChild):
1143         * html/parser/HTMLPreloadScanner.cpp:
1144         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
1145         * inspector/InspectorStyleSheet.cpp:
1146         (WebCore::buildMediaObject):
1147
1148 2012-03-26  Zeno Albisser  <zeno@webkit.org>
1149
1150         [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
1151         https://bugs.webkit.org/show_bug.cgi?id=82178
1152
1153         If TextureMapperShaderManager already has a reference to an instance of the
1154         requested shader program type, this instance should be reused instead of
1155         creating a new one.
1156
1157         Reviewed by Noam Rosenthal.
1158
1159         * platform/graphics/texmap/TextureMapperShaderManager.h:
1160         (WebCore::TextureMapperShaderManager::getShaderProgram):
1161
1162 2012-03-26  Yury Semikhatsky  <yurys@chromium.org>
1163
1164         [Chromium] Web Inspector: dedicated worker inspector is empty
1165         https://bugs.webkit.org/show_bug.cgi?id=82181
1166
1167         "beforeunload" event for worker inspector front-end is ingnored if the
1168         window url is "about:blank" as it is just unload of the default content
1169         before the front-end page load.
1170
1171         Reviewed by Pavel Feldman.
1172
1173         * inspector/front-end/WorkerManager.js:
1174         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
1175
1176 2012-03-22  Yury Semikhatsky  <yurys@chromium.org>
1177
1178         Web Inspector: split nodes and containment edges into two different arrays
1179         https://bugs.webkit.org/show_bug.cgi?id=81930
1180
1181         Extract heap profile nodes and edges into two separate arrays. This
1182         way we will have a continuous array of the heap graph nodes and can
1183         aviod additional mapping between node index and its position in the
1184         heap snapshot.
1185
1186         Reviewed by Pavel Feldman.
1187
1188         * inspector/front-end/HeapSnapshot.js:
1189         (WebInspector.HeapSnapshot.prototype._init):
1190         (WebInspector.HeapSnapshot.prototype._buildContinuousNodeArray):
1191         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
1192         (WebInspector.HeapSnapshot.prototype._restoreNodeTypes):
1193         (WebInspector.HeapSnapshot.prototype._createRetainmentEdgesArray):
1194         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
1195         * inspector/front-end/HeapSnapshotProxy.js:
1196         (WebInspector.HeapSnapshotWorker):
1197
1198 2012-03-22  Pavel Podivilov  <podivilov@chromium.org>
1199
1200         Web Inspector: move resource loading logic from SourceMapParser to CompilerScriptMapping.
1201         https://bugs.webkit.org/show_bug.cgi?id=81897
1202
1203         Reviewed by Vsevolod Vlasov.
1204
1205         SourceMapParser should only deal with payload parsing.
1206
1207         * inspector/front-end/CompilerScriptMapping.js:
1208         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
1209         (WebInspector.CompilerScriptMapping.prototype.addScript):
1210         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
1211         (WebInspector.SourceMapPayload):
1212         (WebInspector.SourceMapParser):
1213         (WebInspector.SourceMapParser.prototype.sourceContent):
1214         (WebInspector.SourceMapParser.prototype.findEntry):
1215         (WebInspector.SourceMapParser.prototype.findEntryReversed):
1216         * inspector/front-end/ContentProviders.js:
1217         (WebInspector.CompilerSourceMappingContentProvider):
1218         (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
1219
1220 2012-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
1221
1222         Web Inspector: replace indexOf('a text') === 0 with RegExp because it is much faster.
1223         https://bugs.webkit.org/show_bug.cgi?id=82175
1224
1225         We were using aString.indexOf("Window") but it is not effective from performance point of view.
1226         I'm replaced it with RegExp.
1227
1228         Reviewed by Yury Semikhatsky.
1229
1230         * inspector/front-end/HeapSnapshot.js:
1231         (WebInspector.HeapSnapshotNode.prototype.get isWindow):
1232         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
1233
1234 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
1235
1236         Web Inspector: breakpoints should be disabled while live editing JavaScript.
1237         https://bugs.webkit.org/show_bug.cgi?id=81947
1238
1239         Reviewed by Yury Semikhatsky.
1240
1241         This change disables (removes from the backend) the breakpoints while editing script.
1242         Undoing or committing the change restores the breakpoints. Main logic is implemented within
1243         JavaScriptSourceFrame, but it required minor tweaking of the text editor: more correct
1244         undo/redo wrapper and better detection of the noop opterations.
1245
1246         * inspector/front-end/JavaScriptSourceFrame.js:
1247         (WebInspector.JavaScriptSourceFrame):
1248         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
1249         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
1250         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
1251         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
1252         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
1253         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
1254         * inspector/front-end/TextEditorModel.js:
1255         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1256         * inspector/front-end/TextViewer.js:
1257         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.before):
1258         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.after):
1259         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
1260         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
1261
1262 2012-03-25  Nat Duca  <nduca@chromium.org>
1263
1264         [chromium] Route willBeginFrame from compositor to WebWidget
1265         https://bugs.webkit.org/show_bug.cgi?id=82171
1266
1267         Reviewed by Darin Fisher.
1268
1269         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1270         (CCLayerTreeHostClient):
1271         (WebCore::CCLayerTreeHost::willBeginFrame):
1272         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1273         (WebCore::CCThreadProxy::beginFrame):
1274
1275 2012-03-25  Hayato Ito  <hayato@chromium.org>
1276
1277         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.
1278         https://bugs.webkit.org/show_bug.cgi?id=79197
1279
1280         Reviewed by Dimitri Glazkov.
1281
1282         Add internal APIs which can be used to traverse Reified DOM tree, which is
1283         a result of node distribution algorithm explained in Shadow DOM spec.
1284         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
1285
1286         Every public functions defined in ReifiedTreeTraversal are static
1287         functions and are named in a similar way to ones defined in WebCore::Node class.
1288         The only difference is that ReifiedTreeTraversal APIs consider shadow
1289         hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary
1290         transparently.
1291
1292         There is no actual client which uses these APIs. Follow-up patches for FocusNavigation
1293         and EventDispatcher will use the APIs so that they can traverse node in reified tree order.
1294
1295         Test: fast/dom/shadow/reified-tree-traversal.html
1296
1297         * CMakeLists.txt:
1298         * GNUmakefile.list.am:
1299         * Target.pri:
1300         * WebCore.exp.in:
1301         * WebCore.gypi:
1302         * WebCore.vcproj/WebCore.vcproj:
1303         * WebCore.xcodeproj/project.pbxproj:
1304         * dom/ReifiedTreeTraversal.cpp: Added.
1305         (WebCore):
1306         (WebCore::isShadowHost):
1307         (WebCore::shadowTreeFor):
1308         (WebCore::shadowTreeOfParent):
1309         (WebCore::ReifiedTreeTraversal::firstChild):
1310         (WebCore::ReifiedTreeTraversal::lastChild):
1311         (WebCore::ReifiedTreeTraversal::lastChildWithoutCrossingUpperBoundary):
1312         (WebCore::ReifiedTreeTraversal::traverseChild):
1313         (WebCore::ReifiedTreeTraversal::traverseLightChildren):
1314         (WebCore::ReifiedTreeTraversal::traverseNode):
1315         (WebCore::ReifiedTreeTraversal::nextSibling):
1316         (WebCore::ReifiedTreeTraversal::previousSibling):
1317         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToInsertionPoint):
1318         (WebCore::ReifiedTreeTraversal::traverseSiblingInCurrentTree):
1319         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToYoungerShadowRoot):
1320         (WebCore::ReifiedTreeTraversal::escapeFallbackContentElement):
1321         (WebCore::ReifiedTreeTraversal::traverseNodeEscapingFallbackContents):
1322         (WebCore::ReifiedTreeTraversal::parentNode):
1323         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
1324         (WebCore::ReifiedTreeTraversal::parentNodeOrBackToInsertionPoint):
1325         (WebCore::ReifiedTreeTraversal::parentNodeInCurrentTree):
1326         (WebCore::ReifiedTreeTraversal::parentNodeBackToYoungerShadowRootOrHost):
1327         (WebCore::ReifiedTreeTraversal::adjustedParentNode):
1328         (WebCore::ReifiedTreeTraversal::traverseNextNode):
1329         (WebCore::ReifiedTreeTraversal::traverseNextNodeWithoutCrossingUpperBoundary):
1330         (WebCore::ReifiedTreeTraversal::traversePreviousNode):
1331         (WebCore::ReifiedTreeTraversal::traversePreviousNodeWithoutCrossingUpperBoundary):
1332         * dom/ReifiedTreeTraversal.h: Added.
1333         (WebCore):
1334         (ReifiedTreeTraversal):
1335         * dom/ShadowTree.cpp:
1336         (WebCore::ShadowTree::insertionPointFor):
1337         (WebCore::ShadowTree::selectionFor):
1338         (WebCore):
1339         * dom/ShadowTree.h:
1340         (WebCore):
1341         (ShadowTree):
1342         * html/shadow/HTMLContentSelector.cpp:
1343         (WebCore::HTMLContentSelector::findFor):
1344         * html/shadow/HTMLContentSelector.h:
1345         (HTMLContentSelectionSet):
1346         (WebCore::HTMLContentSelectionSet::find):
1347         (HTMLContentSelector):
1348         * html/shadow/InsertionPoint.h:
1349         (WebCore::isInsertionPoint):
1350         (WebCore::toInsertionPoint):
1351         (WebCore):
1352         * testing/Internals.cpp:
1353         (WebCore::Internals::nextSiblingInReifiedTree):
1354         (WebCore):
1355         (WebCore::Internals::firstChildInReifiedTree):
1356         (WebCore::Internals::lastChildInReifiedTree):
1357         (WebCore::Internals::traverseNextNodeInReifiedTree):
1358         (WebCore::Internals::traversePreviousNodeInReifiedTree):
1359         * testing/Internals.h:
1360         (Internals):
1361         * testing/Internals.idl:
1362
1363 2012-03-25  Nikita Vasilyev  <me@elv1s.ru>
1364
1365         Web Inspector: Indenting fully selected line should not indent the line next to it
1366         https://bugs.webkit.org/show_bug.cgi?id=81758
1367
1368         In the editor, you can select a whole line by moving caret at 0 column
1369         position and pressing Shift + Arrow Down/Up. After that, pressing Tab
1370         indents 2 lines: fully selected one and the line next to it. The patch
1371         changes this behaviour to indent only fully selected line since that is
1372         what pretty-match all the other code editors do.
1373
1374         Reviewed by Pavel Feldman.
1375
1376         Test: inspector/editor/indentation.html
1377
1378         * inspector/front-end/TextViewer.js:
1379         (WebInspector.TextEditorMainPanel.prototype._indentLines):
1380             Do not insert indent at the begging of the last line if a selection
1381             ends on its 0 column.
1382         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
1383             Do not remove indent at the begging of the last line if a selection
1384             ends on its 0 column.
1385
1386 2012-03-25  Abhishek Arya  <inferno@chromium.org>
1387
1388         Crash in ContainerNode::resumePostAttachCallbacks.
1389         https://bugs.webkit.org/show_bug.cgi?id=82159
1390
1391         Reviewed by Hajime Morita.
1392
1393         Test: plugins/object-onfocus-mutation-crash.html
1394
1395         * dom/ContainerNode.cpp:
1396         (WebCore::ContainerNode::resumePostAttachCallbacks): dispatching post attach
1397         callbacks when our attach depth is 1 can fire mutation events such as onfocus
1398         which can blow away |this|. Need to protect it with a RefPtr.
1399         * html/HTMLPlugInImageElement.cpp:
1400         (WebCore::HTMLPlugInImageElement::attach): add calls to suspend attach callbacks
1401         until the function completes.
1402
1403 2012-03-25  Dana Jansens  <danakj@chromium.org>
1404
1405         [chromium] Layers with animating transforms should prepaint even if they are not visible yet
1406         https://bugs.webkit.org/show_bug.cgi?id=82117
1407
1408         Reviewed by Adrienne Walker.
1409
1410         For animating transforms, instead of early-outing when the layer's
1411         visible rect is empty, let it prepaint regardless.
1412
1413         For now, we just only paint the outermost tiles, and only for small
1414         layers, with at most 9 tiles.
1415
1416         This changes the behaviour of ContentLayerChromium's
1417         idlePaintContentsIfDirty() so I've guarded the behaviour of the two
1418         prepainting functions that it calls to ensure the old behaviour holds
1419         without animations, and the new behaviour works with them.
1420
1421         Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer
1422                    TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer
1423                    TiledLayerChromiumTest.idlePaintNonVisibleLayers
1424                    TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers
1425
1426         * platform/graphics/chromium/ContentLayerChromium.cpp:
1427         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty):
1428         * platform/graphics/chromium/TiledLayerChromium.cpp:
1429         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
1430         (WebCore::TiledLayerChromium::needsIdlePaint):
1431         (WebCore::TiledLayerChromium::idlePaintRect):
1432         * platform/graphics/chromium/TiledLayerChromium.h:
1433         (WebCore::TiledLayerChromium::numPaintedTiles):
1434         (TiledLayerChromium):
1435
1436 2012-03-25  Antti Koivisto  <antti@apple.com>
1437
1438         Don't use CSSRuleList for child rule ownership
1439         https://bugs.webkit.org/show_bug.cgi?id=82127
1440
1441         Reviewed by Andreas Kling.
1442
1443         CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule use CSSRuleList for storing children. 
1444         They should use a simple rule vector instead. CSSRuleList is a CSSOM type that should be 
1445         instantiated on-demand for API purposes only.
1446         
1447         - Use Vector<RefPtr<CSSRule>> for storing the rule children of CSSMediaRule, WebKitCSSKeyframesRule 
1448           and WebKitRegionRule.
1449         - Add direct accessors, use internally instead of CSSRuleList.
1450         - Make CSSRuleList an abstract base. Add concrete subclasses for dealing with the underlying storage.
1451         - Instantiate CSSRuleLists on-demand.
1452         - Make CSSStyleSheet.cssRules always return the same object instance. This matches Firefox and the rest
1453           of our CSSOM implementation. Tested by fast/dom/gc-9.html.
1454           
1455         The patch decouples internals from the external API. It simplifies the child rule ownership and reduces 
1456         indirection. Memory use of css rules with children is reduced (by a ptr, refcount and heap allocation overhead).
1457
1458         * css/CSSGrammar.y:
1459         * css/CSSMediaRule.cpp:
1460         (WebCore::CSSMediaRule::CSSMediaRule):
1461         (WebCore::CSSMediaRule::~CSSMediaRule):
1462         (WebCore::CSSMediaRule::append):
1463         (WebCore::CSSMediaRule::insertRule):
1464         (WebCore::CSSMediaRule::deleteRule):
1465         (WebCore::CSSMediaRule::cssText):
1466         (WebCore::CSSMediaRule::cssRules):
1467         * css/CSSMediaRule.h:
1468         (WebCore::CSSMediaRule::create):
1469         (CSSMediaRule):
1470         (WebCore::CSSMediaRule::ruleCount):
1471         (WebCore::CSSMediaRule::ruleAt):
1472         * css/CSSParser.cpp:
1473         (WebCore::CSSParser::createMediaRule):
1474         (WebCore::CSSParser::createRuleList):
1475         (WebCore::CSSParser::createRegionRule):
1476         * css/CSSParser.h:
1477         (WebCore):
1478         * css/CSSRuleList.cpp:
1479         (WebCore):
1480         (WebCore::StaticCSSRuleList::StaticCSSRuleList):
1481         (WebCore::StaticCSSRuleList::~StaticCSSRuleList):
1482         (WebCore::StaticCSSRuleList::deref):
1483         (WebCore::StaticCSSRuleList::item):        
1484         * css/CSSRuleList.h:
1485         (CSSRuleList):
1486
1487             Turn CSSRuleList into abstract interface.
1488                     
1489         (StaticCSSRuleList):
1490         (WebCore::StaticCSSRuleList::create):
1491         (WebCore::StaticCSSRuleList::ref):
1492         (WebCore::StaticCSSRuleList::rules):
1493         (WebCore::StaticCSSRuleList::styleSheet):
1494         (WebCore::StaticCSSRuleList::length):
1495         
1496             Concrete implementation for fixed list of rules.
1497     
1498         (WebCore):
1499         (LiveCSSRuleList):
1500         (WebCore::LiveCSSRuleList::LiveCSSRuleList):
1501         (WebCore::LiveCSSRuleList::ref):
1502         (WebCore::LiveCSSRuleList::deref):
1503         (WebCore::LiveCSSRuleList::length):
1504         (WebCore::LiveCSSRuleList::item):
1505         (WebCore::LiveCSSRuleList::styleSheet):
1506         
1507             Concrete implemenation for live list backed by the underlying container rule.
1508             LiveCSSRuleList is owned by the underlying rule. Refcount is forwarded. 
1509         
1510         * css/CSSStyleSelector.cpp:
1511         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules):
1512         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1513         * css/CSSStyleSelector.h:
1514         (CSSStyleSelector):
1515         * css/CSSStyleSheet.cpp:
1516         
1517             The same scheme for CSSStyleSheet.cssRule as with container rules.
1518         
1519         (StyleSheetCSSRuleList):
1520         (WebCore::StyleSheetCSSRuleList::StyleSheetCSSRuleList):
1521         (WebCore::StyleSheetCSSRuleList::ref):
1522         (WebCore::StyleSheetCSSRuleList::deref):
1523         (WebCore::StyleSheetCSSRuleList::length):
1524         (WebCore::StyleSheetCSSRuleList::item):
1525         (WebCore::StyleSheetCSSRuleList::styleSheet):
1526         (WebCore):
1527         (WebCore::CSSStyleSheet::rules):
1528         (WebCore::CSSStyleSheet::cssRules):
1529         * css/CSSStyleSheet.h:
1530         (CSSStyleSheet):
1531         * css/WebKitCSSKeyframesRule.cpp:
1532         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
1533         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1534         (WebCore):
1535         (WebCore::WebKitCSSKeyframesRule::append):
1536         (WebCore::WebKitCSSKeyframesRule::deleteRule):
1537         (WebCore::WebKitCSSKeyframesRule::findRule):
1538         (WebCore::WebKitCSSKeyframesRule::findRuleIndex):
1539         (WebCore::WebKitCSSKeyframesRule::cssText):
1540         (WebCore::WebKitCSSKeyframesRule::cssRules):
1541         * css/WebKitCSSKeyframesRule.h:
1542         (WebKitCSSKeyframesRule):
1543         (WebCore::WebKitCSSKeyframesRule::ruleCount):
1544         (WebCore::WebKitCSSKeyframesRule::ruleAt):
1545         (WebCore::WebKitCSSKeyframesRule::length):
1546         (WebCore::WebKitCSSKeyframesRule::item):
1547         * css/WebKitCSSRegionRule.cpp:
1548         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
1549         (WebCore::WebKitCSSRegionRule::~WebKitCSSRegionRule):
1550         (WebCore::WebKitCSSRegionRule::cssText):
1551         (WebCore::WebKitCSSRegionRule::cssRules):
1552         * css/WebKitCSSRegionRule.h:
1553         * inspector/InspectorStyleSheet.cpp:
1554         (WebCore::asCSSRuleList):
1555         (WebCore::InspectorStyleSheet::addRule):
1556         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
1557
1558 2012-03-25  Kentaro Hara  <haraken@chromium.org>
1559
1560         Remove duplicated GenerateConditionalString() from code generators
1561         https://bugs.webkit.org/show_bug.cgi?id=82148
1562
1563         Reviewed by Adam Barth.
1564
1565         Previously GenerateConditionalString()s were defined in each code generator,
1566         and they were doing the same thing. This patch puts GenerateConditionalString()
1567         in CodeGenerator.pm and removes duplicated GenerateConditionalString()s.
1568
1569         No tests. No change in the generated code.
1570
1571         * bindings/scripts/CodeGenerator.pm:
1572         (GenerateConditionalString):
1573         * bindings/scripts/CodeGeneratorCPP.pm:
1574         (GenerateHeader):
1575         (GenerateImplementation):
1576         * bindings/scripts/CodeGeneratorGObject.pm:
1577         (GenerateProperty):
1578         (GenerateProperties):
1579         (GenerateFunction):
1580         (WriteData):
1581         * bindings/scripts/CodeGeneratorJS.pm:
1582         (GenerateHeaderContentHeader):
1583         (GenerateImplementationContentHeader):
1584         (GenerateHeader):
1585         (GenerateImplementation):
1586         (GenerateCallbackHeader):
1587         (GenerateCallbackImplementation):
1588         * bindings/scripts/CodeGeneratorObjC.pm:
1589         (GenerateHeader):
1590         (GenerateImplementation):
1591         * bindings/scripts/CodeGeneratorV8.pm:
1592         (GenerateHeader):
1593         (GenerateNormalAttrGetter):
1594         (GenerateNormalAttrSetter):
1595         (GenerateOverloadedFunctionCallback):
1596         (GenerateFunctionCallback):
1597         (GenerateBatchedAttributeData):
1598         (GenerateImplementation):
1599         (GenerateHeaderContentHeader):
1600         (GenerateImplementationContentHeader):
1601         (GenerateCallbackHeader):
1602         (GenerateCallbackImplementation):
1603
1604 2012-03-25  Kentaro Hara  <haraken@chromium.org>
1605
1606         Move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*, and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*
1607         https://bugs.webkit.org/show_bug.cgi?id=82146
1608
1609         Reviewed by Adam Barth.
1610
1611         Now SQLDatabase is renamed to WebDatabase (See Modules/webdatabase/).
1612         We should move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*,
1613         and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*.
1614         We'll rename the SQL_DATABASE flag to the WEB_DATABASE flag in a follow-up patch.
1615
1616         No tests. No change in behavior.
1617
1618         * Modules/webdatabase/DOMWindowWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.cpp.
1619         (WebCore):
1620         (WebCore::DOMWindowWebDatabase::openDatabase):
1621         * Modules/webdatabase/DOMWindowWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.h.
1622         (WebCore):
1623         (DOMWindowWebDatabase):
1624         (WebCore::DOMWindowWebDatabase::DOMWindowWebDatabase):
1625         (WebCore::DOMWindowWebDatabase::~DOMWindowWebDatabase):
1626         * Modules/webdatabase/DOMWindowWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.idl.
1627         * Modules/webdatabase/WorkerContextWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.cpp.
1628         (WebCore):
1629         (WebCore::WorkerContextWebDatabase::openDatabase):
1630         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
1631         * Modules/webdatabase/WorkerContextWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.h.
1632         (WebCore):
1633         (WorkerContextWebDatabase):
1634         (WebCore::WorkerContextWebDatabase::WorkerContextWebDatabase):
1635         (WebCore::WorkerContextWebDatabase::~WorkerContextWebDatabase):
1636         * Modules/webdatabase/WorkerContextWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.idl.
1637
1638         * DerivedSources.make:
1639         * DerivedSources.pri:
1640         * GNUmakefile.list.am:
1641         * Target.pri:
1642         * WebCore.gypi:
1643         * WebCore.vcproj/WebCore.vcproj:
1644         * WebCore.xcodeproj/project.pbxproj:
1645
1646 2012-03-25  Philip Rogers  <pdr@google.com>
1647
1648         Avoid race condition when iterating over pending resources
1649         https://bugs.webkit.org/show_bug.cgi?id=82115
1650
1651         Reviewed by Nikolas Zimmermann.
1652
1653         We can hit a race condition in SVGStyledElement::buildPendingResourcesIfNeeded
1654         where pending elements can become non-pending while we iterate over them.
1655
1656         This patch cleans up buildPendingResourcesIfNeeded and re-works how pending
1657         resources are removed. Because pending resources can be modified while
1658         iterating over them, we introduce m_pendingResourcesForRemoval that
1659         holds pending resources that are marked for removal. Instead of iterating
1660         over this list we simply remove each pending resource from
1661         m_pendingResourcesForRemoval; if a pending resource is modified or removed
1662         during the processing of another pending resource this list is updated before
1663         the next element can be accessed.
1664
1665         This change also removes removePendingResourceForElement which is no longer
1666         referenced.
1667
1668         Test: http/tests/svg/change-id-with-pending-resources.html
1669
1670         * svg/SVGDocumentExtensions.cpp:
1671         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
1672         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
1673         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
1674         (WebCore):
1675         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
1676         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
1677         * svg/SVGDocumentExtensions.h:
1678         (SVGDocumentExtensions):
1679         * svg/SVGStyledElement.cpp:
1680         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
1681
1682 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
1683
1684         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
1685         https://bugs.webkit.org/show_bug.cgi?id=82104
1686         RIM PR: 145963
1687
1688         Reviewed by Rob Buis.
1689
1690         The embedder may use vertex buffers, which affected the interpretation
1691         our vertex array pointers from memory pointers to offsets into a vertex
1692         buffer. The resulting geometry often resulted in no visible layers on
1693         screen.
1694
1695         Fixed by getting rid of any bound buffer when we enter
1696         LayerRenderer::drawLayers().
1697
1698         * platform/graphics/blackberry/LayerRenderer.cpp:
1699         (WebCore::LayerRenderer::drawLayers):
1700
1701 2012-03-24  Nat Duca  <nduca@chromium.org>
1702
1703         [chromium] Instrument gesture animations with async traces
1704         https://bugs.webkit.org/show_bug.cgi?id=82076
1705
1706         Reviewed by Adrienne Walker.
1707
1708         * platform/ActivePlatformGestureAnimation.cpp:
1709         (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
1710         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
1711         * platform/PlatformGestureCurve.h:
1712         (PlatformGestureCurve):
1713         * platform/TouchpadFlingPlatformGestureCurve.h:
1714         (WebCore::TouchpadFlingPlatformGestureCurve::debugName):
1715         * platform/WheelFlingPlatformGestureCurve.h:
1716         (WebCore::WheelFlingPlatformGestureCurve::debugName):
1717         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
1718         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
1719         (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
1720         * platform/graphics/chromium/cc/CCGestureCurve.h:
1721         (CCGestureCurve):
1722
1723 2012-03-24  Jeffrey Pfau  <jpfau@apple.com>
1724
1725         XML error document creation should not fire mutation events
1726         https://bugs.webkit.org/show_bug.cgi?id=80765
1727
1728         Reviewed by Adam Barth.
1729
1730         Broke two tests that expected the old behavior, which have now been updated.
1731
1732         * xml/XMLErrors.cpp:
1733         (WebCore::createXHTMLParserErrorHeader):
1734         (WebCore::XMLErrors::insertErrorMessageBlock):
1735
1736 2012-03-24  Florin Malita  <fmalita@google.com>
1737
1738         ForeignObject content is zoomed two times
1739         https://bugs.webkit.org/show_bug.cgi?id=76282
1740
1741         Reviewed by Nikolas Zimmermann.
1742
1743         Test: svg/zoom/page/zoom-foreign-content.svg
1744
1745         Reset the effective zoom property for FO-nested content to avoid
1746         having the zoom factor applied multiple times (zooming is handled by
1747         the top level SVG root element).
1748
1749         * css/CSSStyleSelector.cpp:
1750         (WebCore::CSSStyleSelector::adjustRenderStyle):
1751
1752 2012-03-24  Chris Fleizach  <cfleizach@apple.com>
1753
1754         AX: Support solution to handle invalid ax text marker
1755         https://bugs.webkit.org/show_bug.cgi?id=82023
1756
1757         Reviewed by Oliver Hunt.
1758
1759         This provides methods to better use text markers so that assistive technologies
1760         can know when they are valid, and can convert them to and from absolute positions.
1761
1762         Test: platform/mac/accessibility/textmarker-routines.html
1763
1764         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1765         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1766         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1767         (-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
1768         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
1769         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1770
1771 2012-03-24  Victor Carbune  <vcarbune@adobe.com>
1772
1773         Quick fix for rendering controls regression.
1774         https://bugs.webkit.org/show_bug.cgi?id=82125
1775
1776         Reviewed by Eric Carlson.
1777
1778         Only temporary fix. Tests to cover the problem should be added
1779
1780         * html/shadow/MediaControlElements.cpp:
1781         (WebCore::MediaControlPanelElement::makeOpaque): The display:none
1782         property should be toggled only by the media element now.
1783         (WebCore::MediaControlPanelElement::makeTransparent): The timer
1784         that toggles the dispalay:none shouldn't be used now.
1785
1786 2012-03-24  Kevin Ollivier  <kevino@theolliviers.com>
1787
1788         [wx] Unreviewed. Add header needed for compilation.
1789
1790         * html/shadow/TextFieldDecorationElement.cpp:
1791
1792 2012-03-24  Abhishek Arya  <inferno@chromium.org>
1793
1794         Crash in ApplyStyleCommand::applyInlineStyleToNodeRange.
1795         https://bugs.webkit.org/show_bug.cgi?id=81959
1796
1797         Reviewed by Ryosuke Niwa.
1798
1799         Test: editing/execCommand/apply-style-command-crash.html
1800
1801         * editing/ApplyStyleCommand.cpp:
1802         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): RefPtr the weak
1803         node iterator |node|.
1804         * editing/ApplyStyleCommand.h:
1805         (ApplyStyleCommand): convert |startNode| and |pastEndNode| into PassRefPtr.
1806
1807 2012-03-24  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1808
1809         Unreviewed, build fix since we use "-Werror=unused-but-set-variable".
1810
1811         The variable 'it' was set at TextureMapperShaderManager.h:110 but never used.
1812
1813         * platform/graphics/texmap/TextureMapperShaderManager.h:
1814         (WebCore::TextureMapperShaderManager::getShaderProgram):
1815
1816 2012-03-24  Zeno Albisser  <zeno@webkit.org>
1817
1818         [Qt][WK2] Make TextureMapperShaderManager::getShaderProgram() not be a template.
1819         https://bugs.webkit.org/show_bug.cgi?id=82049
1820
1821         Change the getShaderProgram() function to not be a template.
1822         This is a workaround for a compiler bug that leads to an assert
1823         when compiling in debug mode on mac.
1824
1825         Reviewed by Noam Rosenthal.
1826
1827         * platform/graphics/texmap/TextureMapperGL.cpp:
1828         (WebCore::TextureMapperGL::drawTexture):
1829         (WebCore::TextureMapperGL::beginClip):
1830         * platform/graphics/texmap/TextureMapperShaderManager.h:
1831         (TextureMapperShaderProgram):
1832         (WebCore::TextureMapperShaderManager::getShaderProgram):
1833         (TextureMapperShaderManager):
1834
1835 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
1836
1837         [chromium] Incorrect replica originTransform used in CCDamageTracker
1838         https://bugs.webkit.org/show_bug.cgi?id=82118
1839
1840         Reviewed by Adrienne Walker.
1841
1842         Unit test added to CCDamageTrackerTest.cpp
1843
1844         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1845         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
1846
1847 2012-03-23  Dana Jansens  <danakj@chromium.org>
1848
1849         [chromium] When prepainting fails, tiles dirty rects may be cleared
1850         https://bugs.webkit.org/show_bug.cgi?id=82107
1851
1852         Reviewed by Adrienne Walker.
1853
1854         When prepainting, if a tile is unable to be reserved due to memory
1855         limits, we bail out of prepareToUpdateTiles. But we would have
1856         cleared the dirty rect of any previous tiles. This leaves them
1857         in a bad state where their textures are reserved, but their textureIds
1858         are set to 0, and they are not marked dirty. This means that they will
1859         not be updated and displayed if they become visible, since it is
1860         assumed that valid textures with zero textureId must have a dirty
1861         region.
1862
1863         We fix this by not clearing the dirty rects until we know we are
1864         going to update the layer.
1865
1866         Unit test: TiledLayerChromiumTest.pushTilesAfterIdlePaintFailed
1867
1868         * platform/graphics/chromium/TiledLayerChromium.cpp:
1869         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1870         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1871         (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt):
1872         (WebCore):
1873         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1874         (CCTiledLayerImpl):
1875
1876 2012-03-23  Stephanie Lewis  <slewis@apple.com>
1877
1878         https://bugs.webkit.org/show_bug.cgi?id=81963 WebProcess can get stuck in GC during many low memory signals.
1879         <rdar://problem/11094830> WebProcess appears to get stuck in its GC handler (81963).
1880         Remove the call to garbage collect  in low memory signal handler.  Did some testing with hitting the low memory handler
1881         during Membuster and we would get back at most 100k - 200k.  That isn't enough to help the system, and in 
1882         that state the GC collection can take a substantial amount of time.
1883
1884         Reviewed by Geoff Garen.
1885
1886         Performance Change, no change in behavior.
1887
1888         * platform/mac/MemoryPressureHandlerMac.mm:
1889         (WebCore::MemoryPressureHandler::releaseMemory):
1890
1891 2012-03-23  W. James MacLean  <wjmaclean@chromium.org>
1892
1893         [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
1894         https://bugs.webkit.org/show_bug.cgi?id=82106
1895
1896         Reviewed by Adrienne Walker.
1897
1898         Existing unit tests updated.
1899
1900         With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when
1901         wheel handlers are present.
1902
1903         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1904         (WebCore::CCLayerTreeHostImpl::scrollBegin):
1905
1906 2012-03-23  Adam Barth  <abarth@webkit.org>
1907
1908         Move Notifications APIs from WorkerContext.idl to WorkerContextNotifications.idl
1909         https://bugs.webkit.org/show_bug.cgi?id=79635
1910
1911         Reviewed by Kentaro Hara.
1912
1913         This patch moves the NotificationCenter from WorkerContext to
1914         WorkerContextNotificiations, reducing clutter in WorkerContext.  After
1915         this patch, Notifications are almost entirely contained in the
1916         notifications directory.
1917
1918         * CMakeLists.txt:
1919         * DerivedSources.make:
1920         * DerivedSources.pri:
1921         * GNUmakefile.list.am:
1922         * Target.pri:
1923         * WebCore.gypi:
1924         * WebCore.vcproj/WebCore.vcproj:
1925         * WebCore.xcodeproj/project.pbxproj:
1926         * workers/WorkerContext.cpp:
1927         (WebCore::WorkerContext::~WorkerContext):
1928         * workers/WorkerContext.h:
1929         (WebCore):
1930         (WorkerContext):
1931         * workers/WorkerContext.idl:
1932
1933 2012-03-23  Michal Mocny  <mmocny@google.com>
1934
1935         [chromium] RootLayer was not being checked for null causing segfaults very rarely.
1936         https://bugs.webkit.org/show_bug.cgi?id=82111
1937
1938         Reviewed by Adrienne Walker.
1939
1940         * platform/graphics/chromium/LayerRendererChromium.cpp:
1941         (WebCore::LayerRendererChromium::beginDrawingFrame):
1942         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1943         (WebCore::CCLayerTreeHostImpl::drawLayers):
1944
1945 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
1946
1947         [chromium] Fix race bug that clobbers CCLayerImpl updateRect
1948         https://bugs.webkit.org/show_bug.cgi?id=82109
1949
1950         Reviewed by Dirk Pranke.
1951
1952         If the main thread commits twice before the impl thread actually
1953         draws, then the updateRect of the first frame gets lost forever,
1954         and not propagated to the damage tracker.
1955
1956         The solution is to accumulate the updateRect. The CCLayerImpl
1957         updateRect is already being correctly cleared at the appropriate
1958         time after drawing.
1959
1960         Unit test added to LayerChromiumTest.cpp.
1961
1962         * platform/graphics/chromium/LayerChromium.cpp:
1963         (WebCore::LayerChromium::pushPropertiesTo):
1964
1965 2012-03-23  Rafael Weinstein  <rafaelw@chromium.org>
1966
1967         [MutationObservers] attributeFilter should be case sensitive at all times
1968         https://bugs.webkit.org/show_bug.cgi?id=81822
1969
1970         Reviewed by Ryosuke Niwa.
1971
1972         This removes the behavior in MutationObserverRegistration which treats
1973         attributeFilter as case insensitive for HTML elements in HTML documents.
1974
1975         Relevant tests have been updated.
1976
1977         * dom/MutationObserverRegistration.cpp:
1978         (WebCore::MutationObserverRegistration::resetObservation):
1979         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
1980         * dom/MutationObserverRegistration.h:
1981         (MutationObserverRegistration):
1982
1983 2012-03-23  Kentaro Hara  <haraken@chromium.org>
1984
1985         Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
1986         https://bugs.webkit.org/show_bug.cgi?id=79663
1987
1988         Reviewed by Adam Barth.
1989
1990         For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
1991         to WorkerContextWebSocket.idl.
1992
1993         Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)
1994
1995         * CMakeLists.txt:
1996         * DerivedSources.make:
1997         * DerivedSources.pri:
1998         * GNUmakefile.list.am:
1999         * Modules/websockets/WorkerContextWebSocket.idl: Added.
2000         * WebCore.gypi:
2001         * WebCore.xcodeproj/project.xcodeproj:
2002         * workers/WorkerContext.idl:
2003
2004 2012-03-23  Parag Radke  <parag@motorola.com>
2005
2006         REGRESSION: can select text of an input button
2007         https://bugs.webkit.org/show_bug.cgi?id=13624
2008
2009         Reviewed by Ryosuke Niwa.
2010
2011         Text in a button should never have a selection background of its own painted
2012         but if the button is inside an editable area, then the whole button should
2013         have it's selection background painted.
2014
2015         Test: editing/selection/selection-button-text.html
2016
2017         * rendering/RenderButton.h:
2018         Added implementation for the virtual function canBeSelectionLeaf()
2019         which returns true if the button renderer is editable, false other wise.
2020         * rendering/RenderTextFragment.h:
2021         Added implementation for the virtual function canBeSelectionLeaf()
2022         which returns true if the text fragment renderer is editable, false other wise.
2023
2024 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
2025
2026         Remove unnecessary ASSERT from LoadableTextTrack::trackElementIndex
2027         https://bugs.webkit.org/show_bug.cgi?id=82095
2028
2029         Reviewed by Dan Bernstein.
2030
2031         No new tests, removed a bogus ASSERT that was sometimes triggered by tests.
2032
2033         * html/track/LoadableTextTrack.cpp:
2034         (WebCore::LoadableTextTrack::trackElementIndex): Remove ASSERT.
2035
2036 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
2037
2038         Layout Test media/video-source-load.html is failing
2039         https://bugs.webkit.org/show_bug.cgi?id=82094
2040
2041         Reviewed by Alexey Proskuryakov.
2042
2043         No new tests, tested by media/video-source-load.html.
2044
2045         * html/HTMLMediaElement.cpp:
2046         (WebCore::HTMLMediaElement::sourceWasAdded): Set m_nextChildNodeToConsider when called 
2047             with networkState == NETWORK_EMPTY because the resource selection algorithm has
2048             not started yet.
2049
2050 2012-03-23  Alexey Proskuryakov  <ap@apple.com>
2051
2052         [Mac] No need for platform-specific ENABLE_BLOB values
2053         https://bugs.webkit.org/show_bug.cgi?id=82102
2054
2055         Reviewed by David Kilzer.
2056
2057         * Configurations/FeatureDefines.xcconfig:
2058
2059 2012-03-23  Kent Tamura  <tkent@chromium.org>
2060
2061         Add TextFieldDecorator and TextFieldDecorationElement
2062         https://bugs.webkit.org/show_bug.cgi?id=80580
2063
2064         Reviewed by Dimitri Glazkov.
2065
2066         These classes will be used to add a decoration icon to a text field
2067         <input> from outside of WebCore. We have a plan to use them in Chromium
2068         port. So this patch doesn't add TextFieldDecorationElement.{cpp,h} to
2069         non-Chromium build files.
2070
2071         How it works:
2072         When a shadow subtree for a text field is created, we ask ChromeClient
2073         to decorate it. ChromeClient appends a TextFieldDecorationElement to the
2074         existing shadow subtree or another shadow tree. A TextFieldDecorator is
2075         associated to a TextFieldDecorationElement, and it provides decoration
2076         icon images and a click handler.
2077
2078         No new tests. This patch won't make any behavior change for now.
2079
2080         * WebCore.gypi: Add TextFieldDecorationElement.cpp and TextFieldDecorationElement.h
2081         * dom/Element.h:
2082         (WebCore::Element::isTextFieldDecoration):
2083         * html/TextFieldInputType.cpp:
2084         (WebCore::TextFieldInputType::createShadowSubtree):
2085         Calls ChromeClient::willAddTextFieldDecorationsTo() and addTextFieldDecorationsTo().
2086         * html/shadow/TextFieldDecorationElement.cpp: Added.
2087         (WebCore::TextFieldDecorator::~TextFieldDecorator):
2088         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
2089         (WebCore::TextFieldDecorationElement::create):
2090         (WebCore::TextFieldDecorationElement::isTextFieldDecoration):
2091         (WebCore::TextFieldDecorationElement::updateImage):
2092         (WebCore::TextFieldDecorationElement::customStyleForRenderer):
2093         Sets the size to a square of the font-size.
2094         (WebCore::TextFieldDecorationElement::createRenderer):
2095         Always creates a RenderImage.
2096         (WebCore::TextFieldDecorationElement::attach):
2097         Sets an image for appropriate state.
2098         (WebCore::TextFieldDecorationElement::isMouseFocusable):
2099         (WebCore::TextFieldDecorationElement::defaultEventHandler):
2100         Delegate a click event to the corresponding function of TextFieldDecorator.
2101         * html/shadow/TextFieldDecorationElement.h: Added.
2102         (TextFieldDecorator): Added.
2103         (TextFieldDecorationElement): Added.
2104         (WebCore::toTextFieldDecorationElement): Added.
2105         * page/ChromeClient.h:
2106         (WebCore::ChromeClient::willAddTextFieldDecorationsTo): Add an empty implementation.
2107         (WebCore::ChromeClient::addTextFieldDecorationsTo): ditto.
2108
2109 2012-03-23  Adam Klein  <adamk@chromium.org>
2110
2111         Match DOM4 spec with respect to DocumentFragment insertion
2112         https://bugs.webkit.org/show_bug.cgi?id=82089
2113
2114         Reviewed by Ryosuke Niwa.
2115
2116         DOM4 specifies the behavior of appendChild, insertBefore, and replaceChild
2117         in terms of "mutation algorithms":
2118
2119         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#mutation-algorithms
2120
2121         This change updates WebKit to match, in particular with regard to DocumentFragments.
2122         Previously, ContainerNode would remove nodes one at a time, then add them to the new parent.
2123         When combined with MutationObservers, this results in overly-verbose mutation records.
2124         Now we create as few records as possible, matching the spec as well as Gecko's implementation
2125         of MutationObservers.
2126
2127         Note that we still need to check validity each time through the loop,
2128         since inserting a node may dispatch events. In a future change, I hope
2129         to move these events so that they fire only after all nodes are inserted,
2130         but that's too much to tackle all in one.
2131
2132         Tests: fast/mutation/document-fragment-insertion.html
2133
2134         * dom/ContainerNode.cpp:
2135         (WebCore::collectChildrenAndRemoveFromOldParent): New helper method
2136         combining collectTargetNodes() with the removal of the collected nodes from
2137         their old parent, if any.
2138         (WebCore::ContainerNode::insertBefore): Use new helper method instead
2139         of removing nodes one at a time from the fragment.
2140         (WebCore::ContainerNode::replaceChild): ditto. Also removed some redundant asserts
2141         and moved the "do nothing" check out of the loop.
2142         (WebCore::ContainerNode::appendChild): Use new helper method.
2143
2144 2012-03-23  Stephen White  <senorblanco@chromium.org>
2145
2146         [skia] Switch to Skia's implementation of the feMorphology filter.
2147         https://bugs.webkit.org/show_bug.cgi?id=82085
2148
2149         Reviewed by Dirk Schulze.
2150
2151         Covered by existing tests in svg/filters/.
2152
2153         * WebCore.gypi:
2154         * platform/graphics/filters/FEMorphology.h:
2155         (FEMorphology):
2156         * platform/graphics/filters/skia/FEMorphologySkia.cpp: Added.
2157         (WebCore):
2158         (WebCore::FEMorphology::platformApplySkia):
2159
2160 2012-03-23  Adam Barth  <abarth@webkit.org>
2161
2162         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 3)
2163         https://bugs.webkit.org/show_bug.cgi?id=82027
2164
2165         Reviewed by Kentaro Hara.
2166
2167         Rather than watching for willDetachPage, NotificationCenter can just
2168         override ActiveDOMObject::stop directly to be notified when it needs to
2169         stop.
2170
2171         Switching NotificationCenter over to using ActiveDOMObject callbacks
2172         frees DOMWindowNotification to implement reconnectFrame.  However, this
2173         is only really a victory in princple because NotificationCenter always
2174         returns false for canSuspend(), which means we'll never actually use
2175         the reconnectFrame functionality.  However, this patch does move us
2176         closer to the time when NotificationCenter can implement
2177         ActiveDOMObject::suspend/resume to play nice with the PageCache.
2178
2179         * notifications/DOMWindowNotifications.cpp:
2180         (WebCore::DOMWindowNotifications::disconnectFrame):
2181         (WebCore::DOMWindowNotifications::reconnectFrame):
2182         * notifications/DOMWindowNotifications.h:
2183         (DOMWindowNotifications):
2184         * notifications/NotificationCenter.cpp:
2185         (WebCore::NotificationCenter::NotificationCenter):
2186         (WebCore::NotificationCenter::stop):
2187         * notifications/NotificationCenter.h:
2188         (NotificationCenter):
2189
2190 2012-03-23  Daniel Cheng  <dcheng@chromium.org>
2191
2192         [chromium] Support file drag out using DataTransferItemList::add(File)
2193         https://bugs.webkit.org/show_bug.cgi?id=81261
2194
2195         Reviewed by Tony Chang.
2196
2197         Original patch by Varun Jain <varunjain@chromium.org>.
2198         I've updated the original patch to remove 'downloadurl' handling since it's not tested, nor
2199         is it necessary for File objects, since File objects correspond to a native filesystem path.
2200
2201         Test: fast/events/drag-dataTransferItemList-file-handling.html
2202
2203         * platform/chromium/DataTransferItemListChromium.cpp:
2204         (WebCore::DataTransferItemListChromium::add):
2205
2206 2012-03-23  Zan Dobersek  <zandobersek@gmail.com>
2207
2208         [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute
2209         https://bugs.webkit.org/show_bug.cgi?id=80030
2210
2211         Reviewed by Martin Robinson.
2212
2213         Changes in CodeGeneratorGObject.pm:
2214         - group implementation of private helpers and guard them inside
2215         an ifdef if a root conditional attribute is present.
2216         - always define the type of a GObject binding, even if the root
2217         conditional feature is not enabled
2218         - the methods are generated as well, but are simply stubs if the
2219         feature is not enabled, throwing a warning upon interaction.
2220         - if the method itself is guarded by a conditional attribute,
2221         the stub implementation gains one more level of depth, throwing
2222         a warning if the method's conditional feature is not enabled
2223         but the root conditional feature is.
2224         - small style fixes in random places.
2225
2226         Also changed are GObject baselines for binding tests.
2227
2228         No new tests - no new testable functionality.
2229
2230         * bindings/gobject/GNUmakefile.am:
2231         * bindings/scripts/CodeGeneratorGObject.pm:
2232         (HumanReadableConditional):
2233         (GenerateConditionalWarn):
2234         (GenerateProperty):
2235         (GenerateProperties):
2236         (GenerateFunction):
2237         (GenerateFunctions):
2238         (GenerateCFile):
2239         (GenerateEventTargetIface):
2240         (Generate):
2241         (WriteData):
2242         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
2243         (WebKit):
2244         (WebKit::kit):
2245         (WebKit::wrapFloat64Array):
2246         (webkit_dom_float64array_finalize):
2247         (webkit_dom_float64array_foo):
2248         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
2249         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
2250         (WebKit):
2251         (WebKit::kit):
2252         (WebKit::wrapTestActiveDOMObject):
2253         (webkit_dom_test_active_dom_object_finalize):
2254         (webkit_dom_test_active_dom_object_exciting_function):
2255         (webkit_dom_test_active_dom_object_post_message):
2256         (webkit_dom_test_active_dom_object_get_exciting_attr):
2257         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
2258         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2259         (WebKit):
2260         (WebKit::kit):
2261         (WebKit::core):
2262         (WebKit::wrapTestCallback):
2263         (webkit_dom_test_callback_finalize):
2264         (webkit_dom_test_callback_callback_with_no_param):
2265         (webkit_dom_test_callback_callback_with_class1param):
2266         (webkit_dom_test_callback_callback_with_class2param):
2267         (webkit_dom_test_callback_callback_with_non_bool_return_type):
2268         (webkit_dom_test_callback_callback_with_string_list):
2269         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
2270         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
2271         (WebKit):
2272         (WebKit::kit):
2273         (WebKit::wrapTestCustomNamedGetter):
2274         (webkit_dom_test_custom_named_getter_finalize):
2275         (webkit_dom_test_custom_named_getter_another_function):
2276         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
2277         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2278         (WebKit):
2279         (WebKit::kit):
2280         (WebKit::wrapTestEventConstructor):
2281         (webkit_dom_test_event_constructor_finalize):
2282         (webkit_dom_test_event_constructor_get_attr1):
2283         (webkit_dom_test_event_constructor_get_attr2):
2284         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
2285         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2286         (WebKit):
2287         (WebKit::core):
2288         (WebKit::wrapTestEventTarget):
2289         (webkit_dom_test_event_target_finalize):
2290         (webkit_dom_test_event_target_item):
2291         (webkit_dom_test_event_target_dispatch_event):
2292         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
2293         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2294         (WebKit):
2295         (WebKit::kit):
2296         (WebKit::core):
2297         (WebKit::wrapTestInterface):
2298         (webkit_dom_test_interface_finalize):
2299         (webkit_dom_test_interface_supplemental_method1):
2300         (webkit_dom_test_interface_supplemental_method2):
2301         (webkit_dom_test_interface_supplemental_method4):
2302         (webkit_dom_test_interface_get_supplemental_str1):
2303         (webkit_dom_test_interface_get_supplemental_str2):
2304         (webkit_dom_test_interface_set_supplemental_str2):
2305         (webkit_dom_test_interface_get_supplemental_node):
2306         (webkit_dom_test_interface_set_supplemental_node):
2307         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
2308         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
2309         (WebKit):
2310         (WebKit::kit):
2311         (WebKit::wrapTestMediaQueryListListener):
2312         (webkit_dom_test_media_query_list_listener_finalize):
2313         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
2314         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
2315         (WebKit):
2316         (WebKit::kit):
2317         (WebKit::wrapTestNamedConstructor):
2318         (webkit_dom_test_named_constructor_finalize):
2319         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
2320         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2321         (WebKit):
2322         (WebKit::kit):
2323         (WebKit::core):
2324         (WebKit::wrapTestObj):
2325         (webkit_dom_test_obj_finalize):
2326         (webkit_dom_test_obj_set_property):
2327         (webkit_dom_test_obj_get_property):
2328         (webkit_dom_test_obj_constructed):
2329         (webkit_dom_test_obj_class_init):
2330         (webkit_dom_test_obj_init):
2331         (webkit_dom_test_obj_void_method):
2332         (webkit_dom_test_obj_void_method_with_args):
2333         (webkit_dom_test_obj_int_method):
2334         (webkit_dom_test_obj_int_method_with_args):
2335         (webkit_dom_test_obj_obj_method):
2336         (webkit_dom_test_obj_obj_method_with_args):
2337         (webkit_dom_test_obj_method_with_sequence_arg):
2338         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
2339         (webkit_dom_test_obj_serialized_value):
2340         (webkit_dom_test_obj_idb_key):
2341         (webkit_dom_test_obj_options_object):
2342         (webkit_dom_test_obj_method_with_exception):
2343         (webkit_dom_test_obj_with_script_state_void):
2344         (webkit_dom_test_obj_with_script_state_obj):
2345         (webkit_dom_test_obj_with_script_state_void_exception):
2346         (webkit_dom_test_obj_with_script_state_obj_exception):
2347         (webkit_dom_test_obj_with_script_execution_context):
2348         (webkit_dom_test_obj_with_script_execution_context_and_script_state):
2349         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
2350         (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces):
2351         (webkit_dom_test_obj_method_with_optional_arg):
2352         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
2353         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
2354         (webkit_dom_test_obj_method_with_optional_string):
2355         (webkit_dom_test_obj_method_with_optional_string_is_undefined):
2356         (webkit_dom_test_obj_method_with_optional_string_is_null_string):
2357         (webkit_dom_test_obj_conditional_method1):
2358         (webkit_dom_test_obj_conditional_method2):
2359         (webkit_dom_test_obj_conditional_method3):
2360         (webkit_dom_test_obj_class_method):
2361         (webkit_dom_test_obj_class_method_with_optional):
2362         (webkit_dom_test_obj_overloaded_method1):
2363         (webkit_dom_test_obj_convert1):
2364         (webkit_dom_test_obj_convert2):
2365         (webkit_dom_test_obj_convert3):
2366         (webkit_dom_test_obj_convert4):
2367         (webkit_dom_test_obj_convert5):
2368         (webkit_dom_test_obj_mutable_point_function):
2369         (webkit_dom_test_obj_immutable_point_function):
2370         (webkit_dom_test_obj_orange):
2371         (webkit_dom_test_obj_strict_function):
2372         (webkit_dom_test_obj_get_read_only_int_attr):
2373         (webkit_dom_test_obj_get_read_only_string_attr):
2374         (webkit_dom_test_obj_get_read_only_test_obj_attr):
2375         (webkit_dom_test_obj_get_short_attr):
2376         (webkit_dom_test_obj_set_short_attr):
2377         (webkit_dom_test_obj_get_unsigned_short_attr):
2378         (webkit_dom_test_obj_set_unsigned_short_attr):
2379         (webkit_dom_test_obj_get_int_attr):
2380         (webkit_dom_test_obj_set_int_attr):
2381         (webkit_dom_test_obj_get_long_long_attr):
2382         (webkit_dom_test_obj_set_long_long_attr):
2383         (webkit_dom_test_obj_get_unsigned_long_long_attr):
2384         (webkit_dom_test_obj_set_unsigned_long_long_attr):
2385         (webkit_dom_test_obj_get_string_attr):
2386         (webkit_dom_test_obj_set_string_attr):
2387         (webkit_dom_test_obj_get_test_obj_attr):
2388         (webkit_dom_test_obj_set_test_obj_attr):
2389         (webkit_dom_test_obj_get_xml_obj_attr):
2390         (webkit_dom_test_obj_set_xml_obj_attr):
2391         (webkit_dom_test_obj_get_create):
2392         (webkit_dom_test_obj_set_create):
2393         (webkit_dom_test_obj_get_reflected_string_attr):
2394         (webkit_dom_test_obj_set_reflected_string_attr):
2395         (webkit_dom_test_obj_get_reflected_integral_attr):
2396         (webkit_dom_test_obj_set_reflected_integral_attr):
2397         (webkit_dom_test_obj_get_reflected_unsigned_integral_attr):
2398         (webkit_dom_test_obj_set_reflected_unsigned_integral_attr):
2399         (webkit_dom_test_obj_get_reflected_boolean_attr):
2400         (webkit_dom_test_obj_set_reflected_boolean_attr):
2401         (webkit_dom_test_obj_get_reflected_url_attr):
2402         (webkit_dom_test_obj_set_reflected_url_attr):
2403         (webkit_dom_test_obj_get_reflected_custom_integral_attr):
2404         (webkit_dom_test_obj_set_reflected_custom_integral_attr):
2405         (webkit_dom_test_obj_get_reflected_custom_boolean_attr):
2406         (webkit_dom_test_obj_set_reflected_custom_boolean_attr):
2407         (webkit_dom_test_obj_get_reflected_custom_url_attr):
2408         (webkit_dom_test_obj_set_reflected_custom_url_attr):
2409         (webkit_dom_test_obj_get_attr_with_getter_exception):
2410         (webkit_dom_test_obj_set_attr_with_getter_exception):
2411         (webkit_dom_test_obj_get_attr_with_setter_exception):
2412         (webkit_dom_test_obj_set_attr_with_setter_exception):
2413         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
2414         (webkit_dom_test_obj_set_string_attr_with_getter_exception):
2415         (webkit_dom_test_obj_get_string_attr_with_setter_exception):
2416         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
2417         (webkit_dom_test_obj_get_with_script_state_attribute):
2418         (webkit_dom_test_obj_set_with_script_state_attribute):
2419         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
2420         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
2421         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
2422         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
2423         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
2424         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
2425         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute):
2426         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute):
2427         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
2428         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises):
2429         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute):
2430         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute):
2431         (webkit_dom_test_obj_get_conditional_attr1):
2432         (webkit_dom_test_obj_set_conditional_attr1):
2433         (webkit_dom_test_obj_get_conditional_attr2):
2434         (webkit_dom_test_obj_set_conditional_attr2):
2435         (webkit_dom_test_obj_get_conditional_attr3):
2436         (webkit_dom_test_obj_set_conditional_attr3):
2437         (webkit_dom_test_obj_get_content_document):
2438         (webkit_dom_test_obj_get_mutable_point):
2439         (webkit_dom_test_obj_set_mutable_point):
2440         (webkit_dom_test_obj_get_immutable_point):
2441         (webkit_dom_test_obj_set_immutable_point):
2442         (webkit_dom_test_obj_get_strict_float):
2443         (webkit_dom_test_obj_set_strict_float):
2444         (webkit_dom_test_obj_get_description):
2445         (webkit_dom_test_obj_get_id):
2446         (webkit_dom_test_obj_set_id):
2447         (webkit_dom_test_obj_get_hash):
2448         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
2449         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2450         (WebKit):
2451         (WebKit::kit):
2452         (WebKit::core):
2453         (WebKit::wrapTestSerializedScriptValueInterface):
2454         (webkit_dom_test_serialized_script_value_interface_finalize):
2455         (webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
2456         (webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
2457         (webkit_dom_test_serialized_script_value_interface_get_value):
2458         (webkit_dom_test_serialized_script_value_interface_set_value):
2459         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
2460         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
2461         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
2462         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
2463         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
2464
2465 2012-03-23  Dana Jansens  <danakj@chromium.org>
2466
2467         [chromium] Record painted pixel counts for measuring effectiveness of per-tile painting
2468         https://bugs.webkit.org/show_bug.cgi?id=82057
2469
2470         Reviewed by Adrienne Walker.
2471
2472         Adds painted pixel metrics to CCOverdrawMetrics class, and calls in
2473         to report painted areas when updating tiles in the TiledLayerChromium
2474         class.
2475
2476         Unit test: TiledLayerChromiumTest.opaqueContentsRegion
2477                    TiledLayerChromiumTest.pixelsPaintedMetrics
2478
2479         * platform/graphics/chromium/TiledLayerChromium.cpp:
2480         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2481         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
2482         (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
2483         (WebCore::CCOverdrawMetrics::didPaint):
2484         (WebCore):
2485         (WebCore::CCOverdrawMetrics::recordMetricsInternal):
2486         * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
2487         (CCOverdrawMetrics):
2488         (WebCore::CCOverdrawMetrics::pixelsPainted):
2489
2490 2012-03-23  Abhishek Arya  <inferno@chromium.org>
2491
2492         Crash in RenderBlock::splitBlocks.
2493         https://bugs.webkit.org/show_bug.cgi?id=81926
2494
2495         Reviewed by Julien Chaffraix.
2496
2497         We are updating the :after content before calling splitFlow. The :after content
2498         gets blown away since it will go to the continuation. beforeChild was earlier
2499         set to the first child. Being the last anonymous block, its children gets pulled
2500         up in collapseAnonymousBoxChild and it gets destroyed. So, we need to update
2501         beforeChild value. 
2502
2503         Test: fast/multicol/span/update-after-content-before-child-crash.html
2504
2505         * rendering/RenderBlock.cpp:
2506         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2507
2508 2012-03-23  Dana Jansens  <danakj@chromium.org>
2509
2510         [chromium] Improved composited debug borders
2511         https://bugs.webkit.org/show_bug.cgi?id=82071
2512
2513         Reviewed by Adrienne Walker.
2514
2515         Fix the problem with missing debug borders. Since we append quads
2516         to the list front to back now, we draw the quads in the list from
2517         back to front of the list. Which means if the debug quad is added
2518         after the layer it is drawing around, the layer can draw over top
2519         of its debug quad. Reverse the ordering when appending to fix it.
2520
2521         Make the border red around tiles that are checkerboarded. Missing
2522         tiles in non-root layers are drawn clear, so this makes them more
2523         visible.
2524
2525         Put a blue border around each render surface, and a purple border
2526         on their replicas.
2527
2528         No new tests.
2529
2530         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2531         (WebCore):
2532         (WebCore::CCRenderPass::appendQuadsForLayer):
2533         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2534         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2535         (WebCore::CCRenderSurface::hasReplica):
2536         (WebCore):
2537         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
2538         * platform/graphics/chromium/cc/CCRenderSurface.h:
2539         (CCRenderSurface):
2540         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2541         (WebCore):
2542         (WebCore::CCTiledLayerImpl::appendQuads):
2543
2544 2012-03-23  Simon Fraser  <simon.fraser@apple.com>
2545
2546         Move code that calls setAcceleratesDrawing() on GraphicsLayers into RenderLayerBacking
2547         https://bugs.webkit.org/show_bug.cgi?id=82092
2548
2549         Reviewed by Dean Jackson.
2550
2551         A RenderLayerBacking manages several GraphicsLayers, but RenderLayerCompositor
2552         was only calling setAcceleratesDrawing() on the one it knows about. Fix by moving
2553         this setting code down into RenderLayerBacking.
2554         
2555         RenderLayerCompositor now caches the setAcceleratesDrawing setting, as it does
2556         for other compositing-related settings, so that RenderLayerBacking doesn't have
2557         to grovel for Settings every time.
2558
2559         * rendering/RenderLayerBacking.cpp:
2560         (WebCore::RenderLayerBacking::createGraphicsLayer):
2561         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2562         * rendering/RenderLayerCompositor.cpp:
2563         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2564         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2565         (WebCore::RenderLayerCompositor::updateBacking):
2566         * rendering/RenderLayerCompositor.h:
2567         (WebCore::RenderLayerCompositor::acceleratedDrawingEnabled):
2568         (RenderLayerCompositor):
2569
2570 2012-03-23  Beth Dakin  <bdakin@apple.com>
2571
2572         https://bugs.webkit.org/show_bug.cgi?id=82083
2573
2574         Rubber-stamped by Simon Fraser.
2575
2576         This patch is just a name change. getExistingScrollAnimator() (which was 
2577         added earlier today) is now existingScrollAnimator().
2578         * loader/FrameLoader.cpp:
2579         (WebCore::FrameLoader::transitionToCommitted):
2580         * page/EventHandler.cpp:
2581         (WebCore::EventHandler::handleGestureTapDown):
2582         * page/FrameView.cpp:
2583         (WebCore::FrameView::setAnimatorsAreActive):
2584         * platform/ScrollView.cpp:
2585         (WebCore::ScrollView::updateScrollbars):
2586         * platform/ScrollableArea.cpp:
2587         (WebCore::ScrollableArea::willStartLiveResize):
2588         (WebCore::ScrollableArea::willEndLiveResize):
2589         (WebCore::ScrollableArea::contentAreaWillPaint):
2590         (WebCore::ScrollableArea::mouseEnteredContentArea):
2591         (WebCore::ScrollableArea::mouseExitedContentArea):
2592         (WebCore::ScrollableArea::mouseMovedInContentArea):
2593         (WebCore::ScrollableArea::contentAreaDidShow):
2594         (WebCore::ScrollableArea::contentAreaDidHide):
2595         (WebCore::ScrollableArea::contentsResized):
2596         (WebCore::ScrollableArea::serviceScrollAnimations):
2597         * platform/ScrollableArea.h:
2598         (WebCore::ScrollableArea::existingScrollAnimator):
2599
2600 2012-03-23  Abhishek Arya  <inferno@chromium.org>
2601
2602         Crash due to accessing removed parent lineboxes when clearing selection.
2603         https://bugs.webkit.org/show_bug.cgi?id=81359
2604
2605         Reviewed by Eric Seidel.
2606
2607         Similar to r110323, adds the canUpdateSelectionOnRootLineBoxes
2608         check to more places.
2609
2610         Test: editing/selection/clear-selection-crash.html
2611
2612         * rendering/RenderObject.cpp:
2613         (WebCore::RenderObject::canUpdateSelectionOnRootLineBoxes):
2614         * rendering/RenderSelectionInfo.h:
2615         (WebCore::RenderSelectionInfo::RenderSelectionInfo):
2616         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
2617
2618 2012-03-23  Beth Dakin  <bdakin@apple.com>
2619
2620         https://bugs.webkit.org/show_bug.cgi?id=82083
2621         Too many ScrollAnimators are allocated on pages with frames
2622
2623         Reviewed by Geoffrey Garen.
2624
2625         This patch adds a new getter to ScrollableArea called 
2626         getExistingScrollAnimator() unlike scrollAnimator() this new function will 
2627         just return null if there is not already a ScrollAnimator. Callers should use 
2628         this new function when they have business with ScrollAnimator that does not 
2629         need to do anything when there are no scrollbars.
2630         * loader/FrameLoader.cpp:
2631         (WebCore::FrameLoader::transitionToCommitted):
2632         * page/EventHandler.cpp:
2633         (WebCore::EventHandler::handleGestureTapDown):
2634         * page/FrameView.cpp:
2635         (WebCore::FrameView::setAnimatorsAreActive):
2636         * platform/ScrollView.cpp:
2637         (WebCore::ScrollView::updateScrollbars):
2638         * platform/ScrollableArea.cpp:
2639         (WebCore::ScrollableArea::willStartLiveResize):
2640         (WebCore::ScrollableArea::willEndLiveResize):
2641         (WebCore::ScrollableArea::contentAreaWillPaint):
2642         (WebCore::ScrollableArea::mouseEnteredContentArea):
2643         (WebCore::ScrollableArea::mouseExitedContentArea):
2644         (WebCore::ScrollableArea::mouseMovedInContentArea):
2645         (WebCore::ScrollableArea::contentAreaDidShow):
2646         (WebCore::ScrollableArea::contentAreaDidHide):
2647         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
2648         (WebCore::ScrollableArea::contentsResized):
2649         (WebCore::ScrollableArea::serviceScrollAnimations):
2650         * platform/ScrollableArea.h:
2651         (ScrollableArea):
2652         (WebCore::ScrollableArea::getExistingScrollAnimator):
2653
2654 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
2655
2656         Deal with DOM modifications when evaluating source elements.
2657         https://bugs.webkit.org/show_bug.cgi?id=81163
2658
2659         Reviewed by Alexey Proskuryakov.
2660
2661         Test: media/video-beforeload-remove-source.html
2662
2663         * dom/ContainerNode.cpp: Make NodeVector and collectNodes public, renamed as getChildNodes.
2664         (WebCore::ContainerNode::takeAllChildrenFrom): collectNodes -> getChildNodes.
2665         (WebCore::ContainerNode::willRemove): collectNodes -> getChildNodes.
2666         (WebCore::ContainerNode::willRemoveChildren): collectNodes -> getChildNodes.
2667         (WebCore::ContainerNode::insertedIntoDocument): collectNodes -> getChildNodes.
2668         (WebCore::ContainerNode::removedFromDocument): collectNodes -> getChildNodes.
2669         * dom/ContainerNode.h:
2670         (WebCore::getChildNodes):
2671
2672         * editing/ReplaceSelectionCommand.cpp: Remove unused NodeVector declaration.
2673
2674         * html/HTMLMediaElement.cpp:
2675         (WebCore::HTMLMediaElement::HTMLMediaElement): m_nextChildNodeToConsider and m_currentSourceNode
2676             are now RefPtrs.
2677         (WebCore::HTMLMediaElement::loadTimerFired): Protect HTMLMediaElement from being deleted during
2678             a DOM modification during an event callback.
2679         (WebCore::HTMLMediaElement::load): Ditto.
2680         (WebCore::HTMLMediaElement::selectMediaResource): Set m_nextChildNodeToConsider to the first
2681             child node, it will be the first node considered.
2682         (WebCore::HTMLMediaElement::havePotentialSourceChild): m_nextChildNodeToConsider and m_currentSourceNode
2683             are now RefPtrs.
2684         (WebCore::HTMLMediaElement::selectNextSourceChild): Collect all child nodes in a vector before
2685             looking for <source> nodes because 'beforeload' event handlers can mutate the DOM. Don't
2686             use a <source> that is no longer a child node after 'beforeload'. Use 0 to represent the end
2687             of the child node list because m_nextChildNodeToConsider is now a RefPtr so using the previous 
2688             sentinel, "this", would cause a retain cycle.
2689         (WebCore::HTMLMediaElement::sourceWasAdded):  m_nextChildNodeToConsider and m_currentSourceNode
2690             are now RefPtrs.
2691         (WebCore::HTMLMediaElement::sourceWillBeRemoved): Ditto.
2692         (WebCore::HTMLMediaElement::getPluginProxyParams): Protect HTMLMediaElement from being deleted during
2693             a DOM modification during an event callback.
2694         * html/HTMLMediaElement.h:
2695
2696 2012-03-23  Dean Jackson  <dino@apple.com>
2697
2698         Disable CSS_SHADERS in Apple builds
2699         https://bugs.webkit.org/show_bug.cgi?id=81996
2700
2701         Reviewed by Simon Fraser.
2702
2703         Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.
2704
2705         * Configurations/FeatureDefines.xcconfig:
2706
2707 2012-03-23  Dave Michael  <dmichael@chromium.org>
2708
2709         Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
2710         https://bugs.webkit.org/show_bug.cgi?id=80428
2711
2712         Reviewed by Eric Seidel and Ryosuke Niwa.
2713
2714         Make HTMLPluginElement release its m_NPObject in detach() to break a
2715         reference-counting cycle that happens on reload or navigation. With this
2716         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
2717         was removed. Note that Releasing m_NPObject does not result in a call to
2718         the plugin; it simply releases a reference count on the wrapper object
2719         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
2720         when the render tree is destroyed, when PluginView calls
2721         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
2722         detach, because it can not result in layout or style changes.
2723
2724         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
2725         window.internals to enable testing.
2726
2727         Test: plugins/netscape-dom-access-and-reload.html
2728
2729         * WebCore.exp.in:
2730         * html/HTMLPlugInElement.cpp:
2731         (WebCore::HTMLPlugInElement::detach):
2732         * html/HTMLPlugInElement.h:
2733         (HTMLPlugInElement):
2734         * testing/Internals.cpp:
2735         (WebCore):
2736         (WebCore::Internals::numberOfLiveNodes):
2737         (WebCore::Internals::numberOfLiveDocuments):
2738         * testing/Internals.h:
2739         (Internals):
2740         * testing/Internals.idl:
2741
2742 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
2743
2744         CSSParser doesn't set border-*-width/style/color to initial by border shorthand property
2745         https://bugs.webkit.org/show_bug.cgi?id=82040
2746
2747         Reviewed by Antti Koivisto.
2748
2749         The border shorthand property sets values for border-width, border-style, and border-color shorthand properties.
2750         While CSSParser::parseValue can process these shorthand properties properly and set the longhand properties
2751         such as border-top-width, border-right-width, ... border-left-color, CSSParser::addProperty can't and the
2752         initialization in parseShorthand fails for the border property.
2753
2754         Fixed the bug by explicitly initializing longhand properties.
2755
2756         Changing the behavior here is unlikely to break the Web since our behavior already differs from that of Firefox
2757         and Internet Explorer. Both of those browsers return the actual initial values such as "medium" and "currentColor".
2758         This discrepancy is tracked by https://bugs.webkit.org/show_bug.cgi?id=82078.
2759
2760         Test: fast/css/border-shorthand-initialize-longhands.html
2761
2762         * css/CSSParser.cpp:
2763         (WebCore::CSSParser::parseValue): Uses borderAbridgedLonghand.
2764         (WebCore::CSSParser::parseShorthand): Uses longhand properties for initialization if one is available.
2765         This allows us to initialize multiple properties (e.g. border-*-color) for a single property missing in the set.
2766         * css/CSSPropertyLonghand.cpp:
2767         (WebCore::borderAbridgedLonghand): Added. The longhand here (border-width, border-style, border-color) is
2768         "abridged" in the sense that they're still shorthands.
2769         * css/CSSPropertyLonghand.h:
2770         (WebCore::CSSPropertyLonghand::CSSPropertyLonghand):
2771         (CSSPropertyLonghand): Added the version that takes longhand instances for initialization purposes.
2772         (WebCore::CSSPropertyLonghand::longhandsForInitialization):
2773
2774 2012-03-23  Tony Chang  <tony@chromium.org>
2775
2776         [chromium] rename newwtf target back to wtf
2777         https://bugs.webkit.org/show_bug.cgi?id=82064
2778
2779         Reviewed by Adam Barth.
2780
2781         No new tests, only renaming a build target.
2782
2783         * WebCore.gyp/WebCore.gyp:
2784
2785 2012-03-23  Adrienne Walker  <enne@google.com>
2786
2787         [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms
2788         https://bugs.webkit.org/show_bug.cgi?id=82066
2789
2790         Reviewed by James Robinson.
2791
2792         With threaded compositing, OSX will crash and Windows will have black
2793         scrollbars. Fix that by reverting to the previosu behavior of updating
2794         scrollbars on the main thread instead.
2795
2796         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2797         (WebCore::scrollbarLayerDidChange):
2798
2799 2012-03-23  Dan Bernstein  <mitz@apple.com>
2800
2801         <rdar://problem/7883987> ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers
2802         https://bugs.webkit.org/show_bug.cgi?id=81351
2803
2804         Rubber-stamped by Jessie Berlin.
2805
2806         * page/animation/AnimationBase.cpp:
2807         (WebCore::AnimationBase::updateStateMachine): Replaced the assertion with a LOG_ERROR so that
2808         the issue is still noticeable, but it does not automatically make the debug bots red.
2809
2810 2012-03-23  Mike Lawther  <mikelawther@chromium.org>
2811
2812         CSS3 calc: image sizing works with mixed percentage/absolute
2813         https://bugs.webkit.org/show_bug.cgi?id=82017
2814
2815         Reviewed by Ojan Vafai.
2816
2817         Test: css3/calc/img-size-expected.html
2818
2819         * rendering/RenderBox.cpp:
2820         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2821         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2822
2823 2012-03-23  Julien Chaffraix  <jchaffraix@webkit.org>
2824
2825         REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height
2826         https://bugs.webkit.org/show_bug.cgi?id=81826
2827
2828         Reviewed by Tony Chang.
2829
2830         Covered by tables/mozilla/bugs/bug27038-{1|2}.html.
2831
2832         This partly reverts r107971: the extra logical height distribution change was not needed
2833         to fix the bug (it is needed by the test though). We revert to giving all the extra height
2834         to the first tbody and not the first section.
2835
2836         This is broken but unfortunately some websites are relying on that. Getting a real
2837         distribution algorithm is covered by bug 81824. However this is super tricky to get
2838         right and I did not want to add more compatibility risks until I have something solid.
2839
2840         * rendering/RenderTable.cpp:
2841         (WebCore::RenderTable::distributeExtraLogicalHeight):
2842
2843 2012-03-23  Xingnan Wang  <xingnan.wang@intel.com>
2844
2845         Optimize for IPP in DirectConvolver::process()
2846         https://bugs.webkit.org/show_bug.cgi?id=80255
2847
2848         Reviewed by Chris Rogers.
2849
2850         Increase ~2X performance by conv() in IPP.
2851
2852         * platform/audio/DirectConvolver.cpp:
2853         (WebCore::DirectConvolver::DirectConvolver):
2854         (WebCore::DirectConvolver::process):
2855         * platform/audio/DirectConvolver.h:
2856         (DirectConvolver):
2857
2858 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
2859
2860         MediaStream API (JSEP): Introducing PeerConnection00 and IceCallback
2861         https://bugs.webkit.org/show_bug.cgi?id=81657
2862
2863         Reviewed by Adam Barth.
2864
2865         Last major WebCore patch for the JSEP PeerConnection, together with the associated
2866         IceCallback (they both depend on each other and IceCallback has very few lines of real code).
2867
2868         My next patch after this one will do a major overhaul of the existing layout tests
2869         and add a few new ones.
2870
2871         * GNUmakefile.list.am:
2872         * Modules/mediastream/DOMWindowMediaStream.idl:
2873         * Modules/mediastream/IceCallback.h: Added.
2874         (WebCore):
2875         (IceCallback):
2876         (WebCore::IceCallback::~IceCallback):
2877         * Modules/mediastream/IceCallback.idl: Added.
2878         * Modules/mediastream/PeerConnection00.cpp: Added.
2879         (WebCore):
2880         (WebCore::PeerConnection00::create):
2881         (WebCore::PeerConnection00::PeerConnection00):
2882         (WebCore::PeerConnection00::~PeerConnection00):
2883         (WebCore::PeerConnection00::hasLocalAudioTrack):
2884         (WebCore::PeerConnection00::hasLocalVideoTrack):
2885         (WebCore::PeerConnection00::parseMediaHints):
2886         (WebCore::PeerConnection00::createOffer):
2887         (WebCore::PeerConnection00::createAnswer):
2888         (WebCore::PeerConnection00::setLocalDescription):
2889         (WebCore::PeerConnection00::setRemoteDescription):
2890         (WebCore::PeerConnection00::localDescription):
2891         (WebCore::PeerConnection00::remoteDescription):
2892         (WebCore::PeerConnection00::startIce):
2893         (WebCore::PeerConnection00::processIceMessage):
2894         (WebCore::PeerConnection00::readyState):
2895         (WebCore::PeerConnection00::iceState):
2896         (WebCore::PeerConnection00::addStream):
2897         (WebCore::PeerConnection00::removeStream):
2898         (WebCore::PeerConnection00::localStreams):
2899         (WebCore::PeerConnection00::remoteStreams):
2900         (WebCore::PeerConnection00::close):
2901         (WebCore::PeerConnection00::didGenerateIceCandidate):
2902         (WebCore::PeerConnection00::didChangeReadyState):
2903         (WebCore::PeerConnection00::didChangeIceState):
2904         (WebCore::PeerConnection00::didAddRemoteStream):
2905         (WebCore::PeerConnection00::didRemoveRemoteStream):
2906         (WebCore::PeerConnection00::interfaceName):
2907         (WebCore::PeerConnection00::scriptExecutionContext):
2908         (WebCore::PeerConnection00::stop):
2909         (WebCore::PeerConnection00::eventTargetData):
2910         (WebCore::PeerConnection00::ensureEventTargetData):
2911         (WebCore::PeerConnection00::changeReadyState):
2912         (WebCore::PeerConnection00::changeIceState):
2913         * Modules/mediastream/PeerConnection00.h: Added.
2914         (WebCore):
2915         (PeerConnection00):
2916         (WebCore::PeerConnection00::refEventTarget):
2917         (WebCore::PeerConnection00::derefEventTarget):
2918         * Modules/mediastream/PeerConnection00.idl: Added.
2919         * WebCore.gypi:
2920         * bindings/generic/RuntimeEnabledFeatures.h:
2921         (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
2922         * bindings/js/JSPeerConnection00Custom.cpp: Added.
2923         (WebCore):
2924         (WebCore::JSPeerConnection00Constructor::constructJSPeerConnection00):
2925         * dom/EventTargetFactory.in:
2926
2927 2012-03-23  Adrienne Walker  <enne@google.com>
2928
2929         [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6
2930         https://bugs.webkit.org/show_bug.cgi?id=82062
2931
2932         Reviewed by James Robinson.
2933
2934         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2935         (CCScrollbarLayerImpl):
2936
2937 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
2938
2939         [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter
2940         https://bugs.webkit.org/show_bug.cgi?id=81924
2941
2942         Reviewed by Adam Barth.
2943
2944         Nothing to test, just moving methods.
2945
2946         * platform/mediastream/MediaStreamCenter.cpp:
2947         (WebCore::MediaStreamCenter::constructSDP):
2948         (WebCore):
2949
2950 2012-03-23  Sami Kyostila  <skyostil@chromium.org>
2951
2952         Reuse buffer allocation if canvas size does not change
2953         https://bugs.webkit.org/show_bug.cgi?id=80871
2954
2955         Reviewed by Stephen White.
2956
2957         If the user changes the width or height attributes of a canvas element,
2958         the contents of the canvas should be cleared and the context state
2959         should be reset. This has become a common idiom to clear the canvas
2960         "efficiently" at the start of a frame.
2961
2962         Previously, this code path triggered a full reallocation of the image
2963         buffer backing the canvas, leading to reduced performance. This patch
2964         implements an optimization where we reuse the previous image buffer
2965         allocation if the size of the canvas did not change. Also, instead of
2966         clearing the canvas every time its dimensions are touched, we only clear
2967         if anything has been drawn into the canvas since it was previously
2968         cleared.
2969
2970         Note that for now this optimization only applies for 2D canvases,
2971         since it is not entirely clear how touching the dimensions of a WebGL
2972         canvas should work.
2973
2974         Test: fast/canvas/canvas-resize-after-paint-without-layout.html +
2975               existing layout tests for canvas resetting.
2976
2977         * html/HTMLCanvasElement.cpp:
2978         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2979         (WebCore::HTMLCanvasElement::reset):
2980         (WebCore::HTMLCanvasElement::createImageBuffer): Save the initial
2981         graphics context state so we can restore it without creating a new
2982         context.
2983         (WebCore::HTMLCanvasElement::clearImageBuffer):
2984         (WebCore):
2985         (WebCore::HTMLCanvasElement::clearCopiedImage):
2986         * html/HTMLCanvasElement.h:
2987         (HTMLCanvasElement):
2988         * html/canvas/CanvasRenderingContext2D.cpp:
2989         (WebCore::CanvasRenderingContext2D::reset): No need to notify the
2990         compositor when the context is reset, because clearing the image buffer
2991         does the same thing. We can also skip the notification if we did not
2992         have an image buffer at the time of the reset, because the reset will
2993         not have any visual impact in this case. Finally, if the canvas size
2994         did change, the notification is also unnecessary because of the call
2995         to RenderObject::repaint() from HTMLCanvasElement::reset().
2996
2997 2012-03-22  Martin Robinson  <mrobinson@igalia.com>
2998
2999         Fix some code generation warnings on GTK+.
3000
3001         Reviewed by Gustavo Noronha Silva.
3002
3003         No new tests. This just fixes warnings.
3004
3005         * GNUmakefile.am: Remove nonexistent directories from the list IDL directories.
3006
3007 2012-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3008
3009         Unreviewed, rolling out r111751.
3010         http://trac.webkit.org/changeset/111751
3011         https://bugs.webkit.org/show_bug.cgi?id=82060
3012
3013         caused 15% page cycler regression for chromium-linux
3014         (Requested by eae on #webkit).
3015
3016         * css/CSSStyleSelector.cpp:
3017         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3018
3019 2012-03-23  Kentaro Hara  <haraken@chromium.org>
3020
3021         Support [ImplementedAs] for attributes
3022         https://bugs.webkit.org/show_bug.cgi?id=81605
3023
3024         Reviewed by Adam Barth.
3025
3026         [ImplementedAs] just supports methods. [ImplementedAs] should support
3027         attributes too.
3028
3029         Explained here: https://trac.webkit.org/wiki/WebKitIDL#ImplementedAs
3030
3031         Test: bindings/scripts/test/TestObj.idl
3032
3033         * bindings/scripts/CodeGenerator.pm: Modified to support [ImplementedAs] for attributes.
3034         (AttributeNameForGetterAndSetter):
3035
3036         * bindings/scripts/test/TestObj.idl: Added a test case.
3037
3038         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results.
3039         (WebDOMTestObj::strawberry):
3040         (WebDOMTestObj::setStrawberry):
3041         * bindings/scripts/test/CPP/WebDOMTestObj.h:
3042         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3043         (webkit_dom_test_obj_get_strawberry):
3044         (webkit_dom_test_obj_set_strawberry):
3045         (webkit_dom_test_obj_get_property):
3046         (webkit_dom_test_obj_class_init):
3047         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3048         * bindings/scripts/test/JS/JSTestObj.cpp:
3049         (WebCore):
3050         (WebCore::jsTestObjStrawberry):
3051         (WebCore::setJSTestObjStrawberry):
3052         * bindings/scripts/test/JS/JSTestObj.h:
3053         (WebCore):
3054         * bindings/scripts/test/ObjC/DOMTestObj.h:
3055         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3056         (-[DOMTestObj strawberry]):
3057         (-[DOMTestObj setStrawberry:]):
3058         * bindings/scripts/test/V8/V8TestObj.cpp:
3059         (WebCore::TestObjInternal::strawberryAttrGetter):
3060         (TestObjInternal):
3061         (WebCore::TestObjInternal::strawberryAttrSetter):
3062         (WebCore):
3063
3064 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
3065
3066         The JSC code generator doesn't generate correct code for Constructors
3067         https://bugs.webkit.org/show_bug.cgi?id=82046
3068
3069         Reviewed by Kentaro Hara.
3070
3071         The main bulk of generated code for constructors uses the name jsConstructor
3072         for the created object, and then calls GenerateParametersCheck which generates
3073         code that uses the name castedThis.
3074
3075         * bindings/scripts/CodeGeneratorJS.pm:
3076         (GenerateConstructorDefinition):
3077         * bindings/scripts/test/JS/JSTestInterface.cpp:
3078         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
3079         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3080         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
3081         * bindings/scripts/test/JS/JSTestObj.cpp:
3082         (WebCore::JSTestObjConstructor::finishCreation):
3083         (WebCore::JSTestObjConstructor::constructJSTestObj):
3084         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3085         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
3086         * bindings/scripts/test/TestObj.idl:
3087         * bindings/scripts/test/V8/V8TestObj.cpp:
3088         (WebCore::V8TestObj::constructorCallback):
3089
3090 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
3091
3092         The JSC code generator can't handle boolean arguments for Callbacks
3093         https://bugs.webkit.org/show_bug.cgi?id=82045
3094
3095         Reviewed by Kentaro Hara.
3096
3097         CodeGeneratorJS.pm only handles DOMStrings and objects as arguments
3098         for a Callback, so I added support for boolean values as well.
3099
3100         * bindings/scripts/CodeGeneratorJS.pm:
3101         (GenerateCallbackImplementation):
3102         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
3103         (WebDOMTestCallback::callbackWithBoolean):
3104         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
3105         (WebDOMTestCallback):
3106         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
3107         (webkit_dom_test_callback_callback_with_boolean):
3108         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
3109         * bindings/scripts/test/JS/JSTestCallback.cpp:
3110         (WebCore::JSTestCallback::callbackWithBoolean):
3111         (WebCore):
3112         * bindings/scripts/test/JS/JSTestCallback.h:
3113         (JSTestCallback):
3114         * bindings/scripts/test/ObjC/DOMTestCallback.h:
3115         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
3116         (-[DOMTestCallback callbackWithBoolean:]):
3117         * bindings/scripts/test/TestCallback.idl:
3118         * bindings/scripts/test/V8/V8TestCallback.cpp:
3119         (WebCore::V8TestCallback::callbackWithBoolean):
3120         (WebCore):
3121         * bindings/scripts/test/V8/V8TestCallback.h:
3122         (V8TestCallback):
3123
3124 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3125
3126         Touch adjustment forgets some subtarget quads.
3127         https://bugs.webkit.org/show_bug.cgi?id=82044
3128
3129         Reviewed by Kenneth Rohde Christiansen.
3130
3131         Do not uncritically skip all nodes that are ancestors to other test results.
3132         Instead return the inner-most element if multiple nodes have the same distance.
3133
3134         Test: touchadjustment/block-testing.html
3135
3136         * page/TouchAdjustment.cpp:
3137         (WebCore::TouchAdjustment::compileSubtargetList):
3138         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
3139
3140 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3141
3142         TouchAdjustment does not correct for frame position
3143         https://bugs.webkit.org/show_bug.cgi?id=82043
3144
3145         Reviewed by Kenneth Rohde Christiansen.
3146
3147         Convert geometry to window coordinates before calculating distance.
3148
3149         Test: touchadjustment/iframe.html
3150
3151         * page/TouchAdjustment.cpp:
3152         (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine):
3153
3154 2012-03-23  Vlad Voicu  <vladv@rosedu.org>
3155
3156         Fixed minor WebInspector display issue
3157         Clicking on disabled sections in Styles Sidebar Pane creates new elements.
3158         https://bugs.webkit.org/show_bug.cgi?id=81925
3159
3160         Reviewed by Timothy Hatcher
3161
3162         No new tests should be required.
3163
3164         * inspector/front-end/StylesSidebarPane.js:
3165         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
3166         (WebInspector.StylePropertyTreeElement.prototype):
3167
3168 2012-03-23  Kentaro Hara  <haraken@chromium.org>
3169
3170         Unreviewed, rebaselined run-bindings-tests results.
3171
3172         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
3173         * bindings/scripts/test/CPP/WebDOMTestObj.h:
3174         * bindings/scripts/test/JS/JSTestObj.cpp:
3175         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
3176         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
3177         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
3178         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
3179         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
3180         * bindings/scripts/test/V8/V8TestObj.cpp:
3181         (WebCore::TestObjInternal::methodWithCallbackArgCallback):
3182         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback):
3183         (WebCore::TestObjInternal::methodWithCallbackAndOptionalArgCallback):
3184         (WebCore::TestObjInternal::overloadedMethod5Callback):
3185         (WebCore::TestObjInternal::overloadedMethodCallback):
3186
3187 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
3188
3189         cssText should use StringBuilder
3190         https://bugs.webkit.org/show_bug.cgi?id=82028
3191
3192         Reviewed by Hajime Morita.
3193
3194         Make StylePropertySet::asText more efficient by deploying StringBuilder;
3195         avoids heap churn by String::operator+ and String::operator+=.
3196
3197         * css/StylePropertySet.cpp:
3198         (WebCore::StylePropertySet::asText):
3199
3200 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
3201
3202         REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms
3203         https://bugs.webkit.org/show_bug.cgi?id=82035
3204
3205         Rollout r111754 since it caused a test to fail and the test added by the patch
3206         is failing on Mac WebKit 2.
3207
3208         * WebCore.exp.in:
3209         * html/HTMLPlugInElement.cpp:
3210         (WebCore::HTMLPlugInElement::detach):
3211         (WebCore):
3212         (WebCore::HTMLPlugInElement::removedFromDocument):
3213         * html/HTMLPlugInElement.h:
3214         (HTMLPlugInElement):
3215         * testing/Internals.cpp:
3216         * testing/Internals.h:
3217         (Internals):
3218         * testing/Internals.idl:
3219
3220 2012-03-23  Adam Barth  <abarth@webkit.org>
3221
3222         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 2)
3223         https://bugs.webkit.org/show_bug.cgi?id=82026
3224
3225         Reviewed by Kentaro Hara.
3226
3227         This patch removes DOMWindow::resetNotifications, which was unneeded
3228         special-case logic for clearing the notifications center.  The previous
3229         patch that tried to accomplish the same thing did not override
3230         willDetachPage, which is why it caused crashes.
3231
3232         There's actually a cleaner way to handle these cases, which will let us
3233         implement reconnectFrame, but that will need to wait for the next
3234         patch.
3235
3236         * notifications/DOMWindowNotifications.cpp:
3237         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
3238         (WebCore::DOMWindowNotifications::from):
3239         (WebCore::DOMWindowNotifications::webkitNotifications):
3240         (WebCore):
3241         (WebCore::DOMWindowNotifications::disconnectFrame):
3242         (WebCore::DOMWindowNotifications::willDetachPage):
3243         (WebCore::DOMWindowNotifications::reset):
3244         * notifications/DOMWindowNotifications.h:
3245         (DOMWindowNotifications):
3246         * page/DOMWindow.cpp:
3247         (WebCore::DOMWindow::willDetachPage):
3248         (WebCore::DOMWindow::disconnectDOMWindowProperties):
3249         (WebCore::DOMWindow::clearDOMWindowProperties):
3250         * page/DOMWindow.h:
3251         (DOMWindow):
3252         * page/Frame.cpp:
3253         (WebCore::Frame::willDetachPage):
3254
3255 2012-03-22  Adam Barth  <abarth@webkit.org>
3256
3257         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1)
3258         https://bugs.webkit.org/show_bug.cgi?id=82015
3259
3260         Reviewed by Kentaro Hara.
3261
3262         This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to
3263         DOMWindowNotificiations.idl in preparation for moving notificiations
3264         into Modules.
3265
3266         A future patch will remove DOMWindow::resetNotificaitions in favor of
3267         more general mechanisms.
3268
3269         * CMakeLists.txt:
3270         * DerivedSources.make:
3271         * DerivedSources.pri:
3272         * GNUmakefile.list.am:
3273         * Target.pri:
3274         * WebCore.gypi:
3275         * WebCore.vcproj/WebCore.vcproj:
3276         * WebCore.xcodeproj/project.pbxproj:
3277         * notifications/DOMWindowNotifications.cpp: Added.
3278         (WebCore):
3279         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
3280         (WebCore::DOMWindowNotifications::~DOMWindowNotifications):
3281         (WebCore::DOMWindowNotifications::from):
3282         (WebCore::DOMWindowNotifications::webkitNotifications):
3283         (WebCore::DOMWindowNotifications::reset):
3284         (WebCore::DOMWindowNotifications::supplementName):
3285         * notifications/DOMWindowNotifications.h: Added.
3286         (WebCore):
3287         (DOMWindowNotifications):
3288         * notifications/DOMWindowNotifications.idl: Added.
3289         * page/DOMWindow.cpp:
3290         (WebCore::DOMWindow::~DOMWindow):
3291         (WebCore):
3292         (WebCore::DOMWindow::resetNotifications):
3293         * page/DOMWindow.h:
3294         (WebCore):
3295         (DOMWindow):
3296         * page/DOMWindow.idl:
3297
3298 2012-03-22  Li Yin  <li.yin@intel.com>
3299
3300         A client MUST close a connection if it detects a masked frame
3301         https://bugs.webkit.org/show_bug.cgi?id=81361
3302
3303         Reviewed by Kent Tamura.
3304
3305         A server must not mask any frames that it sends to the client.
3306         Change the test case, not mask the frames from server to client.
3307         
3308         Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html
3309
3310         * Modules/websockets/WebSocketChannel.cpp:
3311         (WebCore::WebSocketChannel::processFrame):
3312
3313 2012-03-22  Li Yin  <li.yin@intel.com>
3314
3315         [WebSocket]The minimal number of bytes MUST be used to encode the length
3316         https://bugs.webkit.org/show_bug.cgi?id=81443
3317
3318         Reviewed by Kent Tamura.
3319
3320         From RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.2
3321         the minimal number of bytes MUST be used to encode the length
3322         
3323         New test case : http/tests/websocket/tests/hybi/invalid-encode-length.html
3324
3325         * Modules/websockets/WebSocketChannel.cpp:
3326         (WebCore::WebSocketChannel::parseFrame):
3327
3328 2012-03-22  Adam Barth  <abarth@webkit.org>
3329
3330         Unreviewed.  Sort xcodeproj file.
3331
3332         * WebCore.xcodeproj/project.pbxproj:
3333
3334 2012-03-22  Mao Yujie  <yujie.mao@intel.com>
3335
3336         Implement strict testing criterion for callback function definition
3337         https://bugs.webkit.org/show_bug.cgi?id=80005
3338
3339         Reviewed by Adam Barth.
3340
3341         Callback function should be defined as the function type instead of
3342         the object type.
3343
3344         LayoutTest: fast/dom/MediaStream/argument-types.html
3345
3346         * bindings/scripts/CodeGeneratorJS.pm:
3347         (GenerateParametersCheckExpression):
3348         (GenerateParametersCheck):
3349         * bindings/scripts/CodeGeneratorV8.pm:
3350         (GenerateParametersCheckExpression):
3351         (GenerateParametersCheck):
3352
3353 2012-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3354
3355         Convert hasGrammarMarker to use Internals interface
3356         https://bugs.webkit.org/show_bug.cgi?id=82004
3357
3358         Reviewed by Ryosuke Niwa.
3359
3360         Remove hasGrammarMarker functions, because it is able to work in the
3361         cross-port way through the Internals interface.
3362
3363         No new tests, since we are improving here the infra-structure
3364         for testing a specific method.
3365
3366         * testing/Internals.cpp:
3367         (WebCore::Internals::hasGrammarMarker):
3368         (WebCore):
3369         * testing/Internals.h:
3370         (Internals):
3371         * testing/Internals.idl:
3372
3373 2012-03-22  Xingnan Wang  <xingnan.wang@intel.com>
3374
3375         Add exception for the setter of "fftSize" in RealtimeAnalyserNode
3376         https://bugs.webkit.org/show_bug.cgi?id=81748
3377
3378         Reviewed by Chris Rogers.
3379
3380         * Modules/webaudio/RealtimeAnalyser.cpp:
3381         (WebCore::RealtimeAnalyser::setFftSize):
3382         * Modules/webaudio/RealtimeAnalyser.h:
3383         (RealtimeAnalyser):
3384         * Modules/webaudio/RealtimeAnalyserNode.cpp:
3385         (WebCore::RealtimeAnalyserNode::setFftSize):
3386         (WebCore):
3387         * Modules/webaudio/RealtimeAnalyserNode.h:
3388         (RealtimeAnalyserNode):
3389         * Modules/webaudio/RealtimeAnalyserNode.idl:
3390
3391 2012-03-22  Leo Yang  <leo.yang@torchmobile.com.cn>
3392
3393         [BlackBerry] Add HistoryItemViewState for BlackBerry port
3394         https://bugs.webkit.org/show_bug.cgi?id=81867
3395
3396         Reviewed by Rob Buis.
3397
3398         HistoryItemViewState is the blackberry specific field of HistoryItem.
3399         It's used to maintain the porting specific view state.
3400
3401         No new test because the port can't be built yet.
3402
3403         * history/HistoryItem.h:
3404         (HistoryItem):
3405         (WebCore::HistoryItem::viewState):
3406
3407 2012-03-22  SravanKumar Sandela  <ssandela@innominds.com>
3408
3409         Fieldset unexpectedly stretches to minimum intrinsic width
3410         https://bugs.webkit.org/show_bug.cgi?id=79128
3411
3412         Reviewed by Julien Chaffraix.
3413
3414         Fieldset element width will now check if css width is specified explicitly
3415         before stretching to minimum intrinsic width. The reference
3416         can be taken from IE9, instead of FF(FF acknowledged the broken behavior). 
3417
3418         Tests: fast/forms/fieldset-width-nostretch-ifspecified-expected.html
3419                fast/forms/fieldset-width-nostretch-ifspecified.html
3420
3421         * rendering/RenderFieldset.cpp:
3422         (WebCore::RenderFieldset::stretchesToMinIntrinsicLogicalWidth):
3423         (WebCore):
3424         * rendering/RenderFieldset.h:
3425         (RenderFieldset):
3426
3427 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
3428
3429         [chromium] Target surface should be damaged for a new layers even when layer had no changes
3430         https://bugs.webkit.org/show_bug.cgi?id=81879
3431
3432         Reviewed by Adrienne Walker.
3433
3434         Unit test added to CCDamageTrackerTest.
3435
3436         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
3437         (WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a
3438         boolean arg to detect if the layer is new on this update.
3439
3440         (WebCore::CCDamageTracker::extendDamageForLayer): added logic that
3441         damages the target surface if the layer is new.
3442
3443         (WebCore::CCDamageTracker::extendDamageForRenderSurface): added
3444         logic that damages the target surface if the descendant surface is
3445         new; similar logic for the surface's replica if the replica is new.
3446
3447         * platform/graphics/chromium/cc/CCDamageTracker.h:
3448         (CCDamageTracker):
3449
3450 2012-03-22  Charles Wei  <charles.wei@torchmobile.com.cn>
3451
3452         [BlackBerry] Need to store the meta info of a page in the ViewState of the history
3453         https://bugs.webkit.org/show_bug.cgi?id=82000
3454
3455         Reviewed by Rob Buis.
3456
3457         Internally reviewed by George Staikos.
3458
3459         No new tests, BlackBerry porting doesn't build yet upstreaming.
3460
3461         * history/blackberry/HistoryItemViewState.h:
3462         (WebCore::HistoryItemViewState::HistoryItemViewState):
3463         (HistoryItemViewState):
3464
3465 2012-03-22  Adam Klein  <adamk@chromium.org>
3466
3467         [v8] wrapSlow methods should ref underlying object before creating wrapper
3468         https://bugs.webkit.org/show_bug.cgi?id=81919
3469
3470         Reviewed by Adam Barth.
3471
3472         Because instatiating the wrapper can trigger GC, it's important that
3473         wrapSlow() hold a reference to an object when creating a wrapper for
3474         that object. Once the V8 wrapper exists and is associated with the object,
3475         the reference can be handed off (via leakRef) to be handled by the normal
3476         binding code logic (where derefObject is called if the handle is GCed).
3477
3478         Binding tests have been updated to reflect this change.
3479
3480         Testing the change directly is hard. Any test landed today would only
3481         be a valid test until V8's logic about when to GC changes, at which point
3482         it would become dead weight. So I don't think it's worth landing a
3483         layout test along with this.
3484
3485         * bindings/scripts/CodeGeneratorV8.pm:
3486         (GenerateHeader): Make wrapSlow take a PassRefPtr for RefCounted objects.
3487         (GenerateToV8Converters): Get rid of the explicit call to ref() and
3488         instead call leakRef() when adding a RefCounted object to the DOM map.
3489         (GetPassRefPtrType): Helper to generate "PassRefPtr<T>", or "PassRefPtr<T<U> >" as appropriate.
3490         * bindings/scripts/test/V8/V8Float64Array.cpp:
3491         (WebCore::V8Float64Array::wrapSlow):
3492         * bindings/scripts/test/V8/V8Float64Array.h:
3493         (V8Float64Array):
3494         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3495         (WebCore::V8TestActiveDOMObject::wrapSlow):
3496         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3497         (V8TestActiveDOMObject):
3498         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3499         (WebCore::V8TestCustomNamedGetter::wrapSlow):
3500         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3501         (V8TestCustomNamedGetter):
3502         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3503         (WebCore::V8TestEventConstructor::wrapSlow):
3504         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3505         (V8TestEventConstructor):
3506         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3507         (WebCore::V8TestEventTarget::wrapSlow):
3508         * bindings/scripts/test/V8/V8TestEventTarget.h:
3509         (V8TestEventTarget):
3510         * bindings/scripts/test/V8/V8TestInterface.cpp:
3511         (WebCore::V8TestInterface::wrapSlow):
3512         * bindings/scripts/test/V8/V8TestInterface.h:
3513         (V8TestInterface):
3514         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3515         (WebCore::V8TestMediaQueryListListener::wrapSlow):
3516         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3517         (V8TestMediaQueryListListener):
3518         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3519         (WebCore::V8TestNamedConstructor::wrapSlow):
3520         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3521         (V8TestNamedConstructor):
3522         * bindings/scripts/test/V8/V8TestObj.cpp:
3523         (WebCore::V8TestObj::wrapSlow):
3524         * bindings/scripts/test/V8/V8TestObj.h:
3525         (V8TestObj):
3526         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3527         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
3528         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3529         (V8TestSerializedScriptValueInterface):
3530
3531 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3532
3533         [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
3534         https://bugs.webkit.org/show_bug.cgi?id=81887
3535
3536         Reviewed by Rob Buis.
3537
3538         Fixed SQL issue when clearing table logins and table never_remember.
3539
3540         No new tests.
3541
3542         * platform/network/blackberry/CredentialBackingStore.cpp:
3543         (WebCore::CredentialBackingStore::clearLogins):
3544         (WebCore::CredentialBackingStore::clearNeverRemember):
3545
3546 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3547
3548         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
3549         https://bugs.webkit.org/show_bug.cgi?id=80135
3550
3551         Reviewed by Rob Buis.
3552
3553         Modified the interface function authenticationChallenge() in class
3554         PageClientBlackBerry, moved Credential from return value to the
3555         function's reference parameter, and returned a bool to indicate if
3556         user pressed Ok button or not.
3557         Removed the logic which checks m_currentWebChallenge not null,
3558         because we should challenge user again if the last provided credential
3559         is not valid; also added the logic that will popup challenge
3560         dialog again immediately if user press Ok buttton directly without
3561         inputting anything.
3562
3563         No new tests.
3564
3565         * platform/blackberry/PageClientBlackBerry.h:
3566         * platform/network/blackberry/NetworkJob.cpp:
3567         (WebCore::NetworkJob::handleAuthHeader):
3568         (WebCore::NetworkJob::sendRequestWithCredentials):
3569
3570 2012-03-22  Jason Liu  <jason.liu@torchmobile.com.cn>
3571
3572         [BlackBerry] Synchronize platform/network/blackberry
3573         https://bugs.webkit.org/show_bug.cgi?id=81874
3574
3575         We changed a lot in these files locally. But the changes are not upstreamed.
3576         It is not convenient to do the other upstreaming work based on these differences.
3577         So upstream these changes.
3578
3579         Reviewed by Rob Buis.
3580
3581         No new tests. Just synchronize codes.
3582
3583         * platform/network/blackberry/NetworkJob.cpp:
3584         (WebCore::NetworkJob::NetworkJob):
3585         (WebCore::NetworkJob::initialize):
3586         (WebCore::NetworkJob::handleNotifyHeaderReceived):
3587         (WebCore::NetworkJob::handleNotifyDataReceived):
3588         (WebCore::NetworkJob::sendResponseIfNeeded):
3589         (WebCore::NetworkJob::sendRequestWithCredentials):
3590         (WebCore::NetworkJob::handleAbout):
3591         * platform/network/blackberry/NetworkJob.h:
3592         (WebCore::NetworkJob::isError):
3593         (NetworkJob):
3594         * platform/network/blackberry/NetworkManager.cpp:
3595         (WebCore::NetworkManager::startJob):
3596         * platform/network/blackberry/ResourceRequest.h:
3597         (WebCore::ResourceRequest::ResourceRequest):
3598         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
3599         (WebCore::platformTargetTypeForRequest):
3600
3601 2012-03-22  Tom Sepez  <tsepez@chromium.org>
3602
3603         XSS Auditor bypass via script tag src=data:, URLS.
3604         https://bugs.webkit.org/show_bug.cgi?id=81948
3605
3606         Reviewed by Adam Barth.
3607
3608         This change fixes an XSSAuditor bypass wherby a script with a data: URL src
3609         attribute could evade detection by using characters from the page to create
3610         a snippet for matching not found in the URL's reflected vector.  This change 
3611         terminates the snippet for matching earlier in these cases.
3612         
3613         Test: http/tests/security/xssAuditor/script-tag-with-source-data-url2.html
3614
3615         * html/parser/XSSAuditor.cpp:
3616         (WebCore::XSSAuditor::decodedSnippetForAttribute):
3617
3618 2012-03-22  Dana Jansens  <danakj@chromium.org>
3619
3620         [chromium] Incorrect assert on animating opacity for a surface
3621         https://bugs.webkit.org/show_bug.cgi?id=81994
3622
3623         Reviewed by Adrienne Walker.
3624
3625         Draw opacity and animation state match on the surface itself. A
3626         surface with animating opacity always has an owning layer without
3627         animation, as the surface does the animation for it.
3628
3629         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3630         (WebCore::CCLayerTreeHost::paintLayerContents):
3631
3632 2012-03-22  Dana Jansens  <danakj@chromium.org>
3633
3634         [chromium] Skip frames when checkerboarding an animation
3635         https://bugs.webkit.org/show_bug.cgi?id=81716
3636
3637         Reviewed by Adrienne Walker.
3638
3639         This will stop drawing frames when prepareToDraw fails, if the draw is
3640         not forced. The expected behaviour is outlined below by the unit tests.
3641
3642         When a draw fails, we:
3643         1. Set m_needsRedraw to try again next vsync
3644         2. Set m_needsCommit because we need more data from webkit to succeed
3645         3. Set m_drawIfPossibleFailed. This allows us to try draw again within
3646         the same vsync *if* a commit finishes during this time.
3647
3648         Unit test: CCSchedulerTest.RequestRedrawInsideFailedDraw
3649                    CCSchedulerTest.RequestCommitInsideFailedDraw
3650                    CCSchedulerTest.NoBeginFrameWhenDrawFails
3651                    CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
3652                    CCSchedulerStateMachineTest.TestSetNeedsRedrawDuringFailedDrawDoesNotRemoveNeedsRedraw
3653                    CCSchedulerStateMachineTest.TestCommitAfterFailedDrawAllowsDrawInSameFrame
3654                    CCSchedulerStateMachineTest.TestCommitAfterFailedAndSuccessfulDrawDoesNotAllowDrawInSameFrame
3655                    CCSchedulerStateMachineTest.TestFailedDrawIsRetriedNextVSync
3656
3657         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3658         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3659         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3660         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3661         (CCLayerTreeHostImpl):
3662         * platform/graphics/chromium/cc/CCScheduler.cpp:
3663         (WebCore::CCScheduler::processScheduledActions):
3664         * platform/graphics/chromium/cc/CCScheduler.h:
3665         (CCSchedulerClient):
3666         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3667         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
3668         (WebCore::CCSchedulerStateMachine::nextAction):
3669         (WebCore::CCSchedulerStateMachine::updateState):
3670         (WebCore::CCSchedulerStateMachine::didDrawIfPossibleCompleted):
3671         (WebCore):
3672         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3673         (CCSchedulerStateMachine):
3674         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3675         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3676         (WebCore):
3677         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible):
3678         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced):
3679         * platform/graphics/chromium/cc/CCThreadProxy.h:
3680         (CCThreadProxy):
3681
3682 2012-03-22  W. James MacLean  <wjmaclean@chromium.org>
3683
3684         [chromium] Force update of nonFastScrollableRegion if target CCLayerImpl has been freshly created.
3685         https://bugs.webkit.org/show_bug.cgi?id=81968
3686
3687         Reviewed by Adrienne Walker.
3688
3689         Added unit test to existing tests for TreeSynchronizer.
3690
3691         When creating a new CCLayerImpl during tree synchronization, make sure we transfer the nonFastScrollableRegion as
3692         the new CCLayerImpl will default to an empty region.
3693
3694         * platform/graphics/chromium/LayerChromium.h:
3695         (WebCore::LayerChromium::nonFastScrollableRegion):
3696         (WebCore::LayerChromium::setNonFastScrollableRegionChanged):
3697         * platform/graphics/chromium/TreeSynchronizer.cpp:
3698         (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):
3699
3700 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
3701
3702         [CMake] Unreviewed build fix after r111778.
3703
3704         * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with
3705         ${WTF_DIR}/wtf ones.
3706
3707 2012-03-22  Tony Chang  <tony@chromium.org>
3708
3709         Unreviewed, fix chromium build after wtf move.
3710
3711         Only use newwtf, remove references to wtf.
3712
3713         * WebCore.gyp/WebCore.gyp:
3714
3715 2012-03-22  Benjamin Poulain  <bpoulain@apple.com>
3716
3717         Remove an obsolete comment regarding magic frames from Geolocation
3718         https://bugs.webkit.org/show_bug.cgi?id=81871
3719
3720         Reviewed by Alexey Proskuryakov.
3721
3722         Moving a frame into another document is no longer possible after r111361. The comment
3723         is now irrelevant.
3724
3725         * Modules/geolocation/Geolocation.cpp:
3726         (WebCore::Geolocation::stop):
3727
3728 2012-03-22  Csaba Osztrogon√°c  <ossy@webkit.org>
3729
3730         Actually move WTF files to their new home
3731         https://bugs.webkit.org/show_bug.cgi?id=81844
3732
3733         [Qt] Unreviewed buildfix after r111778.
3734
3735         * Target.pri:
3736
3737 2012-03-22  Kentaro Hara  <haraken@chromium.org>
3738
3739         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl
3740         https://bugs.webkit.org/show_bug.cgi?id=81852
3741
3742         Reviewed by Adam Barth.
3743
3744         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl:
3745
3746         Use of uninitialized value in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2743.
3747         Use of uninitialized value $name in substitution (s///) at WebCore/bindings/scripts/CodeGenerator.pm line 119.
3748         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2969.
3749         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2972.
3750         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 367.
3751         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 368.
3752         ...
3753
3754         This is because [Constructor(...)] does not yet support [Optional] arguments.
3755         It just supports [Optional=DefaultIsUndefined] and [Optional=DefaultIsNullString] arguments:
3756         https://trac.webkit.org/wiki/WebKitIDL#Constructor
3757
3758         This patch replaces [Optional] with [Optional=DefaultIsUndefined]
3759         in TestSerializedScriptValueInterface.idl.
3760
3761         Test: bindings/scripts/test/TestSerializedScriptValueInterface.idl
3762
3763         * bindings/scripts/CodeGeneratorJS.pm:
3764         (GenerateConstructorDefinition):
3765         * bindings/scripts/CodeGeneratorV8.pm:
3766         (GenerateConstructorCallback):
3767         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3768         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
3769         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
3770         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3771         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
3772
3773 2012-03-22  Michal Mocny  <mmocny@google.com>
3774
3775         [chromium] LayerRendererChromium should use GpuMemoryAllocationChanged callback to explicitly manage framebuffer.
3776         https://bugs.webkit.org/show_bug.cgi?id=81823
3777
3778         Reviewed by Adrienne Walker.
3779
3780         New UnitTests: LayerRendererChromiumTest
3781
3782         * platform/graphics/chromium/LayerRendererChromium.cpp:
3783         (LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
3784         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::create):
3785         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::~LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
3786         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged):
3787         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
3788         (WebCore):
3789         (WebCore::LayerRendererChromium::LayerRendererChromium):
3790         (WebCore::LayerRendererChromium::initialize):
3791         (WebCore::LayerRendererChromium::~LayerRendererChromium):
3792         (WebCore::LayerRendererChromium::setVisible):
3793         (WebCore::LayerRendererChromium::swapBuffers):
3794         (WebCore::LayerRendererChromium::discardFramebuffer):
3795         (WebCore::LayerRendererChromium::ensureFramebuffer):
3796         * platform/graphics/chromium/LayerRendererChromium.h:
3797         (WebCore):
3798         (LayerRendererChromiumClient):
3799         (LayerRendererChromium):
3800         (WebCore::LayerRendererChromium::isFramebufferDiscarded):
3801         (ScopedEnsureFramebufferAllocation):
3802         (WebCore::ScopedEnsureFramebufferAllocation::ScopedEnsureFramebufferAllocation):
3803         (WebCore::ScopedEnsureFramebufferAllocation::~ScopedEnsureFramebufferAllocation):
3804         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3805         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
3806         (LayerRendererCapabilities):
3807         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3808         (WebCore::CCLayerTreeHostImpl::setVisible):
3809         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3810         (CCLayerTreeHostImpl):
3811         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3812         (WebCore::CCSingleThreadProxy::compositeAndReadback):
3813         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3814         (WebCore::CCThreadProxy::compositeAndReadback):
3815
3816 2012-03-22  Adam Barth  <abarth@webkit.org>
3817
3818         ContainerNode::insertedIntoTree and removedFromTree use weak iteration patterns
3819         https://bugs.webkit.org/show_bug.cgi?id=80570
3820
3821         Reviewed by Ryosuke Niwa.
3822
3823         These functions use weak iteration patterns, but as far as I can tell,
3824         we never execute script below these functions.  This patch adds ASSERTs
3825         to help us avoid adding events in the future.
3826
3827         * dom/ContainerNode.cpp:
3828         (WebCore::ContainerNode::insertedIntoTree):
3829         (WebCore::ContainerNode::removedFromTree):
3830         * html/HTMLMediaElement.cpp:
3831         (WebCore::HTMLMediaElement::loadInternal):
3832             - There's a somewhat complex call chain from insertedIntoTree into
3833               HTMLMediaElement, and somewhat complex control flow below
3834               loadInternal that eventually leads to the BeforeLoad event being
3835               fired.  In studying this code, I don't see a way for the
3836               BeforeLoad event to be fired during insertedIntoTree, but I've
3837               added this assert here to make sure we don't call loadInternal
3838               when we're not supposed to dispatch events.  This ASSERT should
3839               help us catch these BeforeLoad errors more quickly.
3840
3841 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
3842
3843         Crash in fast/dom/navigator-detached-nocrash.html
3844         https://bugs.webkit.org/show_bug.cgi?id=81773
3845
3846         Reviewed by Adam Barth.
3847
3848         BatteryManager::create() blindly assumes the Navigator* it
3849         receives has a valid Frame, which is not always the case, as made
3850         evident by the crashing test.
3851
3852         Follow abarth's suggestion and just stop
3853         NavigatorBattery::webkitBattery() before it reaches the call to
3854         BatteryManager::create() if that's the case.
3855
3856         No new tests, covered by fast/dom/navigator-detached-nocrash.html.
3857
3858         * Modules/battery/NavigatorBattery.cpp:
3859         (WebCore::NavigatorBattery::webkitBattery):
3860
3861 2012-03-22  Emil A Eklund  <eae@chromium.org>
3862
3863         Unreviewed, add missing include statement for CSSValueList.h.
3864
3865         * css/CSSStyleSelector.h:
3866
3867 2012-03-22  Tony Chang  <tony@chromium.org>
3868
3869         flexbox flexing implementation should match the spec
3870         https://bugs.webkit.org/show_bug.cgi?id=70796
3871
3872         Reviewed by Ojan Vafai.
3873
3874         Match the algorithm in the spec. Handling min/max constraints are slightly improved.
3875         http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
3876
3877         New test cases in css3/flexbox/flex-algorithm-min-max.html.
3878
3879         * rendering/RenderFlexibleBox.cpp:
3880         (WebCore::adjustFlexSizeForMinAndMax): Step 5 of resolving flexible lengths.
3881         (WebCore):
3882         (WebCore::RenderFlexibleBox::Violation::Violation):
3883         (RenderFlexibleBox::Violation):
3884         (WebCore::RenderFlexibleBox::freezeViolations): Used by step 6.
3885         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3886         * rendering/RenderFlexibleBox.h:
3887
3888 2012-03-22  Emil A Eklund  <eae@chromium.org>
3889
3890         Unreviewed, add missing import.
3891
3892         * rendering/RenderThemeMac.mm:
3893
3894 2012-03-22  Anders Carlsson  <andersca@apple.com>
3895
3896         ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/
3897         https://bugs.webkit.org/show_bug.cgi?id=81953
3898         <rdar://problem/11086998>
3899
3900         Reviewed by Sam Weinig.
3901
3902         If a page ends up creating CATiledLayers, CA transactions can be committed outside of the normal
3903         CA run loop observer, so we can't call setNeedsDisplay on tile cache layers directly because then
3904         we'll end up calling into painting code before all the layers have been flushed.
3905
3906         Fix this by adding a list of dirty rects to platformCALayerDidCreateTiles and change GraphicsLayerCA to
3907         mark them as dirty. This ensures that any CA transaction commits won't cause newly added layers to be painted.
3908
3909         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3910         (WebCore::LayerClient::platformCALayerDidCreateTiles):
3911         * platform/graphics/ca/GraphicsLayerCA.cpp:
3912         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
3913         * platform/graphics/ca/GraphicsLayerCA.h:
3914         (GraphicsLayerCA):
3915         * platform/graphics/ca/PlatformCALayerClient.h:
3916         (PlatformCALayerClient):
3917         * platform/graphics/ca/mac/TileCache.mm:
3918         (WebCore::TileCache::setScale):
3919         (WebCore::TileCache::revalidateTiles):
3920         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
3921         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles):
3922
3923 2012-03-19  Robert Hogan  <robert@webkit.org>
3924
3925         Text should overflow when list item height set to 0
3926         https://bugs.webkit.org/show_bug.cgi?id=78726
3927
3928         Reviewed by Julien Chaffraix.
3929
3930         Tests: css2.1/20110323/height-applies-to-010a-expected.html
3931                fast/css/heightless-list-item-expected.html
3932                fast/css/heightless-list-item.html
3933
3934         * rendering/RenderListItem.cpp:
3935         (WebCore::RenderListItem::paint):
3936            If the list item has height:0, only paint it if the list item allows any block or inline content 
3937            to overflow unclipped. The zero-height check is a shortcut to avoid unnecessary painting and 
3938            this seems to be the only case where there's something to do.
3939
3940 2012-03-22  Dave Michael  <dmichael@chromium.org>
3941
3942         HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
3943         https://bugs.webkit.org/show_bug.cgi?id=80428
3944
3945         Reviewed by Eric Seidel.
3946
3947         Make HTMLPluginElement release its m_NPObject in detach() to break a
3948         reference-counting cycle that happens on reload or navigation. With this
3949         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
3950         was removed. Note that Releasing m_NPObject does not result in a call to
3951         the plugin; it simply releases a reference count on the wrapper object
3952         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
3953         when the render tree is destroyed, when PluginView calls
3954         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
3955         detach, because it can not result in layout or style changes.
3956
3957         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
3958         window.internals to enable testing.
3959
3960         Test: plugins/netscape-dom-access-and-reload.html
3961
3962         * WebCore.exp.in:
3963         * html/HTMLPlugInElement.cpp:
3964         (WebCore::HTMLPlugInElement::detach):
3965         * html/HTMLPlugInElement.h:
3966         (HTMLPlugInElement):
3967         * testing/Internals.cpp:
3968         (WebCore::Internals::numberOfLiveDocuments):
3969         (WebCore::Internals::numberOfLiveNodes):
3970         (WebCore):
3971         * testing/Internals.h:
3972         (Internals):
3973         * testing/Internals.idl:
3974
3975 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
3976
3977         [chromium] Make CCDamageTracker robust to empty layer lists
3978         https://bugs.webkit.org/show_bug.cgi?id=81831
3979
3980         Reviewed by Adrienne Walker.
3981
3982         Added a unit test in CCDamageTrackerTest that causes a crash in
3983         the old code. With this patch applied, the crash will not occur.
3984         In theory, that crash should never occur anyway, unless there is a
3985         bug outside the damage tracker, but for robustness it's
3986         appropriate to handle it properly.
3987
3988         In addition to this fix, performed some trivial maintenance on the
3989         damage tracker code.
3990
3991         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
3992         (WebCore::CCDamageTracker::updateDamageTrackingState): removed
3993         unclean code that accessed the targetSurface to get necessary
3994         information. Instead, we now pass those args through the damage
3995         tracker's API.
3996
3997         * platform/graphics/chromium/cc/CCDamageTracker.h:
3998         (CCDamageTracker): modified args passed to damage tracker on update.
3999
4000         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
4001         (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):
4002         modified args passed to damage tracker on update.
4003
4004 2012-03-22  Julien Chaffraix  <jchaffraix@webkit.org>
4005
4006         Enable style sharing for elements with a style attribute
4007         https://bugs.webkit.org/show_bug.cgi?id=81523
4008
4009         Reviewed by Antti Koivisto.
4010
4011         Memory improvement change only.
4012
4013         Overall, this is a performance wash (some benchmarks may regress a bit due to the increase in time taken
4014         by CSSStyleSelector::locateSharedStyle as we try more nodes, others increase their performance due to style sharing).
4015
4016         Instrumenting our style sharing, this should give us some nice memory shavings on some benchmarks:
4017         - HTML5 isn't impacted as it doesn't use much inline style
4018         - page cyclers' intl1 showed a 6% increase in style sharing.
4019
4020         * css/CSSStyleSelector.cpp:
4021         (WebCore::CSSStyleSelector::canShareStyleWithElement):
4022         This method now handles inline style like presentation attributes on the element.
4023
4024         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
4025         (WebCore::CSSStyleSelector::locateSharedStyle):
4026         Don't bail out for an element with an inline style declaration.
4027
4028         (WebCore::CSSStyleSelector::stylesEqual):
4029         Generalized attributeStylesEqual to share the logic between attribute and
4030         inline style property set. This means that attribute checks are actually
4031         doing a little extra more work but that didn't impact our benchmarks.
4032
4033 2012-03-22  Kevin Ollivier  <kevino@theolliviers.com>
4034
4035         [wx] Unreviewed. WebDOM build fix after array type changes.
4036
4037         * bindings/scripts/CodeGeneratorCPP.pm:
4038         (ShouldSkipType):
4039
4040 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
4041
4042         Web Inspector: text gutter decorations should move upon edits.
4043         https://bugs.webkit.org/show_bug.cgi?id=81932
4044
4045         Reviewed by Vsevolod Vlasov.
4046
4047         Decorations set by the line number now shift as editing inserts / removes lines.
4048
4049         * inspector/front-end/TextViewer.js:
4050         (WebInspector.TextViewer.prototype._syncLineHeight):
4051         (WebInspector.TextEditorGutterPanel):
4052         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
4053         (WebInspector.TextEditorGutterPanel.prototype.syncClientHeight):
4054         (WebInspector.TextEditorGutterPanel.prototype.addDecoration):
4055         (WebInspector.TextEditorGutterPanel.prototype.removeDecoration):
4056
4057 2012-03-21  Robert Hogan  <robert@webkit.org>
4058
4059         CSS 2.1 failure: fixed-table-layout-006 fails
4060         https://bugs.webkit.org/show_bug.cgi?id=78412
4061
4062         Reviewed by Julien Chaffraix.
4063