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