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