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