2011-05-24 Yuta Kitamura <yutak@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-05-24  Yuta Kitamura  <yutak@chromium.org>
2
3         Reviewed by Kent Tamura.
4
5         WebSocket: Add fail() to WebSocketChannel and its family
6         https://bugs.webkit.org/show_bug.cgi?id=61277
7
8         This is the first part of refactoring effort described in bug 61115.
9         Existing error reports will be modified to use fail() in a later patch.
10
11         No change in behavior, thus no new tests.
12
13         * websockets/ThreadableWebSocketChannel.h:
14         * websockets/WebSocketChannel.cpp:
15         (WebCore::WebSocketChannel::fail):
16         * websockets/WebSocketChannel.h:
17         * websockets/WorkerThreadableWebSocketChannel.cpp:
18         (WebCore::WorkerThreadableWebSocketChannel::fail):
19         (WebCore::WorkerThreadableWebSocketChannel::Peer::fail):
20         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail):
21         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
22         * websockets/WorkerThreadableWebSocketChannel.h:
23
24 2011-05-24  Andras Becsi  <abecsi@webkit.org>
25
26         Reviewed by Csaba Osztrogonác.
27
28         [Qt][V8] REGRESSION (r87063): Fix the build.
29         https://bugs.webkit.org/show_bug.cgi?id=61290
30
31         No new tests needed.
32
33         * bindings/scripts/CodeGeneratorV8.pm: disable the unsupported call
34         tracked in: https://bugs.webkit.org/show_bug.cgi?id=61291
35
36 2011-05-24  Naoki Takano  <takano.naoki@gmail.com>
37
38         Reviewed by Kent Tamura.
39
40         [Chromium]Add clipping for listBox in popup window to fix wrong location display when the autofill item is really long.
41         https://bugs.webkit.org/show_bug.cgi?id=61252
42         http://code.google.com/p/chromium/issues/detail?id=83539
43
44         Manual test: manual-tests/autofill-popup-location.html.
45
46         * manual-tests/autofill-popup-location.html: With long long text, test the shown location is correct.
47         * platform/chromium/PopupMenuChromium.cpp:
48         (WebCore::PopupListBox::setBaseWidth): Clip width with m_maxWindowWidth.
49         (WebCore::PopupListBox::PopupListBox): Add m_maxWindowWidth initialization.
50         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Call setMaxWidthAndLayout() when the width is clipped with screen size.
51         (WebCore::PopupListBox::setMaxWidthAndLayout): Set m_maxWindowWidth and call layout().
52         (WebCore::PopupListBox::layout): Compare renewed windowWidth and m_maxWindowWidth, and clip the it.
53
54 2011-05-24  James Robinson  <jamesr@chromium.org>
55
56         Reviewed by Kenneth Russell.
57
58         [chromium] Properly handle huge initial dimensions for 2d canvas when accelerated 2d canvas is enabled
59         https://bugs.webkit.org/show_bug.cgi?id=60077
60
61         Return NULL from DrawingBuffer::create() if the initial dimensions are larger than we can support in hardware so
62         that we properly use the software canvas path and not enable the compositor for the canvas.
63
64         compositing/tiling/huge-layer-img.html triggers this case by trying to create a 20000 pixel high canvas.  The
65         failure was previously masked by other bugs fixed by r85661.
66
67         * platform/graphics/chromium/DrawingBufferChromium.cpp:
68         (WebCore::DrawingBuffer::DrawingBuffer):
69             Return NULL from DrawingBuffer::create() if resize() fails.
70
71 2011-05-24  Fumitoshi Ukai  <ukai@chromium.org>
72
73         Reviewed by Adam Barth.
74
75         close before open WebSocket doesn't fire close event.
76         https://bugs.webkit.org/show_bug.cgi?id=57301
77
78         In platformClose(), m_readStream may be 0 until proxy is resolved.
79         It should callback didClose() in such case.
80         
81         Test: http/tests/websocket/tests/close-before-open.html
82
83         * platform/network/cf/SocketStreamHandleCFNet.cpp:
84         (WebCore::SocketStreamHandle::platformClose):
85
86 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
87
88         Unreviewed, rolling out r87118.
89         http://trac.webkit.org/changeset/87118
90         https://bugs.webkit.org/show_bug.cgi?id=61347
91
92         patch breaks layout tests
93         (https://bugs.webkit.org/show_bug.cgi?id=61342), and chromium
94         tests (browser_test MacTestCmdUp and ui_test Scrollbar)
95         (Requested by ukai_ on #webkit).
96
97         * WebCore.gyp/WebCore.gyp:
98         * WebCore.gypi:
99         * platform/ScrollAnimator.cpp:
100         * platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
101         * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
102         * platform/graphics/IntPoint.h:
103
104 2011-05-23  Julien Chaffraix  <jchaffraix@codeaurora.org>
105
106         Reviewed by Adam Barth.
107
108         Remove Node::deprecatedParserAddChild
109         https://bugs.webkit.org/show_bug.cgi?id=60818
110
111         No new tests as this is just a removal.
112
113         * dom/ContainerNode.cpp:
114         * dom/ContainerNode.h:
115         * dom/Node.cpp:
116         * dom/Node.h:
117         Removed the method now that the last instance got removed as part of the <input>
118         shadow DOM refactoring.
119
120 2011-05-23  Dirk Schulze  <krit@webkit.org>
121
122         Reviewed by Darin Adler.
123
124         SVGTextPositioning attributes are marked as NumberList instead of LengthList
125         https://bugs.webkit.org/show_bug.cgi?id=61301
126
127         SVGTextPositioningElement attributes x, y, dx and dy were marked as AnimatedNumberList
128         instead of AnimatedLengthList.
129         See specification http://www.w3.org/TR/SVG/text.html#InterfaceSVGTextPositioningElement
130
131         This does not affect the behavior, since we do not respect SVG units in SMIL animation yet.
132         No new tests added.
133
134         * svg/SVGTextPositioningElement.cpp:
135         (WebCore::SVGTextPositioningElement::fillPassedAttributeToPropertyTypeMap):
136
137 2011-05-19  MORITA Hajime  <morrita@google.com>
138
139         Reviewed by Dimitri Glazkov.
140
141         [Refactoring] Pass NodeRenderingContext to Node::rendererIsNeeded()
142         https://bugs.webkit.org/show_bug.cgi?id=61114
143
144         - Extracted NodeRenderingContext from NodeRendererFactory, giving separate files to it.
145         - Changed signature rendererIsNeeded(RenderStyle*) 
146           to rendererIsNeeded(const NodeRenderingContext&).
147           The style object is retrieved from NodeRendererFactory::style()
148           This will allow rendererIsNeeded() to access contextual
149           information like attaching phase and rendering-parent.
150         
151         No new tests. No behaviour change.
152         
153         * CMakeLists.txt:
154         * GNUmakefile.list.am:
155         * WebCore.gypi:
156         * WebCore.pro:
157         * WebCore.vcproj/WebCore.vcproj:
158         * WebCore.xcodeproj/project.pbxproj:
159         * dom/CharacterData.cpp:
160         (WebCore::CharacterData::updateRenderer): Pass unresolved NodeRenderingContext& to rendererIsNeeded()
161         (WebCore::CharacterData::rendererIsNeeded):
162         * dom/CharacterData.h:
163         * dom/DOMAllInOne.cpp:
164         * dom/EditingText.cpp:
165         (WebCore::EditingText::rendererIsNeeded):
166         * dom/EditingText.h:
167         * dom/Node.cpp:
168         (WebCore::Node::parentNodeForRenderingAndStyle):
169         (WebCore::Node::rendererIsNeeded):
170         * dom/Node.h:
171         * dom/NodeRenderingContext.cpp: Added.
172         (WebCore::NodeRenderingContext::NodeRenderingContext):
173         (WebCore::NodeRenderingContext::~NodeRenderingContext):
174         (WebCore::NodeRenderingContext::setStyle):
175         (WebCore::NodeRenderingContext::releaseStyle):
176         (WebCore::NodeRenderingContext::nextRenderer):
177         (WebCore::NodeRenderingContext::parentRenderer):
178         (WebCore::NodeRenderingContext::hostChildrenChanged):
179         (WebCore::NodeRenderingContext::shouldCreateRenderer):
180         (WebCore::NodeRendererFactory::NodeRendererFactory):
181         (WebCore::NodeRendererFactory::createRendererAndStyle):
182         (WebCore::wrapWithRenderFullScreen):
183         (WebCore::NodeRendererFactory::createRendererIfNeeded):
184         * dom/NodeRenderingContext.h: Added.
185         (WebCore::NodeRenderingContext::node):
186         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
187         (WebCore::NodeRenderingContext::style):
188         (WebCore::NodeRendererFactory::context):
189         * dom/ShadowContentElement.h:
190         * dom/Text.cpp:
191         * dom/Text.h:
192         * html/HTMLAppletElement.cpp:
193         * html/HTMLAppletElement.h:
194         * html/HTMLElement.cpp:
195         * html/HTMLElement.h:
196         * html/HTMLEmbedElement.cpp:
197         * html/HTMLEmbedElement.h:
198         * html/HTMLFormElement.cpp:
199         * html/HTMLFormElement.h:
200         * html/HTMLFrameElement.cpp:
201         * html/HTMLFrameElement.h:
202         * html/HTMLFrameSetElement.cpp:
203         * html/HTMLFrameSetElement.h:
204         * html/HTMLIFrameElement.cpp:
205         * html/HTMLIFrameElement.h:
206         * html/HTMLInputElement.cpp:
207         * html/HTMLInputElement.h:
208         * html/HTMLMediaElement.cpp:
209         * html/HTMLMediaElement.h:
210         * html/HTMLNoScriptElement.h:
211         * html/HTMLObjectElement.cpp:
212         * html/HTMLObjectElement.h:
213         * html/HTMLOptGroupElement.h:
214         * html/HTMLOptionElement.h:
215         * html/HTMLVideoElement.cpp:
216         * html/HTMLVideoElement.h:
217         * html/shadow/DetailsMarkerControl.cpp:
218         * html/shadow/DetailsMarkerControl.h:
219         * html/shadow/MeterShadowElement.cpp:
220         * html/shadow/MeterShadowElement.h:
221         * html/shadow/ProgressShadowElement.cpp:
222         * html/shadow/ProgressShadowElement.h:
223         * svg/SVGDescElement.h:
224         * svg/SVGElement.h:
225         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
226         * svg/SVGFilterPrimitiveStandardAttributes.h:
227         * svg/SVGFontElement.h:
228         * svg/SVGGElement.cpp:
229         * svg/SVGGElement.h:
230         * svg/SVGGlyphElement.h:
231         * svg/SVGHKernElement.h:
232         * svg/SVGMarkerElement.h:
233         * svg/SVGMissingGlyphElement.h:
234         * svg/SVGSVGElement.h:
235         * svg/SVGStyledElement.cpp:
236         * svg/SVGStyledElement.h:
237         * svg/SVGSymbolElement.h:
238         * svg/SVGTRefElement.cpp:
239         * svg/SVGTRefElement.h:
240         * svg/SVGTSpanElement.cpp:
241         * svg/SVGTSpanElement.h:
242         * svg/SVGTextPathElement.cpp:
243         * svg/SVGTextPathElement.h:
244         * svg/SVGTitleElement.h:
245         * svg/SVGVKernElement.h:
246         * svg/SVGViewElement.h:
247
248 2011-05-20  MORITA Hajime  <morrita@google.com>
249
250         Reviewed by Dimitri Glazkov.
251         
252         [Refactoring] attach() following detach() should be replaced with Node::reattach()
253         https://bugs.webkit.org/show_bug.cgi?id=61011
254
255         - Renamed forceReattach() to reattach()
256         - Introduced reattachIfAttached() as a variant.
257         
258         No new tests. No behavior change.
259
260         * dom/CharacterData.cpp:
261         (WebCore::CharacterData::updateRenderer):
262         * dom/Element.cpp:
263         (WebCore::Element::recalcStyle):
264         * dom/Node.h:
265         (WebCore::Node::reattach):
266         (WebCore::Node::reattachIfAttached):
267         * dom/Text.cpp:
268         (WebCore::Text::recalcStyle):
269         * html/HTMLDetailsElement.cpp:
270         (WebCore::HTMLDetailsElement::refreshMainSummary):
271         (WebCore::HTMLDetailsElement::parseMappedAttribute):
272         * html/HTMLInputElement.cpp:
273         (WebCore::HTMLInputElement::parseMappedAttribute):
274         * html/HTMLObjectElement.cpp:
275         (WebCore::HTMLObjectElement::renderFallbackContent):
276         * html/HTMLPlugInImageElement.cpp:
277         (WebCore::HTMLPlugInImageElement::recalcStyle):
278         * html/HTMLSelectElement.cpp:
279         (WebCore::HTMLSelectElement::parseMappedAttribute):
280
281 2011-05-23  Mark Rowe  <mrowe@apple.com>
282
283         Build fix after r87117.
284
285         When moving #defines out in to separate files I find that code is more likely to compile
286         when the new header file is actually #included.
287
288         * editing/SpellingCorrectionController.h:
289
290 2011-05-23  Mike Lawther  <mikelawther@chromium.org>
291
292         Reviewed by James Robinson.
293
294         implement image-rendering: optimize-contrast (with a vendor prefix) as defined in CSS3 image values
295         https://bugs.webkit.org/show_bug.cgi?id=56627
296
297         Tests: css3/images/optimize-contrast-canvas.html
298                css3/images/optimize-contrast-image.html
299
300         * WebCore.xcodeproj/project.pbxproj:
301         * css/CSSComputedStyleDeclaration.cpp:
302         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
303         * css/CSSParser.cpp:
304         (WebCore::CSSParser::parseValue):
305         * css/CSSPrimitiveValueMappings.h:
306         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
307         (WebCore::CSSPrimitiveValue::operator EImageRendering):
308         * css/CSSPropertyNames.in:
309         * css/CSSStyleSelector.cpp:
310         (WebCore::CSSStyleSelector::applyProperty):
311         * css/CSSValueKeywords.in:
312         * css/SVGCSSComputedStyleDeclaration.cpp:
313         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
314         * css/SVGCSSPropertyNames.in:
315         * css/SVGCSSStyleSelector.cpp:
316         (WebCore::CSSStyleSelector::applySVGProperty):
317         * css/SVGCSSValueKeywords.in:
318         * html/HTMLCanvasElement.cpp:
319         (WebCore::HTMLCanvasElement::paint):
320         * html/HTMLCanvasElement.h:
321         * platform/graphics/ImageRenderingMode.h: Added.
322         * rendering/RenderBoxModelObject.cpp:
323         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
324         * rendering/RenderHTMLCanvas.cpp:
325         (WebCore::RenderHTMLCanvas::paintReplaced):
326         * rendering/style/RenderStyle.cpp:
327         (WebCore::RenderStyle::diff):
328         * rendering/style/RenderStyle.h:
329         (WebCore::InheritedFlags::imageRendering):
330         (WebCore::InheritedFlags::setImageRendering):
331         (WebCore::InheritedFlags::initialImageRendering):
332         * rendering/style/RenderStyleConstants.h:
333         * rendering/style/SVGRenderStyle.cpp:
334         (WebCore::SVGRenderStyle::diff):
335         * rendering/style/SVGRenderStyle.h:
336         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
337         (WebCore::SVGRenderStyle::setBitDefaults):
338         * rendering/style/SVGRenderStyleDefs.h:
339         * rendering/svg/SVGRenderTreeAsText.cpp:
340         (WebCore::writeStyle):
341
342 2011-05-23  Sailesh Agrawal  <sail@chromium.org>
343
344         Reviewed by James Robinson.
345
346         Chromium Mac: Use ScrollAnimatorMac.mm for overlay scrollbar support
347         https://bugs.webkit.org/show_bug.cgi?id=59753
348
349         No new tests. Just forking ScrollAnimatorMac to ScrollAnimatorChromiumMac.
350
351         * WebCore.gyp/WebCore.gyp:
352         * WebCore.gypi:
353         * platform/ScrollAnimator.cpp:
354         * platform/chromium/ScrollAnimatorChromiumMac.h: Added.
355         (WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer):
356         (WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer):
357         (WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad):
358         * platform/chromium/ScrollAnimatorChromiumMac.mm: Added. Forked from ScrollAnimatorMac and replaced all instances of ScrollAnimatorMac with ScrollAnimatorChromiumMac and ScrollbarThemeMac with ScrollbarThemeChromiumMac. Removed the ENABLE(SMOOTH_SCROLLING) around the file.
359         (abs):
360         (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
361         (-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]):
362         (-[ScrollAnimationHelperDelegate bounds]):
363         (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
364         (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
365         (-[ScrollAnimationHelperDelegate convertSizeToBase:]):
366         (-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
367         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
368         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
369         (-[ScrollAnimationHelperDelegate superview]):
370         (-[ScrollAnimationHelperDelegate documentView]):
371         (-[ScrollAnimationHelperDelegate window]):
372         (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
373         (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
374         (-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
375         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
376         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
377         (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
378         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
379         (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
380         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
381         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
382         (-[ScrollbarPartAnimation setCurrentProgress:]):
383         (-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
384         (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
385         (-[ScrollbarPainterDelegate cancelAnimations]):
386         (-[ScrollbarPainterDelegate convertRectToBacking:]):
387         (-[ScrollbarPainterDelegate convertRectFromBacking:]):
388         (-[ScrollbarPainterDelegate layer]):
389         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
390         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
391         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
392         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
393         (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
394         (WebCore::ScrollAnimator::create):
395         (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac):
396         (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac):
397         (WebCore::ScrollAnimatorChromiumMac::scroll):
398         (WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation):
399         (WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary):
400         (WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary):
401         (WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary):
402         (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
403         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
404         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
405         (WebCore::ScrollAnimatorChromiumMac::notityPositionChanged):
406         (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint):
407         (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea):
408         (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea):
409         (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea):
410         (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize):
411         (WebCore::ScrollAnimatorChromiumMac::contentsResized):
412         (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize):
413         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow):
414         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide):
415         (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture):
416         (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture):
417         (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
418         (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
419         (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
420         (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
421         (WebCore::ScrollAnimatorChromiumMac::cancelAnimations):
422         (WebCore::elasticDeltaForTimeDelta):
423         (WebCore::reboundDeltaForElasticDelta):
424         (WebCore::elasticDeltaForReboundDelta):
425         (WebCore::scrollWheelMultiplier):
426         (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent):
427         (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
428         (WebCore::ScrollAnimatorChromiumMac::pinnedInDirection):
429         (WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching):
430         (WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching):
431         (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent):
432         (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture):
433         (WebCore::ScrollAnimatorChromiumMac::endScrollGesture):
434         (WebCore::ScrollAnimatorChromiumMac::snapRubberBand):
435         (WebCore::roundTowardZero):
436         (WebCore::roundToDevicePixelTowardZero):
437         (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired):
438         (WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer):
439         (WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive):
440         (WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer):
441         (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
442         (WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect):
443         * platform/graphics/IntPoint.h:
444
445 2011-05-22  MORITA Hajime  <morrita@google.com>
446
447         Reviewed by Ryosuke Niwa.
448
449         SUPPORT_AUTOCORRECTION_PANEL should be USE(AUTOCORRECTION_PANEL)
450         https://bugs.webkit.org/show_bug.cgi?id=61181
451
452         - Removed SUPPORT_AUTOCORRECTION_PANEL and REMOVE_MARKERS_UPON_EDITING from SpellingCorrectionController.h
453         - Define WTF_USE_UNIFIED_TEXT_CHECKING and WTF_USE_AUTOMATIC_TEXT_REPLACEMENT at TextChecking.h
454
455         No new tests. Just renaming a compilation conditional.
456
457         * editing/Editor.cpp:
458         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
459         * editing/SpellingCorrectionCommand.cpp:
460         (WebCore::SpellingCorrectionCommand::doApply):
461         * editing/SpellingCorrectionController.cpp:
462         * editing/SpellingCorrectionController.h:
463         (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):
464         * loader/EmptyClients.h:
465         * page/EditorClient.h:
466         * platform/text/TextChecking.h:
467
468 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
469
470         Unreviewed, rolling out r87007.
471         http://trac.webkit.org/changeset/87007
472         https://bugs.webkit.org/show_bug.cgi?id=61329
473
474         patch unnecessarily breaks HTML5 compatibility (Requested by
475         estes on #webkit).
476
477         * html/HTMLObjectElement.cpp:
478         (WebCore::HTMLObjectElement::hasValidClassId):
479
480 2011-05-23  Julien Chaffraix  <jchaffraix@codeaurora.org>
481
482         Reviewed by Darin Adler.
483
484         Crash from null pointer dereference below WebCore::StorageAreaImpl::setItem()
485         https://bugs.webkit.org/show_bug.cgi?id=57140
486
487         Test: fast/storage/storage-detached-iframe.html
488
489         Access of localStorage on a detached iframe was causing a crash because a detached 
490         iframe has a null m_page, and WebCore::privateBrowsingEnabled() wasn't testing for such.
491
492         * storage/StorageAreaImpl.cpp:
493         (WebCore::privateBrowsingEnabled): check that child->page() is non-null before
494         accessing it.
495
496 2011-05-23  Chris Fleizach  <cfleizach@apple.com>
497
498         Reviewed by David Kilzer.
499
500         VO doesn't work with HTML5 range (slider) input @step attribute
501         https://bugs.webkit.org/show_bug.cgi?id=61298
502
503         Test: platform/mac/accessibility/range-alter-by-step.html
504
505         * accessibility/AccessibilityObject.h:
506         (WebCore::AccessibilityObject::stepValueForRange):
507         * accessibility/AccessibilityRenderObject.cpp:
508         (WebCore::AccessibilityRenderObject::alterSliderValue):
509         (WebCore::AccessibilityRenderObject::increment):
510         (WebCore::AccessibilityRenderObject::decrement):
511         (WebCore::AccessibilityRenderObject::stepValueForRange):
512         (WebCore::AccessibilityRenderObject::changeValueByStep):
513         * accessibility/AccessibilityRenderObject.h:
514
515 2011-05-23  Gavin Peters  <gavinp@chromium.org>
516
517         Reviewed by Adam Barth.
518
519         fix rel=prerender target types
520         https://bugs.webkit.org/show_bug.cgi?id=61297
521
522         The original fix in https://bugs.webkit.org/show_bug.cgi?id=61079
523         didn't properly map the target type, and didn't carry the target
524         types through to chromium properly.  Fixed.
525
526         No new tests; it's very hard to catch these with a layout test, however
527         all of the chromium Prerender browser tests will test this functionality
528         when I land an upcoming chromium CL.
529
530         * loader/cache/CachedResourceRequest.cpp:
531         (WebCore::cachedResourceTypeToTargetType):
532
533 2011-05-23  Matthew Delaney  <mdelaney@apple.com>
534
535         Reviewed by Simon Fraser.
536
537         Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
538         https://bugs.webkit.org/show_bug.cgi?id=58216
539
540         No new tests. The SVG tests mask-excessive-malloc.svg and pattern-excessive-malloc.svg exercise this code path.
541
542         * platform/graphics/FloatRect.cpp:
543         (WebCore::enclosingIntRect):
544
545 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
546
547         Reviewed by Darin Adler.
548
549         Video looks squished when animating to full screen.
550         https://bugs.webkit.org/show_bug.cgi?id=61220
551
552         No new tests, because DumpRenderTree does not currently "animate" the full-screen transition.
553
554         There are three issues animating video content to full screen which this patch is meant to
555         address:
556         1) The animation scales between the client sizes of the element before and after full-screen.
557         Because these sizes have different aspect ratios, the video appears "squished" for part of
558         the animation. Instead, we will animate between the content box sizes before and after full
559         screen which, in the case of video now and object-fit content in the future, will have the
560         same aspect ratio before and after full screen.
561         2) Now that we are animating the full-screen video element's content box, the black letterbox
562         bars appear above and below the video (depending on the video's aspect ratio) as soon as the
563         animation begins. This is extremely jarring, so set the background color to clear. The
564         full-screen renderer's background color will serve the same purpose (providing the letterbox
565         background) once the animation completes.
566         3) Now that the letterbox color is gone, the full screen controls can appear to float in thin
567         air beneath the video (again, depending on aspect ratio) during the animation, so to avoid
568         that effect and to make the animation consistent with the old webkitenterfullscreen()
569         animation, we will hide the controls during the animation by adding a new CSS pseudo class
570         -webkit-animating-full-screen-transition.
571
572         Added a new css pseudo-class: -webkit-animating-full-screen.  During the transition animation, this
573         pseudo-class will be applied to the current full-screen element.  Styles have been added to 
574         fullscreenQuickTime.css to hide the video element's built-in controller during the full-screen
575         animation.
576
577         To accomplish this, the ivar tracking whether the full-screen animation is taking place has been moved
578         from the RenderFullScreen renderer, to the current full-screen Document.  Because changing 
579         isAnimatingFullScreen causes style changes, make sure to call recalcStyle on the full-screen element
580         after changing.
581
582         This extra transition caused assertions in HTMLFormControlElement::updateFromElementCallback. A
583         full-screen media control's renderer is disabled during the style recalculation when exiting full
584         screen. This assertion was exposed by the extra recalcStyle() issued during the exit transition, and
585         has been removed.
586
587         * WebCore.exp.in:
588         * css/CSSSelector.cpp:
589         (WebCore::CSSSelector::pseudoId): Add support for new pseudo class -webkit-animate-full-screen-transition.
590         (WebCore::nameToPseudoTypeMap): Ditto.
591         (WebCore::CSSSelector::extractPseudoType): Ditto.
592         * css/CSSSelector.h:
593         * css/CSSStyleSelector.cpp:
594         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
595         * css/fullscreen.css: 
596         (video:-webkit-full-screen): Set full screen video background color to clear.
597         * css/fullscreenQuickTime.css: 
598         (video:-webkit-full-screen::-webkit-media-controls-panel): Set a default opacity transition.
599         (video:-webkit-animating-full-screen::-webkit-media-controls-panel): Set the opacity to 0 and 
600             disable the transition.
601         * dom/Document.cpp:
602         (WebCore::Document::Document):
603         (WebCore::Document::webkitWillEnterFullScreenForElement): Call our new setAnimatingFullScreen function.
604         (WebCore::Document::webkitDidEnterFullScreenForElement): Ditto.
605         (WebCore::Document::webkitWillExitFullScreenForElement): Ditto.
606         (WebCore::Document::webkitDidExitFullScreenForElement): Ditto.
607         (WebCore::Document::isAnimatingFullScreen): Moved here from RenderFullScreen.
608         (WebCore::Document::setAnimatingFullScreen): Ditto.
609         * dom/Document.h:
610         * html/HTMLFormControlElement.cpp: 
611         (WebCore::updateFromElementCallback): Use the Document's isAnimatingFullScreen function.
612         * page/FrameView.cpp:
613         (WebCore::isDocumentRunningFullScreenAnimation): Ditto.
614         * rendering/RenderFullScreen.cpp:
615         * rendering/RenderFullScreen.h:
616         * rendering/RenderLayerCompositor.cpp:
617         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto.
618         (WebCore::RenderLayerCompositor::requiresCompositingForFullScreen): Ditto.
619         * rendering/style/RenderStyleConstants.h:
620
621 2011-05-23  Emil A Eklund  <eae@chromium.org>
622
623         Reviewed by Eric Seidel.
624
625         Change RenderBlock hit testing to use IntPoint instead x,y pair
626         https://bugs.webkit.org/show_bug.cgi?id=61146
627
628         Covered by existing tests.
629
630         * platform/graphics/IntPoint.h:
631         (WebCore::toSize):
632         Add toSize function for converting from point to size.
633
634         * rendering/RenderBlock.cpp:
635         (WebCore::RenderBlock::isPointInOverflowControl):
636         (WebCore::RenderBlock::nodeAtPoint):
637         (WebCore::RenderBlock::hitTestFloats):
638         (WebCore::RenderBlock::hitTestColumns):
639         (WebCore::RenderBlock::hitTestContents):
640         * rendering/RenderBlock.h:
641         Change hit testing code in RenderBlock to use IntPoint.
642
643         * rendering/RenderListBox.cpp:
644         (WebCore::RenderListBox::isPointInOverflowControl):
645         * rendering/RenderListBox.h:
646         Change overridden method to use IntPoint.
647
648 2011-05-23  Mike Reed  <reed@google.com>
649
650         Reviewed by James Robinson.
651
652         Skia: Need to implement GraphicsContext::clipConvexPolygon()
653         https://bugs.webkit.org/show_bug.cgi?id=41311
654
655         No new tests. 
656
657         * platform/graphics/skia/GraphicsContextSkia.cpp:
658         (WebCore::setPathFromConvexPoints):
659         (WebCore::GraphicsContext::drawConvexPolygon):
660         (WebCore::GraphicsContext::clipConvexPolygon):
661
662 2011-05-23  James Simonsen  <simonjam@chromium.org>
663
664         Reviewed by Adam Barth.
665
666         Convert raw pointer to RefPtr.
667         https://bugs.webkit.org/show_bug.cgi?id=61196
668
669         * dom/XMLDocumentParserLibxml2.cpp:
670         (WebCore::XMLDocumentParser::endElementNs):
671         * dom/XMLDocumentParserQt.cpp:
672         (WebCore::XMLDocumentParser::parseEndElement):
673
674 2011-05-23  Ryosuke Niwa  <rniwa@webkit.org>
675
676         Reviewed by Alexey Proskuryakov.
677
678         selectstart is fired for every mouse move
679         https://bugs.webkit.org/show_bug.cgi?id=19489
680
681         Fixed the bug by dispatching selectstart event immediately before modifying selection in
682         handleMousePressEventSingleClick and updateSelectionForMouseDrag.
683
684         Also replaced a boolean EventHandler::m_beganSelectingText by an enum-valued m_selectionInitiationState
685         to retain 3 states:
686         1. HaveNotStartedSelection - Selection has not been set by a mouse drag or a mouse click
687         2. PlacedCaret - A caret was placed by a mouse click, double click, or triple click, and is about
688         to replace selection if a mouse drag never occurs.
689         3. ExtendedSelection - A range selection was set by a mouse click, a double click, a triple click,
690         or a mouse drag; otherwise a caret selection was set by a mouse drag.
691
692         State 1 corresponds to m_beganSelectingText being false and state 3 corresponds to m_beganSelectingText
693         being true. State 2 is used in updateSelectionForMouseDrag to avoid dispatching selectstart twice.
694
695         States 1 and 2 are set by updateSelectionForMouseDownDispatchingSelectStart and state 3 is set by
696         updateSelectionForMouseDrag.
697
698         Test: fast/events/selectstart-by-double-triple-clicks.html
699               fast/events/selectstart-by-drag.html
700               fast/events/selectstart-by-single-click-with-shift.html
701
702         * page/EventHandler.cpp: Removed canMouseDragExtendSelect.
703         (WebCore::EventHandler::EventHandler): Initializes m_selectionInitiationState.
704         (WebCore::dispatchSelectStart): Returns true only if selectstart was successfully fired
705         and default action was not prevented.
706         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): Updates m_selectionInitiationState
707         and modifies the selection if dispatchSelectStart returns true.
708         (WebCore::EventHandler::selectClosestWordFromMouseEvent): Calls updateSelectionForMouseDownDispatchingSelectStart.
709         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
710         (WebCore::EventHandler::handleMousePressEventDoubleClick):
711         (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
712         (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
713         (WebCore::canMouseDownStartSelect): No longer dispatches startselect; also renamed from
714         EventHandler::canMouseDownStartSelect.
715         (WebCore::EventHandler::handleMousePressEvent): No longer calls canMouseDragExtendSelect.
716         (WebCore::EventHandler::handleMouseDraggedEvent):
717         (WebCore::EventHandler::updateSelectionForMouseDrag): Exit early if m_selectionInitiationState is
718         HaveNotStartedSelection and dispatchSelectStart returns false. Since setSelectionIfPossible dispatches
719         selectstart event before assigning PlacedCaret or ExtendedSelection to m_selectionInitiationState,
720         there is no need to dispatch event for those two cases.
721         (WebCore::EventHandler::handleMouseReleaseEvent):
722         * page/EventHandler.h: Removed canMouseDownStartSelect and canMouseDragExtendSelect from EventHandler
723         and added setSelectionIfPossible.
724
725 2011-05-23  Adam Klein  <adamk@chromium.org>
726
727         Reviewed by Jian Li.
728
729         [fileapi] Add a File::createWithName method to avoid obfuscated filename leakage from FileEntry.file() method
730         https://bugs.webkit.org/show_bug.cgi?id=61155
731
732         Covered by existing tests: fast/filesystem/file-from-file-entry.html
733                                    fast/filesystem/workers/file-from-file-entry.html
734                                    fast/filesystem/workers/file-from-file-entry-sync.html
735
736         * fileapi/DOMFileSystem.cpp:
737         (WebCore::DOMFileSystem::createFile): Updated to call createWithName().
738         * fileapi/DOMFileSystemSync.cpp:
739         (WebCore::DOMFileSystemSync::createFile): Updated to call createWithName().
740         * fileapi/File.cpp:
741         (WebCore::createBlobDataForFile): Added an optional name argument to fix MIME type lookup.
742         (WebCore::File::createWithRelativePath): Renamed from create() for consistency with new method.
743         (WebCore::File::File):
744         * fileapi/File.h:
745         (WebCore::File::createWithName):
746         * html/FileInputType.cpp:
747         (WebCore::FileInputType::setFileList): Updated the single caller of File::createWithRelativePath().
748
749 2011-05-23  Adrienne Walker  <enne@google.com>
750
751         Reviewed by James Robinson.
752
753         [chromium] Fix division by zero in TilingData for boundary case texture sizes
754         https://bugs.webkit.org/show_bug.cgi?id=61164
755
756         * platform/graphics/gpu/TilingData.cpp:
757         (WebCore::TilingData::tileXIndexFromSrcCoord):
758         (WebCore::TilingData::tileYIndexFromSrcCoord):
759
760 2011-05-23  Adam Barth  <abarth@webkit.org>
761
762         Reviewed by Eric Seidel.
763
764         Update ImageDecoder::create to match sniffing spec
765         https://bugs.webkit.org/show_bug.cgi?id=47683
766
767         This change is difficult to test.  We're making this change to comply
768         with standards even if the change is difficult to observe.  (This patch
769         also causes us to match Firefox.)
770
771         Test: fast/images/busted-oval-does-not-render.html
772
773         * platform/image-decoders/ImageDecoder.cpp:
774
775 2011-05-23  Ruben  <chromium@hybridsource.org>
776
777         Reviewed by Tony Chang.
778
779         Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
780         https://bugs.webkit.org/show_bug.cgi?id=61219
781
782         No new tests, just changing gyp defines.
783
784         * WebCore.gyp/WebCore.gyp:
785
786 2011-05-23  Abhishek Arya  <inferno@chromium.org>
787
788         Reviewed by Simon Fraser.
789
790         Terminate css color parsing on integers which are not followed
791         by a terminator.
792         https://bugs.webkit.org/show_bug.cgi?id=61293
793
794         Test: fast/css/parse-color-int-or-percent-crash.html
795
796         * css/CSSParser.cpp:
797         (WebCore::parseColorIntOrPercentage):
798
799 2011-05-20  Ryosuke Niwa  <rniwa@webkit.org>
800
801         Reviewed by Enrica Casucci.
802
803         REGRESSION(r84311): WebKit copies too much styles when copying
804         https://bugs.webkit.org/show_bug.cgi?id=60914
805
806         The bug was caused by WebKit's cloning node hierarchy up until the node that has background color.
807         Fixed the bug by not cloning background color and adding the effective background color to the wrapping
808         style span.
809
810         Tests: editing/pasteboard/do-no-clone-unnecessary-styles-2.html
811                editing/pasteboard/do-no-clone-unnecessary-styles.html
812
813         * editing/EditingStyle.cpp:
814         (WebCore::cssValueToRGBA): Extracted from getRGBAFontColor.
815         (WebCore::getRGBAFontColor): Moved.
816         (WebCore::rgbaBackgroundColorInEffect): Added.
817         (WebCore::EditingStyle::init): Added support for InheritablePropertiesAndBackgroundColorInEffect.
818         (WebCore::EditingStyle::prepareToApplyAt): Include the effective background color at the given position.
819         Also remove the background color property when the effective background color is equal to the background
820         color property (in terms of RGBA value) of the editing style.
821         (WebCore::hasTransparentBackgroundColor): Moved from Editor class.
822         (WebCore::backgroundColorInEffect): Extracted from Editor::selectionStartCSSPropertyValue.
823         * editing/EditingStyle.h: Added prototypes for hasTransparentBackgroundColor and backgroundColorInEffect.
824         * editing/Editor.cpp:
825         (WebCore::Editor::selectionStartCSSPropertyValue): Calls backgroundColorInEffect.
826         * editing/Editor.h: Removed hasTransparentBackgroundColor.
827         * editing/markup.cpp:
828         (WebCore::isElementPresentational): Reverted r85090 and r84311.
829         (WebCore::createMarkup): Include the background color in effect when computing the editing style.
830
831 2011-05-23  Roland Steiner  <rolandsteiner@chromium.org>
832
833         Reviewed by Dimitri Glazkov.
834
835         Update node list cache count on the containing TreeScope rather than the Document
836         https://bugs.webkit.org/show_bug.cgi?id=59983
837
838         Change code to call add/removeNodeListCache() and hasNodeListCaches() on the proper tree scope.
839         Move updating of the node list cache count from setDocument() to setTreeScopeRecursively().
840         Make setDocument() and setDocumentRecursively() private.
841
842         No new tests. (refactoring)
843
844         * dom/ContainerNode.cpp:
845         (WebCore::ContainerNode::childrenChanged):
846         * dom/Node.cpp:
847         (WebCore::Node::~Node):
848         (WebCore::Node::setDocument):
849         (WebCore::Node::setTreeScopeRecursively):
850         (WebCore::Node::childNodes):
851         (WebCore::Node::registerDynamicNodeList):
852         (WebCore::Node::unregisterDynamicNodeList):
853         (WebCore::Node::notifyLocalNodeListsAttributeChanged):
854         (WebCore::Node::notifyLocalNodeListsChildrenChanged):
855         (WebCore::Node::getElementsByTagName):
856         (WebCore::Node::getElementsByTagNameNS):
857         (WebCore::Node::getElementsByName):
858         (WebCore::Node::getElementsByClassName):
859         * dom/Node.h:
860         * html/HTMLFormControlElement.cpp:
861         (WebCore::HTMLFormControlElement::labels):
862
863 2011-05-23  Yury Semikhatsky  <yurys@chromium.org>
864
865         Reviewed by Pavel Feldman.
866
867         [Chromium] Web Inspector: provide initial implementation of worker inspector transport
868         https://bugs.webkit.org/show_bug.cgi?id=60267
869
870         All methods of WorkerContextInspectorProxy are inlined in WorkerContextProxy and
871         the class itself is removed. Messages from worker inspector to page inspector
872         are sent by means of WorkerReportingProxy.
873
874         * GNUmakefile.list.am:
875         * WebCore.gypi:
876         * WebCore.vcproj/WebCore.vcproj:
877         * WebCore.xcodeproj/project.pbxproj:
878         * inspector/InspectorWorkerAgent.cpp:
879         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
880         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::proxy):
881         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::dispatchMessageFromWorker):
882         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
883         (WebCore::InspectorWorkerAgent::didStartWorkerContext):
884         * inspector/InspectorWorkerAgent.h:
885         * inspector/WorkerInspectorController.cpp:
886         (WebCore::WorkerInspectorController::connectFrontend):
887         (WebCore::WorkerInspectorController::disconnectFrontend):
888         * inspector/WorkerInspectorController.h:
889         * workers/DefaultSharedWorkerRepository.cpp:
890         (WebCore::SharedWorkerProxy::postMessageToPageInspector):
891         * workers/WorkerContextInspectorProxy.h: Removed.
892         * workers/WorkerContextProxy.h:
893         (WebCore::WorkerContextProxy::PageInspector::~PageInspector):
894         (WebCore::WorkerContextProxy::connectToInspector):
895         (WebCore::WorkerContextProxy::disconnectFromInspector):
896         (WebCore::WorkerContextProxy::sendMessageToInspector):
897         * workers/WorkerMessagingProxy.cpp:
898         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
899         * workers/WorkerMessagingProxy.h:
900         * workers/WorkerReportingProxy.h:
901
902 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
903
904         Unreviewed, rolling out r87070.
905         http://trac.webkit.org/changeset/87070
906         https://bugs.webkit.org/show_bug.cgi?id=61285
907
908         broke resource-parameters.html on win, weird failures on wk2
909         (Requested by caseq on #webkit).
910
911         * inspector/front-end/HAREntry.js:
912         (WebInspector.HAREntry.prototype.build):
913         (WebInspector.HAREntry.prototype._buildRequest):
914         (WebInspector.HAREntry.prototype._buildResponse):
915         (WebInspector.HAREntry.prototype._buildContent):
916         (WebInspector.HAREntry.prototype._buildCookie):
917         (WebInspector.HAREntry.prototype._interval):
918         (WebInspector.HARLog.prototype.build):
919         * inspector/front-end/Resource.js:
920         (WebInspector.Resource.prototype.set requestHeaders):
921         (WebInspector.Resource.prototype.get requestHeadersText):
922         (WebInspector.Resource.prototype.set requestHeadersText):
923         (WebInspector.Resource.prototype.get requestHeadersSize):
924         (WebInspector.Resource.prototype.set responseHeaders):
925         (WebInspector.Resource.prototype.get responseHeadersText):
926         (WebInspector.Resource.prototype.set responseHeadersText):
927         (WebInspector.Resource.prototype.get responseHeadersSize):
928         (WebInspector.Resource.prototype._headersSize):
929
930 2011-05-18  Pavel Podivilov  <podivilov@chromium.org>
931
932         Reviewed by Yury Semikhatsky.
933
934         Web Inspector: source mapping for pretty-printed scripts is sometimes inaccurate after indented comments.
935         https://bugs.webkit.org/show_bug.cgi?id=61037
936
937         * inspector/front-end/JavaScriptFormatter.js:
938         (FormattedContentBuilder.prototype.addToken):
939         (FormattedContentBuilder.prototype._addComment):
940         (FormattedContentBuilder.prototype._addText):
941         (FormattedContentBuilder.prototype._addMappingIfNeeded):
942
943 2011-05-23  Mike West  <mkwst@chromium.org>
944
945         Reviewed by Yury Semikhatsky.
946
947         Web Inspector: Missing fields in HAR
948         https://bugs.webkit.org/show_bug.cgi?id=58127
949         
950         Specifically, this patch adds:
951         - entry.request.httpVersion
952         - entry.request.headersSize
953         - entry.request.bodySize
954         - entry.response.httpVersion
955         - entry.response.headersSize
956         - entry.response.bodySize
957         - entry.response.content.compression
958         
959         Tests: http/tests/inspector/resource-har-conversion.html
960                http/tests/inspector/resource-har-headers.html
961                http/tests/inspector/resource-parameters.html
962                http/tests/inspector/network/network-size.html
963
964         * inspector/front-end/HAREntry.js:
965         (WebInspector.HAREntry.prototype.build):
966         (WebInspector.HAREntry.prototype._buildRequest):
967         (WebInspector.HAREntry.prototype._buildResponse):
968         (WebInspector.HAREntry.prototype._buildContent):
969         (WebInspector.HAREntry.prototype._buildCookie):
970         (WebInspector.HAREntry.prototype._interval):
971         (WebInspector.HAREntry.prototype.get requestBodySize):
972         (WebInspector.HAREntry.prototype.get responseBodySize):
973         (WebInspector.HAREntry.prototype.get responseCompression):
974         (WebInspector.HARLog.prototype.build):
975         * inspector/front-end/Resource.js:
976         (WebInspector.Resource.prototype.set requestHeaders):
977         (WebInspector.Resource.prototype.get requestHeadersText):
978         (WebInspector.Resource.prototype.set requestHeadersText):
979         (WebInspector.Resource.prototype.get requestHeadersSize):
980         (WebInspector.Resource.prototype.get requestHttpVersion):
981         (WebInspector.Resource.prototype.set responseHeaders):
982         (WebInspector.Resource.prototype.get responseHeadersText):
983         (WebInspector.Resource.prototype.set responseHeadersText):
984         (WebInspector.Resource.prototype.get responseHeadersSize):
985         (WebInspector.Resource.prototype.get responseHttpVersion):
986
987 2011-05-23  Andrey Kosyakov  <caseq@chromium.org>
988
989         Reviewed by Yury Semikhatsky.
990
991         Web Inspector: keyboard shortcut panel is 1px too short
992         https://bugs.webkit.org/show_bug.cgi?id=61242
993
994         Fixed bottom margin of attached helpscreen so it's glued to status bar.
995
996         * inspector/front-end/helpScreen.css:
997         (body.attached .help-window-outer):
998
999 2011-05-23  Kent Tamura  <tkent@chromium.org>
1000
1001         Reviewed by Dimitri Glazkov.
1002
1003         Change text-based <input> types to the new shadow DOM model
1004         https://bugs.webkit.org/show_bug.cgi?id=54179
1005
1006         By this change, text field inputs and textareas have one extra
1007         shadow node at the root of shadow trees.
1008         e.g. Before the change:
1009           <textarea> --(shadow-connection)-- <div> -- ...
1010         After the change:
1011           <textarea> --(shadow-connection)-- {#shadow-root} -- <div> -- ...
1012
1013         The goals of this change are
1014         - Change to the new shadow DOM model, and
1015         - Minimize the patch size.
1016
1017         We should use shadowPseudoId() in the new shadow DOM model, but the
1018         shadow elements in this patch don't use it in order to reduce the patch
1019         size.
1020
1021         Note: This is a re-landing for r87014 with a small fix of
1022         Element::removeShadowRoot().
1023         
1024         * css/html.css:
1025         (input::-webkit-inner-spin-button):
1026          Add vertical-align in order to avoid the button affect the baseline.
1027         (input::-webkit-outer-spin-button): ditto.
1028         (input::-webkit-input-speech-button): ditto.
1029         * dom/Element.cpp:
1030         (WebCore::Element::recalcStyle): Calls styleForRenderer() so that a
1031          subclass of Element can override it.
1032         (WebCore::Element::remvoeShadowRoot):
1033          Fix a wrong parameter for willRemoveDOMNode().
1034         (WebCore::Element::isSpellCheckingEnabled):
1035          Handle ShadowRoot, which is not an Element.
1036         * dom/Node.cpp:
1037           Add utility functions for editing code.
1038         (WebCore::Node::nonBoundaryShadowTreeRootNode):
1039         (WebCore::Node::nonShadowBoundaryParentNode):
1040         * dom/Node.h: Declare them.
1041         * dom/Position.cpp:
1042          - Add some assertions about ShadowRoot
1043          - Replace parentNode() with nonShadowBoundaryParentNode()
1044         Because input/textarea shadow structures are changed.
1045         (WebCore::Position::Position):
1046         (WebCore::Position::containerNode):
1047         (WebCore::Position::parentAnchoredEquivalent):
1048         (WebCore::Position::previous):
1049         (WebCore::Position::next):
1050         (WebCore::Position::parentEditingBoundary):
1051         (WebCore::Position::atStartOfTree):
1052         (WebCore::Position::atEndOfTree):
1053         * dom/Position.h: ditto.
1054         (WebCore::positionInParentBeforeNode):
1055         (WebCore::positionInParentAfterNode):
1056         * editing/CompositeEditCommand.cpp: ditto.
1057         (WebCore::CompositeEditCommand::insertNodeAfter):
1058         (WebCore::CompositeEditCommand::removeNode):
1059         * editing/Editor.cpp:
1060         (WebCore::Editor::findString): ditto.
1061         * editing/FrameSelection.cpp:
1062         (WebCore::FrameSelection::selectAll): Inline shadowTreeRootNode() calls.
1063         * editing/FrameSelection.h:
1064           Remove shadowTreeRootNode(). It is used only by FrameSelection::selectAll().
1065         * editing/InsertParagraphSeparatorCommand.cpp:
1066         (WebCore::InsertParagraphSeparatorCommand::doApply): Use nonShadowBoundaryParentNode()
1067         * editing/ReplaceSelectionCommand.cpp:
1068         (WebCore::ReplacementFragment::removeNode): ditto.
1069         (WebCore::ReplacementFragment::insertNodeBefore): ditto.
1070         * editing/VisibleSelection.cpp:
1071           Rename shadowTreeRootNode() to nonBoundaryShadowTreeRootNode(), and it reutrns
1072           a child node of ShadowRoot.
1073         (WebCore::VisibleSelection::isAll):
1074         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
1075         (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
1076         * editing/VisibleSelection.h: ditto.
1077         * editing/htmlediting.cpp: Add assertions.
1078         (WebCore::visiblePositionBeforeNode):
1079         (WebCore::visiblePositionAfterNode):
1080         * html/HTMLInputElement.cpp:
1081         (WebCore::HTMLInputElement::create): Calls createShadowSubtree().
1082         (WebCore::HTMLInputElement::createShadowSubtree):
1083           Calls InputType::createShadowSubTree().
1084         (WebCore::HTMLInputElement::innerTextElement):
1085           Accessor of a shadow node. This is used by RenderTextControlSingleLine.
1086         (WebCore::HTMLInputElement::innerBlockElement): ditto.
1087         (WebCore::HTMLInputElement::innerSpinButtonElement): ditto.
1088         (WebCore::HTMLInputElement::outerSpinButtonElement): ditto.
1089         (WebCore::HTMLInputElement::resultsButtonElement): ditto.
1090         (WebCore::HTMLInputElement::cancelButtonElement): ditto.
1091         (WebCore::HTMLInputElement::speechButtonElement): ditto.
1092         (WebCore::HTMLInputElement::parseMappedAttribute):
1093           Rebuild shadow trees because x-webkit-speech attribute affects it.
1094         * html/HTMLInputElement.h: Add declarations.
1095         * html/HTMLIsIndexElement.cpp:
1096         (WebCore::HTMLIsIndexElement::create): Calls createShadowSubtree().
1097         * html/HTMLTextAreaElement.cpp:
1098         (WebCore::HTMLTextAreaElement::create): Calls createShadowSubtree().
1099         (WebCore::HTMLTextAreaElement::createShadowSubtree): Added.
1100         * html/HTMLTextAreaElement.h: Declare createShadowSubtree().
1101         * html/InputType.h: Add default implementations of accessors.
1102         (WebCore::InputType::innerBlockElement):
1103         (WebCore::InputType::innerTextElement):
1104         (WebCore::InputType::innerSpinButtonElement):
1105         (WebCore::InputType::outerSpinButtonElement):
1106         (WebCore::InputType::resultsButtonElement):
1107         (WebCore::InputType::cancelButtonElement):
1108         (WebCore::InputType::speechButtonElement):
1109         * html/SearchInputType.cpp:
1110         (WebCore::SearchInputType::SearchInputType): Initializes new data members.
1111         (WebCore::SearchInputType::createShadowSubtree):
1112           Moved from RenderTextControlSingleLine.
1113         (WebCore::SearchInputType::destroyShadowSubtree): Clear element references.
1114         * html/SearchInputType.h: Add declarations.
1115         (WebCore::SearchInputType::innerBlockElement):
1116         (WebCore::SearchInputType::resultsButtonElement):
1117         (WebCore::SearchInputType::cancelButtonElement):
1118         * html/TextFieldInputType.cpp:
1119         (WebCore::TextFieldInputType::TextFieldInputType):
1120           Initializes new data members.
1121         (WebCore::TextFieldInputType::createShadowSubtree):
1122           Moved from RenderTextControlSingleLine.
1123         (WebCore::TextFieldInputType::destroyShadowSubtree): Clear element references.
1124         * html/TextFieldInputType.h: Add declarations.
1125         (WebCore::TextFieldInputType::innerTextElement):
1126         (WebCore::TextFieldInputType::innerSpinButtonElement):
1127         (WebCore::TextFieldInputType::outerSpinButtonElement):
1128         (WebCore::TextFieldInputType::speechButtonElement):
1129         (WebCore::TextFieldInputType::setInnerTextElement):
1130         (WebCore::TextFieldInputType::setSpeechButtonElement):
1131         * html/shadow/TextControlInnerElements.cpp:
1132         (WebCore::TextControlInnerElement::TextControlInnerElement):
1133           Remove shadowParent parameter. It is unnecessary because we switch to
1134           new shadow model.
1135         (WebCore::TextControlInnerElement::create):
1136           Change the parameter type to Document.
1137         (WebCore::TextControlInnerElement::styleForRenderer):
1138           Override this in order to set style by
1139           RenderTextControlSingleLine::createInnerBlockStyle().
1140         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
1141           Remove shadowParent parameter.
1142           Inherit HTMLDivElement, not TextControlInnerElement.
1143         (WebCore::TextControlInnerTextElement::create): Remove shadowParent parameter.
1144         (WebCore::TextControlInnerTextElement::styleForRenderer):
1145           Override this in order to set style by
1146           RenderTextControlSingleLine::createInnerTextStyle().
1147         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
1148           Inherit HTMLDivElement, not TextControlInnerElement.
1149         (WebCore::SearchFieldResultsButtonElement::styleForRenderer):
1150           Override this in order to set style by
1151           RenderTextControlSingleLine::createResultButtonStyle().
1152         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
1153           Inherit HTMLDivElement, not TextControlInnerElement.
1154         (WebCore::SearchFieldCancelButtonElement::styleForRenderer):
1155           Override this in order to set style by
1156           RenderTextControlSingleLine::createCancelButtonStyle().
1157         (WebCore::SearchFieldCancelButtonElement::detach):
1158           Update for the parent class change.
1159         (WebCore::SpinButtonElement::SpinButtonElement):
1160           - Change the parameter type: shadowParent -> Document
1161           - Add the inner flag
1162           - Inherit HTMLDivElement, not TextControlInnerElement.
1163         (WebCore::SpinButtonElement::createInner): Introduce a new factory
1164           method to hide a bool parameter of the constructor.
1165         (WebCore::SpinButtonElement::createOuter): ditto.
1166         (WebCore::SpinButtonElement::styleForRenderer):
1167           Override this in order to set style by
1168           RenderTextControlSingleLine::createInnerSpinButtonStyle() or
1169           createOuterSpinButtonStyle().
1170         (WebCore::SpinButtonElement::detach): Update for the parent class change.
1171         (WebCore::SpinButtonElement::setHovered): ditto.
1172         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
1173           - Change the parameter type: shadowParent -> Document
1174           - Inherit HTMLDivElement, not TextControlInnerElement.
1175           - Do not register this as a speech input listener here.
1176         (WebCore::InputFieldSpeechButtonElement::create):
1177           Update for the parameter change.
1178         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1179           Do not handle click event if listener registration is not done.
1180         (WebCore::InputFieldSpeechButtonElement::attach):
1181           Register this as a speech input listener.
1182         (WebCore::InputFieldSpeechButtonElement::detach):
1183           Update for the parent class change.
1184         (WebCore::InputFieldSpeechButtonElement::styleForRenderer):
1185           Override this in order to set style by
1186           RenderTextControlSingleLine::createSpeechButtonStyle().
1187         * html/shadow/TextControlInnerElements.h:
1188         (WebCore::TextControlInnerTextElement::isMouseFocusable):
1189           Add this because the class is not a subclass of TextControllInnerElement.
1190         (WebCore::SearchFieldResultsButtonElement::isMouseFocusable): ditto.
1191         (WebCore::SearchFieldCancelButtonElement::isMouseFocusable): ditto.
1192         (WebCore::SpinButtonElement::isMouseFocusable): ditto.
1193         (WebCore::InputFieldSpeechButtonElement::isMouseFocusable): ditto.
1194         * rendering/RenderTextControl.cpp:
1195         (WebCore::RenderTextControl::~RenderTextControl): Remove unnecessary code.
1196         (WebCore::RenderTextControl::styleDidChange):
1197           innerTextElement can have no renderer.
1198           Explicitly call setNeedsStyleRecals() for innerTextElement. It is
1199           needed for LayoutTests/editing/selection/select-across-readonly-input-*.html.
1200         (WebCore::RenderTextControl::textBlockWidth): Member data -> function
1201         (WebCore::RenderTextControl::updateFromElement): ditto.
1202         (WebCore::RenderTextControl::setInnerTextValue): ditto.
1203         (WebCore::RenderTextControl::hasVisibleTextArea): ditto.
1204         (WebCore::RenderTextControl::isSelectableElement): ditto.
1205         (WebCore::RenderTextControl::selection): ditto.
1206         (WebCore::RenderTextControl::visiblePositionForIndex): ditto.
1207         (WebCore::RenderTextControl::indexForVisiblePosition): ditto.
1208         (WebCore::RenderTextControl::text): ditto.
1209         (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
1210         (WebCore::RenderTextControl::computeLogicalHeight): ditto.
1211         (WebCore::RenderTextControl::hitInnerTextElement): ditto.
1212         (WebCore::RenderTextControl::forwardEvent): ditto.
1213         (WebCore::RenderTextControl::computePreferredLogicalWidths): ditto.
1214         * rendering/RenderTextControl.h:
1215           - Make m_innerText virtual function.
1216           - Make createInnerTextStyle() public in order that
1217             TextControlInnerElements can call it.
1218         * rendering/RenderTextControlMultiLine.cpp:
1219         (WebCore::RenderTextControlMultiLine::innerTextElement): Added.
1220         (WebCore::RenderTextControlMultiLine::updateFromElement):
1221           Remove unnecessary createSubtreeIfNeeded() call.
1222         * rendering/RenderTextControlMultiLine.h: Add a declaration.
1223         * rendering/RenderTextControlSingleLine.cpp:
1224         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
1225           Remove unnecessary code.
1226         (WebCore::RenderTextControlSingleLine::innerTextElement): Added.
1227         (WebCore::RenderTextControlSingleLine::innerBlockElement): Added.
1228         (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): Added.
1229         (WebCore::RenderTextControlSingleLine::outerSpinButtonElement): Added.
1230         (WebCore::RenderTextControlSingleLine::resultsButtonElement): Added.
1231         (WebCore::RenderTextControlSingleLine::cancelButtonElement): Added.
1232         (WebCore::RenderTextControlSingleLine::speechButtonElement): Added.
1233         (WebCore::RenderTextControlSingleLine::textBaseStyle): Data member -> function
1234         (WebCore::RenderTextControlSingleLine::subtreeHasChanged): ditto.
1235         (WebCore::RenderTextControlSingleLine::layout): ditto.
1236         (WebCore::RenderTextControlSingleLine::nodeAtPoint): ditto.
1237         (WebCore::RenderTextControlSingleLine::forwardEvent): ditto.
1238         (WebCore::RenderTextControlSingleLine::styleDidChange): ditto.
1239         (WebCore::RenderTextControlSingleLine::hasControlClip): ditto.
1240         (WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
1241         (WebCore::RenderTextControlSingleLine::textBlockWidth): ditto.
1242         (WebCore::RenderTextControlSingleLine::decorationWidthRight): ditto.
1243         (WebCore::RenderTextControlSingleLine::preferredContentWidth): ditto.
1244         (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight): ditto.
1245         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): ditto.
1246         (WebCore::RenderTextControlSingleLine::updateFromElement):
1247           ditto, and remove unnecessary createSubtreeIfNeeded() call.
1248         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
1249           Data member -> function
1250         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): ditto.
1251         (WebCore::RenderTextControlSingleLine::clientPaddingLeft): ditto.
1252         (WebCore::RenderTextControlSingleLine::clientPaddingRight): ditto.
1253         (WebCore::RenderTextControlSingleLine::textBlockInsetTop): ditto.
1254         * rendering/RenderTextControlSingleLine.h:
1255           Add declarations, and remove unnecessary data members.
1256
1257 2011-05-19  Vitaly Repeshko  <vitalyr@chromium.org>
1258
1259         Reviewed by Adam Barth.
1260
1261         [V8] Explicitly mark objects with complex GC rules.
1262         https://bugs.webkit.org/show_bug.cgi?id=61131
1263
1264         From the GC point view there are two kinds of objects: the ones
1265         that may participate in object grouping (i.e. their lifetime
1266         depends on other objects) and the ones that never participate in
1267         grouping (independent). V8 added support for marking persistent
1268         handles as independent so that the GC can process the objects they
1269         hold faster. The motivating use case here is typed arrays.
1270
1271         This patch adds V8-specific inherited IDL attribute
1272         V8DependentLifetime to types used in V8GCController, which is
1273         exactly the set of types with object lifetimes depending on other
1274         objects. The handles for the types that are not marked with the
1275         new attribute can be marked as independent and GC-ed faster.
1276
1277         * bindings/scripts/CodeGeneratorV8.pm: Added proccessing of the new attribute.
1278
1279         Updated test output:
1280         * bindings/scripts/test/V8/V8TestInterface.cpp:
1281         (WebCore::V8TestInterface::wrapSlow):
1282         * bindings/scripts/test/V8/V8TestInterface.h:
1283         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1284         (WebCore::V8TestMediaQueryListListener::wrapSlow):
1285         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1286         * bindings/scripts/test/V8/V8TestObj.cpp:
1287         (WebCore::V8TestObj::wrapSlow):
1288         * bindings/scripts/test/V8/V8TestObj.h:
1289         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1290         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
1291         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1292
1293         Added the new attribute:
1294         * css/CSSRule.idl:
1295         * css/CSSRuleList.idl:
1296         * css/CSSStyleDeclaration.idl:
1297         * css/CSSValue.idl:
1298         * css/StyleSheet.idl:
1299         * css/StyleSheetList.idl:
1300         * dom/DOMImplementation.idl:
1301         * dom/Node.idl:
1302
1303 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1304
1305         Unreviewed, rolling out r87014, r87016, and r87017.
1306         http://trac.webkit.org/changeset/87014
1307         http://trac.webkit.org/changeset/87016
1308         http://trac.webkit.org/changeset/87017
1309         https://bugs.webkit.org/show_bug.cgi?id=61266
1310
1311         It made more tests assert (Requested by Ossy on #webkit).
1312
1313         * css/html.css:
1314         (input::-webkit-inner-spin-button):
1315         (input::-webkit-outer-spin-button):
1316         (input::-webkit-input-speech-button):
1317         * dom/Element.cpp:
1318         (WebCore::Element::recalcStyle):
1319         (WebCore::Element::isSpellCheckingEnabled):
1320         * dom/Node.cpp:
1321         * dom/Node.h:
1322         * dom/Position.cpp:
1323         (WebCore::Position::Position):
1324         (WebCore::Position::containerNode):
1325         (WebCore::Position::parentAnchoredEquivalent):
1326         (WebCore::Position::previous):
1327         (WebCore::Position::next):
1328         (WebCore::Position::parentEditingBoundary):
1329         (WebCore::Position::atStartOfTree):
1330         (WebCore::Position::atEndOfTree):
1331         * dom/Position.h:
1332         (WebCore::positionInParentBeforeNode):
1333         (WebCore::positionInParentAfterNode):
1334         * editing/CompositeEditCommand.cpp:
1335         (WebCore::CompositeEditCommand::insertNodeAfter):
1336         (WebCore::CompositeEditCommand::removeNode):
1337         * editing/Editor.cpp:
1338         (WebCore::Editor::findString):
1339         * editing/FrameSelection.cpp:
1340         (WebCore::FrameSelection::selectAll):
1341         * editing/FrameSelection.h:
1342         (WebCore::FrameSelection::shadowTreeRootNode):
1343         * editing/InsertParagraphSeparatorCommand.cpp:
1344         (WebCore::InsertParagraphSeparatorCommand::doApply):
1345         * editing/ReplaceSelectionCommand.cpp:
1346         (WebCore::ReplacementFragment::removeNode):
1347         (WebCore::ReplacementFragment::insertNodeBefore):
1348         * editing/VisibleSelection.cpp:
1349         (WebCore::VisibleSelection::isAll):
1350         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
1351         (WebCore::VisibleSelection::shadowTreeRootNode):
1352         * editing/VisibleSelection.h:
1353         * editing/htmlediting.cpp:
1354         (WebCore::visiblePositionBeforeNode):
1355         (WebCore::visiblePositionAfterNode):
1356         * html/HTMLInputElement.cpp:
1357         (WebCore::HTMLInputElement::create):
1358         (WebCore::HTMLInputElement::parseMappedAttribute):
1359         * html/HTMLInputElement.h:
1360         * html/HTMLIsIndexElement.cpp:
1361         (WebCore::HTMLIsIndexElement::create):
1362         * html/HTMLTextAreaElement.cpp:
1363         (WebCore::HTMLTextAreaElement::create):
1364         * html/HTMLTextAreaElement.h:
1365         * html/InputType.h:
1366         * html/SearchInputType.cpp:
1367         * html/SearchInputType.h:
1368         (WebCore::SearchInputType::SearchInputType):
1369         * html/TextFieldInputType.cpp:
1370         * html/TextFieldInputType.h:
1371         (WebCore::TextFieldInputType::TextFieldInputType):
1372         * html/shadow/TextControlInnerElements.cpp:
1373         (WebCore::TextControlInnerElement::TextControlInnerElement):
1374         (WebCore::TextControlInnerElement::create):
1375         (WebCore::TextControlInnerElement::attachInnerElement):
1376         (WebCore::TextControlInnerElement::detach):
1377         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
1378         (WebCore::TextControlInnerTextElement::create):
1379         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
1380         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
1381         (WebCore::SearchFieldCancelButtonElement::detach):
1382         (WebCore::SpinButtonElement::SpinButtonElement):
1383         (WebCore::SpinButtonElement::create):
1384         (WebCore::SpinButtonElement::detach):
1385         (WebCore::SpinButtonElement::setHovered):
1386         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
1387         (WebCore::InputFieldSpeechButtonElement::create):
1388         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1389         (WebCore::InputFieldSpeechButtonElement::detach):
1390         * html/shadow/TextControlInnerElements.h:
1391         * rendering/RenderTextControl.cpp:
1392         (WebCore::RenderTextControl::~RenderTextControl):
1393         (WebCore::RenderTextControl::styleDidChange):
1394         (WebCore::RenderTextControl::setInnerTextStyle):
1395         (WebCore::RenderTextControl::createSubtreeIfNeeded):
1396         (WebCore::RenderTextControl::textBlockWidth):
1397         (WebCore::RenderTextControl::updateFromElement):
1398         (WebCore::RenderTextControl::setInnerTextValue):
1399         (WebCore::RenderTextControl::hasVisibleTextArea):
1400         (WebCore::RenderTextControl::isSelectableElement):
1401         (WebCore::RenderTextControl::selection):
1402         (WebCore::RenderTextControl::visiblePositionForIndex):
1403         (WebCore::RenderTextControl::indexForVisiblePosition):
1404         (WebCore::RenderTextControl::text):
1405         (WebCore::RenderTextControl::textWithHardLineBreaks):
1406         (WebCore::RenderTextControl::computeLogicalHeight):
1407         (WebCore::RenderTextControl::hitInnerTextElement):
1408         (WebCore::RenderTextControl::forwardEvent):
1409         (WebCore::RenderTextControl::computePreferredLogicalWidths):
1410         (WebCore::RenderTextControl::innerTextElement):
1411         * rendering/RenderTextControl.h:
1412         * rendering/RenderTextControlMultiLine.cpp:
1413         (WebCore::RenderTextControlMultiLine::updateFromElement):
1414         * rendering/RenderTextControlMultiLine.h:
1415         * rendering/RenderTextControlSingleLine.cpp:
1416         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
1417         (WebCore::RenderTextControlSingleLine::textBaseStyle):
1418         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
1419         (WebCore::RenderTextControlSingleLine::layout):
1420         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1421         (WebCore::RenderTextControlSingleLine::forwardEvent):
1422         (WebCore::RenderTextControlSingleLine::styleDidChange):
1423         (WebCore::RenderTextControlSingleLine::hasControlClip):
1424         (WebCore::RenderTextControlSingleLine::controlClipRect):
1425         (WebCore::RenderTextControlSingleLine::textBlockWidth):
1426         (WebCore::RenderTextControlSingleLine::decorationWidthRight):
1427         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
1428         (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight):
1429         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
1430         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
1431         (WebCore::RenderTextControlSingleLine::updateFromElement):
1432         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
1433         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
1434         (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
1435         (WebCore::RenderTextControlSingleLine::clientPaddingRight):
1436         (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
1437         * rendering/RenderTextControlSingleLine.h:
1438
1439 2011-05-23  Syed Idris Shah  <syed.idris-shah@nokia.com>
1440
1441         Reviewed by Andreas Kling.
1442
1443         GraphicsContext3DInternal object should be called for getAttachedShaders.
1444         [Qt] fast/canvas/webgl/gl-object-get-calls.html crash for Qt based webkit
1445         https://bugs.webkit.org/show_bug.cgi?id=61202 
1446
1447         LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
1448
1449         getAttachedShaders should be called on GraphicsContext3DInternal instance.
1450         It was left out by mistake.
1451
1452         * platform/graphics/qt/GraphicsContext3DQt.cpp: 
1453         (WebCore::GraphicsContext3D::getAttachedShaders): GraphicsContext3DInternal instance should be called.
1454
1455 2011-05-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1456
1457         Unreviewed. Strict PassOwnPtr build fix.
1458
1459         * platform/text/gtk/TextCodecGtk.cpp:
1460         (WebCore::newTextCodecGtk):
1461
1462 2011-05-23  Mikhail Naganov  <mnaganov@chromium.org>
1463
1464         Reviewed by Yury Semikhatsky.
1465
1466         Web Inspector: [Chromium] Show "Please wait" message during initial
1467         heap snapshot processing.
1468         https://bugs.webkit.org/show_bug.cgi?id=61040
1469
1470         * inspector/front-end/DetailedHeapshotView.js:
1471         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged.sort):
1472         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
1473         (WebInspector.DetailedHeapshotView.profileCallback):
1474         (WebInspector.DetailedHeapshotView.setDataSource):
1475         (WebInspector.DetailedHeapshotView):
1476         (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
1477         (WebInspector.DetailedHeapshotView.prototype._changeBase.setDataSource):
1478         (WebInspector.DetailedHeapshotView.prototype._changeBase):
1479         (WebInspector.DetailedHeapshotView.prototype._changeView.setDataSource):
1480         (WebInspector.DetailedHeapshotView.prototype._changeView):
1481         * inspector/front-end/PleaseWaitMessage.js:
1482         (WebInspector.PleaseWaitMessage.prototype.showAndWaitFor):
1483
1484 2011-05-23  Adam Barth  <abarth@webkit.org>
1485
1486         Strict PassOwnPtr build fixes.
1487
1488         * platform/gtk/GeolocationServiceGtk.cpp:
1489         (WebCore::GeolocationServiceGtk::create):
1490         * platform/gtk/RenderThemeGtk.cpp:
1491         (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
1492         (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
1493         (WebCore::RenderThemeGtk::adjustProgressBarStyle):
1494
1495 2011-05-22  Adam Barth  <abarth@webkit.org>
1496
1497         Strict PassOwnPtr build fix.
1498
1499         * platform/efl/RenderThemeEfl.cpp:
1500         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
1501
1502 2011-05-22  Andrew Wason  <rectalogic@rectalogic.com>
1503
1504         Reviewed by Benjamin Poulain.
1505
1506         [Qt] Implement toImageData() in QtWebKit Bridge
1507         https://bugs.webkit.org/show_bug.cgi?id=60897
1508
1509         Tests are in WebKit/qt/tests/hybridPixmap
1510
1511         * bridge/qt/qt_pixmapruntime.cpp:
1512         (JSC::Bindings::QtPixmapToImageDataMethod::name):
1513         (JSC::Bindings::QtPixmapToImageDataMethod::invoke):
1514         (JSC::Bindings::QtPixmapToImageDataMethod::copyPixels):
1515         (JSC::Bindings::QtPixmapClass::methodsNamed):
1516         (JSC::Bindings::QtPixmapInstance::getPropertyNames):
1517          Add toImageData() to Qt Bridge, alternative to
1518          assignToHTMLImageElement().
1519
1520 2011-05-22  Dominic Cooney  <dominicc@chromium.org>
1521
1522         Reviewed by Dimitri Glazkov.
1523
1524         When removing a shadow root, also remove it from the render tree.
1525         https://bugs.webkit.org/show_bug.cgi?id=61245
1526
1527         Test: existing fast/dom/shadow/layout-tests-can-access-shadow.html
1528
1529         * dom/Element.cpp:
1530         (WebCore::Element::removeShadowRoot): Call detach if attached.
1531
1532 2011-05-22  Dirk Schulze  <krit@webkit.org>
1533
1534         Reviewed by Nikolas Zimmermann.
1535
1536         Don't do manually style resolution for SVGElements with renderer
1537         https://bugs.webkit.org/show_bug.cgi?id=59176
1538
1539         General clean-up.
1540
1541         Don't resolve style manually, instead ask the RenderObject for its style.
1542
1543         Cleanup svgattrs.in, some SVG element names were accidently listed there as attributes.
1544
1545         No new tests needed. No change of behavior.
1546
1547         * svg/SVGFEDiffuseLightingElement.cpp:
1548         (WebCore::SVGFEDiffuseLightingElement::build):
1549         * svg/SVGFEDropShadowElement.cpp:
1550         (WebCore::SVGFEDropShadowElement::build):
1551         * svg/SVGFEFloodElement.cpp:
1552         (WebCore::SVGFEFloodElement::build):
1553         * svg/SVGFESpecularLightingElement.cpp:
1554         (WebCore::SVGFESpecularLightingElement::build):
1555         * svg/svgattrs.in:
1556
1557 2011-05-21  Dirk Schulze  <krit@webkit.org>
1558
1559         Reviewed by Darin Adler.
1560
1561         REGRESSION(r66731): pointer-events are broken in some cases
1562         https://bugs.webkit.org/show_bug.cgi?id=45467
1563
1564         The SVGSVGElement shouldn't be the target of a mouse event, if its pointer-events attribute is set
1565         to 'none'. This matches the behavior on Firefox where an embedded SVG element is the target of an event,
1566         if none of its childs caught the event. This is the case for all pointer-events other than 'none'.
1567
1568         Tests: svg/custom/pointer-events-on-svg-with-pointer.xhtml
1569                svg/custom/pointer-events-on-svg-without-pointer.xhtml
1570
1571         * rendering/svg/RenderSVGRoot.cpp:
1572         (WebCore::RenderSVGRoot::nodeAtPoint):
1573
1574 2011-05-21  Dan Bernstein  <mitz@apple.com>
1575
1576         Reviewed by Darin Adler.
1577
1578         <rdar://problem/9479926> REGRESSION (r82144): Icon overlaps text in Twitter message dialog
1579         https://bugs.webkit.org/show_bug.cgi?id=61241
1580
1581         Test: fast/block/positioning/start-ignoring-before.html
1582
1583         * rendering/RenderBlockLineLayout.cpp:
1584         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Added a boolean parameter saying
1585         whether to merge the first trailing space with the line break.
1586         (WebCore::RenderBlock::LineBreaker::nextLineBreak): When adding a midpoint behind the current
1587         character, account for trailing positioned objects that occurred after the midpoint by calling
1588         updateMidpointsForTrailingBoxes(), which adds midpoints for them.
1589
1590 2011-05-21  Jeremy Noble  <jer.noble@apple.com>
1591
1592         Reviewed by Eric Carlson.
1593
1594         WebKit2: fix failing fullscreen/full-screen-remove* tests.
1595         https://bugs.webkit.org/show_bug.cgi?id=61027
1596
1597         * dom/Document.cpp:
1598         (WebCore::Document::fullScreenChangeDelayTimerFired): dispatchEvent can be
1599             synchronous, so make sure to check whether the current element is
1600             in the DOM before dispatching.
1601
1602 2011-05-21  Gavin Peters  <gavinp@chromium.org>
1603
1604         Reviewed by Adam Barth.
1605
1606         Add rel type prerender to distinguish prerender from prefetch
1607         https://bugs.webkit.org/show_bug.cgi?id=61079
1608
1609         Chrome right now uses <link rel=prefetch ...> for one of two things,
1610         to warm the cache in the same way as firefox, or to launch a speculative
1611         rendering of a web page, for faster "loading" when the user navigates to it.
1612
1613         This new rel type will let us distinguish the two cases; the rel type prerender
1614         isn't used on the web today, but the Google Web Search example prerendering application
1615         is ready to experiment with it.
1616
1617         Test: fast/dom/HTMLLinkElement/prerender.html
1618
1619         * html/HTMLLinkElement.cpp:
1620         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
1621         (WebCore::HTMLLinkElement::process):
1622         * html/HTMLLinkElement.h:
1623         (WebCore::HTMLLinkElement::RelAttribute::RelAttribute):
1624         * loader/cache/CachedResource.cpp:
1625         (WebCore::defaultPriorityForResourceType):
1626         * loader/cache/CachedResource.h:
1627         (WebCore::CachedResource::isLinkResource):
1628         * loader/cache/CachedResourceLoader.cpp:
1629         (WebCore::createResource):
1630         (WebCore::CachedResourceLoader::requestLinkResource):
1631         (WebCore::CachedResourceLoader::canRequest):
1632         * loader/cache/CachedResourceLoader.h:
1633         * loader/cache/CachedResourceRequest.cpp:
1634         (WebCore::cachedResourceTypeToTargetType):
1635         (WebCore::CachedResourceRequest::load):
1636         * platform/network/ResourceRequestBase.h:
1637
1638 2011-05-21  Emil A Eklund  <eae@chromium.org>
1639
1640         Reviewed by Eric Seidel.
1641
1642         Change RenderLineBoxList::hitTest to use IntPoint
1643         https://bugs.webkit.org/show_bug.cgi?id=61156
1644
1645         Change the RenderLineBoxList hit testing to use IntPoint and clean up the rect calculation.
1646
1647         Covered by existing tests.
1648
1649         * rendering/RenderBlock.cpp:
1650         (WebCore::RenderBlock::hitTestContents):
1651         * rendering/RenderInline.cpp:
1652         (WebCore::RenderInline::nodeAtPoint):
1653         * rendering/RenderLineBoxList.cpp:
1654         (WebCore::RenderLineBoxList::hitTest):
1655         * rendering/RenderLineBoxList.h:
1656
1657 2011-05-21  Emil A Eklund  <eae@chromium.org>
1658
1659         Reviewed by Eric Seidel.
1660
1661         Change HitTestResult to use IntPoint
1662         https://bugs.webkit.org/show_bug.cgi?id=61230
1663
1664         Covered by existing tests.
1665
1666         * rendering/EllipsisBox.cpp:
1667         (WebCore::EllipsisBox::nodeAtPoint):
1668         * rendering/HitTestResult.cpp:
1669         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1670         * rendering/HitTestResult.h:
1671         (WebCore::HitTestResult::isRectBasedTest):
1672         * rendering/InlineFlowBox.cpp:
1673         (WebCore::InlineFlowBox::nodeAtPoint):
1674         * rendering/InlineTextBox.cpp:
1675         (WebCore::InlineTextBox::nodeAtPoint):
1676         * rendering/RenderBlock.cpp:
1677         (WebCore::RenderBlock::nodeAtPoint):
1678         (WebCore::RenderBlock::hitTestColumns):
1679         * rendering/RenderBox.cpp:
1680         (WebCore::RenderBox::nodeAtPoint):
1681         * rendering/RenderTable.cpp:
1682         (WebCore::RenderTable::nodeAtPoint):
1683         * rendering/svg/RenderSVGRoot.cpp:
1684         (WebCore::RenderSVGRoot::nodeAtPoint):
1685
1686 2011-05-21  Jochen Eisinger  <jochen@chromium.org>
1687
1688         Reviewed by Darin Fisher.
1689
1690         [chromium] add extraData field to resource requests
1691         https://bugs.webkit.org/show_bug.cgi?id=61033
1692
1693         * platform/network/chromium/ResourceRequest.h:
1694         (WebCore::ResourceRequest::ExtraData::~ExtraData):
1695         (WebCore::ResourceRequest::extraData):
1696         (WebCore::ResourceRequest::setExtraData):
1697
1698 2011-05-21  Kent Tamura  <tkent@chromium.org>
1699
1700         Reviewed by Dimitri Glazkov.
1701
1702         Change text-based <input> types to the new shadow DOM model
1703         https://bugs.webkit.org/show_bug.cgi?id=54179
1704
1705         By this change, text field inputs and textareas have one extra
1706         shadow node at the root of shadow trees.
1707         e.g. Before the change:
1708           <textarea> --(shadow-connection)-- <div> -- ...
1709         After the change:
1710           <textarea> --(shadow-connection)-- {#shadow-root} -- <div> -- ...
1711
1712         The goals of this change are
1713         - Change to the new shadow DOM model, and
1714         - Minimize the patch size.
1715
1716         We should use shadowPseudoId() in the new shadow DOM model, but the
1717         shadow elements in this patch don't use it in order to reduce the patch
1718         size.
1719
1720         * css/html.css:
1721         (input::-webkit-inner-spin-button):
1722          Add vertical-align in order to avoid the button affect the baseline.
1723         (input::-webkit-outer-spin-button): ditto.
1724         (input::-webkit-input-speech-button): ditto.
1725         * dom/Element.cpp:
1726         (WebCore::Element::recalcStyle): Calls styleForRenderer() so that a
1727          subclass of Element can override it.
1728         (WebCore::Element::isSpellCheckingEnabled):
1729         Handle ShadowRoot, which is not an Element.
1730         * dom/Node.cpp:
1731           Add utility functions for editing code.
1732         (WebCore::Node::nonBoundaryShadowTreeRootNode):
1733         (WebCore::Node::nonShadowBoundaryParentNode):
1734         * dom/Node.h: Declare them.
1735         * dom/Position.cpp:
1736          - Add some assertions about ShadowRoot
1737          - Replace parentNode() with nonShadowBoundaryParentNode()
1738         Because input/textarea shadow structures are changed.
1739         (WebCore::Position::Position):
1740         (WebCore::Position::containerNode):
1741         (WebCore::Position::parentAnchoredEquivalent):
1742         (WebCore::Position::previous):
1743         (WebCore::Position::next):
1744         (WebCore::Position::parentEditingBoundary):
1745         (WebCore::Position::atStartOfTree):
1746         (WebCore::Position::atEndOfTree):
1747         * dom/Position.h: ditto.
1748         (WebCore::positionInParentBeforeNode):
1749         (WebCore::positionInParentAfterNode):
1750         * editing/CompositeEditCommand.cpp: ditto.
1751         (WebCore::CompositeEditCommand::insertNodeAfter):
1752         (WebCore::CompositeEditCommand::removeNode):
1753         * editing/Editor.cpp:
1754         (WebCore::Editor::findString): ditto.
1755         * editing/FrameSelection.cpp:
1756         (WebCore::FrameSelection::selectAll): Inline shadowTreeRootNode() calls.
1757         * editing/FrameSelection.h:
1758           Remove shadowTreeRootNode(). It is used only by FrameSelection::selectAll().
1759         * editing/InsertParagraphSeparatorCommand.cpp:
1760         (WebCore::InsertParagraphSeparatorCommand::doApply): Use nonShadowBoundaryParentNode()
1761         * editing/ReplaceSelectionCommand.cpp:
1762         (WebCore::ReplacementFragment::removeNode): ditto.
1763         (WebCore::ReplacementFragment::insertNodeBefore): ditto.
1764         * editing/VisibleSelection.cpp:
1765           Rename shadowTreeRootNode() to nonBoundaryShadowTreeRootNode(), and it reutrns
1766           a child node of ShadowRoot.
1767         (WebCore::VisibleSelection::isAll):
1768         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
1769         (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
1770         * editing/VisibleSelection.h: ditto.
1771         * editing/htmlediting.cpp: Add assertions.
1772         (WebCore::visiblePositionBeforeNode):
1773         (WebCore::visiblePositionAfterNode):
1774         * html/HTMLInputElement.cpp:
1775         (WebCore::HTMLInputElement::create): Calls createShadowSubtree().
1776         (WebCore::HTMLInputElement::createShadowSubtree):
1777           Calls InputType::createShadowSubTree().
1778         (WebCore::HTMLInputElement::innerTextElement):
1779           Accessor of a shadow node. This is used by RenderTextControlSingleLine.
1780         (WebCore::HTMLInputElement::innerBlockElement): ditto.
1781         (WebCore::HTMLInputElement::innerSpinButtonElement): ditto.
1782         (WebCore::HTMLInputElement::outerSpinButtonElement): ditto.
1783         (WebCore::HTMLInputElement::resultsButtonElement): ditto.
1784         (WebCore::HTMLInputElement::cancelButtonElement): ditto.
1785         (WebCore::HTMLInputElement::speechButtonElement): ditto.
1786         (WebCore::HTMLInputElement::parseMappedAttribute):
1787           Rebuild shadow trees because x-webkit-speech attribute affects it.
1788         * html/HTMLInputElement.h: Add declarations.
1789         * html/HTMLIsIndexElement.cpp:
1790         (WebCore::HTMLIsIndexElement::create): Calls createShadowSubtree().
1791         * html/HTMLTextAreaElement.cpp:
1792         (WebCore::HTMLTextAreaElement::create): Calls createShadowSubtree().
1793         (WebCore::HTMLTextAreaElement::createShadowSubtree): Added.
1794         * html/HTMLTextAreaElement.h: Declare createShadowSubtree().
1795         * html/InputType.h: Add default implementations of accessors.
1796         (WebCore::InputType::innerBlockElement):
1797         (WebCore::InputType::innerTextElement):
1798         (WebCore::InputType::innerSpinButtonElement):
1799         (WebCore::InputType::outerSpinButtonElement):
1800         (WebCore::InputType::resultsButtonElement):
1801         (WebCore::InputType::cancelButtonElement):
1802         (WebCore::InputType::speechButtonElement):
1803         * html/SearchInputType.cpp:
1804         (WebCore::SearchInputType::SearchInputType): Initializes new data members.
1805         (WebCore::SearchInputType::createShadowSubtree):
1806           Moved from RenderTextControlSingleLine.
1807         (WebCore::SearchInputType::destroyShadowSubtree): Clear element references.
1808         * html/SearchInputType.h: Add declarations.
1809         (WebCore::SearchInputType::innerBlockElement):
1810         (WebCore::SearchInputType::resultsButtonElement):
1811         (WebCore::SearchInputType::cancelButtonElement):
1812         * html/TextFieldInputType.cpp:
1813         (WebCore::TextFieldInputType::TextFieldInputType):
1814           Initializes new data members.
1815         (WebCore::TextFieldInputType::createShadowSubtree):
1816           Moved from RenderTextControlSingleLine.
1817         (WebCore::TextFieldInputType::destroyShadowSubtree): Clear element references.
1818         * html/TextFieldInputType.h: Add declarations.
1819         (WebCore::TextFieldInputType::innerTextElement):
1820         (WebCore::TextFieldInputType::innerSpinButtonElement):
1821         (WebCore::TextFieldInputType::outerSpinButtonElement):
1822         (WebCore::TextFieldInputType::speechButtonElement):
1823         (WebCore::TextFieldInputType::setInnerTextElement):
1824         (WebCore::TextFieldInputType::setSpeechButtonElement):
1825         * html/shadow/TextControlInnerElements.cpp:
1826         (WebCore::TextControlInnerElement::TextControlInnerElement):
1827           Remove shadowParent parameter. It is unnecessary because we switch to
1828           new shadow model.
1829         (WebCore::TextControlInnerElement::create):
1830           Change the parameter type to Document.
1831         (WebCore::TextControlInnerElement::styleForRenderer):
1832           Override this in order to set style by
1833           RenderTextControlSingleLine::createInnerBlockStyle().
1834         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
1835           Remove shadowParent parameter.
1836           Inherit HTMLDivElement, not TextControlInnerElement.
1837         (WebCore::TextControlInnerTextElement::create): Remove shadowParent parameter.
1838         (WebCore::TextControlInnerTextElement::styleForRenderer):
1839           Override this in order to set style by
1840           RenderTextControlSingleLine::createInnerTextStyle().
1841         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
1842           Inherit HTMLDivElement, not TextControlInnerElement.
1843         (WebCore::SearchFieldResultsButtonElement::styleForRenderer):
1844           Override this in order to set style by
1845           RenderTextControlSingleLine::createResultButtonStyle().
1846         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
1847           Inherit HTMLDivElement, not TextControlInnerElement.
1848         (WebCore::SearchFieldCancelButtonElement::styleForRenderer):
1849           Override this in order to set style by
1850           RenderTextControlSingleLine::createCancelButtonStyle().
1851         (WebCore::SearchFieldCancelButtonElement::detach):
1852           Update for the parent class change.
1853         (WebCore::SpinButtonElement::SpinButtonElement):
1854           - Change the parameter type: shadowParent -> Document
1855           - Add the inner flag
1856           - Inherit HTMLDivElement, not TextControlInnerElement.
1857         (WebCore::SpinButtonElement::createInner): Introduce a new factory
1858           method to hide a bool parameter of the constructor.
1859         (WebCore::SpinButtonElement::createOuter): ditto.
1860         (WebCore::SpinButtonElement::styleForRenderer):
1861           Override this in order to set style by
1862           RenderTextControlSingleLine::createInnerSpinButtonStyle() or
1863           createOuterSpinButtonStyle().
1864         (WebCore::SpinButtonElement::detach): Update for the parent class change.
1865         (WebCore::SpinButtonElement::setHovered): ditto.
1866         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
1867           - Change the parameter type: shadowParent -> Document
1868           - Inherit HTMLDivElement, not TextControlInnerElement.
1869           - Do not register this as a speech input listener here.
1870         (WebCore::InputFieldSpeechButtonElement::create):
1871           Update for the parameter change.
1872         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1873           Do not handle click event if listener registration is not done.
1874         (WebCore::InputFieldSpeechButtonElement::attach):
1875           Register this as a speech input listener.
1876         (WebCore::InputFieldSpeechButtonElement::detach):
1877           Update for the parent class change.
1878         (WebCore::InputFieldSpeechButtonElement::styleForRenderer):
1879           Override this in order to set style by
1880           RenderTextControlSingleLine::createSpeechButtonStyle().
1881         * html/shadow/TextControlInnerElements.h:
1882         (WebCore::TextControlInnerTextElement::isMouseFocusable):
1883           Add this because the class is not a subclass of TextControllInnerElement.
1884         (WebCore::SearchFieldResultsButtonElement::isMouseFocusable): ditto.
1885         (WebCore::SearchFieldCancelButtonElement::isMouseFocusable): ditto.
1886         (WebCore::SpinButtonElement::isMouseFocusable): ditto.
1887         (WebCore::InputFieldSpeechButtonElement::isMouseFocusable): ditto.
1888         * rendering/RenderTextControl.cpp:
1889         (WebCore::RenderTextControl::~RenderTextControl): Remove unnecessary code.
1890         (WebCore::RenderTextControl::styleDidChange):
1891           innerTextElement can have no renderer.
1892           Explicitly call setNeedsStyleRecals() for innerTextElement. It is
1893           needed for LayoutTests/editing/selection/select-across-readonly-input-*.html.
1894         (WebCore::RenderTextControl::textBlockWidth): Member data -> function
1895         (WebCore::RenderTextControl::updateFromElement): ditto.
1896         (WebCore::RenderTextControl::setInnerTextValue): ditto.
1897         (WebCore::RenderTextControl::hasVisibleTextArea): ditto.
1898         (WebCore::RenderTextControl::isSelectableElement): ditto.
1899         (WebCore::RenderTextControl::selection): ditto.
1900         (WebCore::RenderTextControl::visiblePositionForIndex): ditto.
1901         (WebCore::RenderTextControl::indexForVisiblePosition): ditto.
1902         (WebCore::RenderTextControl::text): ditto.
1903         (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
1904         (WebCore::RenderTextControl::computeLogicalHeight): ditto.
1905         (WebCore::RenderTextControl::hitInnerTextElement): ditto.
1906         (WebCore::RenderTextControl::forwardEvent): ditto.
1907         (WebCore::RenderTextControl::computePreferredLogicalWidths): ditto.
1908         * rendering/RenderTextControl.h:
1909           - Make m_innerText virtual function.
1910           - Make createInnerTextStyle() public in order that
1911             TextControlInnerElements can call it.
1912         * rendering/RenderTextControlMultiLine.cpp:
1913         (WebCore::RenderTextControlMultiLine::innerTextElement): Added.
1914         (WebCore::RenderTextControlMultiLine::updateFromElement):
1915           Remove unnecessary createSubtreeIfNeeded() call.
1916         * rendering/RenderTextControlMultiLine.h: Add a declaration.
1917         * rendering/RenderTextControlSingleLine.cpp:
1918         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
1919           Remove unnecessary code.
1920         (WebCore::RenderTextControlSingleLine::innerTextElement): Added.
1921         (WebCore::RenderTextControlSingleLine::innerBlockElement): Added.
1922         (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): Added.
1923         (WebCore::RenderTextControlSingleLine::outerSpinButtonElement): Added.
1924         (WebCore::RenderTextControlSingleLine::resultsButtonElement): Added.
1925         (WebCore::RenderTextControlSingleLine::cancelButtonElement): Added.
1926         (WebCore::RenderTextControlSingleLine::speechButtonElement): Added.
1927         (WebCore::RenderTextControlSingleLine::textBaseStyle): Data member -> function
1928         (WebCore::RenderTextControlSingleLine::subtreeHasChanged): ditto.
1929         (WebCore::RenderTextControlSingleLine::layout): ditto.
1930         (WebCore::RenderTextControlSingleLine::nodeAtPoint): ditto.
1931         (WebCore::RenderTextControlSingleLine::forwardEvent): ditto.
1932         (WebCore::RenderTextControlSingleLine::styleDidChange): ditto.
1933         (WebCore::RenderTextControlSingleLine::hasControlClip): ditto.
1934         (WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
1935         (WebCore::RenderTextControlSingleLine::textBlockWidth): ditto.
1936         (WebCore::RenderTextControlSingleLine::decorationWidthRight): ditto.
1937         (WebCore::RenderTextControlSingleLine::preferredContentWidth): ditto.
1938         (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight): ditto.
1939         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): ditto.
1940         (WebCore::RenderTextControlSingleLine::updateFromElement):
1941           ditto, and remove unnecessary createSubtreeIfNeeded() call.
1942         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
1943           Data member -> function
1944         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): ditto.
1945         (WebCore::RenderTextControlSingleLine::clientPaddingLeft): ditto.
1946         (WebCore::RenderTextControlSingleLine::clientPaddingRight): ditto.
1947         (WebCore::RenderTextControlSingleLine::textBlockInsetTop): ditto.
1948         * rendering/RenderTextControlSingleLine.h:
1949           Add declarations, and remove unnecessary data members.
1950
1951 2011-05-21  Chris Rogers  <crogers@google.com>
1952
1953         Reviewed by Kenneth Russell.
1954
1955         AudioBufferSourceNode noteOff() method must respect scheduling time
1956         https://bugs.webkit.org/show_bug.cgi?id=61226
1957
1958         No new tests since audio API is not yet implemented.
1959
1960         * webaudio/AudioBufferSourceNode.cpp:
1961         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
1962         (WebCore::AudioBufferSourceNode::process):
1963         (WebCore::AudioBufferSourceNode::provideInput):
1964         (WebCore::AudioBufferSourceNode::finish):
1965         (WebCore::AudioBufferSourceNode::noteGrainOn):
1966         (WebCore::AudioBufferSourceNode::noteOff):
1967         * webaudio/AudioBufferSourceNode.h:
1968
1969 2011-05-20  Dirk Schulze  <krit@webkit.org>
1970
1971         Reviewed by Nikolas Zimmermann.
1972
1973         Share more code in PathTraversalState
1974         https://bugs.webkit.org/show_bug.cgi?id=61238
1975
1976         Share more code between SVGPathTraversalStateBuilder and Path in PathTraversalState.
1977
1978         No change in functionality, so no new tests.
1979
1980         * platform/graphics/Path.cpp:
1981         (WebCore::pathLengthApplierFunction):
1982         * platform/graphics/PathTraversalState.cpp:
1983         (WebCore::PathTraversalState::processSegment):
1984         * platform/graphics/PathTraversalState.h:
1985         * svg/SVGPathTraversalStateBuilder.cpp:
1986         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
1987
1988 2011-05-21  Nikolas Zimmermann  <nzimmermann@rim.com>
1989
1990         Reviewed by Rob Buis.
1991
1992         SVG svgAttributeChanged/synchronizeProperty/parseMappedAttribute should be optimized
1993         https://bugs.webkit.org/show_bug.cgi?id=61183
1994
1995         Example: rect.x.baseVal.value = 100;
1996         What happens: SVGRectElement::svgAttributeChanged(const QualifiedName& attrName) is invoked with "SVGNames::rectAttr" as parameter.
1997
1998         void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName)
1999         {
2000             SVGStyledTransformableElement::svgAttributeChanged(attrName);
2001             // Handle my own attribute changes...
2002         }
2003
2004         Currently we always traverse the base class hierarchy, when invoking svgAttributeChanged. Every svgAttributeChanged call from a class
2005         like SVGRectElement has to reach the base class SVGStyledElement::svgAttributeChanged, as it handles invalidation of the instances of
2006         an element. Say that a <rect> is referenced by a <use> and we change the 'x' attribute of the <rect>, then SVGStyledElement::svgAttributeChanged,
2007         calls SVGElementInstance::invalidateAllInstancesOfElement(this), so that the <use> can rebuild its shadow tree...
2008         That's the only reason all svgAttributeChanged implementations call the base class immediately, so SVGStyledElement is always reached.
2009
2010         Switch to a more efficient pattern, by providing a "bool isSupportedAttribute(const QualifiedName&);" function for all SVG*Elements.
2011         It contains all attributes the particular SVG*Element class handles (but not its parent classes attributes). For example SVGRectElement
2012         contains x/y/width/height/rx/ry attributes, and the ones from SVGTests/SVGLangSpace/SVGExternalResourcesRequired (xml:space/lang, etc.),
2013         but not eg. transform as that's handled by the parent class SVGStyledTransformableElement.
2014
2015         void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName)
2016         {
2017             if (!isSupportedAttribute.contains(attrName)) {
2018                 SVGStyledTransformableElement::svgAttributeChanged(attrName);
2019                 return;
2020             }
2021
2022             // When we get here, we know for sure it's one of our attributes that has changed.
2023             // Note for eg. SVGNames::transformAttr, the call from SVGRectElement::svgAttributeChanged, would be immediately forwarded to the base class, which handles transformAttr changes)
2024
2025             if (attrName == SVGNames::xAttr) { do_work(); return; }
2026             if (attrName == SVGNames::yAttr) { do_work(); return; }
2027             ...
2028             // Assure that we handled all properties we claim support for in "isSupportedAttribute()".
2029             ASSERT_NOT_REACHED();
2030         }
2031
2032         Exactly the same pattern can be applied to synchronizeProperty and parseMappedAttribute to speed them up as well.
2033
2034         Add "SVGElementInstance::InvalidationGuard guard(this)" statements in all svgAttributeChanged implementations, that calls invalidateAllInstancesOfElement(this)
2035         upon destruction, after we've reacted to the svg attribute change. This assures we never forget to call the invalidation method anywhere, and don't
2036         need to rely on the base class svgAttributeChanged() call to do it.
2037        
2038         It's a slight overal performance progression.
2039
2040         * svg/SVGAElement.cpp:
2041         (WebCore::SVGAElement::isSupportedAttribute):
2042         (WebCore::SVGAElement::parseMappedAttribute):
2043         (WebCore::SVGAElement::svgAttributeChanged):
2044         (WebCore::SVGAElement::synchronizeProperty):
2045         * svg/SVGAElement.h:
2046         * svg/SVGAnimateMotionElement.cpp:
2047         (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
2048         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
2049         * svg/SVGAnimateMotionElement.h:
2050         * svg/SVGAnimateTransformElement.cpp:
2051         (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
2052         (WebCore::SVGAnimateTransformElement::parseMappedAttribute):
2053         * svg/SVGAnimateTransformElement.h:
2054         * svg/SVGAnimationElement.cpp:
2055         (WebCore::SVGAnimationElement::isSupportedAttribute):
2056         (WebCore::SVGAnimationElement::parseMappedAttribute):
2057         * svg/SVGAnimationElement.h:
2058         * svg/SVGCircleElement.cpp:
2059         (WebCore::SVGCircleElement::isSupportedAttribute):
2060         (WebCore::SVGCircleElement::parseMappedAttribute):
2061         (WebCore::SVGCircleElement::svgAttributeChanged):
2062         (WebCore::SVGCircleElement::synchronizeProperty):
2063         * svg/SVGCircleElement.h:
2064         * svg/SVGClipPathElement.cpp:
2065         (WebCore::SVGClipPathElement::isSupportedAttribute):
2066         (WebCore::SVGClipPathElement::parseMappedAttribute):
2067         (WebCore::SVGClipPathElement::svgAttributeChanged):
2068         (WebCore::SVGClipPathElement::synchronizeProperty):
2069         * svg/SVGClipPathElement.h:
2070         * svg/SVGComponentTransferFunctionElement.cpp:
2071         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
2072         (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
2073         (WebCore::SVGComponentTransferFunctionElement::synchronizeProperty):
2074         * svg/SVGComponentTransferFunctionElement.h:
2075         * svg/SVGCursorElement.cpp:
2076         (WebCore::SVGCursorElement::isSupportedAttribute):
2077         (WebCore::SVGCursorElement::parseMappedAttribute):
2078         (WebCore::SVGCursorElement::svgAttributeChanged):
2079         (WebCore::SVGCursorElement::synchronizeProperty):
2080         * svg/SVGCursorElement.h:
2081         * svg/SVGElementInstance.h:
2082         (WebCore::SVGElementInstance::InvalidationGuard::InvalidationGuard):
2083         (WebCore::SVGElementInstance::InvalidationGuard::~InvalidationGuard):
2084         * svg/SVGEllipseElement.cpp:
2085         (WebCore::SVGEllipseElement::isSupportedAttribute):
2086         (WebCore::SVGEllipseElement::parseMappedAttribute):
2087         (WebCore::SVGEllipseElement::svgAttributeChanged):
2088         (WebCore::SVGEllipseElement::synchronizeProperty):
2089         * svg/SVGEllipseElement.h:
2090         * svg/SVGExternalResourcesRequired.cpp:
2091         (WebCore::SVGExternalResourcesRequired::addSupportedAttributes):
2092         * svg/SVGExternalResourcesRequired.h:
2093         * svg/SVGFEBlendElement.cpp:
2094         (WebCore::SVGFEBlendElement::isSupportedAttribute):
2095         (WebCore::SVGFEBlendElement::parseMappedAttribute):
2096         (WebCore::SVGFEBlendElement::svgAttributeChanged):
2097         (WebCore::SVGFEBlendElement::synchronizeProperty):
2098         * svg/SVGFEBlendElement.h:
2099         * svg/SVGFEColorMatrixElement.cpp:
2100         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
2101         (WebCore::SVGFEColorMatrixElement::parseMappedAttribute):
2102         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged):
2103         (WebCore::SVGFEColorMatrixElement::synchronizeProperty):
2104         * svg/SVGFEColorMatrixElement.h:
2105         * svg/SVGFEComponentTransferElement.cpp:
2106         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
2107         (WebCore::SVGFEComponentTransferElement::parseMappedAttribute):
2108         (WebCore::SVGFEComponentTransferElement::synchronizeProperty):
2109         * svg/SVGFEComponentTransferElement.h:
2110         * svg/SVGFECompositeElement.cpp:
2111         (WebCore::SVGFECompositeElement::isSupportedAttribute):
2112         (WebCore::SVGFECompositeElement::parseMappedAttribute):
2113         (WebCore::SVGFECompositeElement::svgAttributeChanged):
2114         (WebCore::SVGFECompositeElement::synchronizeProperty):
2115         * svg/SVGFECompositeElement.h:
2116         * svg/SVGFEConvolveMatrixElement.cpp:
2117         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
2118         (WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute):
2119         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged):
2120         (WebCore::SVGFEConvolveMatrixElement::synchronizeProperty):
2121         * svg/SVGFEConvolveMatrixElement.h:
2122         * svg/SVGFEDiffuseLightingElement.cpp:
2123         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
2124         (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
2125         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
2126         (WebCore::SVGFEDiffuseLightingElement::synchronizeProperty):
2127         * svg/SVGFEDiffuseLightingElement.h:
2128         * svg/SVGFEDisplacementMapElement.cpp:
2129         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
2130         (WebCore::SVGFEDisplacementMapElement::parseMappedAttribute):
2131         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged):
2132         (WebCore::SVGFEDisplacementMapElement::synchronizeProperty):
2133         * svg/SVGFEDisplacementMapElement.h:
2134         * svg/SVGFEDropShadowElement.cpp:
2135         (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
2136         (WebCore::SVGFEDropShadowElement::parseMappedAttribute):
2137         (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
2138         (WebCore::SVGFEDropShadowElement::synchronizeProperty):
2139         * svg/SVGFEDropShadowElement.h:
2140         * svg/SVGFEGaussianBlurElement.cpp:
2141         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
2142         (WebCore::SVGFEGaussianBlurElement::parseMappedAttribute):
2143         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
2144         (WebCore::SVGFEGaussianBlurElement::synchronizeProperty):
2145         * svg/SVGFEGaussianBlurElement.h:
2146         * svg/SVGFEImageElement.cpp:
2147         (WebCore::SVGFEImageElement::isSupportedAttribute):
2148         (WebCore::SVGFEImageElement::parseMappedAttribute):
2149         (WebCore::SVGFEImageElement::svgAttributeChanged):
2150         (WebCore::SVGFEImageElement::synchronizeProperty):
2151         * svg/SVGFEImageElement.h:
2152         * svg/SVGFELightElement.cpp:
2153         (WebCore::SVGFELightElement::isSupportedAttribute):
2154         (WebCore::SVGFELightElement::parseMappedAttribute):
2155         (WebCore::SVGFELightElement::svgAttributeChanged):
2156         (WebCore::SVGFELightElement::synchronizeProperty):
2157         * svg/SVGFELightElement.h:
2158         * svg/SVGFEMergeNodeElement.cpp:
2159         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
2160         (WebCore::SVGFEMergeNodeElement::parseMappedAttribute):
2161         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
2162         (WebCore::SVGFEMergeNodeElement::synchronizeProperty):
2163         * svg/SVGFEMergeNodeElement.h:
2164         * svg/SVGFEMorphologyElement.cpp:
2165         (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
2166         (WebCore::SVGFEMorphologyElement::parseMappedAttribute):
2167         (WebCore::SVGFEMorphologyElement::svgAttributeChanged):
2168         (WebCore::SVGFEMorphologyElement::synchronizeProperty):
2169         * svg/SVGFEMorphologyElement.h:
2170         * svg/SVGFEOffsetElement.cpp:
2171         (WebCore::SVGFEOffsetElement::isSupportedAttribute):
2172         (WebCore::SVGFEOffsetElement::parseMappedAttribute):
2173         (WebCore::SVGFEOffsetElement::svgAttributeChanged):
2174         (WebCore::SVGFEOffsetElement::synchronizeProperty):
2175         * svg/SVGFEOffsetElement.h:
2176         * svg/SVGFESpecularLightingElement.cpp:
2177         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
2178         (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
2179         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged):
2180         (WebCore::SVGFESpecularLightingElement::synchronizeProperty):
2181         * svg/SVGFESpecularLightingElement.h:
2182         * svg/SVGFETileElement.cpp:
2183         (WebCore::SVGFETileElement::isSupportedAttribute):
2184         (WebCore::SVGFETileElement::parseMappedAttribute):
2185         (WebCore::SVGFETileElement::svgAttributeChanged):
2186         (WebCore::SVGFETileElement::synchronizeProperty):
2187         * svg/SVGFETileElement.h:
2188         * svg/SVGFETurbulenceElement.cpp:
2189         (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
2190         (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
2191         (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
2192         (WebCore::SVGFETurbulenceElement::synchronizeProperty):
2193         * svg/SVGFETurbulenceElement.h:
2194         * svg/SVGFilterElement.cpp:
2195         (WebCore::SVGFilterElement::isSupportedAttribute):
2196         (WebCore::SVGFilterElement::parseMappedAttribute):
2197         (WebCore::SVGFilterElement::svgAttributeChanged):
2198         (WebCore::SVGFilterElement::synchronizeProperty):
2199         * svg/SVGFilterElement.h:
2200         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2201         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
2202         (WebCore::SVGFilterPrimitiveStandardAttributes::parseMappedAttribute):
2203         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
2204         (WebCore::SVGFilterPrimitiveStandardAttributes::synchronizeProperty):
2205         * svg/SVGFilterPrimitiveStandardAttributes.h:
2206         * svg/SVGFitToViewBox.cpp:
2207         (WebCore::SVGFitToViewBox::parseMappedAttribute):
2208         (WebCore::SVGFitToViewBox::synchronizeProperties):
2209         (WebCore::SVGFitToViewBox::addSupportedAttributes):
2210         * svg/SVGFitToViewBox.h:
2211         * svg/SVGForeignObjectElement.cpp:
2212         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
2213         (WebCore::SVGForeignObjectElement::parseMappedAttribute):
2214         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
2215         (WebCore::SVGForeignObjectElement::synchronizeProperty):
2216         * svg/SVGForeignObjectElement.h:
2217         * svg/SVGGElement.cpp:
2218         (WebCore::SVGGElement::isSupportedAttribute):
2219         (WebCore::SVGGElement::parseMappedAttribute):
2220         (WebCore::SVGGElement::svgAttributeChanged):
2221         (WebCore::SVGGElement::synchronizeProperty):
2222         * svg/SVGGElement.h:
2223         * svg/SVGGradientElement.cpp:
2224         (WebCore::SVGGradientElement::isSupportedAttribute):
2225         (WebCore::SVGGradientElement::parseMappedAttribute):
2226         (WebCore::SVGGradientElement::svgAttributeChanged):
2227         (WebCore::SVGGradientElement::synchronizeProperty):
2228         * svg/SVGGradientElement.h:
2229         * svg/SVGImageElement.cpp:
2230         (WebCore::SVGImageElement::isSupportedAttribute):
2231         (WebCore::SVGImageElement::parseMappedAttribute):
2232         (WebCore::SVGImageElement::svgAttributeChanged):
2233         (WebCore::SVGImageElement::synchronizeProperty):
2234         * svg/SVGImageElement.h:
2235         * svg/SVGLangSpace.cpp:
2236         (WebCore::SVGLangSpace::addSupportedAttributes):
2237         * svg/SVGLangSpace.h:
2238         * svg/SVGLineElement.cpp:
2239         (WebCore::SVGLineElement::isSupportedAttribute):
2240         (WebCore::SVGLineElement::parseMappedAttribute):
2241         (WebCore::SVGLineElement::svgAttributeChanged):
2242         (WebCore::SVGLineElement::synchronizeProperty):
2243         * svg/SVGLineElement.h:
2244         * svg/SVGLinearGradientElement.cpp:
2245         (WebCore::SVGLinearGradientElement::isSupportedAttribute):
2246         (WebCore::SVGLinearGradientElement::parseMappedAttribute):
2247         (WebCore::SVGLinearGradientElement::svgAttributeChanged):
2248         (WebCore::SVGLinearGradientElement::synchronizeProperty):
2249         * svg/SVGLinearGradientElement.h:
2250         * svg/SVGMPathElement.cpp:
2251         (WebCore::SVGMPathElement::isSupportedAttribute):
2252         (WebCore::SVGMPathElement::parseMappedAttribute):
2253         (WebCore::SVGMPathElement::synchronizeProperty):
2254         * svg/SVGMPathElement.h:
2255         * svg/SVGMarkerElement.cpp:
2256         (WebCore::SVGMarkerElement::isSupportedAttribute):
2257         (WebCore::SVGMarkerElement::parseMappedAttribute):
2258         (WebCore::SVGMarkerElement::svgAttributeChanged):
2259         (WebCore::SVGMarkerElement::synchronizeProperty):
2260         * svg/SVGMarkerElement.h:
2261         * svg/SVGMaskElement.cpp:
2262         (WebCore::SVGMaskElement::isSupportedAttribute):
2263         (WebCore::SVGMaskElement::parseMappedAttribute):
2264         (WebCore::SVGMaskElement::svgAttributeChanged):
2265         (WebCore::SVGMaskElement::synchronizeProperty):
2266         * svg/SVGMaskElement.h:
2267         * svg/SVGPathElement.cpp:
2268         (WebCore::SVGPathElement::isSupportedAttribute):
2269         (WebCore::SVGPathElement::parseMappedAttribute):
2270         (WebCore::SVGPathElement::svgAttributeChanged):
2271         (WebCore::SVGPathElement::synchronizeProperty):
2272         * svg/SVGPathElement.h:
2273         * svg/SVGPatternElement.cpp:
2274         (WebCore::SVGPatternElement::isSupportedAttribute):
2275         (WebCore::SVGPatternElement::parseMappedAttribute):
2276         (WebCore::SVGPatternElement::svgAttributeChanged):
2277         (WebCore::SVGPatternElement::synchronizeProperty):
2278         * svg/SVGPatternElement.h:
2279         * svg/SVGPolyElement.cpp:
2280         (WebCore::SVGPolyElement::isSupportedAttribute):
2281         (WebCore::SVGPolyElement::parseMappedAttribute):
2282         (WebCore::SVGPolyElement::svgAttributeChanged):
2283         * svg/SVGPolyElement.h:
2284         * svg/SVGRadialGradientElement.cpp:
2285         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
2286         (WebCore::SVGRadialGradientElement::parseMappedAttribute):
2287         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
2288         (WebCore::SVGRadialGradientElement::synchronizeProperty):
2289         * svg/SVGRadialGradientElement.h:
2290         * svg/SVGRectElement.cpp:
2291         (WebCore::SVGRectElement::isSupportedAttribute):
2292         (WebCore::SVGRectElement::parseMappedAttribute):
2293         (WebCore::SVGRectElement::svgAttributeChanged):
2294         (WebCore::SVGRectElement::synchronizeProperty):
2295         * svg/SVGRectElement.h:
2296         * svg/SVGSVGElement.cpp:
2297         (WebCore::SVGSVGElement::svgAttributeChanged):
2298         (WebCore::SVGSVGElement::synchronizeProperty):
2299         * svg/SVGScriptElement.cpp:
2300         (WebCore::SVGScriptElement::isSupportedAttribute):
2301         (WebCore::SVGScriptElement::parseMappedAttribute):
2302         (WebCore::SVGScriptElement::svgAttributeChanged):
2303         (WebCore::SVGScriptElement::synchronizeProperty):
2304         * svg/SVGScriptElement.h:
2305         * svg/SVGStopElement.cpp:
2306         (WebCore::SVGStopElement::isSupportedAttribute):
2307         (WebCore::SVGStopElement::parseMappedAttribute):
2308         (WebCore::SVGStopElement::svgAttributeChanged):
2309         (WebCore::SVGStopElement::synchronizeProperty):
2310         * svg/SVGStopElement.h:
2311         * svg/SVGStyleElement.cpp:
2312         (WebCore::SVGStyleElement::isSupportedAttribute):
2313         (WebCore::SVGStyleElement::parseMappedAttribute):
2314         * svg/SVGStyleElement.h:
2315         * svg/SVGStyledElement.cpp:
2316         (WebCore::SVGStyledElement::parseMappedAttribute):
2317         (WebCore::SVGStyledElement::svgAttributeChanged):
2318         (WebCore::SVGStyledElement::synchronizeProperty):
2319         * svg/SVGStyledTransformableElement.cpp:
2320         (WebCore::SVGStyledTransformableElement::isSupportedAttribute):
2321         (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
2322         (WebCore::SVGStyledTransformableElement::svgAttributeChanged):
2323         (WebCore::SVGStyledTransformableElement::synchronizeProperty):
2324         * svg/SVGStyledTransformableElement.h:
2325         * svg/SVGSymbolElement.cpp:
2326         (WebCore::SVGSymbolElement::isSupportedAttribute):
2327         (WebCore::SVGSymbolElement::parseMappedAttribute):
2328         (WebCore::SVGSymbolElement::svgAttributeChanged):
2329         (WebCore::SVGSymbolElement::synchronizeProperty):
2330         * svg/SVGSymbolElement.h:
2331         * svg/SVGTRefElement.cpp:
2332         (WebCore::SVGTRefElement::isSupportedAttribute):
2333         (WebCore::SVGTRefElement::parseMappedAttribute):
2334         (WebCore::SVGTRefElement::svgAttributeChanged):
2335         (WebCore::SVGTRefElement::synchronizeProperty):
2336         * svg/SVGTRefElement.h:
2337         * svg/SVGTests.cpp:
2338         (WebCore::SVGTests::addSupportedAttributes):
2339         * svg/SVGTests.h:
2340         * svg/SVGTextContentElement.cpp:
2341         (WebCore::SVGTextContentElement::isSupportedAttribute):
2342         (WebCore::SVGTextContentElement::parseMappedAttribute):
2343         (WebCore::SVGTextContentElement::synchronizeProperty):
2344         (WebCore::SVGTextContentElement::svgAttributeChanged):
2345         * svg/SVGTextContentElement.h:
2346         * svg/SVGTextElement.cpp:
2347         (WebCore::SVGTextElement::isSupportedAttribute):
2348         (WebCore::SVGTextElement::parseMappedAttribute):
2349         (WebCore::SVGTextElement::svgAttributeChanged):
2350         (WebCore::SVGTextElement::synchronizeProperty):
2351         * svg/SVGTextElement.h:
2352         * svg/SVGTextPathElement.cpp:
2353         (WebCore::SVGTextPathElement::isSupportedAttribute):
2354         (WebCore::SVGTextPathElement::parseMappedAttribute):
2355         (WebCore::SVGTextPathElement::svgAttributeChanged):
2356         (WebCore::SVGTextPathElement::synchronizeProperty):
2357         * svg/SVGTextPathElement.h:
2358         * svg/SVGTextPositioningElement.cpp:
2359         (WebCore::SVGTextPositioningElement::isSupportedAttribute):
2360         (WebCore::SVGTextPositioningElement::parseMappedAttribute):
2361         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
2362         (WebCore::SVGTextPositioningElement::synchronizeProperty):
2363         * svg/SVGTextPositioningElement.h:
2364         * svg/SVGTransformable.cpp:
2365         * svg/SVGTransformable.h:
2366         * svg/SVGURIReference.cpp:
2367         (WebCore::SVGURIReference::addSupportedAttributes):
2368         * svg/SVGURIReference.h:
2369         * svg/SVGUseElement.cpp:
2370         (WebCore::SVGUseElement::isSupportedAttribute):
2371         (WebCore::SVGUseElement::parseMappedAttribute):
2372         (WebCore::SVGUseElement::svgAttributeChanged):
2373         (WebCore::SVGUseElement::synchronizeProperty):
2374         * svg/SVGUseElement.h:
2375         * svg/SVGViewElement.cpp:
2376         (WebCore::SVGViewElement::isSupportedAttribute):
2377         (WebCore::SVGViewElement::parseMappedAttribute):
2378         (WebCore::SVGViewElement::synchronizeProperty):
2379         * svg/SVGViewElement.h:
2380         * svg/SVGZoomAndPan.cpp:
2381         (WebCore::SVGZoomAndPan::addSupportedAttributes):
2382         * svg/SVGZoomAndPan.h:
2383
2384 2011-05-20  Simon Fraser  <simon.fraser@apple.com>
2385
2386         Reviewed by Dan Bernstein.
2387
2388         Allow ShadowBlur to do tiling when the context is scaled
2389         https://bugs.webkit.org/show_bug.cgi?id=61232
2390
2391         If the GraphicsContext is scaled or rotated by a multiple of 90deg, have ShadowBlur
2392         use the tiling code path, to avoid blurring large areas on pages like cracked.com
2393         when the context is scaled.
2394
2395         * platform/graphics/ShadowBlur.cpp:
2396         (WebCore::ShadowBlur::drawRectShadow): Call preservesAxisAlignment()
2397         to decide when to not use tiling.
2398         (WebCore::ShadowBlur::drawInsetShadow): Ditto.
2399         (WebCore::ShadowBlur::drawLayerPieces): Round to device pixels when drawing tiles
2400         to avoid pixel cracks in scaled contexts.
2401         * platform/graphics/transforms/AffineTransform.h:
2402         (WebCore::AffineTransform::preservesAxisAlignment): Return true if there is the matrix
2403         contains a transform that results in axis alignment (no rotation or skew, or rotations
2404         which are multiples of 90deg).
2405
2406 2011-05-20  Alexey Proskuryakov  <ap@apple.com>
2407
2408         Reviewed by Kent Tamura.
2409
2410         Special characters can be inserted in text field having reached maxlength
2411         https://bugs.webkit.org/show_bug.cgi?id=19479
2412         <rdar://problem/7828739>
2413
2414         Test: platform/mac/editing/input/maxlength.html
2415
2416         * editing/CompositeEditCommand.cpp:
2417         (WebCore::CompositeEditCommand::insertTextIntoNode):
2418         (WebCore::CompositeEditCommand::replaceTextInNode):
2419         Avoid hitting an assertion below, now that we can get here with empty text.
2420
2421         * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): There is still work to do
2422         even if beforetextinput removed all text from the event. At the very least, we should delete
2423         the current selection.
2424
2425 2011-05-20  Andy Estes  <aestes@apple.com>
2426
2427         Reviewed by Darin Adler.
2428
2429         REGRESSION (r70748): WebKit cannot play videos created by Podcast Producer.
2430         https://bugs.webkit.org/show_bug.cgi?id=61229
2431         
2432         Podcast Producer uses an object tag with a classid attribute to embed
2433         QuickTime Player into a page. In r70748, we changed our behavior to
2434         render the object's fallback content when a non-empty classid is
2435         encountered, per HTML5. Since Podcast Producer videos have no fallback
2436         content, this change in behavior causes the video to fail to load.
2437         
2438         Since the object tag has a valid type attribute, we would be able to
2439         load it if weren't for the non-empty classid. This patch changes our
2440         policy to allow objects with non-empty classids if there is no fallback
2441         content. We still continue to prefer fallback content if it exists,
2442         however.
2443
2444         * html/HTMLObjectElement.cpp:
2445         (WebCore::HTMLObjectElement::hasValidClassId): Treat a non-empty
2446         classid as valid if the object has no fallback content.
2447
2448 2011-05-20  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
2449
2450         Reviewed by Simon Fraser.
2451
2452         If both border-radius and box-shadow applied, shadow is not fully visible
2453         https://bugs.webkit.org/show_bug.cgi?id=59577
2454
2455         The current implementation of RoundedIntRect::inflateWithRadii() inflates
2456         its rect size and corner radii out of sync. This leads to validation failure in
2457         Path::addRoundedRect() and results in ignoring radii in the path.
2458         When this invalid path is used to clip out the rounded corner box before painting
2459         the box shadow, the entire rectangle is clipped out without the corner radii.
2460
2461         This patch implements RoundedIntRect::inflateWithRadii() properly to inflate
2462         rounded rect radii based on inflate ratios of rect size.
2463
2464         Test: fast/css/box-shadow-and-border-radius.html
2465
2466         * platform/graphics/RoundedIntRect.cpp:
2467         (WebCore::RoundedIntRect::inflateWithRadii):
2468         * platform/graphics/RoundedIntRect.h:
2469
2470 2011-05-20  Michael Nordman  <michaeln@google.com>
2471
2472         Reviewed by Darin Fisher.
2473
2474         [Chromium] Support the new webkit apis so the WebDatabase system participates
2475         in the unified quota management system.
2476         https://bugs.webkit.org/show_bug.cgi?id=60985
2477
2478         No change in functionality, no new tests.
2479
2480         * platform/chromium/PlatformBridge.h:
2481         * storage/chromium/QuotaTracker.cpp:
2482         (WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin):
2483         (WebCore::QuotaTracker::updateDatabaseSize):
2484         (WebCore::QuotaTracker::updateSpaceAvailableToOrigin):
2485         (WebCore::QuotaTracker::resetSpaceAvailableToOrigin):
2486         * storage/chromium/QuotaTracker.h:
2487
2488 2011-05-20  Andy Estes  <aestes@apple.com>
2489
2490         Reviewed by Darin Adler.
2491
2492         WebView loses firstResponder status when entering full-screen mode.
2493         https://bugs.webkit.org/show_bug.cgi?id=61153
2494
2495         No test possible via DRT. Add a manual test instead.
2496
2497         * manual-tests/full-screen-keypress.html: Added.
2498
2499 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
2500
2501         Reviewed by Maciej Stachowiak.
2502
2503         WebKit2: Exit full screen mode if the WebProcess crashes.
2504         https://bugs.webkit.org/show_bug.cgi?id=61151
2505
2506         * platform/graphics/win/FullScreenController.h:
2507         * platform/graphics/win/FullScreenController.cpp:
2508         (FullScreenController::close): Added.  Close the full-screen window without animation
2509             if called.
2510
2511 2011-05-20  Enrica Casucci  <enrica@apple.com>
2512
2513         Reviewed by David Kilzer.
2514
2515         Add delegate methods about focus and blur to all elements.
2516         https://bugs.webkit.org/show_bug.cgi?id=61218
2517
2518         We want to have delegates for these events for all the elements, not only the form elements.
2519         The patch moves the call to the delegate in the Node class and changes the name
2520         of the methods not to be form element specific.
2521
2522         * dom/Node.cpp:
2523         (WebCore::Node::dispatchFocusEvent): Added call to delegate with the new name.
2524         (WebCore::Node::dispatchBlurEvent): Added call to delegate with the new name.
2525         * html/HTMLFormControlElement.cpp:
2526         (WebCore::HTMLFormControlElement::dispatchBlurEvent): Removed code that calls the delegate since
2527         it has been moved into Node.
2528         * html/HTMLFormControlElement.h: Removed dispatchFocusEvent, since we are using the default inplementation in Node.
2529         * loader/EmptyClients.h:
2530         (WebCore::EmptyChromeClient::elementDidFocus): Name changed.
2531         (WebCore::EmptyChromeClient::elementDidBlur): Name changed.
2532         * page/ChromeClient.h:
2533         (WebCore::ChromeClient::elementDidFocus): Name changed.
2534         (WebCore::ChromeClient::elementDidBlur): Name changed.
2535
2536 2011-05-20  Ryosuke Niwa  <rniwa@webkit.org>
2537
2538         Reviewed by Enrica Casucci.
2539
2540         Wrap copied contents by one style span instead of two
2541         https://bugs.webkit.org/show_bug.cgi?id=60988
2542
2543         Replaced sourceDocumentStyleSpan and copiedRangeStyleSpan by one wrapping style span. Instead
2544         of wrapping the copied contents by user-applied style and document default style in serialization,
2545         take the difference with the document default's style in paste code.
2546
2547         This will dramatically simplify our copy and paste code and pave a way to fix the bug 60914.
2548
2549         No new tests because copy & paste is tested by existing layout tests.
2550
2551         * editing/EditingStyle.cpp:
2552         (WebCore::EditingStyle::prepareToApplyAt): Remove the color property if RGBA values of color
2553         matches that of the computed style at the specified position.
2554         * editing/ReplaceSelectionCommand.cpp:
2555         (WebCore::ReplaceSelectionCommand::handleStyleSpans): Replaced sourceDocumentStyleSpan and
2556         copiedRangeStyleSpan by wrappingStyleSpan. When pasting as a quotation, compare style against
2557         the document's default style to avoid keeping the document default style (tested by
2558         editing/pasteboard/4930986-3.html).
2559         * editing/ReplaceSelectionCommand.h:
2560         * editing/markup.cpp:
2561         (WebCore::createMarkup): Only use one style span to wrap the serialized contents.
2562
2563 2011-05-20  Simon Fraser  <simon.fraser@apple.com>
2564
2565         Reviewed by Sam Weinig.
2566
2567         numberOfActiveAnimations() can include animations from documents in the page cache
2568         https://bugs.webkit.org/show_bug.cgi?id=53641
2569         
2570         Some transition tests using layoutTestController.numberOfActiveAnimations() failed
2571         in WebKit2 because numberOfActiveAnimations() could include those from other documents
2572         in the page cache.
2573         
2574         Fix by passing in the document for which we wish to count animations.
2575
2576         * WebCore.exp.in:
2577         * page/animation/AnimationController.cpp:
2578         (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
2579         (WebCore::AnimationController::numberOfActiveAnimations):
2580         * page/animation/AnimationController.h:
2581         * page/animation/AnimationControllerPrivate.h:
2582
2583 2011-05-20  Adam Barth  <abarth@webkit.org>
2584
2585         Reviewed by Alexey Proskuryakov.
2586
2587         Factor CORS request preparation out of DocumentThreadableLoader
2588         https://bugs.webkit.org/show_bug.cgi?id=61209
2589
2590         DocumentThreadableLoader has two jobs:
2591
2592         1) Proxy loads between threads.
2593         2) Run the CORS state machine.
2594
2595         This patch begins the work of separating those concerns, allowing CORS
2596         to be used elsewhere in the loading pipeline.  In particular, this
2597         patch moves knowledge of how to prepare CORS requests out of
2598         DocumentThreadableLoder.
2599
2600         * loader/CrossOriginAccessControl.cpp:
2601         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
2602         (WebCore::updateRequestForAccessControl):
2603         (WebCore::createAccessControlPreflightRequest):
2604         * loader/CrossOriginAccessControl.h:
2605         * loader/DocumentThreadableLoader.cpp:
2606         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
2607         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
2608         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
2609
2610 2011-05-20  Rob Buis  <rbuis@rim.com>
2611
2612         Reviewed by Dirk Schulze.
2613
2614         Use test from ietestcenter fails
2615         https://bugs.webkit.org/show_bug.cgi?id=60844
2616
2617         When an id changes on an in-document element, we need to check whether the id
2618         is part of the pending elements. Since this is the same thing as happens in
2619         insertedIntoDocument, split out the common code into buildPendingResourcesIfNeeded.
2620
2621         Test: svg/W3C-SVG-1.1-SE/struct-use-14-f.svg
2622
2623         * svg/SVGStyledElement.cpp:
2624         (WebCore::SVGStyledElement::svgAttributeChanged):
2625         (WebCore::SVGStyledElement::insertedIntoDocument):
2626         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
2627         * svg/SVGStyledElement.h:
2628
2629 2011-05-20  Abhishek Arya  <inferno@chromium.org>
2630
2631         Reviewed by Kent Tamura.
2632
2633         Make auto-focus a post attach callback in
2634         HTMLFormControlElement::attach().
2635         https://bugs.webkit.org/show_bug.cgi?id=32882
2636
2637         Original patch by Darin Adler. This one uses a part of it.
2638         
2639         Test: fast/forms/input-element-attach-crash.html
2640
2641         * dom/Document.cpp:
2642         (WebCore::Document::recalcStyle): Make sure that m_inStyleRecalc is
2643         already false by the time post-attach callbacks are done so that
2644         layout triggered inside those callbacks can work properly.
2645         * html/HTMLFormControlElement.cpp:
2646         (WebCore::shouldAutofocus): Helper function that expresses
2647         the rule for which form control elements should auto-focus.
2648         (WebCore::focusPostAttach): Called post-attach to focus an
2649         element if we discover it should be focused during attach.
2650         (WebCore::HTMLFormControlElement::attach): Refactored code for
2651         which elements need auto-focus into a separate function. Instead
2652         of focusing right away, use the focusPostAttach function to focus
2653         after attach is done. Also added calls to suspendPostAttachCallbacks
2654         and resumePostAttachCallbacks so post-attach callbacks happen late
2655         enough. Before, they could run inside the base attach function.
2656         * html/HTMLInputElement.cpp:
2657         (WebCore::HTMLInputElement::attach): Added calls to
2658         suspendPostAttachCallbacks and resumePostAttachCallbacks so
2659         post-attach callbacks happen late enough
2660
2661 2011-05-20  Alok Priyadarshi  <alokp@chromium.org>
2662
2663         Reviewed by James Robinson.
2664
2665         [chromium] Remove LayerRendererChromium::useShader
2666         https://bugs.webkit.org/show_bug.cgi?id=61143
2667
2668         GPU compositor tests should be sufficient.
2669
2670         * platform/graphics/chromium/LayerRendererChromium.cpp:
2671         (WebCore::LayerRendererChromium::LayerRendererChromium):
2672         * platform/graphics/chromium/LayerRendererChromium.h:
2673         * platform/graphics/chromium/LayerTilerChromium.cpp:
2674         (WebCore::LayerTilerChromium::draw):
2675         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2676         (WebCore::RenderSurfaceChromium::drawSurface):
2677         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
2678         (WebCore::CCCanvasLayerImpl::draw):
2679         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2680         (WebCore::CCHeadsUpDisplay::draw):
2681         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2682         (WebCore::CCLayerImpl::drawDebugBorder):
2683         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
2684         (WebCore::CCPluginLayerImpl::draw):
2685         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2686         (WebCore::CCVideoLayerImpl::drawYUV):
2687         (WebCore::CCVideoLayerImpl::drawRGBA):
2688
2689 2011-05-20  Dirk Schulze  <krit@webkit.org>
2690
2691         Reviewed by Darin Adler.
2692
2693         SVGPathSegList needs better getTotalLength, getSegmentAtLength path traversal code
2694         https://bugs.webkit.org/show_bug.cgi?id=12047
2695
2696         Right now SVGPathElement::getTotalLength and SVGPathElement::getPointAtLength use toPathData()
2697         to transform a SVGPathByteStream to a Path. This Path gets traversed to find the searched value.
2698         With this patch both functions use the SVGPathByteStream directly together with the existing
2699         traversing code in SVG. This avoids the intermediate transforming to a platform path and gives
2700         platform independent results.
2701         The traversal code in SVG needed to be extended to support all PathTraversalActions.
2702
2703         No new tests added. The existing tests cover the changes.
2704
2705         * svg/SVGPathElement.cpp:
2706         (WebCore::SVGPathElement::getTotalLength):
2707         (WebCore::SVGPathElement::getPointAtLength):
2708         * svg/SVGPathParserFactory.cpp:
2709         (WebCore::SVGPathParserFactory::getTotalLengthOfSVGPathByteStream):
2710         (WebCore::SVGPathParserFactory::getPointAtLengthOfSVGPathByteStream):
2711         * svg/SVGPathParserFactory.h:
2712         * svg/SVGPathTraversalStateBuilder.cpp:
2713         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
2714         (WebCore::SVGPathTraversalStateBuilder::totalLength):
2715         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
2716         * svg/SVGPathTraversalStateBuilder.h:
2717
2718 2011-05-20  Mark Pilgrim  <pilgrim@chromium.org>
2719
2720         Reviewed by Tony Chang.
2721
2722         IndexedDB createObjectStore should throw if name is null
2723         https://bugs.webkit.org/show_bug.cgi?id=58465
2724
2725         Test: storage/indexeddb/mozilla/create-objectstore-null-name.html
2726
2727         * storage/IDBDatabase.idl:
2728         * storage/IDBDatabaseBackendImpl.cpp:
2729         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2730
2731 2011-05-20  Xiaomei Ji  <xji@chromium.org>
2732
2733         Reviewed by Ryosuke Niwa.
2734
2735         ctrl-arrow does not work on words separated by multiple spaces.
2736         https://bugs.webkit.org/show_bug.cgi?id=57543.
2737
2738         Add the leftmost boundary of a box in RTL block or the rightmost boundary of a box in LTR
2739         block as word break if its inlineBox is the current box and it is a word break.
2740
2741         * editing/visible_units.cpp:
2742         (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): Add the rightmost
2743         boundary of a box in LTR block or leftmost boundary of a box in RTL block as visually
2744         first word break.
2745         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
2746         (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
2747         (WebCore::leftWordBoundary): Fix bug change "box" to "adjacentBox".
2748         (WebCore::rightWordBoundary): Fix bug change "box" to "adjacentBox".
2749
2750 2011-05-19  Evan Martin  <evan@chromium.org>
2751
2752         Reviewed by Tony Chang.
2753
2754         [chromium] remove <(library) variable
2755         https://bugs.webkit.org/show_bug.cgi?id=61158
2756
2757         This was for a build experiment; we can just use the correct value now.
2758
2759         * WebCore.gyp/WebCore.gyp:
2760
2761 2011-05-20  Pavel Podivilov  <podivilov@chromium.org>
2762
2763         Reviewed by Pavel Feldman.
2764
2765         Web Inspector: breakpoints disappear from ui after navigation.
2766         https://bugs.webkit.org/show_bug.cgi?id=61133
2767
2768         * inspector/front-end/DebuggerPresentationModel.js:
2769         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
2770         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2771
2772 2011-05-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2773
2774         Unreviewed, rolling out r86958.
2775         http://trac.webkit.org/changeset/86958
2776         https://bugs.webkit.org/show_bug.cgi?id=61195
2777
2778         broke breakpoints persisting (Requested by podivilov on
2779         #webkit).
2780
2781         * inspector/front-end/DebuggerPresentationModel.js:
2782         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
2783         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2784
2785 2011-05-19  Sergey Vorobyev  <sergeyvorobyev@google.com>
2786
2787         Reviewed by Yury Semikhatsky.
2788
2789         Web Inspector: Background network events collection - add GUI to Inspector.
2790         https://bugs.webkit.org/show_bug.cgi?id=58652
2791
2792         Now in WebInspector Network panel avalaible new checkbox item in context menu:
2793         "Background events collection". It allows to save all network events when inspector
2794         frontend closed. Events that occur before collection enabling are not preserved after
2795         frontend reopening. Property unique for each page. Disabled by default.
2796
2797
2798         Tests: http/tests/inspector/network/network-clear-after-disabled.html
2799                http/tests/inspector/network/network-close-load-open.html
2800                http/tests/inspector/network/network-open-load-reopen.html
2801
2802         * inspector/EventsCollector.cpp:
2803         (WebCore::EventsCollector::clear):
2804         * inspector/EventsCollector.h:
2805         * inspector/Inspector.json:
2806         * inspector/InspectorFrontendProxy.cpp:
2807         (WebCore::InspectorFrontendProxy::inspectorFrontendChannel):
2808         * inspector/InspectorFrontendProxy.h:
2809         * inspector/InspectorResourceAgent.cpp:
2810         (WebCore::InspectorResourceAgent::setFrontend):
2811         (WebCore::InspectorResourceAgent::clearFrontend):
2812         (WebCore::InspectorResourceAgent::isBackgroundEventsCollectionEnabled):
2813         (WebCore::InspectorResourceAgent::setBackgroundEventsCollectionEnabled):
2814         (WebCore::InspectorResourceAgent::initializeBackgroundCollection):
2815         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
2816         * inspector/InspectorResourceAgent.h:
2817         * inspector/front-end/NetworkPanel.js:
2818         (WebInspector.NetworkPanel):
2819         (WebInspector.NetworkPanel.prototype._contextMenu):
2820         (WebInspector.NetworkPanel.prototype._toggleBackgroundEventsCollection):
2821
2822 2011-05-20  Pavel Podivilov  <podivilov@chromium.org>
2823
2824         Reviewed by Pavel Feldman.
2825
2826         Web Inspector: breakpoints disappear from ui after navigation.
2827         https://bugs.webkit.org/show_bug.cgi?id=61133
2828
2829         * inspector/front-end/DebuggerPresentationModel.js:
2830         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
2831         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2832
2833 2011-05-20  Jer Noble  <jer.noble@apple.com>
2834
2835         Reviewed by Maciej Stachowiak.
2836
2837         Win: non-full-screen content is briefly seen when entering full-screen mode (and vice versa)
2838         https://bugs.webkit.org/show_bug.cgi?id=61108
2839
2840         Instead of repainting the full- and non-full-screen windows in WebCore, delegate that
2841         responsibility to the FullScreenControllerClient.  Because the repaint operation may 
2842         be asynchronous, add a new method for clients to use to indicate repainting has completed.
2843
2844         * platform/graphics/win/FullScreenController.cpp:
2845         (FullScreenController::Private::Private): Added new ivars.
2846         (FullScreenController::enterFullScreen): Split into two functions (pre-and post repaint)
2847         (FullScreenController::enterFullScreenRepaintCompleted): Ditto.
2848         (FullScreenController::exitFullScreen): Ditto.
2849         (FullScreenController::exitFullScreenRepaintCompleted): Ditto.
2850         (FullScreenController::repaintCompleted): Call the appropriated repaint completed function.
2851         * platform/graphics/win/FullScreenController.h:
2852         * platform/graphics/win/FullScreenControllerClient.h:
2853
2854 2011-05-20  Yury Semikhatsky  <yurys@chromium.org>
2855
2856         Reviewed by Pavel Feldman.
2857
2858         Web Inspector: use RefPtr instead of OwnPtr to store InspectorBackendDispatcher
2859         https://bugs.webkit.org/show_bug.cgi?id=61188
2860
2861         * inspector/WorkerInspectorController.cpp:
2862         (WebCore::WorkerInspectorController::connectFrontend):
2863         (WebCore::WorkerInspectorController::disconnectFrontend):
2864         * inspector/WorkerInspectorController.h:
2865
2866 2011-05-20  Tonis Tiigi  <tonistiigi@gmail.com>
2867
2868         Reviewed by Pavel Feldman.
2869
2870         Web Inspector: Network panel should only show pointer cursor over valid resources
2871         https://bugs.webkit.org/show_bug.cgi?id=55240
2872
2873         Cursor style removed from filler area.
2874
2875         * inspector/front-end/networkPanel.css:
2876         (.network-sidebar .data-grid tr:not(.filler) td.name-column):
2877
2878 2011-05-20  Peter Varga  <pvarga@webkit.org>
2879
2880         Reviewed by Simon Hausmann.
2881
2882         [Qt][V8] Use qtscript-staging's shipped version of V8 when building with --v8
2883         https://bugs.webkit.org/show_bug.cgi?id=56649
2884
2885         Use the provided V8 and functionality of
2886         http://qt.gitorious.org/+qt-developers/qt/qtscript-staging to build QtWebKit+V8.
2887         Based on the original patch of Andras Becsi <abecsi@webkit.org>.
2888
2889         No new tests needed.
2890
2891         * CodeGenerators.pri: Add generating of DebuggerScriptSource.h
2892         * WebCore.pri: Fix the options for V8 build.
2893         * WebCore.pro: Ditto.
2894         * bindings/v8/NPV8Object.cpp:
2895         (WebCore::npObjectTypeInfo): Add missing initializer.
2896         * bindings/v8/ScriptController.cpp:
2897         (WebCore::ScriptController::disableEval): Temporarily disable
2898         unsupported feature on Qt.
2899         * bindings/v8/ScriptControllerQt.cpp:
2900         (WebCore::ScriptController::qtScriptEngine): use the QtScriptEngine
2901         constructor of qtscript-staging.
2902         * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: Add missing
2903         initializer.
2904         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Ditto.
2905         * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: Ditto.
2906         * loader/appcache/ApplicationCacheGroup.cpp: Add missing header.
2907         * loader/cache/CachedResourceRequest.cpp: Ditto.
2908         * page/PageSerializer.cpp: Ditto.
2909         * page/qt/FrameQt.cpp: Ditto.
2910         * storage/StorageEventDispatcher.cpp: Ditto.
2911
2912 2011-05-20  Tonis Tiigi  <tonistiigi@gmail.com>
2913
2914         Reviewed by Pavel Feldman.
2915
2916         Web Inspector: console.log(XMLDocument) should be case preserving
2917         https://bugs.webkit.org/show_bug.cgi?id=60765
2918
2919         Changes the XML document checking from base documents MIME type
2920         to xmlVersion parameter.
2921
2922         * inspector/InspectorDOMAgent.cpp:
2923         (WebCore::InspectorDOMAgent::buildObjectForNode):
2924         * inspector/front-end/DOMAgent.js:
2925         (WebInspector.DOMNode):
2926         * inspector/front-end/ElementsTreeOutline.js:
2927         (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
2928
2929 2011-05-20  Mikhail Naganov  <mnaganov@chromium.org>
2930
2931         Reviewed by Yury Semikhatsky.
2932
2933         Web Inspector: [Chromium] Use bottom-up CPU profile tree built in VM,
2934         instead of building it on Inspector's side.
2935         https://bugs.webkit.org/show_bug.cgi?id=61185
2936
2937         * bindings/js/ScriptProfile.cpp:
2938         (WebCore::ScriptProfile::bottomUpHead):
2939         (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
2940         * bindings/js/ScriptProfile.h:
2941         * bindings/v8/ScriptProfile.cpp:
2942         (WebCore::ScriptProfile::bottomUpHead):
2943         (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
2944         * bindings/v8/ScriptProfile.h:
2945         * inspector/InspectorProfilerAgent.cpp:
2946         (WebCore::InspectorProfilerAgent::getProfile):
2947         * inspector/front-end/ProfileView.js:
2948         (WebInspector.CPUProfileView.prototype.get bottomUpProfileDataGridTree):
2949
2950 2011-05-20  Adam Roben  <aroben@apple.com>
2951
2952         Mac build fix after r86936
2953
2954         * WebCore.xcodeproj/project.pbxproj: Added preprocessor.pm like the
2955         other .pm files.
2956
2957 2011-05-20  Kent Tamura  <tkent@chromium.org>
2958
2959         Try to fix Windows CE build.
2960         Touch html.css to kick UA style sheet generation.
2961
2962         * css/html.css:
2963
2964 2011-05-20  Kent Tamura  <tkent@chromium.org>
2965
2966         Try to fix Windows CE build. 
2967
2968         * CMakeLists.txt: Add --preprocessor flag.
2969
2970 2011-05-20  Kent Tamura  <tkent@chromium.org>
2971
2972         Reviewed by Hajime Morita.
2973
2974         Apply feature flags to user-agent style sheets
2975         https://bugs.webkit.org/show_bug.cgi?id=52612
2976
2977         A user-agent style sheet should not have style definitions for disabled
2978         features because such definitions makes feature detection harder and
2979         causes incorrect behavior (See Bug 52214).
2980
2981         We have handled such feature-dependent style definitions by providing
2982         separated CSS files and selecting them in build files. Adding such style
2983         definition was hard because we need to update each of build files. This
2984         change simplifies the process to add such style definitions by applying
2985         preprocessor to the CSS files.
2986
2987         Implementation:
2988         make-css-file-arrays.pl invokes a preprocessor if it has --defines
2989         option. Otherwise, it just remove lines beginning with #.
2990         In this change, we pass --defines on Mac, Windows, Chromium, GTK, and
2991         CMake platforms. Qt and Android have no behavior change.
2992
2993         * CMakeLists.txt:
2994           - IDL handling depends on preprocessor.pm.
2995           - Pass --defines option to make-css-file-arrays.pl
2996           - Add WebCore/bindings/scripts to @INC for make-css-file-arrays.pl
2997         * CodeGenerators.pri: IDL handling depends on preprocessor.pm.
2998         * DerivedSources.make: ditto.
2999         * GNUmakefile.am: ditto.
3000         * WebCore.gyp/WebCore.gyp: ditto.
3001         * WebCore.gyp/scripts/action_useragentstylesheets.py:
3002           Change parameter order to support perl modules and options.
3003           Many code is taken from rule_bindings.py.
3004         * WebCore.vcproj/MigrateScripts: Handles preprocessor.pm.
3005         * bindings/scripts/IDLParser.pm:
3006           Move the preprocessor code to preprocessor.pm.
3007         * bindings/scripts/preprocessor.pm:
3008           Added. The code was moved from IDLParser.pm
3009         * css/html.css: Enclose some style definitions with #if-#endif.
3010         * css/make-css-file-arrays.pl:
3011           - Add --defines and --preprocessor options.
3012           - Invoke a preprocessor if --defines is specified.
3013
3014 2011-05-20  Dirk Schulze  <krit@webkit.org>
3015
3016         Rubber-stamped by Nikolas Zimmermann.
3017
3018         Remove unnecessary class Path inlcude from PathTraversalState.
3019
3020         * platform/graphics/PathTraversalState.h:
3021
3022 2011-05-19  Pavel Podivilov  <podivilov@chromium.org>
3023
3024         Reviewed by Pavel Feldman.
3025
3026         Web Inspector: ctrl+s should not switch source frame to read only mode.
3027         https://bugs.webkit.org/show_bug.cgi?id=61125
3028
3029         * inspector/front-end/SourceFrame.js:
3030         (WebInspector.SourceFrame.prototype.commitEditing.didEditContent):
3031         (WebInspector.SourceFrame.prototype.commitEditing):
3032         * inspector/front-end/inspector.js:
3033         (WebInspector.documentKeyDown):
3034
3035 2011-05-20  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
3036
3037         Reviewed by Nikolas Zimmermann.
3038
3039         Apply the ParallelJobs support to FEConvolveMatrix
3040         https://bugs.webkit.org/show_bug.cgi?id=61171
3041
3042         The FEConvolveMatrix filter of SVG can consume lots of resources if it is
3043         applied to a large area. The computation can be distributed to multiple
3044         cores if the architecture supports.
3045         The average performance progression is 20-30% on dual-core machines.
3046
3047         Developed in cooperation with Gabor Loki.
3048
3049         * platform/graphics/filters/FEConvolveMatrix.cpp:
3050         (WebCore::FEConvolveMatrix::fastSetInteriorPixels):
3051         (WebCore::FEConvolveMatrix::setInteriorPixels):
3052         (WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
3053         (WebCore::FEConvolveMatrix::apply):
3054         * platform/graphics/filters/FEConvolveMatrix.h:
3055
3056 2011-05-20  Sheriff Bot  <webkit.review.bot@gmail.com>
3057
3058         Unreviewed, rolling out r86920.
3059         http://trac.webkit.org/changeset/86920
3060         https://bugs.webkit.org/show_bug.cgi?id=61173
3061
3062         It cause compile error on some buildbot in chromium. e.g.
3063         http://build.chromium.org/p/chromium.memory/builders/Chromium%20Mac%20Builder%20%28valgrind%29/builds/12336/steps/compile/logs/stdio#error1
3064         (Requested by ukai_ on #webkit).
3065
3066         * WebCore.xcodeproj/project.pbxproj:
3067         * css/CSSComputedStyleDeclaration.cpp:
3068         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3069         * css/CSSParser.cpp:
3070         (WebCore::CSSParser::parseValue):
3071         * css/CSSPrimitiveValueMappings.h:
3072         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3073         (WebCore::CSSPrimitiveValue::operator EImageRendering):
3074         * css/CSSPropertyNames.in:
3075         * css/CSSStyleSelector.cpp:
3076         (WebCore::CSSStyleSelector::applyProperty):
3077         * css/CSSValueKeywords.in:
3078         * css/SVGCSSComputedStyleDeclaration.cpp:
3079         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
3080         * css/SVGCSSPropertyNames.in:
3081         * css/SVGCSSStyleSelector.cpp:
3082         (WebCore::CSSStyleSelector::applySVGProperty):
3083         * css/SVGCSSValueKeywords.in:
3084         * html/HTMLCanvasElement.cpp:
3085         (WebCore::HTMLCanvasElement::paint):
3086         * html/HTMLCanvasElement.h:
3087         * platform/graphics/ImageRenderingMode.h: Removed.
3088         * rendering/RenderBoxModelObject.cpp:
3089         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
3090         * rendering/RenderHTMLCanvas.cpp:
3091         (WebCore::RenderHTMLCanvas::paintReplaced):
3092         * rendering/style/RenderStyle.cpp:
3093         (WebCore::RenderStyle::diff):
3094         * rendering/style/RenderStyle.h:
3095         * rendering/style/RenderStyleConstants.h:
3096         * rendering/style/SVGRenderStyle.cpp:
3097         (WebCore::SVGRenderStyle::diff):
3098         * rendering/style/SVGRenderStyle.h:
3099         (WebCore::SVGRenderStyle::initialImageRendering):
3100         (WebCore::SVGRenderStyle::setImageRendering):
3101         (WebCore::SVGRenderStyle::imageRendering):
3102         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
3103         (WebCore::SVGRenderStyle::setBitDefaults):
3104         * rendering/style/SVGRenderStyleDefs.h:
3105         * rendering/style/StyleRareInheritedData.cpp:
3106         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3107         (WebCore::StyleRareInheritedData::operator==):
3108         * rendering/style/StyleRareInheritedData.h:
3109         * rendering/svg/SVGRenderTreeAsText.cpp:
3110         (WebCore::writeStyle):
3111
3112 2011-05-20  Dirk Schulze  <krit@webkit.org>
3113
3114         Reviewed by Eric Seidel.
3115
3116         SVG Large curve path segment OOM crash
3117         https://bugs.webkit.org/show_bug.cgi?id=42079
3118
3119         Limit the depth of repeatedly splitting a segment on length calculation to 20. The limitation
3120         is necessary for very big segments that would be splitter into millions of parts otherwise.
3121         The limitation just cause a less accurate approximation.
3122         At the moment the limit is fixed to 20. This is comparable with splitting the segment into 
3123         ~1 million parts as a worst case. We might want to be more flexible later.
3124
3125         Test: svg/custom/path-getTotalLength-on-big-segment-crash.svg
3126
3127         * platform/graphics/PathTraversalState.cpp:
3128         (WebCore::midPoint):
3129         (WebCore::curveLength):
3130         (WebCore::PathTraversalState::PathTraversalState):
3131         (WebCore::PathTraversalState::moveTo):
3132         (WebCore::PathTraversalState::quadraticBezierTo):
3133         (WebCore::PathTraversalState::cubicBezierTo):
3134         * platform/graphics/PathTraversalState.h:
3135
3136 2011-05-20  Leo Yang  <leo.yang@torchmobile.com.cn>
3137
3138         Reviewed by Nikolas Zimmermann.
3139
3140         SVGRootInlineBox triggers calculateBoundaries twice in layout
3141         https://bugs.webkit.org/show_bug.cgi?id=60979
3142
3143         SVGRootInlineBox was calculating boundaries for children twice
3144         in computePerCharacterLayoutInformation(). The first time of
3145         calculation was in layoutChildBoxes() which is called by
3146         computePerCharacterLayoutInformation(), and the second time of
3147         calculation was in layoutRootBox() following layoutChildBoxes().
3148
3149         This patch calculates rectangle of children in layoutChildBoxes()
3150         and then uses the rectange in layoutRootBox() to reduce a pass
3151         of calculating child boundaries.
3152
3153         No functionality change, no new tests.
3154
3155         * rendering/svg/SVGRootInlineBox.cpp:
3156         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
3157         (WebCore::SVGRootInlineBox::layoutChildBoxes):
3158         (WebCore::SVGRootInlineBox::layoutRootBox):
3159         * rendering/svg/SVGRootInlineBox.h:
3160
3161 2011-05-19  Naoki Takano  <takano.naoki@gmail.com>
3162
3163         Reviewed by Kent Tamura.
3164
3165         Fix a problem that updating HTMLInputElement::value sets the cursor to a wrong position.
3166         https://bugs.webkit.org/show_bug.cgi?id=61163
3167
3168         Manual test input-number-localization.html.
3169         Because we can't assume any number formats in various WebKit ports.
3170
3171         * html/HTMLInputElement.cpp:
3172         (WebCore::HTMLInputElement::setValue): The cursor must be the last position of visibleValue(), not m_value.
3173         * manual-tests/input-number-localization.html: Added manual test to check the cursor correctly moved to the last poisition of the input.
3174
3175 2011-05-19  Jer Noble  <jer.noble@apple.com>
3176
3177         Reviewed by Maciej Stachowiak.
3178
3179         WebKit2: Flashing when entering and exiting full screen mode
3180         https://bugs.webkit.org/show_bug.cgi?id=56957
3181
3182         Guard against the parameter of setAnimating() matching the ivar value it's 
3183         setting, thus avoiding tearing down the renderer's layer backing.
3184
3185         * rendering/RenderFullScreen.cpp:
3186         (RenderFullScreen::setAnimating):
3187
3188 2011-05-19  Julien Chaffraix  <jchaffraix@codeaurora.org>
3189
3190         Reviewed by Adam Barth.
3191
3192         Remove Node::deprecatedParserAddChild
3193         https://bugs.webkit.org/show_bug.cgi?id=60818
3194
3195         Refactoring only so no new tests.
3196
3197         This patch fails short of one instance of deprecatedParserAddChild which will
3198         require a refactoring of <input> shadow DOM to be removed.
3199
3200         * dom/XMLDocumentParser.cpp:
3201         (WebCore::XMLDocumentParser::pushCurrentNode): Updated to use a ContainerNode.
3202         (WebCore::XMLDocumentParser::clearCurrentNodeStack): We now need to clear
3203         up m_leafTextNode too.
3204
3205         (WebCore::XMLDocumentParser::enterText):
3206         (WebCore::XMLDocumentParser::exitText):
3207         Those methods were updated to use m_leafTextNode instead of m_currentNode.
3208
3209         * dom/XMLDocumentParser.h:
3210         Changed the currentNode logic to use ContainerNode. Also fixed the style of the
3211         forward declarations.
3212
3213         * dom/XMLDocumentParserLibxml2.cpp:
3214         (WebCore::XMLDocumentParser::startElementNs):
3215         (WebCore::XMLDocumentParser::endElementNs):
3216         (WebCore::XMLDocumentParser::characters):
3217         (WebCore::XMLDocumentParser::processingInstruction):
3218         (WebCore::XMLDocumentParser::cdataBlock):
3219         (WebCore::XMLDocumentParser::comment):
3220         * dom/XMLDocumentParserQt.cpp:
3221         (WebCore::XMLDocumentParser::parse):
3222         (WebCore::XMLDocumentParser::parseStartElement):
3223         (WebCore::XMLDocumentParser::parseEndElement):
3224         (WebCore::XMLDocumentParser::parseCharacters):
3225         (WebCore::XMLDocumentParser::parseProcessingInstruction):
3226         (WebCore::XMLDocumentParser::parseCdata):
3227         (WebCore::XMLDocumentParser::parseComment):
3228         Removed the calls to deprecatedParserAddChild, changed the code to use
3229         m_leafTextNode when it made sense and used ContainerNode instead of
3230         Node for m_currentNode.
3231
3232 2011-05-19  Mike Lawther  <mikelawther@chromium.org>
3233
3234         Reviewed by Simon Fraser.
3235
3236         implement image-rendering: optimize-contrast (with a vendor prefix) as defined in CSS3 image values
3237         https://bugs.webkit.org/show_bug.cgi?id=56627
3238
3239         Tests: css3/images/optimize-contrast-canvas.html
3240                css3/images/optimize-contrast-image.html
3241
3242         * WebCore.xcodeproj/project.pbxproj:
3243         * css/CSSComputedStyleDeclaration.cpp:
3244         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3245         * css/CSSParser.cpp:
3246         (WebCore::CSSParser::parseValue):
3247         * css/CSSPrimitiveValueMappings.h:
3248         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3249         (WebCore::CSSPrimitiveValue::operator EImageRendering):
3250         * css/CSSPropertyNames.in:
3251         * css/CSSStyleSelector.cpp:
3252         (WebCore::CSSStyleSelector::applyProperty):
3253         * css/CSSValueKeywords.in:
3254         * css/SVGCSSComputedStyleDeclaration.cpp:
3255         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
3256         * css/SVGCSSPropertyNames.in:
3257         * css/SVGCSSStyleSelector.cpp:
3258         (WebCore::CSSStyleSelector::applySVGProperty):
3259         * css/SVGCSSValueKeywords.in:
3260         * html/HTMLCanvasElement.cpp:
3261         (WebCore::HTMLCanvasElement::paint):
3262         * html/HTMLCanvasElement.h:
3263         * platform/graphics/ImageRenderingMode.h: Added.
3264         * rendering/RenderBoxModelObject.cpp:
3265         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
3266         * rendering/RenderHTMLCanvas.cpp:
3267         (WebCore::RenderHTMLCanvas::paintReplaced):
3268         * rendering/style/RenderStyle.cpp:
3269         (WebCore::RenderStyle::diff):
3270         * rendering/style/RenderStyle.h:
3271         (WebCore::InheritedFlags::imageRendering):
3272         (WebCore::InheritedFlags::setImageRendering):
3273         (WebCore::InheritedFlags::initialImageRendering):
3274         * rendering/style/RenderStyleConstants.h:
3275         * rendering/style/SVGRenderStyle.cpp:
3276         (WebCore::SVGRenderStyle::diff):
3277         * rendering/style/SVGRenderStyle.h:
3278         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
3279         (WebCore::SVGRenderStyle::setBitDefaults):
3280         * rendering/style/SVGRenderStyleDefs.h:
3281         * rendering/svg/SVGRenderTreeAsText.cpp:
3282         (WebCore::writeStyle):
3283
3284 2011-05-18  Kenneth Russell  <kbr@google.com>
3285
3286         Reviewed by James Robinson.
3287
3288         [chromium] Disable blending in compositor for WebGL layers with alpha=false
3289         https://bugs.webkit.org/show_bug.cgi?id=61091
3290
3291         Test: compositing/webgl/webgl-no-alpha.html
3292
3293         * platform/graphics/chromium/CanvasLayerChromium.cpp:
3294         (WebCore::CanvasLayerChromium::CanvasLayerChromium):
3295         (WebCore::CanvasLayerChromium::pushPropertiesTo):
3296         * platform/graphics/chromium/CanvasLayerChromium.h:
3297         * platform/graphics/chromium/WebGLLayerChromium.cpp:
3298         (WebCore::WebGLLayerChromium::setContext):
3299         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
3300         (WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl):
3301         (WebCore::CCCanvasLayerImpl::draw):
3302         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
3303         (WebCore::CCCanvasLayerImpl::setHasAlpha):
3304
3305 2011-05-18  Jeremy Noble  <jer.noble@apple.com>
3306
3307         Reviewed by Darin Adler.
3308
3309         Poster is not shown in Safari for video element with no playable source elements.
3310         https://bugs.webkit.org/show_bug.cgi?id=61109
3311
3312         Test: media/video-src-invalid-poster.html
3313
3314         In the case where no video sources are playable, update the display state and 
3315         renderer, allowing the poster image to display.
3316
3317         * html/HTMLMediaElement.cpp:
3318         (WebCore::HTMLMediaElement::waitForSourceChange): 
3319
3320 2011-05-19  Andrew Wilson  <atwilson@chromium.org>
3321
3322         Reviewed by Darin Adler.
3323
3324         MessagePortArray cloning code needs to verify source before copying.
3325         https://bugs.webkit.org/show_bug.cgi?id=61130
3326
3327         * bindings/js/JSMessagePortCustom.cpp:
3328         (WebCore::fillMessagePortArray):
3329         Changed code to not pre-allocate the destination array.
3330         * bindings/v8/custom/V8MessagePortCustom.cpp:
3331         (WebCore::getMessagePortArray):
3332         Changed code to not pre-allocate the destination array.
3333
3334 2011-05-19  Sheriff Bot  <webkit.review.bot@gmail.com>
3335
3336         Unreviewed, rolling out r86869, r86873, r86875, and r86877.
3337         http://trac.webkit.org/changeset/86869
3338         http://trac.webkit.org/changeset/86873
3339         http://trac.webkit.org/changeset/86875
3340         http://trac.webkit.org/changeset/86877
3341         https://bugs.webkit.org/show_bug.cgi?id=61139
3342
3343         broke builds and debug DRT (Requested by rniwa on #webkit).
3344
3345         * DerivedSources.make:
3346         * WebCore.exp.in:
3347         * WebCore.gyp/WebCore.gyp:
3348         * WebCore.gypi:
3349         * WebCore.xcodeproj/project.pbxproj:
3350         * testing/Internals.cpp: Removed.
3351         * testing/Internals.h: Removed.
3352         * testing/Internals.idl: Removed.
3353         * testing/js/WebCoreTestSupport.cpp: Removed.
3354         * testing/js/WebCoreTestSupport.h: Removed.
3355         * testing/v8/WebCoreTestSupport.cpp: Removed.
3356         * testing/v8/WebCoreTestSupport.h: Removed.
3357
3358 2011-05-19  Dimitri Glazkov  <dglazkov@chromium.org>
3359
3360         One more fix after r86869.
3361
3362         * WebCore.exp.in: Made __ZN7WebCore12JSDOMWrapperD2Ev only export for debug builds.
3363
3364 2011-05-19  Anders Carlsson  <andersca@apple.com>
3365
3366         Add two more symbols needed by the window.internals library.
3367
3368         * WebCore.exp.in:
3369
3370 2011-05-19  Dimitri Glazkov  <dglazkov@chromium.org>
3371
3372         Fix Leopard build after r86869.
3373
3374         * WebCore.exp.in: Moved now-always-used exported symbols out of the conditional guard.
3375
3376 2011-05-19  Robert Hogan  <robert@webkit.org>
3377
3378         Reviewed by Andreas Kling.
3379
3380         [Qt] Fix plugins/windowless_plugin_paint_test.html
3381         https://bugs.webkit.org/show_bug.cgi?id=60992
3382
3383         Call gdk_init_check before gdk_display_get_default().
3384         If we don't do this, gdk_display_get_default() will hang
3385         the next time it's called.
3386
3387         * plugins/qt/PluginViewQt.cpp:
3388         (WebCore::getPluginDisplay):
3389
3390 2011-05-18  Dimitri Glazkov  <dglazkov@chromium.org>
3391
3392         Reviewed by Darin Adler.
3393
3394         Add build logistics and plumbing for window.internals object.
3395         https://bugs.webkit.org/show_bug.cgi?id=60313
3396
3397         Test: fast/harness/internals-object.html
3398
3399         * DerivedSources.make: Added support for generating from Internals.idl.
3400         * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
3401         * WebCore.gypi: Ditto.
3402         * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
3403         * testing/Internals.cpp: Added.
3404         * testing/Internals.h: Added.
3405         * testing/Internals.idl: Added.
3406     &n