2011-02-01 Adam Barth <abarth@webkit.org>
[WebKit.git] / Source / WebCore / ChangeLog
1 2011-02-01  Adam Barth  <abarth@webkit.org>
2
3         Reviewed by Alexey Proskuryakov.
4
5         Improve readability of updateWidget by converting bool parameter to an enum
6         https://bugs.webkit.org/show_bug.cgi?id=53576
7
8         As requested on webkit-dev.
9
10         * html/HTMLEmbedElement.cpp:
11         (WebCore::HTMLEmbedElement::updateWidget):
12         * html/HTMLEmbedElement.h:
13         * html/HTMLMediaElement.cpp:
14         (WebCore::HTMLMediaElement::updateWidget):
15         * html/HTMLMediaElement.h:
16         * html/HTMLObjectElement.cpp:
17         (WebCore::HTMLObjectElement::updateWidget):
18         * html/HTMLObjectElement.h:
19         * html/HTMLPlugInImageElement.cpp:
20         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
21         * html/HTMLPlugInImageElement.h:
22         * page/FrameView.cpp:
23         (WebCore::FrameView::updateWidget):
24
25 2011-02-01  James Robinson  <jamesr@chromium.org>
26
27         Reviewed by Adam Barth.
28
29         [v8] Increase V8 native->js recursion limit to match document.write() recursion limit
30         https://bugs.webkit.org/show_bug.cgi?id=53566
31
32         A recursion limit of 22 is necessary to pass fast/dom/Document/document-write-recursion.html.
33         Other than being large enough for this one test case, this limit is arbitrary.
34
35         * bindings/v8/V8Proxy.h:
36
37 2011-02-01  Adam Barth  <abarth@webkit.org>
38
39         Reviewed by Andreas Kling.
40
41         Remove useless comment
42         https://bugs.webkit.org/show_bug.cgi?id=53549
43
44         The reason for this parameter is captured in
45         plugins/netscape-plugin-setwindow-size.html, which is a better place to
46         capture it than in this comment (which otherwise just re-iterates the
47         name of the parameter).
48
49         * html/HTMLPlugInImageElement.cpp:
50         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
51
52 2011-02-01  James Simonsen  <simonjam@chromium.org>
53
54         Reviewed by Tony Gentilcore.
55
56         [WebTiming] Remove asserts that verify timestamp order
57         https://bugs.webkit.org/show_bug.cgi?id=53548
58
59         Covered by existing tests.
60
61         * loader/FrameLoader.cpp:
62         (WebCore::FrameLoader::stopLoading): Remove assert.
63         * page/DOMWindow.cpp:
64         (WebCore::DOMWindow::dispatchTimedEvent): Ditto.
65
66 2011-02-01  Dimitri Glazkov  <dglazkov@chromium.org>
67
68         Add the 'default_targets' enclosure to the flags.
69
70         * WebCore.gyp/WebCore.gyp: Did it.
71
72 2011-02-01  Mihai Parparita  <mihaip@chromium.org>
73
74         Reviewed by James Robinson.
75
76         Async event handlers should not fire within a modal dialog
77         https://bugs.webkit.org/show_bug.cgi?id=53202
78
79         Asychronous events that use EventQueue would currently fire while a
80         modal dialog (e.g. window.alert()) was up. Change EventQueue to use a
81         SuspendableTimer (which automatically gets suspended while dialogs are
82         up and in other cases where JS execution is not allowed).
83         
84         Test: fast/events/scroll-event-during-modal-dialog.html
85
86         * dom/Document.cpp:
87         (WebCore::Document::Document):
88         * dom/EventQueue.cpp:
89         (WebCore::EventQueueTimer::EventQueueTimer):
90         (WebCore::EventQueueTimer::fired):
91         (WebCore::EventQueue::EventQueue):
92         (WebCore::EventQueue::enqueueEvent):
93         (WebCore::EventQueue::pendingEventTimerFired):
94         * dom/EventQueue.h:
95         (WebCore::EventQueue::create):
96         * page/SuspendableTimer.cpp:
97         (WebCore::SuspendableTimer::SuspendableTimer):
98         (WebCore::SuspendableTimer::suspend):
99         (WebCore::SuspendableTimer::resume):
100         * page/SuspendableTimer.h:
101
102 2011-02-01  Patrick Gansterer  <paroga@webkit.org>
103
104         Reviewed by Andreas Kling.
105
106         Change wrong PLATFORM(WIN) to USE(WININET)
107         https://bugs.webkit.org/show_bug.cgi?id=53547
108
109         * platform/network/ResourceHandle.h:
110
111 2011-02-01  Beth Dakin  <bdakin@apple.com>
112
113         32-bit build fix.
114
115         * platform/mac/ScrollAnimatorMac.mm:
116         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
117
118 2011-01-25  Martin Robinson  <mrobinson@igalia.com>
119
120         Reviewed by Gustavo Noronha Silva.
121
122         [GTK] Two tests crash after r76555
123         https://bugs.webkit.org/show_bug.cgi?id=53057
124
125         Instead of creating synchronous ResourceHandles manually, use the ::create factory.
126         This ensures that ::start() is not called when there is a scheduled failure and also
127         reduces code duplication.
128
129         * platform/network/soup/ResourceHandleSoup.cpp:
130         (WebCore::ResourceHandle::loadResourceSynchronously): Use the ::create factory method.
131
132 2011-02-01  Martin Robinson  <mrobinson@igalia.com>
133
134         Reviewed by Eric Seidel.
135
136         [GTK] GObject DOM bindings do no support the CallWith attribute
137         https://bugs.webkit.org/show_bug.cgi?id=53331
138
139         Disable building GObject DOM bindings for IndexedDB because we do not support
140         the CallWith attribute at this time.
141
142         * bindings/gobject/GNUmakefile.am: Disable building bindings for the IndexedDB API.
143
144 2011-02-01  Darin Adler  <darin@apple.com>
145
146         Reviewed by Brady Eidson.
147
148         Fix a couple loose ends from the back/forward tree encode/decode work
149         https://bugs.webkit.org/show_bug.cgi?id=53537
150
151         * history/HistoryItem.cpp:
152         (WebCore::HistoryItem::encodeBackForwardTreeNode): Remove extra copy of
153         original URL string; no need to encode it twice.
154         (WebCore::HistoryItem::decodeBackForwardTree): Ditto.
155         * history/HistoryItem.h: Removed declaration for function that is no
156         longer defined nor used.
157
158 2011-02-01  Tony Chang  <tony@chromium.org>
159
160         Reviewed by Kent Tamura.
161
162         [chromium] disable arm uninitialized variable warnings
163         https://bugs.webkit.org/show_bug.cgi?id=53553
164
165         We just got another error:
166         third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.cpp:123:error:
167         'colorTransparent.unstatic.4879' may be used uninitialized in this
168         function
169
170         * WebCore.gyp/WebCore.gyp:
171
172 2011-02-01  chris reiss  <christopher.reiss@nokia.com>
173
174         Reviewed by Adam Barth.
175
176         Self-replicating code makes Safari hang and eventually crash
177         https://bugs.webkit.org/show_bug.cgi?id=15123
178
179        
180         Here we are replicating the Firefox safeguard against
181         recursive document.write( ) 's.
182
183         See  https://bug197052.bugzilla.mozilla.org/attachment.cgi?id=293907 in bug 
184         https://bugzilla.mozilla.org/show_bug.cgi?id=197052 .   Firefox does two things - 
185             a) imposes a recursion limit of 20 on document.write( ) and
186             b) once that limit is passed, panics all the way the call stack (rather than just returning one level.)
187         To see why this is necessary, consider the script : 
188
189         <script>
190            var t = document.body.innerHTML;
191            document.write(t);
192         </script> 
193
194         This will create a tree both broad and deep as the script keeps appending itself to the text.   If
195         we just return one level after the recursion limit is reached, we still allow millions of copies to 
196         duplicate (and execute).   
197
198         The recursion is fortunately depth-first, so as soon as we cross this limit, we panic up the callstack
199         to prevent this situation.    (IE apparently does the same thing, with a lower recursion limit.) 
200
201         Test: fast/dom/Document/document-write-recursion.html        
202         Test: fast/dom/Document/document-close-iframe-load.html
203         Test: fast/dom/Document/document-close-nested-iframe-load.html
204
205
206         * dom/Document.cpp:
207         (WebCore::Document::Document):
208         (WebCore::Document::write):
209         * dom/Document.h:
210
211 2011-02-01  Johnny Ding  <jnd@chromium.org>
212
213         Reviewed by Darin Adler.
214
215         Don't set user gesture in HTMLAnchorElement's click handler because the click handler can be triggered by untrusted event.
216         https://bugs.webkit.org/show_bug.cgi?id=53424
217
218         Test: fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html
219
220         * html/HTMLAnchorElement.cpp:
221         (WebCore::handleLinkClick):
222
223 2011-02-01  Csaba Osztrogonác  <ossy@webkit.org>
224
225         Unreviewed Qt buildfix after r77286.
226
227         https://bugs.webkit.org/show_bug.cgi?id=53520 
228         Remove the physical terminology from IntRect and FloatRect.
229
230         * platform/graphics/TiledBackingStore.cpp:
231         (WebCore::TiledBackingStore::createTiles):
232
233 2011-02-01  Sam Weinig  <sam@webkit.org>
234
235         Fix Mac production builds.
236
237         * DerivedSources.make:
238         * WebCore.xcodeproj/project.pbxproj:
239         * platform/mac/ScrollAnimatorMac.h:
240         * platform/mac/ScrollbarThemeMac.h:
241
242 2011-02-01  Darin Adler  <darin@apple.com>
243
244         Reviewed by Chris Fleizach.
245
246         REGRESSION: Removing focus from area element causes unwanted scrolling
247         https://bugs.webkit.org/show_bug.cgi?id=50169
248
249         Test: fast/images/imagemap-scroll.html
250
251         * html/HTMLAreaElement.cpp:
252         (WebCore::HTMLAreaElement::setFocus): Added override. Calls the new
253         RenderImage::areaElementFocusChanged function.
254         (WebCore::HTMLAreaElement::updateFocusAppearance): Removed the code
255         here that calls setNeedsLayout on the image's renderer. This was an
256         attempt to cause repaint of the renderer, but this function does not
257         need to do that. Also changed this to use the imageElement function
258         to avoid repeating code.
259
260         * html/HTMLAreaElement.h: Updated for above changes.
261
262         * rendering/RenderImage.cpp:
263         (WebCore::RenderImage::paint): Updated for name change.
264         (WebCore::RenderImage::paintAreaElementFocusRing): Renamed this from
265         paintFocusRing, because it only paints area focus rings, and should
266         not be confused with paintFocusRing functions in other classes. Also
267         removed the unused style argument. Removed the code that used an
268         HTMLCollection to see if the focused area element is for this image
269         and instead just call imageElement on the area element.
270         (WebCore::RenderImage::areaElementFocusChanged): Added. Calls repaint.
271
272         * rendering/RenderImage.h: Added a public areaElementFocusChanged
273         function for HTMLAreaElement to call. Made the paintFocusRing function
274         private, renamed it to paintAreaElementFocusRing, and removed its
275         unused style argument.
276
277 2011-02-01  Patrick Gansterer  <paroga@webkit.org>
278
279         Unreviewed WinCE build fix for r77286.
280
281         * platform/graphics/wince/GraphicsContextWinCE.cpp:
282         (WebCore::TransparentLayerDC::TransparentLayerDC):
283
284 2011-02-01  Chris Fleizach  <cfleizach@apple.com>
285
286         Reviewed by Darin Adler.
287
288         AX: AXPosition of AXScrollArea is wrong
289         https://bugs.webkit.org/show_bug.cgi?id=53511
290
291         AccessibilityScrollView needed to return a valid documentFrameView() object.
292         At the same time, the code from document() should be consolidated in 
293         AccessibilityObject, so all objects can use it.
294
295         Test: platform/mac/accessibility/webkit-scrollarea-position.html
296
297         * accessibility/AccessibilityObject.cpp:
298         (WebCore::AccessibilityObject::document):
299         * accessibility/AccessibilityObject.h:
300         * accessibility/AccessibilityScrollView.cpp:
301         (WebCore::AccessibilityScrollView::accessibilityHitTest):
302         (WebCore::AccessibilityScrollView::documentFrameView):
303         * accessibility/AccessibilityScrollView.h:
304
305 2011-02-01  Zhenyao Mo  <zmo@google.com>
306
307         Reviewed by Kenneth Russell.
308
309         getUniform should support SAMPLER_2D or SAMPLER_CUBE
310         https://bugs.webkit.org/show_bug.cgi?id=52190
311
312         * html/canvas/WebGLRenderingContext.cpp:
313         (WebCore::WebGLRenderingContext::getUniform):
314
315 2011-02-01  Zhenyao Mo  <zmo@google.com>
316
317         Reviewed by Darin Adler.
318
319         Fix the incorrect usage of RetainPtr cases in GraphicsContext3DCG.cpp
320         https://bugs.webkit.org/show_bug.cgi?id=53531
321
322         With this fix, running WebGL conformance tests should no longer crash randomly.
323
324         * platform/graphics/cg/GraphicsContext3DCG.cpp:
325         (WebCore::GraphicsContext3D::getImageData):
326
327 2011-02-01  Dimitri Glazkov  <dglazkov@chromium.org>
328
329         One more Chromium build fix after r77286.
330
331         * platform/chromium/ScrollbarThemeChromiumMac.mm:
332         (WebCore::ScrollbarThemeChromiumMac::paint): Changed to not use topLeft().
333
334 2011-02-01  Sam Weinig  <sam@webkit.org>
335
336         Fix the build for Beth.
337
338         * platform/mac/ScrollAnimatorMac.mm:
339         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
340
341 2011-02-01  Sam Weinig  <sam@webkit.org>
342
343         Reviewed by Beth Dakin.
344
345         Part 2 for <rdar://problem/8492788>
346         Adopt WKScrollbarPainterController
347
348         Use header detection to define scrollbar painting controller #define.
349
350         * WebCore.exp.in:
351         * platform/mac/ScrollAnimatorMac.h:
352         * platform/mac/ScrollbarThemeMac.h:
353         * platform/mac/WebCoreSystemInterface.h:
354         * platform/mac/WebCoreSystemInterface.mm:
355
356 2011-02-01  David Hyatt  <hyatt@apple.com>
357
358         Reviewed by Oliver Hunt.
359
360         https://bugs.webkit.org/show_bug.cgi?id=53520
361         
362         Remove the physical terminology from IntRect and FloatRect.
363         
364         Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
365         we need to update our terminology to be more accurate.
366
367         I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
368         renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
369         even for flipped rectangles.
370
371         * accessibility/AccessibilityRenderObject.cpp:
372         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
373         * accessibility/mac/AccessibilityObjectWrapper.mm:
374         (-[AccessibilityObjectWrapper position]):
375         * dom/ClientRect.h:
376         (WebCore::ClientRect::right):
377         (WebCore::ClientRect::bottom):
378         * html/HTMLCanvasElement.cpp:
379         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
380         * html/canvas/CanvasRenderingContext2D.cpp:
381         (WebCore::normalizeRect):
382         * inspector/InspectorAgent.cpp:
383         (WebCore::InspectorAgent::drawElementTitle):
384         * page/DOMWindow.cpp:
385         (WebCore::DOMWindow::adjustWindowRect):
386         * page/DragController.cpp:
387         (WebCore::dragLocForSelectionDrag):
388         * page/EventHandler.cpp:
389         (WebCore::EventHandler::sendContextMenuEventForKey):
390         * page/PrintContext.cpp:
391         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
392         (WebCore::PrintContext::pageNumberForElement):
393         * page/SpatialNavigation.cpp:
394         (WebCore::end):
395         (WebCore::areRectsFullyAligned):
396         (WebCore::areRectsMoreThanFullScreenApart):
397         (WebCore::below):
398         (WebCore::rightOf):
399         (WebCore::isRectInDirection):
400         (WebCore::entryAndExitPointsForDirection):
401         (WebCore::virtualRectForDirection):
402         * page/WindowFeatures.cpp:
403         (WebCore::WindowFeatures::WindowFeatures):
404         * platform/ScrollView.cpp:
405         (WebCore::ScrollView::wheelEvent):
406         * platform/Scrollbar.cpp:
407         (WebCore::Scrollbar::setFrameRect):
408         * platform/ScrollbarThemeComposite.cpp:
409         (WebCore::ScrollbarThemeComposite::splitTrack):
410         * platform/chromium/ScrollbarThemeChromium.cpp:
411         (WebCore::ScrollbarThemeChromium::paintTickmarks):
412         * platform/graphics/FloatQuad.h:
413         (WebCore::FloatQuad::FloatQuad):
414         * platform/graphics/FloatRect.cpp:
415         (WebCore::FloatRect::intersects):
416         (WebCore::FloatRect::contains):
417         (WebCore::FloatRect::intersect):
418         (WebCore::FloatRect::unite):
419         (WebCore::enclosingIntRect):
420         * platform/graphics/FloatRect.h:
421         (WebCore::FloatRect::maxX):
422         (WebCore::FloatRect::maxY):
423         (WebCore::FloatRect::contains):
424         * platform/graphics/IntRect.cpp:
425         (WebCore::IntRect::intersects):
426         (WebCore::IntRect::contains):
427         (WebCore::IntRect::intersect):
428         (WebCore::IntRect::unite):
429         * platform/graphics/IntRect.h:
430         (WebCore::IntRect::maxX):
431         (WebCore::IntRect::maxY):
432         (WebCore::IntRect::shiftXEdgeTo):
433         (WebCore::IntRect::shiftMaxXEdgeTo):
434         (WebCore::IntRect::shiftYEdgeTo):
435         (WebCore::IntRect::shiftMaxYEdgeTo):
436         (WebCore::IntRect::contains):
437         * platform/graphics/WidthIterator.cpp:
438         (WebCore::WidthIterator::advance):
439         * platform/graphics/cg/GraphicsContextCG.cpp:
440         (WebCore::GraphicsContext::drawRect):
441         (WebCore::GraphicsContext::fillPath):
442         (WebCore::GraphicsContext::fillRect):
443         * platform/graphics/cg/ImageBufferCG.cpp:
444         (WebCore::getImageData):
445         (WebCore::putImageData):
446         * platform/graphics/cg/ImageCG.cpp:
447         (WebCore::BitmapImage::draw):
448         * platform/graphics/filters/FilterEffect.cpp:
449         (WebCore::FilterEffect::copyImageBytes):
450         * platform/graphics/mac/ComplexTextController.cpp:
451         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
452         * platform/graphics/mac/SimpleFontDataMac.mm:
453         (WebCore::SimpleFontData::platformBoundsForGlyph):
454         * platform/graphics/transforms/AffineTransform.cpp:
455         (WebCore::AffineTransform::mapRect):
456         * platform/graphics/win/FontCGWin.cpp:
457         (WebCore::drawGDIGlyphs):
458         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
459         (WebCore::MediaPlayerPrivate::paint):
460         * platform/gtk/RenderThemeGtk.cpp:
461         (WebCore::centerRectVerticallyInParentInputElement):
462         * platform/mac/WidgetMac.mm:
463         (WebCore::Widget::paint):
464         * rendering/InlineFlowBox.cpp:
465         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
466         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
467         * rendering/InlineTextBox.cpp:
468         (WebCore::InlineTextBox::selectionRect):
469         (WebCore::InlineTextBox::paint):
470         (WebCore::InlineTextBox::positionForOffset):
471         * rendering/RenderBlock.cpp:
472         (WebCore::RenderBlock::addOverflowFromChildren):
473         (WebCore::RenderBlock::paintChildren):
474         (WebCore::RenderBlock::paintEllipsisBoxes):
475         (WebCore::RenderBlock::inlineSelectionGaps):
476         (WebCore::RenderBlock::adjustPointToColumnContents):
477         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
478         (WebCore::RenderBlock::adjustForColumns):
479         * rendering/RenderBlock.h:
480         (WebCore::RenderBlock::FloatingObject::right):
481         (WebCore::RenderBlock::FloatingObject::bottom):
482         * rendering/RenderBox.cpp:
483         (WebCore::RenderBox::reflectedRect):
484         (WebCore::RenderBox::localCaretRect):
485         (WebCore::RenderBox::addShadowOverflow):
486         (WebCore::RenderBox::addLayoutOverflow):
487         (WebCore::RenderBox::visualOverflowRectForPropagation):
488         (WebCore::RenderBox::layoutOverflowRectForPropagation):
489         (WebCore::RenderBox::flipForWritingMode):
490         * rendering/RenderFrameSet.cpp:
491         (WebCore::RenderFrameSet::paintColumnBorder):
492         (WebCore::RenderFrameSet::paintRowBorder):
493         * rendering/RenderInline.cpp:
494         (WebCore::RenderInline::paintOutlineForLine):
495         * rendering/RenderLayer.cpp:
496         (WebCore::RenderLayer::getRectToExpose):
497         (WebCore::cornerRect):
498         (WebCore::RenderLayer::positionOverflowControls):
499         (WebCore::RenderLayer::overflowBottom):
500         (WebCore::RenderLayer::overflowRight):
501         (WebCore::RenderLayer::paintResizer):
502         * rendering/RenderLineBoxList.cpp:
503         (WebCore::RenderLineBoxList::rangeIntersectsRect):
504         (WebCore::RenderLineBoxList::paint):
505         * rendering/RenderListItem.cpp:
506         (WebCore::RenderListItem::positionListMarker):
507         * rendering/RenderListMarker.cpp:
508         (WebCore::RenderListMarker::paint):
509         * rendering/RenderObject.cpp:
510         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
511         * rendering/RenderOverflow.h:
512         (WebCore::RenderOverflow::RenderOverflow):
513         (WebCore::RenderOverflow::addLayoutOverflow):
514         (WebCore::RenderOverflow::addVisualOverflow):
515         (WebCore::RenderOverflow::setLayoutOverflow):
516         (WebCore::RenderOverflow::setVisualOverflow):
517         (WebCore::RenderOverflow::resetLayoutOverflow):
518         * rendering/RenderReplaced.cpp:
519         (WebCore::RenderReplaced::shouldPaint):
520         * rendering/RenderScrollbarTheme.cpp:
521         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
522         * rendering/RenderTable.cpp:
523         (WebCore::RenderTable::paint):
524         * rendering/RenderTableCell.cpp:
525         (WebCore::RenderTableCell::paint):
526         * rendering/RenderTableSection.cpp:
527         (WebCore::RenderTableSection::paintObject):
528         * rendering/RenderText.cpp:
529         (WebCore::RenderText::absoluteQuads):
530         * rendering/RenderTextControlSingleLine.cpp:
531         (WebCore::RenderTextControlSingleLine::forwardEvent):
532         * rendering/RenderThemeMac.mm:
533         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
534         (WebCore::RenderThemeMac::paintMenuListButton):
535         (WebCore::RenderThemeMac::paintSliderTrack):
536         * rendering/RenderView.cpp:
537         (WebCore::RenderView::computeRectForRepaint):
538         (WebCore::RenderView::docBottom):
539         (WebCore::RenderView::docRight):
540         * rendering/RootInlineBox.cpp:
541         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
542         * rendering/svg/RenderSVGInlineText.cpp:
543         (WebCore::RenderSVGInlineText::localCaretRect):
544
545 2011-02-01  Beth Dakin  <bdakin@apple.com>
546
547         Reviewed by Sam Weinig.
548
549         Fix for <rdar://problem/8492788> Adopt WKScrollbarPainterController
550
551         Lots of new WebCoreSystemInterface functions to export.
552         * WebCore.exp.in:
553         * platform/mac/WebCoreSystemInterface.h:
554         * platform/mac/WebCoreSystemInterface.mm:
555
556         Let the scrollAnimator know when the mouse has
557         moved anywhere inside the page, and when the mouse 
558         has moved in or out of the window. 
559         * page/EventHandler.cpp:
560         (WebCore::EventHandler::mouseMoved):
561         (WebCore::EventHandler::updateMouseEventTargetNode):
562
563         Let the scrollAnimator know when the window has become
564         active or inactive.
565         * page/FocusController.cpp:
566         (WebCore::FocusController::setActive):
567         
568         Let the scrollAnimator know when all of these things
569         are happening.
570         * page/FrameView.cpp:
571         (WebCore::FrameView::setContentsSize):
572         (WebCore::FrameView::didMoveOnscreen):
573         (WebCore::FrameView::willMoveOffscreen):
574         (WebCore::FrameView::currentMousePosition):
575         (WebCore::FrameView::contentsResized):
576         
577         New functions called through WebKit2 that allow the
578         scrollAnimator to know when a live resize starts and ends.
579         (WebCore::FrameView::willStartLiveResize):
580         (WebCore::FrameView::willEndLiveResize):
581         * page/FrameView.h:
582         
583         New functions on ScrollAnimator that pass information
584         to the WKPainterController when we're using one.
585         * platform/ScrollAnimator.h:
586         (WebCore::ScrollAnimator::scrollableArea):
587         (WebCore::ScrollAnimator::contentAreaWillPaint):
588         (WebCore::ScrollAnimator::mouseEnteredContentArea):
589         (WebCore::ScrollAnimator::mouseExitedContentArea):
590         (WebCore::ScrollAnimator::mouseMovedInContentArea):
591         (WebCore::ScrollAnimator::willStartLiveResize):
592         (WebCore::ScrollAnimator::contentsResized):
593         (WebCore::ScrollAnimator::willEndLiveResize):
594         (WebCore::ScrollAnimator::contentAreaDidShow):
595         (WebCore::ScrollAnimator::contentAreaDidHide):
596         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
597         (WebCore::ScrollAnimatorMac::scrollbarPainterDelegate):
598         (WebCore::ScrollAnimatorMac::setPainterForPainterController):
599         (WebCore::ScrollAnimatorMac::removePainterFromPainterController):
600         (WebCore::ScrollAnimatorMac::notityPositionChanged):
601         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
602         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
603         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
604         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
605         (WebCore::ScrollAnimatorMac::willStartLiveResize):
606         (WebCore::ScrollAnimatorMac::contentsResized):
607         (WebCore::ScrollAnimatorMac::willEndLiveResize):
608         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
609         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
610         
611         Let the scrollAnimator know when this is happening.
612         * platform/ScrollView.cpp:
613         (WebCore::ScrollView::paint):
614         
615         New function lets the scrollAnimator get the current 
616         mouse position.
617         * platform/ScrollView.h:
618         (WebCore::ScrollView::currentMousePosition):
619         
620         New function that returns the scrollAnimator when needed.
621         * platform/ScrollableArea.h:
622         (WebCore::ScrollableArea::scrollAnimator):
623         
624         Keep track of if we're in a live resize using a new memeber
625         variable.
626         * platform/mac/ScrollAnimatorMac.h:
627         (WebCore::ScrollAnimatorMac::inLiveResize):
628         * platform/mac/ScrollAnimatorMac.mm:
629         (WebCore::view):
630         
631         New delegates for the WKPainter and WKPainterController
632         (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
633         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
634         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
635         (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
636         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
637         (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
638         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
639         (-[ScrollKnobAnimation initWithScrollbarPainter:forScrollAnimator:WebCore::animateKnobAlphaTo:duration:]):
640         (-[ScrollKnobAnimation setCurrentProgress:]):
641         (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
642         (-[ScrollbarPainterDelegate convertRectToBacking:]):
643         (-[ScrollbarPainterDelegate convertRectFromBacking:]):
644         (-[ScrollbarPainterDelegate layer]):
645         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:animateKnobAlphaTo:duration:]):
646         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
647         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
648         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
649
650         Get the WKScrollbarPainterRefs to synch up with the 
651         WKScrollbarPainterControllerRefs when appropriate
652         * platform/mac/ScrollbarThemeMac.h:
653         * platform/mac/ScrollbarThemeMac.mm:
654         (WebCore::ScrollbarThemeMac::registerScrollbar):
655         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
656         (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
657         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
658
659         Implement ScrollableArea's virtual function contentsSize() for access
660         through the scrollAnimator.
661         * rendering/RenderLayer.h:
662         (WebCore::RenderLayer::contentsSize):
663
664 2011-02-01  Carol Szabo  <carol.szabo@nokia.com>
665
666         Reviewed by David Hyatt.
667
668         layoutTestController.counterValueForElementById does not return the correct value
669         https://bugs.webkit.org/show_bug.cgi?id=53037
670
671         Test: fast/css/counters/deep-before.html
672
673         * rendering/RenderTreeAsText.cpp:
674         (WebCore::counterValueForElement):
675         Modified to use the newly available RenderObject::beforePseudoElement()
676         and RenderObject::afterPseudoElement() instead of the old imperfect
677         algorithm to find the before and after pseudo elements.
678
679 2011-02-01  Anton Muhin  <antonm@chromium.org>
680
681         Reviewed by Adam Barth.
682
683         Allow access for security origin same as this.
684         https://bugs.webkit.org/show_bug.cgi?id=53440
685
686         Hard to test as newly added path currently is never hit.
687
688         * page/SecurityOrigin.cpp:
689         (WebCore::SecurityOrigin::canAccess): allow access if this == other
690
691 2011-01-31  Oliver Hunt  <oliver@apple.com>
692
693         Reviewed by Geoffrey Garen.
694
695         Update JSObject storage for new marking API
696         https://bugs.webkit.org/show_bug.cgi?id=53467
697
698         Update WebCore to handle new anonymous slot behaviour.
699
700         * bindings/js/JSDOMWindowShell.cpp:
701         (WebCore::JSDOMWindowShell::setWindow):
702         * bindings/js/WorkerScriptController.cpp:
703         (WebCore::WorkerScriptController::initScript):
704         * bindings/scripts/CodeGeneratorJS.pm:
705
706 2011-02-01  Xiaomei Ji  <xji@chromium.org>
707
708         Reviewed by David Hyatt.
709
710         Fix a text rendering problem when enclosing block is RTL and text runs
711         are in different directionality.
712         https://bugs.webkit.org/show_bug.cgi?id=34176
713
714         The problem happens in the following example scenario (ABC represents 
715         Hebrew characters):
716         <div dir=rtl>this is a <span><span>test <span>ABC</span></span></span></div>
717
718         The line consists of 3 text runs -- TextRun1 TextRun2 TextRun3. In which
719         TextRun1 and TextRun2's bidi level are 2, and TextRun3's bidi level is 1.
720         TextRun2 and TextRun3's least common ancestor is not a sibling of TextRun1.
721
722         The visual bidi run order of the text runs is TextRun3 TextRun1 TextRun2.
723
724         Inside RenderBlock::constructLine(), when RenderBlock::createLineBoxes()
725         creates InlineFlowBox for TextRun2, it should check an InlineFlowBox for
726         the run's render object's ancestor (not only its parent) has already 
727         been constructed or has something following it on the line, in which 
728         case, create a new box for TextRun2 instead of sharing the same box with
729         TextRun3.
730
731         In other words, the following 2 div should render the same results
732         (ABC represents Hebrew characters).
733         <div dir=rtl>this is a <span><span>test <span>ABC</span></span></span></div>
734         <div dir=rtl>this is a <span>Test <span>ABC</span></span></div>
735
736         Test: fast/dom/34176.html
737
738         * rendering/RenderBlockLineLayout.cpp:
739         (WebCore::parentIsConstructedOrHaveNext):
740         (WebCore::RenderBlock::createLineBoxes):
741
742 2011-02-01  Abhishek Arya  <inferno@chromium.org>
743
744         Reviewed by Dan Bernstein.
745
746         Do not add a node in the document's stylesheet candidate node list if the
747         node is already removed from document.
748         https://bugs.webkit.org/show_bug.cgi?id=53441
749
750         Test: fast/css/stylesheet-candidate-nodes-crash.xhtml
751
752         * dom/Document.cpp:
753         (WebCore::Document::addStyleSheetCandidateNode):
754
755 2011-02-01  Dave Hyatt  <hyatt@apple.com>
756
757         Reviewed by Darin Adler.
758
759         https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work
760         with vertical text.
761
762         Change printing functions to check writing-mode and properly swap width and height
763         as needed.
764         
765         Fix the setScrollOrigin function so that the origin doesn't cause
766         scroll spasming during printing (this is only partially successful, but it's better
767         than it was).
768
769         Rewrite computePageRects to handle both RTL documents properly as well as vertical
770         text documents properly.
771
772         * WebCore.exp.in:
773         * page/FrameView.cpp:
774         (WebCore::FrameView::adjustViewSize):
775         (WebCore::FrameView::forceLayoutForPagination):
776         * page/PrintContext.cpp:
777         (WebCore::PrintContext::computePageRects):
778         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
779         (WebCore::PrintContext::computeAutomaticScaleFactor):
780         (WebCore::PrintContext::spoolPage):
781         (WebCore::PrintContext::spoolRect):
782         * page/PrintContext.h:
783         * page/mac/WebCoreFrameView.h:
784         * platform/ScrollView.cpp:
785         (WebCore::ScrollView::wheelEvent):
786         * platform/ScrollView.h:
787         * platform/mac/ScrollViewMac.mm:
788         (WebCore::ScrollView::platformSetScrollOrigin):
789         * rendering/RenderView.cpp:
790         (WebCore::RenderView::layout):
791
792 2011-02-01  Mikhail Naganov  <mnaganov@chromium.org>
793
794         Reviewed by Pavel Feldman.
795
796         Web Inspector: Fix profiles reset to avoid clearing heap profiles in Chromium.
797
798         https://bugs.webkit.org/show_bug.cgi?id=53500
799
800         * inspector/InspectorProfilerAgent.cpp:
801         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
802
803 2011-02-01  Mikhail Naganov  <mnaganov@chromium.org>
804
805         Reviewed by Pavel Feldman.
806
807         Web Inspector: [Chromium] Landing detailed heap snapshots, part 1.
808
809         https://bugs.webkit.org/show_bug.cgi?id=53173
810
811         Adding code for accessing heap snapshot data and
812         performing graph calculations.
813
814         * English.lproj/localizedStrings.js:
815         * inspector/front-end/HeapSnapshot.js:
816         (WebInspector.HeapSnapshotArraySlice): Helper class to avoid array contents copying.
817         (WebInspector.HeapSnapshotEdge): Wrapper for accessing graph edge properties.
818         (WebInspector.HeapSnapshotEdgeIterator):
819         (WebInspector.HeapSnapshotNode): Wrapper for accessing graph node properties.
820         (WebInspector.HeapSnapshotNodeIterator):
821         (WebInspector.HeapSnapshot): Wrapper for the heap snapshot.
822         (WebInspector.HeapSnapshotFilteredOrderedIterator):
823         (WebInspector.HeapSnapshotEdgesProvider):
824         (WebInspector.HeapSnapshotNodesProvider):
825         (WebInspector.HeapSnapshotPathFinder):
826         * inspector/front-end/HeapSnapshotView.js:
827         (WebInspector.HeapSnapshotView.prototype._convertSnapshot):
828
829 2011-02-01  Adam Roben  <aroben@apple.com>
830
831         Fix linker warnings in Release_LTCG builds
832
833         * WebCore.vcproj/WebCore.vcproj: Exclude EventNames.cpp and EventTarget.cpp from all
834         configurations, since they get pulled in via DOMAllInOne.cpp.
835
836 2011-02-01  Alexander Pavlov  <apavlov@chromium.org>
837
838         Reviewed by Yury Semikhatsky.
839
840         Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane
841         https://bugs.webkit.org/show_bug.cgi?id=53482
842
843         * English.lproj/localizedStrings.js:
844         * inspector/front-end/ElementsPanel.js:
845         (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
846         * inspector/front-end/inspector.js:
847         (WebInspector.resourceForURL):
848         (WebInspector.openLinkExternallyLabel):
849
850 2011-02-01  Anton Muhin  <antonm@chromium.org>
851
852         Reviewed by Adam Barth.
853
854         Propagate parent document security origin to newly create Document XML response
855         https://bugs.webkit.org/show_bug.cgi?id=53444
856
857         Covered by the existing tests.
858
859         * xml/XMLHttpRequest.cpp:
860         (WebCore::XMLHttpRequest::responseXML):
861
862 2011-02-01  Yury Semikhatsky  <yurys@chromium.org>
863
864         Unreviewed. Rollout r77230 which caused many layout tests
865         crashes on Chromium Debug bots.
866
867         Async event handlers should not fire within a modal dialog
868         https://bugs.webkit.org/show_bug.cgi?id=53202
869
870         * dom/Document.cpp:
871         (WebCore::Document::Document):
872         * dom/EventQueue.cpp:
873         (WebCore::EventQueue::EventQueue):
874         (WebCore::EventQueue::enqueueEvent):
875         (WebCore::EventQueue::pendingEventTimerFired):
876         * dom/EventQueue.h:
877
878 2011-02-01  Zoltan Herczeg  <zherczeg@webkit.org>
879
880         Reviewed by Dirk Schulze.
881
882         LightElement changes does not require relayout.
883         https://bugs.webkit.org/show_bug.cgi?id=53232
884
885         When an attribute of a LightElement changes, it
886         send an update message to the lighting filters
887         to update its corresponding LightSource objects,
888         and repaint the filters.
889
890         Duplicated 'id' attributes removed from svg-filter-animation.svg.
891
892         Existing dynamic-update tests covers this feature.
893
894         5x speedup on manual-tests/svg-filter-animation.svg
895
896         * manual-tests/svg-filter-animation.svg:
897         * platform/graphics/filters/DistantLightSource.h:
898         * platform/graphics/filters/FEDiffuseLighting.cpp:
899         (WebCore::FEDiffuseLighting::setLightingColor):
900         (WebCore::FEDiffuseLighting::setSurfaceScale):
901         (WebCore::FEDiffuseLighting::setDiffuseConstant):
902         (WebCore::FEDiffuseLighting::setKernelUnitLengthX):
903         (WebCore::FEDiffuseLighting::setKernelUnitLengthY):
904         * platform/graphics/filters/FEDiffuseLighting.h:
905         * platform/graphics/filters/LightSource.cpp:
906         (WebCore::PointLightSource::setX):
907         (WebCore::PointLightSource::setY):
908         (WebCore::PointLightSource::setZ):
909         (WebCore::SpotLightSource::setX):
910         (WebCore::SpotLightSource::setY):
911         (WebCore::SpotLightSource::setZ):
912         (WebCore::SpotLightSource::setPointsAtX):
913         (WebCore::SpotLightSource::setPointsAtY):
914         (WebCore::SpotLightSource::setPointsAtZ):
915         (WebCore::SpotLightSource::setSpecularExponent):
916         (WebCore::SpotLightSource::setLimitingConeAngle):
917         (WebCore::DistantLightSource::setAzimuth):
918         (WebCore::DistantLightSource::setElevation):
919         (WebCore::LightSource::setAzimuth):
920         (WebCore::LightSource::setElevation):
921         (WebCore::LightSource::setX):
922         (WebCore::LightSource::setY):
923         (WebCore::LightSource::setZ):
924         (WebCore::LightSource::setPointsAtX):
925         (WebCore::LightSource::setPointsAtY):
926         (WebCore::LightSource::setPointsAtZ):
927         (WebCore::LightSource::setSpecularExponent):
928         (WebCore::LightSource::setLimitingConeAngle):
929         * platform/graphics/filters/LightSource.h:
930         * platform/graphics/filters/PointLightSource.h:
931         * platform/graphics/filters/SpotLightSource.h:
932         * rendering/svg/RenderSVGResourceFilter.cpp:
933         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
934         * svg/SVGFEDiffuseLightingElement.cpp:
935         (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
936         (WebCore::SVGFEDiffuseLightingElement::lightElementAttributeChanged):
937         (WebCore::SVGFEDiffuseLightingElement::build):
938         (WebCore::SVGFEDiffuseLightingElement::findLightElement):
939         (WebCore::SVGFEDiffuseLightingElement::findLight):
940         * svg/SVGFEDiffuseLightingElement.h:
941         * svg/SVGFELightElement.cpp:
942         (WebCore::SVGFELightElement::svgAttributeChanged):
943         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
944         (WebCore::SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute):
945         * svg/SVGFilterPrimitiveStandardAttributes.h:
946
947 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
948
949         Reviewed by Dimitri Glazkov.
950
951         Bug 53289 - DOM: Move DocumentOrderedMap from Document into separate files
952         https://bugs.webkit.org/show_bug.cgi?id=53289
953
954         Moving the nested class DocumentOrderedMap from Document into separate files,
955         updating code where necessary.
956
957         No new tests. (refactoring)
958
959         * Android.mk:
960         * CMakeLists.txt:
961         * GNUMakefile.am:
962         * WebCore.gypi:
963         * WebCore.pro:
964         * WebCore.vcproj/WebCore.vcproj:
965         * WebCore.xcodeproj/project.pbxproj:
966         * dom/Document.cpp:
967         (WebCore::Document::getElementById):
968         (WebCore::Document::getImageMap):
969         * dom/Document.h:
970         * dom/DocumentOrderedMap.cpp: Added.
971         (WebCore::keyMatchesId):
972         (WebCore::keyMatchesMapName):
973         (WebCore::keyMatchesLowercasedMapName):
974         (WebCore::DocumentOrderedMap::clear):
975         (WebCore::DocumentOrderedMap::add):
976         (WebCore::DocumentOrderedMap::remove):
977         (WebCore::DocumentOrderedMap::get):
978         (WebCore::DocumentOrderedMap::getElementById):
979         (WebCore::DocumentOrderedMap::getElementByMapName):
980         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
981         * dom/DocumentOrderedMap.h: Added.
982         (WebCore::DocumentOrderedMap::contains):
983         (WebCore::DocumentOrderedMap::containsMultiple):
984         * dom/DOMAllInOne.cpp:
985
986 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
987
988         Reviewed by Martin Robinson.
989
990         [Gtk] atk_text_set_caret_offset fails for list items
991         https://bugs.webkit.org/show_bug.cgi?id=53388
992
993         Allow using text ranges across list items.
994
995         * accessibility/gtk/AccessibilityObjectAtk.cpp:
996         (WebCore::AccessibilityObject::allowsTextRanges): Add list items
997         to the list of accessibility objects supporting text ranges.
998
999 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1000
1001         Reviewed by Martin Robinson.
1002
1003         [GTK] character range extents is off when the end of a wrapped line is included
1004         https://bugs.webkit.org/show_bug.cgi?id=53323
1005
1006         Fixed wrong calculation getting the range extents.
1007
1008         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1009         (webkit_accessible_text_get_range_extents): Removed '+1' since the
1010         requested interval shouldn't include the last character.
1011
1012 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1013
1014         Reviewed by Martin Robinson.
1015
1016         [GTK] Caret Offset is one off at the end of wrapped lines
1017         https://bugs.webkit.org/show_bug.cgi?id=53300
1018
1019         Consider linebreaks as special cases.
1020
1021         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1022         (objectAndOffsetUnignored): In order to avoid getting wrong values
1023         when around linebreaks, we need to workaround this by explicitly
1024         avoiding those '\n' text nodes from affecting the result of
1025         calling to TextIterator:rangeLength().
1026
1027 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
1028
1029         Unreviewed, rolling out r77229.
1030         http://trac.webkit.org/changeset/77229
1031         https://bugs.webkit.org/show_bug.cgi?id=53289
1032
1033         revert mysterious build breakage
1034
1035         * Android.mk:
1036         * CMakeLists.txt:
1037         * GNUmakefile.am:
1038         * WebCore.gypi:
1039         * WebCore.pro:
1040         * WebCore.vcproj/WebCore.vcproj:
1041         * WebCore.xcodeproj/project.pbxproj:
1042         * dom/DOMAllInOne.cpp:
1043         * dom/Document.cpp:
1044         (WebCore::Document::DocumentOrderedMap::clear):
1045         (WebCore::Document::DocumentOrderedMap::add):
1046         (WebCore::Document::DocumentOrderedMap::remove):
1047         (WebCore::Document::DocumentOrderedMap::get):
1048         (WebCore::keyMatchesId):
1049         (WebCore::Document::getElementById):
1050         (WebCore::keyMatchesMapName):
1051         (WebCore::keyMatchesLowercasedMapName):
1052         (WebCore::Document::getImageMap):
1053         * dom/Document.h:
1054         (WebCore::Document::DocumentOrderedMap::contains):
1055         (WebCore::Document::DocumentOrderedMap::containsMultiple):
1056         * dom/DocumentOrderedMap.cpp: Removed.
1057         * dom/DocumentOrderedMap.h: Removed.
1058
1059 2011-02-01  Mihai Parparita  <mihaip@chromium.org>
1060
1061         Reviewed by James Robinson.
1062
1063         Async event handlers should not fire within a modal dialog
1064         https://bugs.webkit.org/show_bug.cgi?id=53202
1065
1066         Asychronous events that use EventQueue would currently fire while a
1067         modal dialog (e.g. window.alert()) was up. Change EventQueue to use a
1068         SuspendableTimer (which automatically gets suspended while dialogs are
1069         up and in other cases where JS execution is not allowed).
1070         
1071         Test: fast/events/scroll-event-during-modal-dialog.html
1072
1073         * dom/Document.cpp:
1074         (WebCore::Document::Document):
1075         * dom/EventQueue.cpp:
1076         (WebCore::EventQueueTimer::EventQueueTimer):
1077         (WebCore::EventQueueTimer::fired):
1078         (WebCore::EventQueue::EventQueue):
1079         (WebCore::EventQueue::enqueueEvent):
1080         (WebCore::EventQueue::pendingEventTimerFired):
1081         * dom/EventQueue.h:
1082         (WebCore::EventQueue::create):
1083
1084 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
1085
1086         Reviewed by Dimitri Glazkov.
1087
1088         Bug 53289 - DOM: Move DocumentOrderedMap from Document into separate files
1089         https://bugs.webkit.org/show_bug.cgi?id=53289
1090
1091         Moving the nested class DocumentOrderedMap from Document into separate files,
1092         updating code where necessary.
1093
1094         No new tests. (refactoring)
1095
1096         * Android.mk:
1097         * CMakeLists.txt:
1098         * GNUMakefile.am:
1099         * WebCore.gypi:
1100         * WebCore.pro:
1101         * WebCore.vcproj/WebCore.vcproj:
1102         * WebCore.xcodeproj/project.pbxproj:
1103         * dom/Document.cpp:
1104         (WebCore::Document::getElementById):
1105         (WebCore::Document::getImageMap):
1106         * dom/Document.h:
1107         * dom/DocumentOrderedMap.cpp: Added.
1108         (WebCore::keyMatchesId):
1109         (WebCore::keyMatchesMapName):
1110         (WebCore::keyMatchesLowercasedMapName):
1111         (WebCore::DocumentOrderedMap::clear):
1112         (WebCore::DocumentOrderedMap::add):
1113         (WebCore::DocumentOrderedMap::remove):
1114         (WebCore::DocumentOrderedMap::get):
1115         (WebCore::DocumentOrderedMap::getElementById):
1116         (WebCore::DocumentOrderedMap::getElementByMapName):
1117         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
1118         * dom/DocumentOrderedMap.h: Added.
1119         (WebCore::DocumentOrderedMap::contains):
1120         (WebCore::DocumentOrderedMap::containsMultiple):
1121         * dom/DOMAllInOne.cpp:
1122
1123 2011-02-01  Naoki Takano  <takano.naoki@gmail.com>
1124
1125         Reviewed by Darin Fisher.
1126
1127         [Chromium] Autofill should work with HTML5 form elements
1128         https://bugs.webkit.org/show_bug.cgi?id=51809
1129         http://crbug.com/65654
1130
1131         No new tests, because this fix is for Chromium project and hard to test only in WebKit project.
1132
1133         * html/InputType.h: Insert comment for canSetSuggestedValue().
1134         * html/TextFieldInputType.cpp:
1135         (WebCore::TextFieldInputType::canSetSuggestedValue): Implemented to return always true for that all text filed inputs can be completed.
1136         * html/TextFieldInputType.h: Declare canSetSuggestedValue().
1137         * html/TextInputType.cpp: Delete canSetSuggestedValue() not to return true anymore.
1138         * html/TextInputType.h: Delete canSetSuggestedValue() not to return true anymore.
1139
1140 2011-02-01  Kent Tamura  <tkent@chromium.org>
1141
1142         Reviewed by Dan Bernstein.
1143
1144         REGRESSION (r65062): Safari loops forever under WebCore::plainTextToMallocAllocatedBuffer()
1145         https://bugs.webkit.org/show_bug.cgi?id=53272
1146
1147         * editing/TextIterator.cpp:
1148         (WebCore::TextIterator::handleTextBox): Pass the appropriate renderer to emitText().
1149
1150 2011-01-31  Alexey Proskuryakov  <ap@apple.com>
1151
1152         Reviewed by Maciej Stachowiak.
1153
1154         https://bugs.webkit.org/show_bug.cgi?id=53466
1155         Move WebKit2 to printing via API methods
1156
1157         * WebCore.exp.in: Export IntRect::scale().
1158
1159 2011-01-31  Patrick Gansterer  <paroga@webkit.org>
1160
1161         Reviewed by Adam Barth.
1162
1163         Remove obsolete comment after r41871
1164         https://bugs.webkit.org/show_bug.cgi?id=53406
1165
1166         * dom/Document.h:
1167
1168 2011-01-31  Simon Fraser  <simon.fraser@apple.com>
1169
1170         Fix according to reviewer comments: can just use Color::black now.
1171
1172         * platform/graphics/ShadowBlur.cpp:
1173         (WebCore::ShadowBlur::drawInsetShadow):
1174         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
1175
1176 2011-01-31  Simon Fraser  <simon.fraser@apple.com>
1177
1178         Reviewed by Sam Weinig.
1179
1180         Clean up ShadowBlur
1181         https://bugs.webkit.org/show_bug.cgi?id=53472
1182
1183         Some minor ShadowBlur cleanup.
1184
1185         * platform/graphics/ShadowBlur.h:
1186         * platform/graphics/ShadowBlur.cpp:
1187         (WebCore::ShadowBlur::ShadowBlur): Use m_blurRadius rather than the radius
1188         paramter.
1189         (WebCore::ShadowBlur::adjustBlurRadius): Renamed from adjustBlurDistance.
1190         (WebCore::ShadowBlur::calculateLayerBoundingRect): Rename layerFloatRect to
1191         layerRect. Make frameSize a float.
1192         (WebCore::ShadowBlur::beginShadowLayer): This now takes a precomputed
1193         layerRect rather than calling calculateLayerBoundingRect() to compute
1194         it itself, since we were calling calculateLayerBoundingRect() twice.
1195         (WebCore::ShadowBlur::drawRectShadow): Optimize to call calculateLayerBoundingRect()
1196         only once. The shadowRect variable was unused, so two return paths could be
1197         collapsed into one.
1198         (WebCore::ShadowBlur::drawInsetShadow): Call calculateLayerBoundingRect() before
1199         beginShadowLayer() now.
1200         (WebCore::ShadowBlur::drawRectShadowWithoutTiling): The layerRect gets passed in.
1201         We always used alpha=1, so no need to pass that in.
1202         (WebCore::ShadowBlur::drawRectShadowWithTiling): We always used alpha=1, so no need to
1203         pass that in. Move shadowRect down to first use.
1204         ShadowBlur::clipBounds() was unused.
1205
1206 2011-01-31  No'am Rosenthal  <noam.rosenthal@nokia.com>
1207
1208         Reviewed by Kenneth Rohde Christiansen.
1209
1210         [Qt] QWebElements example from QtWebKit Bridge documentation does not work at all
1211         https://bugs.webkit.org/show_bug.cgi?id=46748
1212
1213         This problem disappears when we register QWebElement using qRegisterMetaType, which we now do in QtInstance.
1214         Added a regression test to tst_QWebFrame.
1215
1216         * bridge/qt/qt_instance.cpp:
1217         (JSC::Bindings::QtInstance::QtInstance):
1218
1219 2011-01-27  MORITA Hajime  <morrita@google.com>
1220
1221         Reviewed by Dimitri Glazkov.
1222         
1223         Convert <progress> shadow DOM to a DOM-based shadow.
1224         https://bugs.webkit.org/show_bug.cgi?id=50660
1225
1226         * Removed RenderProgress::m_valuePart, moved the shadow node
1227           to the shadow root of HTMLProgressElement.
1228         * Removed hard-coded pseudo ID for -webkit-progress-bar-value.
1229           ProgressBarValueElement is defined only for overriding
1230           shadowPseudoId().
1231         
1232         No new tests. No behavioral change.
1233
1234         * css/CSSSelector.cpp:
1235         (WebCore::CSSSelector::pseudoId):
1236         (WebCore::nameToPseudoTypeMap):
1237         (WebCore::CSSSelector::extractPseudoType):
1238         * css/CSSSelector.h:
1239         * html/HTMLProgressElement.cpp:
1240         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
1241         (WebCore::ProgressBarValueElement::shadowPseudoId):
1242         (WebCore::ProgressBarValueElement::create):
1243         (WebCore::ProgressBarValueElement::detach):
1244         (WebCore::HTMLProgressElement::parseMappedAttribute):
1245         (WebCore::HTMLProgressElement::attach):
1246         (WebCore::HTMLProgressElement::valuePart):
1247         (WebCore::HTMLProgressElement::didElementStateChange):
1248         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
1249         * html/HTMLProgressElement.h:
1250         * rendering/RenderProgress.cpp:
1251         (WebCore::RenderProgress::~RenderProgress):
1252         (WebCore::RenderProgress::updateFromElement):
1253         (WebCore::RenderProgress::layoutParts):
1254         (WebCore::RenderProgress::shouldHaveParts):
1255         (WebCore::RenderProgress::valuePart):
1256         * rendering/RenderProgress.h:
1257         * rendering/style/RenderStyleConstants.h:
1258
1259 2011-01-31  Charlie Reis  <creis@chromium.org>
1260
1261         Reviewed by Mihai Parparita.
1262
1263         Add sanity check to help diagnose bug 52819
1264         https://bugs.webkit.org/show_bug.cgi?id=53402
1265
1266         Crash early if the children of fromItem look invalid.
1267
1268         * loader/HistoryController.cpp:
1269
1270 2011-01-31  Kalle Vahlman  <kalle.vahlman@movial.com>
1271
1272         Reviewed by Andreas Kling.
1273
1274         [Qt] canvas.drawImage(HTMLVideoElement) doesn't work with Qt Multimedia backend
1275         https://bugs.webkit.org/show_bug.cgi?id=53325
1276
1277         Reimplement paintCurrentFrameInContext() rather than delegate the
1278         rendering to paint() to make sure we really do get the video frame
1279         content into the GraphicsContext, regardless of accelerated
1280         compositing and the video scene state.
1281
1282         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1283         (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
1284         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1285
1286 2011-01-31  Emil A Eklund  <eae@chromium.org>
1287
1288         Reviewed by Darin Adler.
1289
1290         Setting "selected" attribute to false should have no effect in single line <select>
1291         https://bugs.webkit.org/show_bug.cgi?id=52436
1292
1293         Change SelectElement::setSelectedIndex to select the first selectable
1294         option when the select state of all options is set to false as required
1295         by the HTML5 specification.
1296
1297         Test: fast/dom/HTMLSelectElement/selected-false.html
1298
1299         * dom/SelectElement.cpp:
1300         (WebCore::SelectElement::setSelectedIndex):
1301
1302 2011-01-31  Alexander Pavlov  <apavlov@chromium.org>
1303
1304         Reviewed by Yury Semikhatsky.
1305
1306         Web Inspector: Console source references need a left-margin
1307         https://bugs.webkit.org/show_bug.cgi?id=53308
1308
1309         * inspector/front-end/inspector.css:
1310         (.console-message-url): Added a 4px margin on the left.
1311
1312 2011-01-31  Carol Szabo  <carol.szabo@nokia.com>
1313
1314         Reviewed by David Hyatt.
1315
1316         Code Changes only.
1317
1318         It is needlessly expensive to find the generating node from an anonymous renderer of a pseudoelement.
1319         https://bugs.webkit.org/show_bug.cgi?id=53024
1320
1321         No new tests. No change in functionality
1322
1323         * rendering/RenderObject.h:
1324         (WebCore::RenderObject::before):
1325         (WebCore::RenderObject::after):
1326         (WebCore::RenderObject::generatingNode):
1327         Added new accessors for the use of the CSS 2.1 counters code
1328         (mainlyly)
1329         * rendering/RenderObjectChildList.cpp:
1330         (WebCore::beforeAfterContainer):
1331         (WebCore::RenderObjectChildList::invalidateCounters):
1332         (WebCore::RenderObjectChildList::before):
1333         (WebCore::RenderObjectChildList::after):
1334         Refactored the code to take advantage of the new accessors.
1335         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
1336         Changed to store the generating node in the :before and :after
1337         renderers.
1338         * rendering/RenderObjectChildList.h:
1339
1340 2011-01-31  Krithigassree Sambamurthy  <krithigassree.sambamurthy@nokia.com>
1341
1342         Reviewed by David Hyatt.
1343
1344         Add background-clip to background shorthand
1345         https://bugs.webkit.org/show_bug.cgi?id=52080
1346
1347         Added background-clip to background-shorthand. Also made changes to
1348         include webkitMaskClip to the mask shorthand to keep both in sync.
1349
1350         * css/CSSParser.cpp:
1351         (WebCore::CSSParser::parseValue):
1352         (WebCore::CSSParser::parseFillShorthand):
1353
1354 2011-01-31  Darin Adler  <darin@apple.com>
1355
1356         Reviewed by Adele Peterson.
1357
1358         WKView should support scrollPageDown:, scrollPageUp:, scrollToBeg and other similar selectors
1359         https://bugs.webkit.org/show_bug.cgi?id=53460
1360
1361         * editing/EditorCommand.cpp:
1362         (WebCore::executeScrollPageBackward): Added.
1363         (WebCore::executeScrollPageForward): Added.
1364         (WebCore::executeScrollToBeginningOfDocument): Added.
1365         (WebCore::executeScrollToEndOfDocument): Added.
1366         (WebCore::createCommandMap): Added the four commands above to the map.
1367
1368 2011-01-31  Dan Bernstein  <mitz@apple.com>
1369
1370         Reviewed by Adele Peterson.
1371
1372         Inter-ideograph justification should apply to hiragana and katakana as well
1373         https://bugs.webkit.org/show_bug.cgi?id=53464
1374
1375         Changed the test for expansion opportunities from isCJKIdeograph() to isCJKIdeographOrSymbol().
1376
1377         * platform/graphics/Font.cpp:
1378         (WebCore::Font::expansionOpportunityCount):
1379         * platform/graphics/WidthIterator.cpp:
1380         (WebCore::WidthIterator::advance):
1381         * platform/graphics/mac/ComplexTextController.cpp:
1382         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1383
1384 2011-01-31  Dimitri Glazkov  <dglazkov@chromium.org>
1385
1386         Reviewed by James Robinson.
1387
1388         REGRESSION(r76951): Appearance of media controls changed slightly on Qt/Chromium ports
1389         https://bugs.webkit.org/show_bug.cgi?id=53314
1390
1391         Fixes media/controls-strict.html on Chromium.
1392
1393         * css/mediaControlsChromium.css:
1394         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1395             Added proper box-sizing to avoid differences between strict/quirks mode.
1396
1397 2011-01-31  Kent Tamura  <tkent@chromium.org>
1398
1399         Reviewed by Dimitri Glazkov.
1400
1401         Validation message bubble shouldn't inherit text-security style
1402         https://bugs.webkit.org/show_bug.cgi?id=53457
1403
1404         No new tests because the validation message feature depends on timers
1405         and is enabled only in Chromium port.
1406
1407         * css/html.css:
1408         (::-webkit-validation-bubble): Reset -webkit-text-security.
1409
1410 2011-01-31  Michael Saboff  <msaboff@apple.com>
1411
1412         Reviewed by Geoffrey Garen.
1413
1414         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
1415         https://bugs.webkit.org/show_bug.cgi?id=53271
1416
1417         Reapplying this patch again. 
1418         The removal of this patch in <http://trac.webkit.org/changeset/77125>
1419         as part of https://bugs.webkit.org/show_bug.cgi?id=53418,
1420         removed the both the first (failing) patch (r76893) and this fixed 
1421         patch (r76969).  This patch includes slight changes necessitated by
1422         r77151.
1423
1424         Reapplying this patch with the change that the second ASSERT in 
1425         RootObject::removeRuntimeObject was changed to use
1426         .uncheckedGet() instead of the failing .get().  The object in question
1427         could be in the process of being GC'ed.  The get() call will not return
1428         such an object while the uncheckedGet() call will return the (unsafe) 
1429         object.  This is the behavior we want.
1430
1431         Precautionary change.
1432         Changed RootObject to use WeakGCMap instead of HashSet.
1433         Found will looking for another issue, but can't produce a test case
1434         that is problematic.  THerefore there aren't any new tests.
1435
1436         * bridge/runtime_root.cpp:
1437         (JSC::Bindings::RootObject::invalidate):
1438         (JSC::Bindings::RootObject::addRuntimeObject):
1439         (JSC::Bindings::RootObject::removeRuntimeObject):
1440         * bridge/runtime_root.h:
1441
1442 2011-01-31  Andreas Kling  <kling@webkit.org>
1443
1444         Unbreak Qt build after r77151.
1445
1446         * bridge/qt/qt_instance.cpp:
1447         (JSC::Bindings::QtInstance::removeCachedMethod):
1448         (JSC::Bindings::QtInstance::markAggregate):
1449
1450 2011-01-31  takano takumi  <takano@apple.com>
1451
1452         Reviewed by Dave Hyatt.
1453
1454         Implement text-combine rendering code
1455         https://bugs.webkit.org/show_bug.cgi?id=50621
1456
1457         Test: fast/text/international/text-combine-image-test.html
1458
1459         * Android.mk: Added RenderCombineText.cpp/h
1460         * CMakeLists.txt: Added RenderCombineText.cpp/h
1461         * GNUmakefile.am: Added RenderCombineText.cpp/h
1462         * WebCore.exp.in:
1463         * WebCore.gypi: Added RenderCombineText.cpp/h
1464         * WebCore.pro: Added RenderCombineText.cpp/h
1465         * WebCore.vcproj/WebCore.vcproj: Added RenderCombineText.cpp/h
1466         * WebCore.xcodeproj/project.pbxproj: Added RenderCombineText.cpp/h
1467         * css/CSSFontFaceSource.cpp:
1468         (WebCore::CSSFontFaceSource::getFontData):
1469         - Added fontDescription.widthVariant to SimpleFontData creation.
1470         * css/CSSStyleSelector.cpp:
1471         (WebCore::CSSStyleSelector::applyProperty):
1472         - Changed to set "Unique" flag to RenderStyle in case of TextCombine.
1473         * dom/Text.cpp:
1474         (WebCore::Text::createRenderer):
1475         - Changed to create RenderCombineText in case of TextCombine.
1476         * loader/cache/CachedFont.cpp:
1477         (WebCore::CachedFont::platformDataFromCustomData):
1478         - Added FontWidthVariant as an argument for FontPlatformData creation.
1479         * loader/cache/CachedFont.h:
1480         - Ditto.
1481         * platform/graphics/Font.h:
1482         (WebCore::Font::widthVariant):
1483         - The accessor to FontWidthVariant member variable.
1484         * platform/graphics/FontCache.cpp:
1485         - Made cache to incorporate FontWidthVariant value.
1486         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1487         (WebCore::FontPlatformDataCacheKey::operator==):
1488         (WebCore::computeHash):
1489         (WebCore::FontCache::getCachedFontPlatformData):
1490         * platform/graphics/FontDescription.h:
1491         - Add a member variable that holds a width variant - none, half-width, third-width, and quarter-width.
1492         (WebCore::FontDescription::FontDescription):
1493         (WebCore::FontDescription::widthVariant):
1494         (WebCore::FontDescription::setWidthVariant):
1495         (WebCore::FontDescription::operator==):
1496         * platform/graphics/FontWidthVariant.h: Added.
1497         * platform/graphics/cairo/FontCustomPlatformData.h:
1498         - Changed to carry FontWidthVariant value.
1499         * platform/graphics/cocoa/FontPlatformData.h:
1500         - Changed to carry FontWidthVariant value.
1501         (WebCore::FontPlatformData::FontPlatformData):
1502         (WebCore::FontPlatformData::widthVariant):
1503         (WebCore::FontPlatformData::hash):
1504         (WebCore::FontPlatformData::operator==):
1505         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1506         (WebCore::FontPlatformData::FontPlatformData):
1507         - Changed to carry FontWidthVariant value.
1508         (WebCore::FontPlatformData::operator=):
1509         - Ditto.
1510         (WebCore::mapFontWidthVariantToCTFeatureSelector):
1511         - A function to map a FontWidthVariant value to a CoreText's text spacing feature selector.
1512         (WebCore::FontPlatformData::ctFont):
1513         - Changed to create CTFont with text spacing variant based on FontWidthVariant.
1514         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1515         (WebCore::FontCustomPlatformData::fontPlatformData):
1516         - Changed to carry FontWidthVariant value.
1517         * platform/graphics/haiku/FontCustomPlatformData.cpp:
1518         (WebCore::FontCustomPlatformData::fontPlatformData):
1519         - Changed to carry FontWidthVariant value.
1520         * platform/graphics/haiku/FontCustomPlatformData.h:
1521         * platform/graphics/mac/FontCacheMac.mm:
1522         (WebCore::FontCache::createFontPlatformData):
1523         - Changed to carry FontWidthVariant value.
1524         * platform/graphics/mac/FontCustomPlatformData.cpp:
1525         (WebCore::FontCustomPlatformData::fontPlatformData):
1526         - Changed to carry FontWidthVariant value.
1527         * platform/graphics/mac/FontCustomPlatformData.h:
1528         - Ditto.
1529         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1530         (WebCore::shouldUseCoreText):
1531         - Changed to skip CT path when width variant is specified.
1532         * platform/graphics/pango/FontCustomPlatformDataPango.cpp:
1533         (WebCore::FontCustomPlatformData::fontPlatformData):
1534         - Ditto.
1535         * platform/graphics/qt/FontCustomPlatformData.h:
1536         - Ditto.
1537         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
1538         (WebCore::FontCustomPlatformData::fontPlatformData):
1539         - Ditto.
1540         * platform/graphics/skia/FontCustomPlatformData.cpp:
1541         (WebCore::FontCustomPlatformData::fontPlatformData):
1542         - Ditto.
1543         * platform/graphics/skia/FontCustomPlatformData.h:
1544         - Ditto.
1545         * platform/graphics/win/FontCustomPlatformData.cpp:
1546         (WebCore::FontCustomPlatformData::fontPlatformData):
1547         - Ditto.
1548         * platform/graphics/win/FontCustomPlatformData.h:
1549         - Ditto.
1550         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1551         - Ditto.
1552         (WebCore::FontCustomPlatformData::fontPlatformData):
1553         - Ditto.
1554         * platform/graphics/win/FontCustomPlatformDataCairo.h:
1555         - Ditto.
1556         * platform/graphics/wince/FontCustomPlatformData.cpp:
1557         (WebCore::FontCustomPlatformData::fontPlatformData):
1558         - Ditto.
1559         * platform/graphics/wince/FontCustomPlatformData.h:
1560         - Ditto.
1561         * platform/graphics/wx/FontCustomPlatformData.cpp:
1562         (WebCore::FontCustomPlatformData::fontPlatformData):
1563         - Ditto.
1564         * platform/graphics/wx/FontCustomPlatformData.h:
1565         - Ditto.
1566         * rendering/InlineTextBox.cpp:
1567         (WebCore::InlineTextBox::paint):
1568         - In case of RenderCombineText, we don't rotate text even in vertical writing. Also, we render original text
1569         instead of text returned from text().
1570         * rendering/RenderBlock.cpp:
1571         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1572         - Made to call RenderCombinedText's prepareTextCombine() here.
1573         * rendering/RenderBlockLineLayout.cpp:
1574         (WebCore::textWidth):
1575         - Made to always use the render object's width() in case of TextCombine.
1576         (WebCore::RenderBlock::findNextLineBreak):
1577         - Made to call RenderCombinedText's prepareTextCombine() here.
1578         * rendering/RenderCombineText.cpp: Added. A subclass of RenderText.
1579         (WebCore::RenderCombineText::RenderCombineText):
1580         (WebCore::RenderCombineText::styleDidChange):
1581         - Clear the flag that indicated the font has been prepared for combining. The font will be reinitialized in
1582         the next call of RenderBlock::findNextLineBreak().
1583         (WebCore::RenderCombineText::setTextInternal):
1584         - Ditto.
1585         (WebCore::RenderCombineText::width):
1586         - Returns 1-em width in case of font combine.
1587         (WebCore::RenderCombineText::adjustTextOrigin):
1588         - Adjust drawing origin point in case of font combine.
1589         (WebCore::RenderCombineText::charactersToRender):
1590         - Return original text instead of current text in case of font combine.
1591         (WebCore::RenderCombineText::combineText):
1592         - This function tries to pack passed text with; 1) the current font as is, 2) the font created
1593         from the descriptor with half-width variant specified, 3) the font with third-width variant, 4) the font
1594         with quarter-width variant.
1595         - If a suitable font successfully found, replace the current font with the new font. If no appropriate font found,
1596         we give up text-combine as the CSS spec describes.
1597         - If a new font found, we replace the text with 0xFFFC. This is needed for a combined text block to be able to
1598         behave like a single character against text decorations.
1599         * rendering/RenderCombineText.h: Added.
1600         (WebCore::RenderCombineText::isCombined):
1601         (WebCore::RenderCombineText::combinedTextWidth):
1602         - Returns 1-em width in case of font combine.
1603         (WebCore::RenderCombineText::renderName):
1604         (WebCore::toRenderCombineText):
1605         * rendering/RenderText.cpp:
1606         (WebCore::RenderText::widthFromCache):
1607         - Made to call RenderCombineText's combinedTextWidth when the text is combined.
1608         * rendering/RenderingAllInOne.cpp: Added RenderCombineText.cpp
1609         * rendering/style/RenderStyle.h:
1610         (WebCore::InheritedFlags::hasTextCombine):
1611         - Added for a quick test of TextCombine.
1612
1613 2011-01-31  Oliver Hunt  <oliver@apple.com>
1614
1615         Convert markstack to a slot visitor API
1616         https://bugs.webkit.org/show_bug.cgi?id=53219
1617
1618         rolling r77098, r77099, r77100, r77109, and
1619         r77111 back in, along with a few more Qt fix attempts.
1620
1621         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
1622         * WebCore.exp.in:
1623         * bindings/js/DOMWrapperWorld.h:
1624         (WebCore::DOMWrapperWorld::globalData):
1625         * bindings/js/JSAudioConstructor.cpp:
1626         (WebCore::JSAudioConstructor::JSAudioConstructor):
1627         * bindings/js/JSDOMBinding.cpp:
1628         (WebCore::markDOMNodesForDocument):
1629         (WebCore::markDOMObjectWrapper):
1630         (WebCore::markDOMNodeWrapper):
1631         * bindings/js/JSDOMGlobalObject.cpp:
1632         (WebCore::JSDOMGlobalObject::markChildren):
1633         (WebCore::JSDOMGlobalObject::setInjectedScript):
1634         (WebCore::JSDOMGlobalObject::injectedScript):
1635         * bindings/js/JSDOMGlobalObject.h:
1636         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
1637         (WebCore::getDOMConstructor):
1638         * bindings/js/JSDOMWindowCustom.cpp:
1639         (WebCore::JSDOMWindow::setLocation):
1640         (WebCore::DialogHandler::dialogCreated):
1641         * bindings/js/JSDOMWindowShell.cpp:
1642         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
1643         (WebCore::JSDOMWindowShell::setWindow):
1644         (WebCore::JSDOMWindowShell::markChildren):
1645         (WebCore::JSDOMWindowShell::unwrappedObject):
1646         * bindings/js/JSDOMWindowShell.h:
1647         (WebCore::JSDOMWindowShell::window):
1648         (WebCore::JSDOMWindowShell::setWindow):
1649         * bindings/js/JSDeviceMotionEventCustom.cpp:
1650         (WebCore::createAccelerationObject):
1651         (WebCore::createRotationRateObject):
1652         * bindings/js/JSEventListener.cpp:
1653         (WebCore::JSEventListener::JSEventListener):
1654         (WebCore::JSEventListener::markJSFunction):
1655         * bindings/js/JSEventListener.h:
1656         (WebCore::JSEventListener::jsFunction):
1657         * bindings/js/JSHTMLDocumentCustom.cpp:
1658         (WebCore::JSHTMLDocument::setAll):
1659         * bindings/js/JSImageConstructor.cpp:
1660         (WebCore::JSImageConstructor::JSImageConstructor):
1661         * bindings/js/JSImageDataCustom.cpp:
1662         (WebCore::toJS):
1663         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1664         (WebCore::JSJavaScriptCallFrame::scopeChain):
1665         (WebCore::JSJavaScriptCallFrame::scopeType):
1666         * bindings/js/JSNodeFilterCondition.cpp:
1667         (WebCore::JSNodeFilterCondition::markAggregate):
1668         (WebCore::JSNodeFilterCondition::acceptNode):
1669         * bindings/js/JSNodeFilterCondition.h:
1670         * bindings/js/JSNodeFilterCustom.cpp:
1671         * bindings/js/JSOptionConstructor.cpp:
1672         (WebCore::JSOptionConstructor::JSOptionConstructor):
1673         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1674         (WebCore::JSSQLResultSetRowList::item):
1675         * bindings/js/ScriptCachedFrameData.cpp:
1676         (WebCore::ScriptCachedFrameData::restore):
1677         * bindings/js/ScriptObject.cpp:
1678         (WebCore::ScriptGlobalObject::set):
1679         * bindings/js/SerializedScriptValue.cpp:
1680         (WebCore::CloneDeserializer::putProperty):
1681         * bindings/scripts/CodeGeneratorJS.pm:
1682         * bridge/qt/qt_class.cpp:
1683         (JSC::Bindings::QtClass::fallbackObject):
1684         * bridge/qt/qt_instance.cpp:
1685         (JSC::Bindings::QtInstance::QtInstance):
1686         (JSC::Bindings::QtInstance::removeCachedMethod):
1687         (JSC::Bindings::QtInstance::markAggregate):
1688         * bridge/qt/qt_instance.h:
1689         * bridge/qt/qt_runtime.cpp:
1690         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
1691         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
1692         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
1693         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
1694         * bridge/qt/qt_runtime.h:
1695         * dom/Document.h:
1696
1697 2011-01-31  Dan Winship  <danw@gnome.org>
1698
1699         Reviewed by Gustavo Noronha Silva.
1700
1701         wss (websockets ssl) support for gtk via new gio TLS support
1702         https://bugs.webkit.org/show_bug.cgi?id=50344
1703
1704         Update to use GPollableOutputStream and GTlsConnection to
1705         implement wss URLs
1706
1707         * platform/network/soup/SocketStreamHandle.h:
1708         * platform/network/soup/SocketStreamHandleSoup.cpp:
1709         (WebCore::SocketStreamHandle::SocketStreamHandle):
1710         (WebCore::SocketStreamHandle::connected):
1711         (WebCore::SocketStreamHandle::platformSend):
1712         (WebCore::SocketStreamHandle::beginWaitingForSocketWritability):
1713         (WebCore::writeReadyCallback):
1714
1715 2011-01-31  Abhishek Arya  <inferno@chromium.org>
1716
1717         Reviewed by Dimitri Glazkov.
1718
1719         Check the textarea node still exists in document before casting
1720         it to HTMLTextAreaElement.
1721         https://bugs.webkit.org/show_bug.cgi?id=53429
1722
1723         Test: fast/forms/textarea-node-removed-from-document-crash.html
1724
1725         * rendering/RenderTextControlMultiLine.cpp:
1726         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
1727
1728 2011-01-27  Abhishek Arya  <inferno@chromium.org>
1729
1730         Reviewed by Dave Hyatt.
1731
1732         If beforeChild is wrapped in an anonymous table section, we need to
1733         go the parent to find it and use it before adding childs to table.
1734         https://bugs.webkit.org/show_bug.cgi?id=53276
1735
1736         We need to make sure that beforeChild's parent is "this" before calling
1737         RenderBox::addChild. The previous condition in while is too restrictive
1738         and fails to calculate the right beforeChild value when its display
1739         style is table caption.
1740         Test: fast/table/before-child-non-table-section-add-table-crash.html
1741
1742         * rendering/RenderTable.cpp:
1743         (WebCore::RenderTable::addChild):
1744
1745 2011-01-31  Shane Stephens  <shanestephens@google.com>
1746
1747         Reviewed by Simon Fraser.
1748
1749         AffineTransform::translateRight incorrectly computes a translateLeft.
1750         https://bugs.webkit.org/show_bug.cgi?id=52551
1751
1752         Removed translateRight and converted all uses to perform standard
1753         matrix multiplication.
1754
1755         No new tests because patch doesn't modify functionality.
1756
1757         * platform/graphics/transforms/AffineTransform.cpp:
1758         * platform/graphics/transforms/AffineTransform.h:
1759         (WebCore::AffineTransform::translation):
1760         * rendering/svg/RenderSVGResourceMarker.cpp:
1761         (WebCore::RenderSVGResourceMarker::localToParentTransform):
1762         * rendering/svg/RenderSVGRoot.cpp:
1763         (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
1764         (WebCore::RenderSVGRoot::localToParentTransform):
1765         * rendering/svg/RenderSVGViewportContainer.cpp:
1766         (WebCore::RenderSVGViewportContainer::localToParentTransform):
1767         * rendering/svg/SVGTextLayoutEngine.cpp:
1768         (WebCore::SVGTextLayoutEngine::finalizeTransformMatrices):
1769
1770 2011-01-31  Mario Sanchez Prada  <msanchez@igalia.com>
1771
1772         Reviewed by Martin Robinson.
1773
1774         [Gtk] atk_text_set_caret_offset returns True even when it is unsuccessful
1775         https://bugs.webkit.org/show_bug.cgi?id=53389
1776
1777         Return FALSE when not able to set the caret at the specified offset.
1778
1779         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1780         (webkit_accessible_text_set_caret_offset): Return FALSE when the
1781         range created is NULL and adjust offset to account for list markers.
1782
1783 2011-01-28  Pavel Feldman  <pfeldman@chromium.org>
1784
1785         Reviewed by Yury Semikhatsky.
1786
1787         Web Inspector: copy HAR to clipboard instead of saving blob on export.
1788         https://bugs.webkit.org/show_bug.cgi?id=53328
1789
1790         * inspector/front-end/NetworkPanel.js:
1791         (WebInspector.NetworkPanel.prototype._exportAll):
1792         (WebInspector.NetworkPanel.prototype._exportResource):
1793
1794 2011-01-30  Pavel Feldman  <pfeldman@chromium.org>
1795
1796         Reviewed by Timothy Hatcher.
1797
1798         Web Inspector: speed up network panel rendering.
1799         https://bugs.webkit.org/show_bug.cgi?id=53397
1800
1801         * inspector/front-end/DataGrid.js:
1802         (WebInspector.DataGrid.prototype.get scrollContainer):
1803         * inspector/front-end/NetworkPanel.js:
1804         (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor):
1805         (WebInspector.NetworkPanel.prototype._positionSummaryBar):
1806         (WebInspector.NetworkPanel.prototype._createTable):
1807         (WebInspector.NetworkPanel.prototype._exportResource):
1808         (WebInspector.NetworkPanel.prototype._onScroll):
1809         * inspector/front-end/networkPanel.css:
1810         (.network-sidebar .data-grid.small tr.offscreen):
1811         (.network-sidebar .data-grid tr.offscreen):
1812         (.network-sidebar .data-grid tr.offscreen td):
1813
1814 2011-01-31  Peter Varga  <pvarga@webkit.org>
1815
1816         Reviewed by Andreas Kling.
1817
1818         Remove wrec from WebCore
1819         https://bugs.webkit.org/show_bug.cgi?id=53298
1820
1821         No new tests needed.
1822
1823         * Android.jscbindings.mk:
1824         * ForwardingHeaders/wrec/WREC.h: Removed.
1825         * WebCore.vcproj/WebCore.vcproj:
1826         * WebCore.vcproj/copyForwardingHeaders.cmd:
1827
1828 2011-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1829
1830         Unreviewed, rolling out r76969.
1831         http://trac.webkit.org/changeset/76969
1832         https://bugs.webkit.org/show_bug.cgi?id=53418
1833
1834         "It is causing crashes in GTK+ and Leopard bots" (Requested by
1835         alexg__ on #webkit).
1836
1837         * bridge/runtime_root.cpp:
1838         (JSC::Bindings::RootObject::invalidate):
1839         (JSC::Bindings::RootObject::addRuntimeObject):
1840         (JSC::Bindings::RootObject::removeRuntimeObject):
1841         * bridge/runtime_root.h:
1842
1843 2011-01-31  Antti Koivisto  <antti@apple.com>
1844
1845         Not reviewed.
1846
1847         Spelling.
1848
1849         * css/CSSSelectorList.h:
1850         (WebCore::CSSSelectorList::next):
1851
1852 2011-01-31  Yury Semikhatsky  <yurys@chromium.org>
1853
1854         Unreviewed. Fix Chromium compilation on Linux.
1855
1856         * platform/graphics/ShadowBlur.cpp: added PLATFORM(CHROMIUM) guard
1857         * platform/graphics/ShadowBlur.h: added missing ColorSpace.h header include
1858
1859 2011-01-31  Yury Semikhatsky  <yurys@chromium.org>
1860
1861         Unreviewed. Fix Chromium compilation on Mac broken by r77101.
1862
1863         * WebCore.gypi: add ShadowBlur.{h,cpp} to the gypi file.
1864
1865 2011-01-31  Mikhail Naganov  <mnaganov@chromium.org>
1866
1867         Reviewed by Yury Semikhatsky.
1868
1869         WebInspector: Change button title from "Clear CPU profiles" to "Clear all profiles".
1870
1871         https://bugs.webkit.org/show_bug.cgi?id=53309
1872
1873         * English.lproj/localizedStrings.js:
1874         * inspector/front-end/ProfilesPanel.js:
1875         (WebInspector.ProfilesPanel):
1876
1877 2011-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1878
1879         Unreviewed, fix the build with current GTK+ 3.x.
1880
1881         * plugins/gtk/gtk2xtbin.c:
1882         * plugins/gtk/gtk2xtbin.h:
1883
1884 2011-01-30  Kenichi Ishibashi  <bashi@google.com>
1885
1886         Reviewed by Kent Tamura.
1887
1888         Dangling form associated elements should not be registered on the document
1889         https://bugs.webkit.org/show_bug.cgi?id=53223
1890
1891         Adds insertedIntoDocument() and remvoedFromDocument() to
1892         FormAssociatedElement class to register the element on the document
1893         if and only if it actually inserted into (removed from) the document.
1894
1895         Test: fast/forms/dangling-form-element-crash.html
1896
1897         * html/FormAssociatedElement.cpp:
1898         (WebCore::FormAssociatedElement::insertedIntoDocument): Added.
1899         (WebCore::FormAssociatedElement::removedFromDocument): Ditto.
1900         (WebCore::FormAssociatedElement::insertedIntoTree): Don't register
1901         the element to a document.
1902         (WebCore::FormAssociatedElement::removedFromTree): Don't unregister
1903         the element from a document.
1904         * html/FormAssociatedElement.h:
1905         * html/HTMLFormControlElement.cpp:
1906         (WebCore::HTMLFormControlElement::insertedIntoDocument): Added.
1907         (WebCore::HTMLFormControlElement::removedFromDocument): Ditto.
1908         * html/HTMLFormControlElement.h:
1909         * html/HTMLObjectElement.cpp:
1910         (WebCore::HTMLObjectElement::insertedIntoDocument): Calls
1911         FormAssociatedElement::insertedIntoDocument().
1912         (WebCore::HTMLObjectElement::removedFromDocument): Calls
1913         FormAssociatedElement::removedFromDocument().
1914
1915 2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
1916
1917         Unreviewed, rolling out r77098, r77099, r77100, r77109, and
1918         r77111.
1919         http://trac.webkit.org/changeset/77098
1920         http://trac.webkit.org/changeset/77099
1921         http://trac.webkit.org/changeset/77100
1922         http://trac.webkit.org/changeset/77109
1923         http://trac.webkit.org/changeset/77111
1924         https://bugs.webkit.org/show_bug.cgi?id=53219
1925
1926         Qt build is broken
1927
1928         * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
1929         * WebCore.exp.in:
1930         * bindings/js/DOMWrapperWorld.h:
1931         * bindings/js/JSAudioConstructor.cpp:
1932         (WebCore::JSAudioConstructor::JSAudioConstructor):
1933         * bindings/js/JSDOMBinding.cpp:
1934         (WebCore::markDOMNodesForDocument):
1935         (WebCore::markDOMObjectWrapper):
1936         (WebCore::markDOMNodeWrapper):
1937         * bindings/js/JSDOMGlobalObject.cpp:
1938         (WebCore::JSDOMGlobalObject::markChildren):
1939         (WebCore::JSDOMGlobalObject::setInjectedScript):
1940         (WebCore::JSDOMGlobalObject::injectedScript):
1941         * bindings/js/JSDOMGlobalObject.h:
1942         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
1943         (WebCore::getDOMConstructor):
1944         * bindings/js/JSDOMWindowCustom.cpp:
1945         (WebCore::JSDOMWindow::setLocation):
1946         (WebCore::DialogHandler::dialogCreated):
1947         * bindings/js/JSDOMWindowShell.cpp:
1948         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
1949         (WebCore::JSDOMWindowShell::setWindow):
1950         (WebCore::JSDOMWindowShell::markChildren):
1951         (WebCore::JSDOMWindowShell::unwrappedObject):
1952         * bindings/js/JSDOMWindowShell.h:
1953         (WebCore::JSDOMWindowShell::window):
1954         (WebCore::JSDOMWindowShell::setWindow):
1955         * bindings/js/JSDeviceMotionEventCustom.cpp:
1956         (WebCore::createAccelerationObject):
1957         (WebCore::createRotationRateObject):
1958         * bindings/js/JSEventListener.cpp:
1959         (WebCore::JSEventListener::JSEventListener):
1960         (WebCore::JSEventListener::markJSFunction):
1961         * bindings/js/JSEventListener.h:
1962         (WebCore::JSEventListener::jsFunction):
1963         * bindings/js/JSHTMLDocumentCustom.cpp:
1964         (WebCore::JSHTMLDocument::setAll):
1965         * bindings/js/JSImageConstructor.cpp:
1966         (WebCore::JSImageConstructor::JSImageConstructor):
1967         * bindings/js/JSImageDataCustom.cpp:
1968         (WebCore::toJS):
1969         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1970         (WebCore::JSJavaScriptCallFrame::scopeChain):
1971         (WebCore::JSJavaScriptCallFrame::scopeType):
1972         * bindings/js/JSNodeFilterCondition.cpp:
1973         (WebCore::JSNodeFilterCondition::markAggregate):
1974         (WebCore::JSNodeFilterCondition::acceptNode):
1975         * bindings/js/JSNodeFilterCondition.h:
1976         * bindings/js/JSNodeFilterCustom.cpp:
1977         * bindings/js/JSOptionConstructor.cpp:
1978         (WebCore::JSOptionConstructor::JSOptionConstructor):
1979         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1980         (WebCore::JSSQLResultSetRowList::item):
1981         * bindings/js/ScriptCachedFrameData.cpp:
1982         (WebCore::ScriptCachedFrameData::restore):
1983         * bindings/js/ScriptObject.cpp:
1984         (WebCore::ScriptGlobalObject::set):
1985         * bindings/js/SerializedScriptValue.cpp:
1986         (WebCore::CloneDeserializer::putProperty):
1987         * bindings/scripts/CodeGeneratorJS.pm:
1988         * bridge/qt/qt_instance.cpp:
1989         (JSC::Bindings::QtInstance::QtInstance):
1990         (JSC::Bindings::QtInstance::removeCachedMethod):
1991         (JSC::Bindings::QtInstance::markAggregate):
1992         * bridge/qt/qt_instance.h:
1993         * bridge/qt/qt_runtime.cpp:
1994         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
1995         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
1996         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
1997         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
1998         * bridge/qt/qt_runtime.h:
1999         * bridge/runtime_root.cpp:
2000         (JSC::Bindings::RootObject::invalidate):
2001         * bridge/runtime_root.h:
2002         * dom/Document.h:
2003
2004 2011-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2005
2006         Unreviewed, rolling out r77107.
2007         http://trac.webkit.org/changeset/77107
2008         https://bugs.webkit.org/show_bug.cgi?id=53412
2009
2010         Caused 5 new form-related test crashes (Requested by smfr on
2011         #webkit).
2012
2013         * css/CSSSelector.cpp:
2014         (WebCore::CSSSelector::pseudoId):
2015         (WebCore::nameToPseudoTypeMap):
2016         (WebCore::CSSSelector::extractPseudoType):
2017         * css/CSSSelector.h:
2018         * html/HTMLProgressElement.cpp:
2019         (WebCore::HTMLProgressElement::parseMappedAttribute):
2020         (WebCore::HTMLProgressElement::attach):
2021         * html/HTMLProgressElement.h:
2022         * rendering/RenderProgress.cpp:
2023         (WebCore::RenderProgress::~RenderProgress):
2024         (WebCore::RenderProgress::updateFromElement):
2025         (WebCore::RenderProgress::layoutParts):
2026         (WebCore::RenderProgress::shouldHaveParts):
2027         * rendering/RenderProgress.h:
2028         * rendering/style/RenderStyleConstants.h:
2029
2030 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2031
2032         Reviewed by Sam Weinig.
2033
2034         Enhance ShadowBlur to render inset box shadows
2035         https://bugs.webkit.org/show_bug.cgi?id=51567
2036         
2037         Use ShadowBlur for inset box-shadows with CG. It 
2038         currently lacks a tiled version, but is still much
2039         faster than CG shadows.
2040
2041         Test: fast/box-shadow/inset-box-shadow-radius.html
2042
2043         * platform/graphics/ShadowBlur.cpp:
2044         * platform/graphics/ShadowBlur.h: New method for inset
2045         shadows.
2046         (WebCore::ShadowBlur::drawInsetShadow): 
2047
2048         * platform/graphics/GraphicsContext.cpp: #ifdef out
2049         fillRectWithRoundedHole() for CG.
2050
2051         * platform/graphics/cg/GraphicsContextCG.cpp:
2052         (WebCore::GraphicsContext::fillRectWithRoundedHole): If there's
2053         a shadow with a radius > 0, use ShadowBlur.
2054
2055 2011-01-28  Kenneth Russell  <kbr@google.com>
2056
2057         Reviewed by Chris Marrin.
2058
2059         WebGL shows PNG Textures with indexed colors too dark
2060         https://bugs.webkit.org/show_bug.cgi?id=47477
2061
2062         Properly handle indexed PNG images by re-rendering them as RGBA
2063         images before upload. Verified with this layout test and the test
2064         cases from bugs 47477 and 53269.
2065
2066         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2067         (WebCore::GraphicsContext3D::getImageData):
2068
2069 2011-01-27  MORITA Hajime  <morrita@google.com>
2070
2071         Reviewed by Dimitri Glazkov.
2072         
2073         Convert <progress> shadow DOM to a DOM-based shadow.
2074         https://bugs.webkit.org/show_bug.cgi?id=50660
2075
2076         * Removed RenderProgress::m_valuePart, moved the shadow node
2077           to the shadow root of HTMLProgressElement.
2078         * Removed hard-coded pseudo ID for -webkit-progress-bar-value.
2079           ProgressBarValueElement is defined only for overriding
2080           shadowPseudoId().
2081         
2082         No new tests. No behavioral change.
2083
2084         * css/CSSSelector.cpp:
2085         (WebCore::CSSSelector::pseudoId):
2086         (WebCore::nameToPseudoTypeMap):
2087         (WebCore::CSSSelector::extractPseudoType):
2088         * css/CSSSelector.h:
2089         * html/HTMLProgressElement.cpp:
2090         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
2091         (WebCore::ProgressBarValueElement::shadowPseudoId):
2092         (WebCore::ProgressBarValueElement::create):
2093         (WebCore::HTMLProgressElement::parseMappedAttribute):
2094         (WebCore::HTMLProgressElement::attach):
2095         (WebCore::HTMLProgressElement::valuePart):
2096         (WebCore::HTMLProgressElement::didElementStateChange):
2097         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
2098         * html/HTMLProgressElement.h:
2099         * rendering/RenderProgress.cpp:
2100         (WebCore::RenderProgress::~RenderProgress):
2101         (WebCore::RenderProgress::updateFromElement):
2102         (WebCore::RenderProgress::layoutParts):
2103         (WebCore::RenderProgress::shouldHaveParts):
2104         (WebCore::RenderProgress::valuePart):
2105         * rendering/RenderProgress.h:
2106         * rendering/style/RenderStyleConstants.h:
2107
2108 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2109
2110         Reviewed by Ariya Hidayat.
2111
2112         Enhance ShadowBlur to render inset box shadows; Part 1.
2113         https://bugs.webkit.org/show_bug.cgi?id=51567
2114         
2115         Add a new method to GraphicsContext to render a rect with a rounded hole,
2116         for use by inset box-shadow code. Knowledge that we're rendering a rounded
2117         hole will enable ShadowBlur to be used here in future.
2118
2119         * platform/graphics/GraphicsContext.cpp:
2120         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2121         * platform/graphics/GraphicsContext.h:
2122         * rendering/RenderBoxModelObject.cpp:
2123         (WebCore::RenderBoxModelObject::paintBoxShadow):
2124
2125 2011-01-23  MORITA Hajime  <morrita@google.com>
2126
2127         Reviewed by Eric Seidel.
2128
2129         REGRESSION: Inset shadow with too large border radius misses rounded corner.
2130         https://bugs.webkit.org/show_bug.cgi?id=52800
2131
2132         The refactoring on r76083 broke the invariant between border
2133         IntRect and its radii because RoundedIntRect::setRect() is called
2134         after getRoundedInnerBorderWithBorderWidths(), which enforces the
2135         invariant. Th rounded-rect clipping code verifies the invariant,
2136         and discard the invalid radii, that results broken paintings.
2137         
2138         This change moved setRect() before
2139         getRoundedInnerBorderWithBorderWidths() not to modify the valid
2140         RoundedIntRect value.
2141         
2142         Test: fast/box-shadow/inset-with-extraordinary-radii-and-border.html
2143
2144         * rendering/RenderBoxModelObject.cpp:
2145         (WebCore::RenderBoxModelObject::paintBoxShadow):
2146
2147 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2148
2149         Attempt to fix Windows build by adding ShadowBlur.cpp/h to the
2150         vcproj.
2151
2152         * WebCore.vcproj/WebCore.vcproj:
2153
2154 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2155
2156         Reviewed by Dan Bernstein.
2157
2158         -webkit-box-shadow causes awful scroll/resize/redraw performance
2159         https://bugs.webkit.org/show_bug.cgi?id=22102
2160         
2161         Use ShadowBlur for CG, whe rendering shadows on rects and
2162         rounded rects outside of canvas.
2163         
2164         CG shadows with a radius of more than 8px do not render
2165         correctly. We preserve this incorrect rendering by compensating
2166         for it when rending -webkit-box-shadow. Calls that should use
2167         this deprecated radius behavior now use setLegacyShadow().
2168
2169         Test: fast/box-shadow/box-shadow-transformed.html
2170         
2171         * html/canvas/CanvasRenderingContext2D.cpp: Use setLegacyShadow()
2172         for canvas, to indicate that it should use the deprecated radius
2173         behavior.
2174         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault): Ditto.
2175         (WebCore::CanvasRenderingContext2D::setShadow): Ditto.
2176         (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
2177         
2178         * platform/graphics/GraphicsContext.cpp:
2179         (WebCore::GraphicsContext::setLegacyShadow): Set the m_state.shadowsUseLegacyRadius bit.
2180         
2181         * platform/graphics/GraphicsContext.h:
2182         (WebCore::GraphicsContextState::GraphicsContextState): Add a 
2183         shadowsUseLegacyRadius bit to the state.
2184         
2185         * platform/graphics/cg/GraphicsContextCG.cpp:
2186         (WebCore::radiusToLegacyRadius): Map from the actual radius to one
2187         that approximates CG behavior.
2188         (WebCore::hasBlurredShadow): Helper that returns true if we have a shadow
2189         with a non-zero blur radius.
2190         (WebCore::GraphicsContext::fillRect): Use ShadowBlur if not canvas.
2191         (WebCore::GraphicsContext::fillRoundedRect): Ditto.
2192         (WebCore::GraphicsContext::setPlatformShadow): Comment.
2193
2194         * rendering/RenderBoxModelObject.cpp:
2195         (WebCore::RenderBoxModelObject::paintBoxShadow): Call setLegacyShadow()
2196         for -webkit-box-shadow.
2197
2198         * platform/graphics/ShadowBlur.cpp: 
2199         (WebCore::ShadowBlur::calculateLayerBoundingRect): Fix some pixel crack issues
2200         by rounding up the blur radius.
2201         (WebCore::ShadowBlur::drawRectShadow): Ditto
2202         (WebCore::ShadowBlur::drawRectShadowWithTiling): Ditto.
2203
2204 2011-01-30  Oliver Hunt  <oliver@apple.com>
2205
2206         Try to fix Qt build (again).
2207
2208         * bridge/qt/qt_runtime.cpp:
2209         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2210         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2211
2212 2011-01-30  Oliver Hunt  <oliver@apple.com>
2213
2214         Try to fix Qt build.
2215
2216         * bridge/qt/qt_instance.cpp:
2217         (JSC::Bindings::QtInstance::QtInstance):
2218         (JSC::Bindings::QtInstance::removeCachedMethod):
2219         (JSC::Bindings::QtInstance::markAggregate):
2220         * bridge/qt/qt_instance.h:
2221
2222 2011-01-30  Oliver Hunt  <oliver@apple.com>
2223
2224         Convert markstack to a slot visitor API
2225         https://bugs.webkit.org/show_bug.cgi?id=53219
2226
2227         rolling r77006 and r77020 back in.
2228
2229         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
2230         * WebCore.exp.in:
2231         * bindings/js/DOMWrapperWorld.h:
2232         (WebCore::DOMWrapperWorld::globalData):
2233         * bindings/js/JSAudioConstructor.cpp:
2234         (WebCore::JSAudioConstructor::JSAudioConstructor):
2235         * bindings/js/JSDOMBinding.cpp:
2236         (WebCore::markDOMNodesForDocument):
2237         (WebCore::markDOMObjectWrapper):
2238         (WebCore::markDOMNodeWrapper):
2239         * bindings/js/JSDOMGlobalObject.cpp:
2240         (WebCore::JSDOMGlobalObject::markChildren):
2241         (WebCore::JSDOMGlobalObject::setInjectedScript):
2242         (WebCore::JSDOMGlobalObject::injectedScript):
2243         * bindings/js/JSDOMGlobalObject.h:
2244         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2245         (WebCore::getDOMConstructor):
2246         * bindings/js/JSDOMWindowCustom.cpp:
2247         (WebCore::JSDOMWindow::setLocation):
2248         (WebCore::DialogHandler::dialogCreated):
2249         * bindings/js/JSDOMWindowShell.cpp:
2250         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2251         (WebCore::JSDOMWindowShell::setWindow):
2252         (WebCore::JSDOMWindowShell::markChildren):
2253         (WebCore::JSDOMWindowShell::unwrappedObject):
2254         * bindings/js/JSDOMWindowShell.h:
2255         (WebCore::JSDOMWindowShell::window):
2256         (WebCore::JSDOMWindowShell::setWindow):
2257         * bindings/js/JSDeviceMotionEventCustom.cpp:
2258         (WebCore::createAccelerationObject):
2259         (WebCore::createRotationRateObject):
2260         * bindings/js/JSEventListener.cpp:
2261         (WebCore::JSEventListener::JSEventListener):
2262         (WebCore::JSEventListener::markJSFunction):
2263         * bindings/js/JSEventListener.h:
2264         (WebCore::JSEventListener::jsFunction):
2265         * bindings/js/JSHTMLDocumentCustom.cpp:
2266         (WebCore::JSHTMLDocument::setAll):
2267         * bindings/js/JSImageConstructor.cpp:
2268         (WebCore::JSImageConstructor::JSImageConstructor):
2269         * bindings/js/JSImageDataCustom.cpp:
2270         (WebCore::toJS):
2271         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2272         (WebCore::JSJavaScriptCallFrame::scopeChain):
2273         (WebCore::JSJavaScriptCallFrame::scopeType):
2274         * bindings/js/JSNodeFilterCondition.cpp:
2275         (WebCore::JSNodeFilterCondition::markAggregate):
2276         (WebCore::JSNodeFilterCondition::acceptNode):
2277         * bindings/js/JSNodeFilterCondition.h:
2278         * bindings/js/JSNodeFilterCustom.cpp:
2279         * bindings/js/JSOptionConstructor.cpp:
2280         (WebCore::JSOptionConstructor::JSOptionConstructor):
2281         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2282         (WebCore::JSSQLResultSetRowList::item):
2283         * bindings/js/ScriptCachedFrameData.cpp:
2284         (WebCore::ScriptCachedFrameData::restore):
2285         * bindings/js/ScriptObject.cpp:
2286         (WebCore::ScriptGlobalObject::set):
2287         * bindings/js/SerializedScriptValue.cpp:
2288         (WebCore::CloneDeserializer::putProperty):
2289         * bindings/scripts/CodeGeneratorJS.pm:
2290         * bridge/qt/qt_runtime.cpp:
2291         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
2292         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
2293         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2294         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2295         * bridge/qt/qt_runtime.h:
2296         * bridge/runtime_root.cpp:
2297         (JSC::Bindings::RootObject::invalidate):
2298         * bridge/runtime_root.h:
2299         * dom/Document.h:
2300
2301 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2302
2303         Reviewed by Sam Weinig.
2304
2305         Make ContextShadow code cross-platform
2306         https://bugs.webkit.org/show_bug.cgi?id=51312
2307
2308         Add a new class, ShadowBlur, that contains most of the
2309         code from ContextShadow, but is fully cross-platform.
2310         It depends on one new method, GraphicsContext::clipBounds(),
2311         which platforms will have to implement.
2312         
2313         Add ShadowBlur to the Mac Xcode project, but don't use it
2314         anywhere yet.
2315
2316         * WebCore.xcodeproj/project.pbxproj:
2317         * platform/graphics/GraphicsContext.cpp:
2318         (WebCore::GraphicsContext::clipBounds):
2319         * platform/graphics/GraphicsContext.h:
2320         * platform/graphics/ShadowBlur.cpp: Added.
2321         (WebCore::roundUpToMultipleOf32):
2322         (WebCore::ScratchBuffer::ScratchBuffer):
2323         (WebCore::ScratchBuffer::getScratchBuffer):
2324         (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
2325         (WebCore::ScratchBuffer::timerFired):
2326         (WebCore::ScratchBuffer::clearScratchBuffer):
2327         (WebCore::ScratchBuffer::shared):
2328         (WebCore::ShadowBlur::ShadowBlur):
2329         (WebCore::ShadowBlur::blurLayerImage):
2330         (WebCore::ShadowBlur::adjustBlurDistance):
2331         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2332         (WebCore::ShadowBlur::beginShadowLayer):
2333         (WebCore::ShadowBlur::endShadowLayer):
2334         (WebCore::ShadowBlur::drawRectShadow):
2335         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2336         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2337         (WebCore::ShadowBlur::clipBounds):
2338         * platform/graphics/ShadowBlur.h: Added.
2339         (WebCore::ShadowBlur::setShadowsIgnoreTransforms):
2340         (WebCore::ShadowBlur::shadowsIgnoreTransforms):
2341         * platform/graphics/cg/GraphicsContextCG.cpp:
2342         (WebCore::GraphicsContext::clipBounds):
2343
2344 2011-01-29  Simon Fraser  <simon.fraser@apple.com>
2345
2346         Reviewed by Dan Bernstein.
2347
2348         CSS3 gradients with em-based stops fail to repaint when font size changes
2349         https://bugs.webkit.org/show_bug.cgi?id=51845
2350         
2351         Mark as uncacheable gradidients whose color stops depend on font size,
2352         and don't attempt to put these into CSSImageGeneratorValue's image cache.
2353         This means we return a new gradient each time, which is fairly cheap, and
2354         fixes repaint issues under changing font size.
2355
2356         Test: fast/repaint/gradients-em-stops-repaint.html
2357
2358         * css/CSSGradientValue.cpp:
2359         (WebCore::CSSGradientValue::image):
2360         (WebCore::CSSGradientValue::isCacheable):
2361         * css/CSSGradientValue.h:
2362
2363 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2364
2365         Undo try to fix the Qt build.
2366         
2367         My guess didn't work.
2368
2369         * WebCore.pro:
2370
2371 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2372
2373         Try to fix the Qt build.
2374
2375         * WebCore.pro: Added platform/text/CharacterNames.h.
2376
2377 2011-01-28  Geoffrey Garen  <ggaren@apple.com>
2378
2379         Reviewed by Maciej Stachowiak.
2380
2381         Some more Heap cleanup.
2382         https://bugs.webkit.org/show_bug.cgi?id=53357
2383         
2384         Updated for JavaScriptCore changes.
2385
2386         * bindings/js/ScriptGCEvent.cpp:
2387         (WebCore::ScriptGCEvent::getHeapSize):
2388
2389 2011-01-29  Adam Barth  <abarth@webkit.org>
2390
2391         Reviewed by Daniel Bates.
2392
2393         Fix XSSFilter crash when extracting the source for a token twice
2394         https://bugs.webkit.org/show_bug.cgi?id=53368
2395
2396         Previously, it was unsafe to extract the source for the same token
2397         twice because the HTMLSourceTracker would advance its internal
2398         representation of the SegmentedString.  This patch introduces a cache
2399         to make calling HTMLSourceTracker::sourceForToken multiple times safe.
2400
2401         * html/parser/HTMLSourceTracker.cpp:
2402         (WebCore::HTMLSourceTracker::end):
2403         (WebCore::HTMLSourceTracker::sourceForToken):
2404         * html/parser/HTMLSourceTracker.h:
2405
2406 2011-01-29  Maciej Stachowiak  <mjs@apple.com>
2407
2408         Reviewed by Dan Bernstein.
2409
2410         Fix fat build for both 32-bit and 64-bit under llvm-gcc 4.2
2411         https://bugs.webkit.org/show_bug.cgi?id=53386
2412
2413         * platform/mac/ScrollAnimatorMac.mm:
2414         (WebCore::elasticDeltaForReboundDelta):
2415         (WebCore::scrollWheelMultiplier):
2416         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
2417         (WebCore::ScrollAnimatorMac::beginScrollGesture):
2418         (WebCore::roundTowardZero):
2419         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2420
2421 2011-01-29  Daniel Bates  <dbates@rim.com>
2422
2423         Reviewed by Maciej Stachowiak.
2424
2425         Remove reference to ${CMAKE_SOURCE_DIR}/Source in CMake files
2426         https://bugs.webkit.org/show_bug.cgi?id=53382
2427
2428         Our file system hierarchy ensures that CMAKE_SOURCE_DIR is defined to be /Source.
2429         So, ${CMAKE_SOURCE_DIR}/Source evaluates to the non-existent directory /Source/Source.
2430         Therefore, we should remove such references.
2431
2432         * CMakeLists.txt:
2433
2434 2011-01-29  Sam Weinig  <sam@webkit.org>
2435
2436         Reviewed by Jon Honeycutt.
2437
2438         Fix 32-bit build on the Mac.
2439
2440         * platform/mac/ScrollAnimatorMac.mm:
2441         (WebCore::roundTowardZero):
2442         (WebCore::roundToDevicePixelTowardZero):
2443         Use floats instead of doubles to avoid double-to-float conversion
2444         issues.
2445
2446 2011-01-29  Simon Fraser  <simon.fraser@apple.com>
2447
2448         Reviewed by Adam Barth.
2449
2450         Use clampToInteger() functions in a few places
2451         https://bugs.webkit.org/show_bug.cgi?id=53363
2452         
2453         * css/CSSStyleSelector.cpp:
2454         (WebCore::CSSStyleSelector::applyProperty): Use clampToInteger() for z-index.
2455         (WebCore::CSSStyleSelector::createTransformOperations): Use clampToPositiveInteger().
2456         * platform/graphics/transforms/PerspectiveTransformOperation.cpp: Ditto.
2457         (WebCore::PerspectiveTransformOperation::blend): Ditto.
2458
2459 2011-01-29  Patrick Gansterer  <paroga@webkit.org>
2460
2461         Reviewed by David Kilzer.
2462
2463         Move CharacterNames.h into WTF directory
2464         https://bugs.webkit.org/show_bug.cgi?id=49618
2465
2466         * ForwardingHeaders/wtf/unicode/CharacterNames.h: Added.
2467         * GNUmakefile.am:
2468         * WebCore.gypi:
2469         * WebCore.vcproj/WebCore.vcproj:
2470         * WebCore.xcodeproj/project.pbxproj:
2471         * accessibility/AccessibilityObject.cpp:
2472         * accessibility/AccessibilityRenderObject.cpp:
2473         * bindings/cpp/WebDOMHTMLDocumentCustom.cpp:
2474         * bindings/js/JSHTMLDocumentCustom.cpp:
2475         * dom/Position.cpp:
2476         * dom/SelectElement.cpp:
2477         * editing/CompositeEditCommand.cpp:
2478         * editing/Editor.cpp:
2479         * editing/HTMLInterchange.cpp:
2480         * editing/InsertTextCommand.cpp:
2481         * editing/MarkupAccumulator.cpp:
2482         * editing/TextIterator.cpp:
2483         * editing/VisibleSelection.cpp:
2484         * editing/htmlediting.cpp:
2485         * editing/htmlediting.h:
2486         * editing/markup.cpp:
2487         * html/FTPDirectoryDocument.cpp:
2488         * html/HTMLFormControlElement.cpp:
2489         * html/parser/HTMLTreeBuilder.cpp:
2490         * loader/appcache/ManifestParser.cpp:
2491         * platform/chromium/PopupMenuChromium.cpp:
2492         * platform/graphics/Font.h:
2493         * platform/graphics/FontFastPath.cpp:
2494         * platform/graphics/GlyphPageTreeNode.cpp:
2495         * platform/graphics/StringTruncator.cpp:
2496         * platform/graphics/mac/ComplexTextController.cpp:
2497         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
2498         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2499         * platform/mac/PasteboardMac.mm:
2500         * platform/text/TextCodecICU.cpp:
2501         * platform/text/mac/TextCodecMac.cpp:
2502         * platform/text/transcoder/FontTranscoder.cpp:
2503         * rendering/RenderBlockLineLayout.cpp:
2504         * rendering/RenderFlexibleBox.cpp:
2505         * rendering/RenderListMarker.cpp:
2506         * rendering/RenderText.cpp:
2507         * rendering/RenderTextControl.cpp:
2508         * rendering/RenderTreeAsText.cpp:
2509         * rendering/break_lines.cpp:
2510         * rendering/mathml/RenderMathMLOperator.h:
2511         * websockets/WebSocketHandshake.cpp:
2512         * wml/WMLTableElement.cpp:
2513
2514 2011-01-29  Dan Winship  <danw@gnome.org>
2515
2516         Reviewed by Xan Lopez.
2517
2518         [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on
2519         libsoup 2.33.1 now.
2520         https://bugs.webkit.org/show_bug.cgi?id=50675
2521
2522         * platform/network/soup/CookieJarSoup.cpp:
2523         (WebCore::defaultCookieJar):
2524         (WebCore::setCookies):
2525         * platform/network/soup/ResourceHandleSoup.cpp:
2526         (WebCore::ResourceHandle::prepareForURL):
2527         (WebCore::restartedCallback):
2528         (WebCore::startHttp):
2529         * platform/network/soup/ResourceRequestSoup.cpp:
2530         (WebCore::ResourceRequest::updateSoupMessage):
2531         (WebCore::ResourceRequest::toSoupMessage):
2532         (WebCore::ResourceRequest::updateFromSoupMessage):
2533
2534 2011-01-29  Adam Barth  <abarth@webkit.org>
2535
2536         Reviewed by Daniel Bates.
2537
2538         XSSFilter should replace URLs with about:blank instead of the empty string
2539         https://bugs.webkit.org/show_bug.cgi?id=53370
2540
2541         Using the empty string will make the URL complete to the current
2542         document's URL, which isn't really what we want.  Instead, we want to
2543         use about:blank, which is safe.
2544
2545         * html/parser/XSSFilter.cpp:
2546         (WebCore::XSSFilter::filterObjectToken):
2547         (WebCore::XSSFilter::filterEmbedToken):
2548
2549 2011-01-29  Adam Barth  <abarth@webkit.org>
2550
2551         Reviewed by Daniel Bates.
2552
2553         XSSFilter should pass xssAuditor/script-tag-addslashes*
2554         https://bugs.webkit.org/show_bug.cgi?id=53365
2555
2556         We need to canonicalize strings to avoid being tricked by addslashes.
2557
2558         * html/parser/XSSFilter.cpp:
2559         (WebCore::HTMLNames::isNonCanonicalCharacter):
2560             - This function is copied from the XSSAuditor (with some tweaks).
2561               We'll eventually remove the XSSAuditor once we've got XSSFilter
2562               working properly.
2563         (WebCore::HTMLNames::canonicalize):
2564         (WebCore::HTMLNames::decodeURL):
2565         (WebCore::XSSFilter::isContainedInRequest):
2566
2567 2011-01-29  Adam Barth  <abarth@webkit.org>
2568
2569         Reviewed by Daniel Bates.
2570
2571         XSSFilter should pass xssAuditor/script-tag-with-source-same-host.html
2572         and xssAuditor/script-tag-post-*
2573         https://bugs.webkit.org/show_bug.cgi?id=53364
2574
2575         We're supposed to allow loading same-origin resources even if they
2576         appear as part of the request.
2577
2578         Also, we're supposed to look at the POST data too.  :)
2579
2580         * html/parser/XSSFilter.cpp:
2581         (WebCore::XSSFilter::eraseAttributeIfInjected):
2582         (WebCore::XSSFilter::isSameOriginResource):
2583             - Copy/paste from XSSAuditor::isSameOriginResource.  We'll
2584               eventually remove the XSSAuditor version when XSSFilter is done.
2585         * html/parser/XSSFilter.h:
2586
2587 2011-01-29  Adam Barth  <abarth@webkit.org>
2588
2589         Reviewed by Daniel Bates.
2590
2591         XSSFilter should pass 16 of the xssAuditor/script-tag* tests
2592         https://bugs.webkit.org/show_bug.cgi?id=53362
2593
2594         Turns out we need to replace the src attribute of script tags with
2595         about:blank to avoid loading the main document URL as a script.  Also,
2596         move misplaced return statement that was triggering the console message
2597         too often.
2598
2599         * html/parser/HTMLToken.h:
2600         (WebCore::HTMLToken::appendToAttributeValue):
2601         * html/parser/XSSFilter.cpp:
2602         (WebCore::XSSFilter::filterScriptToken):
2603         (WebCore::XSSFilter::eraseAttributeIfInjected):
2604         * html/parser/XSSFilter.h:
2605
2606 2011-01-28  Jon Honeycutt  <jhoneycutt@apple.com>
2607
2608         Downloads in WK2 on Windows should write resume data to bundle
2609         https://bugs.webkit.org/show_bug.cgi?id=53282
2610         <rdar://problem/8753077>
2611
2612         Reviewed by Alice Liu.
2613
2614         * WebCore.vcproj/WebCore.vcproj:
2615         Added new files to project.
2616
2617         * platform/network/cf/DownloadBundle.h: Added.
2618         * platform/network/win/DownloadBundleWin.cpp: Added.
2619         (WebCore::DownloadBundle::magicNumber):
2620         Moved from WebKit's WebDownload so that WebKit and WebKit2 can share
2621         it.
2622         (WebCore::DownloadBundle::fileExtension):
2623         Ditto.
2624         (WebCore::DownloadBundle::appendResumeData):
2625         Ditto - but modified to return bool rather than HRESULT and to clean up
2626         whitespace.
2627         (WebCore::DownloadBundle::extractResumeData):
2628         Ditto - modified to clean up whitespace.
2629
2630 2011-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2631
2632         Unreviewed, rolling out r77050.
2633         http://trac.webkit.org/changeset/77050
2634         https://bugs.webkit.org/show_bug.cgi?id=53371
2635
2636         Caused a crash in Chromium's test_shell_tests (Requested by
2637         rniwa on #webkit).
2638
2639         * html/parser/HTMLTreeBuilder.cpp:
2640         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
2641         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
2642         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
2643         * html/parser/HTMLTreeBuilder.h:
2644
2645 2011-01-28  Eric Seidel  <eric@webkit.org>
2646
2647         Reviewed by Darin Adler.
2648
2649         HTML5 TreeBuilder regressed a Peacekeeper DOM test by 40%
2650         https://bugs.webkit.org/show_bug.cgi?id=48719
2651
2652         It's unclear exactly what the Peacekeeper benchmark is testing,
2653         because I haven't found a way to run it myself.
2654
2655         However, I constructed a benchmark which shows at least one possible slow point.
2656         The HTML5 spec talks about creating a new document for every time we use
2657         the fragment parsing algorithm.  Document() it turns out, it a huge bloated
2658         mess, and the constructor and destructor do a huge amount of work.
2659         To avoid constructing (or destructing) documents for each innerHTML call,
2660         this patch adds a shared dummy document used by all innerHTML calls.
2661
2662         This patch brings us from 7x slower than Safari 5 on tiny-innerHTML
2663         to only 1.5x slower than Safari 5.  I'm sure there is more work to do here.
2664
2665         Saving a shared Document like this is error prone.  Currently
2666         DummyDocumentFactory::releaseDocument() calls removeAllChildren()
2667         in an attempt to clear the Document's state. However it's possible
2668         that that call is not sufficient and we'll have future bugs here.
2669
2670         * html/parser/HTMLTreeBuilder.cpp:
2671         (WebCore::DummyDocumentFactory::createDummyDocument):
2672         (WebCore::DummyDocumentFactory::releaseDocument):
2673         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
2674         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
2675         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
2676         * html/parser/HTMLTreeBuilder.h:
2677
2678 2011-01-28  Johnny Ding  <jnd@chromium.org>
2679
2680         Reviewed by Adam Barth.
2681
2682         Gesture API: Don't use current gesture status to set "forceUserGesture" parameter when calling ScriptController::executeScript.
2683         The "forceUserGesture" parameter should be only set when you are definitely sure that the running script is from a hyper-link.
2684         https://bugs.webkit.org/show_bug.cgi?id=53244
2685
2686         Test: fast/events/popup-blocked-from-iframe-src.html
2687
2688         * bindings/ScriptControllerBase.cpp:
2689         (WebCore::ScriptController::executeIfJavaScriptURL):
2690
2691 2011-01-28  Simon Fraser  <simon.fraser@apple.com>
2692
2693         Reviewed by Gavin Barraclough.
2694
2695         Add various clampToInt() methods to MathExtras.h
2696         https://bugs.webkit.org/show_bug.cgi?id=52910
2697
2698         Use clampToInteger() from MathExtras.h
2699
2700         * css/CSSParser.cpp:
2701         (WebCore::CSSParser::parseCounter):
2702
2703 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2704
2705         Unreviewed, rolling out r77006 and r77020.
2706         http://trac.webkit.org/changeset/77006
2707         http://trac.webkit.org/changeset/77020
2708         https://bugs.webkit.org/show_bug.cgi?id=53360
2709
2710         "Broke Windows tests" (Requested by rniwa on #webkit).
2711
2712         * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
2713         * WebCore.exp.in:
2714         * bindings/js/DOMWrapperWorld.h:
2715         * bindings/js/JSAudioConstructor.cpp:
2716         (WebCore::JSAudioConstructor::JSAudioConstructor):
2717         * bindings/js/JSDOMBinding.cpp:
2718         (WebCore::markDOMNodesForDocument):
2719         (WebCore::markDOMObjectWrapper):
2720         (WebCore::markDOMNodeWrapper):
2721         * bindings/js/JSDOMGlobalObject.cpp:
2722         (WebCore::JSDOMGlobalObject::markChildren):
2723         (WebCore::JSDOMGlobalObject::setInjectedScript):
2724         (WebCore::JSDOMGlobalObject::injectedScript):
2725         * bindings/js/JSDOMGlobalObject.h:
2726         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2727         (WebCore::getDOMConstructor):
2728         * bindings/js/JSDOMWindowCustom.cpp:
2729         (WebCore::JSDOMWindow::setLocation):
2730         (WebCore::DialogHandler::dialogCreated):
2731         * bindings/js/JSDOMWindowShell.cpp:
2732         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2733         (WebCore::JSDOMWindowShell::setWindow):
2734         (WebCore::JSDOMWindowShell::markChildren):
2735         (WebCore::JSDOMWindowShell::unwrappedObject):
2736         * bindings/js/JSDOMWindowShell.h:
2737         (WebCore::JSDOMWindowShell::window):
2738         (WebCore::JSDOMWindowShell::setWindow):
2739         * bindings/js/JSDeviceMotionEventCustom.cpp:
2740         (WebCore::createAccelerationObject):
2741         (WebCore::createRotationRateObject):
2742         * bindings/js/JSEventListener.cpp:
2743         (WebCore::JSEventListener::JSEventListener):
2744         (WebCore::JSEventListener::markJSFunction):
2745         * bindings/js/JSEventListener.h:
2746         (WebCore::JSEventListener::jsFunction):
2747         * bindings/js/JSHTMLDocumentCustom.cpp:
2748         (WebCore::JSHTMLDocument::setAll):
2749         * bindings/js/JSImageConstructor.cpp:
2750         (WebCore::JSImageConstructor::JSImageConstructor):
2751         * bindings/js/JSImageDataCustom.cpp:
2752         (WebCore::toJS):
2753         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2754         (WebCore::JSJavaScriptCallFrame::scopeChain):
2755         (WebCore::JSJavaScriptCallFrame::scopeType):
2756         * bindings/js/JSNodeFilterCondition.cpp:
2757         (WebCore::JSNodeFilterCondition::markAggregate):
2758         (WebCore::JSNodeFilterCondition::acceptNode):
2759         * bindings/js/JSNodeFilterCondition.h:
2760         * bindings/js/JSNodeFilterCustom.cpp:
2761         * bindings/js/JSOptionConstructor.cpp:
2762         (WebCore::JSOptionConstructor::JSOptionConstructor):
2763         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2764         (WebCore::JSSQLResultSetRowList::item):
2765         * bindings/js/ScriptCachedFrameData.cpp:
2766         (WebCore::ScriptCachedFrameData::restore):
2767         * bindings/js/ScriptObject.cpp:
2768         (WebCore::ScriptGlobalObject::set):
2769         * bindings/js/SerializedScriptValue.cpp:
2770         (WebCore::CloneDeserializer::putProperty):
2771         * bindings/scripts/CodeGeneratorJS.pm:
2772         * bridge/qt/qt_runtime.cpp:
2773         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
2774         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
2775         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2776         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2777         * bridge/qt/qt_runtime.h:
2778         * bridge/runtime_root.cpp:
2779         (JSC::Bindings::RootObject::invalidate):
2780         * bridge/runtime_root.h:
2781         * dom/Document.h:
2782
2783 2011-01-28  Adam Barth  <abarth@webkit.org>
2784
2785         Reviewed by Eric Seidel.
2786
2787         XSSFilter should log to the console when it blocks something
2788         https://bugs.webkit.org/show_bug.cgi?id=53354
2789
2790         This patch refactors a bunch of methods in XSSFilter to return a bool
2791         indicating whether they blocked anything.  Using this bool, we decide
2792         whether to log to the console.  We're using the same log message as the
2793         XSSAuditor, but it seems likely we can improve this message in the
2794         future (especially by piping in the correct line number, which is now
2795         accessible via the parser).
2796
2797         * html/parser/XSSFilter.cpp:
2798         (WebCore::HTMLNames::isNameOfInlineEventHandler):
2799         (WebCore::XSSFilter::filterToken):
2800         (WebCore::XSSFilter::filterTokenInitial):
2801         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
2802         (WebCore::XSSFilter::filterScriptToken):
2803         (WebCore::XSSFilter::filterObjectToken):
2804         (WebCore::XSSFilter::filterEmbedToken):
2805         (WebCore::XSSFilter::filterAppletToken):
2806         (WebCore::XSSFilter::filterMetaToken):
2807         (WebCore::XSSFilter::filterBaseToken):
2808         (WebCore::XSSFilter::eraseInlineEventHandlersIfInjected):
2809         * html/parser/XSSFilter.h:
2810
2811 2011-01-28  Adam Barth  <abarth@webkit.org>
2812
2813         Reviewed by Daniel Bates.
2814
2815         Wire up settings->xssAuditorEnabled to XSSFilter
2816         https://bugs.webkit.org/show_bug.cgi?id=53345
2817
2818         * html/parser/XSSFilter.cpp:
2819         (WebCore::XSSFilter::XSSFilter):
2820         (WebCore::XSSFilter::filterToken):
2821         * html/parser/XSSFilter.h:
2822
2823 2011-01-28  Adam Barth  <abarth@webkit.org>
2824
2825         Reviewed by Daniel Bates.
2826
2827         Teach XSSFilter about <meta> and <base> tags
2828         https://bugs.webkit.org/show_bug.cgi?id=53339
2829
2830         I'm not 100% sure we need to block <meta http-equiv>, but it seems
2831         prudent given how powerful that attribute is.  We definitely need to
2832         block injection of <base href> because that can redirect script tags
2833         that use relative URLs.
2834
2835         * html/parser/XSSFilter.cpp:
2836         (WebCore::XSSFilter::filterToken):
2837         (WebCore::XSSFilter::filterMetaToken):
2838         (WebCore::XSSFilter::filterBaseToken):
2839         * html/parser/XSSFilter.h:
2840
2841 2011-01-28  Adam Barth  <abarth@webkit.org>
2842
2843         Reviewed by Daniel Bates.
2844
2845         Teach XSSFilter about <applet>
2846         https://bugs.webkit.org/show_bug.cgi?id=53338
2847
2848         HTML5 is pretty light on information about how the <applet> tag works.
2849         According to this site:
2850
2851         http://download.oracle.com/javase/1.4.2/docs/guide/misc/applet.html
2852
2853         The "code" and "object" attributes are the essential attributes for
2854         determining which piece of Java to run.  We might need to expand to the
2855         codebase and archive attributes at some point, but hopefully code and
2856         object will be sufficient.
2857
2858         * html/parser/XSSFilter.cpp:
2859         (WebCore::XSSFilter::filterToken):
2860         (WebCore::XSSFilter::filterAppletToken):
2861         * html/parser/XSSFilter.h:
2862
2863 2011-01-28  Adam Barth  <abarth@webkit.org>
2864
2865         Reviewed by Daniel Bates.
2866
2867         Teach the XSSFilter about object and embed tags
2868         https://bugs.webkit.org/show_bug.cgi?id=53336
2869
2870         For <object> and <embed>, we filter out attribute values that either
2871         indicate which piece of media to load or which plugin to load.  In a
2872         perfect world, we'd only need to filter out the URLs of the media, but
2873         some plug-ins (like Flash) have lots of fun places you can hide the
2874         URL (e.g., the "movie" <param>).
2875
2876         * html/parser/XSSFilter.cpp:
2877         (WebCore::XSSFilter::filterToken):
2878         (WebCore::XSSFilter::filterScriptToken):
2879         (WebCore::XSSFilter::filterObjectToken):
2880         (WebCore::XSSFilter::filterEmbedToken):
2881         (WebCore::XSSFilter::eraseAttributeIfInjected):
2882         * html/parser/XSSFilter.h:
2883
2884 2011-01-28  Oliver Hunt  <oliver@apple.com>
2885
2886         Fix Qt build.
2887
2888         * bridge/qt/qt_runtime.cpp:
2889         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
2890         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
2891         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2892         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2893         * bridge/qt/qt_runtime.h:
2894
2895 2011-01-28  Antti Koivisto  <antti@apple.com>
2896
2897         Reviewed by Simon Fraser.
2898
2899         CSS styles are shared based on uninitialized property values
2900         https://bugs.webkit.org/show_bug.cgi?id=53285
2901         
2902         Null test.
2903
2904         * dom/NamedNodeMap.cpp:
2905         (WebCore::NamedNodeMap::mappedMapsEquivalent):
2906
2907 2011-01-27  Oliver Hunt  <oliver@apple.com>
2908
2909         Reviewed by Geoffrey Garen.
2910
2911         Convert markstack to a slot visitor API
2912         https://bugs.webkit.org/show_bug.cgi?id=53219
2913
2914         Update WebCore to the new marking apis, correct bindings
2915         codegen. 
2916
2917         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
2918         * WebCore.exp.in:
2919         * bindings/js/DOMWrapperWorld.h:
2920         (WebCore::DOMWrapperWorld::globalData):
2921         * bindings/js/JSAudioConstructor.cpp:
2922         (WebCore::JSAudioConstructor::JSAudioConstructor):
2923         * bindings/js/JSDOMBinding.cpp:
2924         (WebCore::markDOMNodesForDocument):
2925         (WebCore::markDOMObjectWrapper):
2926         (WebCore::markDOMNodeWrapper):
2927         * bindings/js/JSDOMGlobalObject.cpp:
2928         (WebCore::JSDOMGlobalObject::markChildren):
2929         (WebCore::JSDOMGlobalObject::setInjectedScript):
2930         (WebCore::JSDOMGlobalObject::injectedScript):
2931         * bindings/js/JSDOMGlobalObject.h:
2932         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2933         (WebCore::getDOMConstructor):
2934         * bindings/js/JSDOMWindowCustom.cpp:
2935         (WebCore::JSDOMWindow::setLocation):
2936         (WebCore::DialogHandler::dialogCreated):
2937         * bindings/js/JSDOMWindowShell.cpp:
2938         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2939         (WebCore::JSDOMWindowShell::setWindow):
2940         (WebCore::JSDOMWindowShell::markChildren):
2941         (WebCore::JSDOMWindowShell::unwrappedObject):
2942         * bindings/js/JSDOMWindowShell.h:
2943         (WebCore::JSDOMWindowShell::window):
2944         (WebCore::JSDOMWindowShell::setWindow):
2945         * bindings/js/JSEventListener.cpp:
2946         (WebCore::JSEventListener::JSEventListener):
2947         (WebCore::JSEventListener::markJSFunction):
2948         * bindings/js/JSEventListener.h:
2949         (WebCore::JSEventListener::jsFunction):
2950         * bindings/js/JSHTMLDocumentCustom.cpp:
2951         (WebCore::JSHTMLDocument::setAll):
2952         * bindings/js/JSImageConstructor.cpp:
2953         (WebCore::JSImageConstructor::JSImageConstructor):
2954         * bindings/js/JSImageDataCustom.cpp:
2955         (WebCore::toJS):
2956         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2957         (WebCore::JSJavaScriptCallFrame::scopeChain):
2958         (WebCore::JSJavaScriptCallFrame::scopeType):
2959         * bindings/js/JSNodeFilterCondition.cpp:
2960         (WebCore::JSNodeFilterCondition::markAggregate):
2961         (WebCore::JSNodeFilterCondition::acceptNode):
2962         * bindings/js/JSNodeFilterCondition.h:
2963         * bindings/js/JSNodeFilterCustom.cpp:
2964         * bindings/js/JSOptionConstructor.cpp:
2965         (WebCore::JSOptionConstructor::JSOptionConstructor):
2966         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2967         (WebCore::JSSQLResultSetRowList::item):
2968         * bindings/js/ScriptCachedFrameData.cpp:
2969         (WebCore::ScriptCachedFrameData::restore):
2970         * bindings/js/ScriptObject.cpp:
2971         (WebCore::ScriptGlobalObject::set):
2972         * bindings/js/SerializedScriptValue.cpp:
2973         (WebCore::CloneDeserializer::putProperty):
2974         * bindings/scripts/CodeGeneratorJS.pm:
2975         * dom/Document.h:
2976
2977 2011-01-28  Sam Weinig  <sam@webkit.org>
2978
2979         Reviewed by Anders Carlsson.
2980
2981         Keyboard scrolling doesn’t work in WebKit2
2982         <rdar://problem/8909672>
2983
2984         * platform/mac/ScrollAnimatorMac.mm:
2985         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
2986         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
2987         Add additional necessary delegate methods.
2988
2989 2011-01-29  Darin Adler  <darin@apple.com>
2990
2991         Reviewed by Dan Bernstein.
2992
2993         Re-land this patch with the missing null check that caused crashes in layout tests.
2994
2995         Changing cursor style has no effect until the mouse moves
2996         https://bugs.webkit.org/show_bug.cgi?id=14344
2997         rdar://problem/7563712
2998
2999         No tests added because we don't have infrastructure for testing actual cursor
3000         changes (as opposed to cursor style computation) at this time. We might add it later.
3001
3002         * page/EventHandler.cpp:
3003         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
3004         * page/EventHandler.h: Ditto.
3005
3006         * rendering/RenderObject.cpp:
3007         (WebCore::areNonIdenticalCursorListsEqual): Added.
3008         (WebCore::areCursorsEqual): Added.
3009         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
3010         cursor styles changed.
3011
3012 2011-01-28  Justin Schuh  <jschuh@chromium.org>
3013
3014         Reviewed by Eric Seidel.
3015
3016         We should hold RefPtrs to SVG font faces
3017         https://bugs.webkit.org/show_bug.cgi?id=53270
3018
3019         Test: svg/custom/use-multiple-on-nested-disallowed-font.html
3020
3021         * css/CSSFontFaceSource.cpp:
3022         (WebCore::CSSFontFaceSource::getFontData):
3023         * css/CSSFontFaceSource.h:
3024         * svg/SVGFontFaceElement.cpp:
3025         (WebCore::SVGFontFaceElement::associatedFontElement):
3026         * svg/SVGFontFaceElement.h:
3027
3028 2011-01-28  Zhenyao Mo  <zmo@google.com>
3029
3030         Reviewed by Kenneth Russell.
3031
3032         uniformN*v should generate INVALID_VALUE of the array size is not a multiple of N
3033         https://bugs.webkit.org/show_bug.cgi?id=53306
3034
3035         * html/canvas/WebGLRenderingContext.cpp:
3036         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
3037
3038 2011-01-28  Tom Sepez  <tsepez@chromium.org>
3039
3040         Reviewed by Eric Seidel.
3041
3042         NULL pointer crash in TextIterator::handleTextBox()
3043         https://bugs.webkit.org/show_bug.cgi?id=53267
3044
3045         Test: fast/css/rtl-nth-child-first-letter-crash.html
3046
3047         * editing/TextIterator.cpp:
3048         (WebCore::TextIterator::handleTextBox):
3049
3050 2011-01-28  Adrienne Walker  <enne@google.com>
3051
3052         Reviewed by Kenneth Russell.
3053
3054         [chromium] Remove a spurious diagnostic CRASH check.
3055         https://bugs.webkit.org/show_bug.cgi?id=52379
3056
3057         * platform/graphics/chromium/LayerTilerChromium.cpp:
3058         (WebCore::LayerTilerChromium::invalidateRect):
3059
3060 2011-01-28  Dan Bernstein  <mitz@apple.com>
3061
3062         Reviewed by Sam Weinig.
3063
3064         <rdar://problem/4761512> <select> can't display right-to-left (rtl) languages
3065         https://bugs.webkit.org/show_bug.cgi?id=19785
3066
3067         Changed <select> pop-up menus on Mac OS X Snow Leopard and later to have their items aligned in the
3068         direction corresponding to the writing direction of the <select> element, with the checkmarks
3069         on the "start" side, and use the <option>'s writing direction rather than "natural". Made the
3070         pop-up button match the menu by adding a Chrome boolean function, selectItemAlignmentFollowsMenuWritingDirection(),
3071         which returns true for this pop-up behavior.
3072
3073         * loader/EmptyClients.h:
3074         (WebCore::EmptyChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
3075         * manual-tests/pop-up-alignment-and-direction.html: Added.
3076         * page/Chrome.cpp:
3077         (WebCore::Chrome::selectItemAlignmentFollowsMenuWritingDirection): Added. Calls through to the
3078         client.
3079         * page/Chrome.h:
3080         * page/ChromeClient.h:
3081         * platform/PopupMenuStyle.h:
3082         (WebCore::PopupMenuStyle::PopupMenuStyle): Added hasTextDirectionOverride parameter and member
3083         variable initialization.
3084         (WebCore::PopupMenuStyle::hasTextDirectionOverride): Added this accessor.
3085         * platform/mac/PopupMenuMac.mm:
3086         (WebCore::PopupMenuMac::populate): Set the pop-up's layout direction and items' text alignment
3087         to match the menu's writing direction. Set items' writing direction and direction override
3088         according to their styles.
3089         * rendering/RenderMenuList.cpp:
3090         (WebCore::RenderMenuList::RenderMenuList): Removed unncesaary initialization of a smart pointer.
3091         (WebCore::RenderMenuList::adjustInnerStyle): If the alignment of items in the menu follows the
3092         menu's writing direction, use that alignment for the button as well. Also in this mode, use the
3093         item's writing direction and override setting.
3094         (WebCore::RenderMenuList::setTextFromOption): Store the option element's style.
3095         (WebCore::RenderMenuList::itemStyle): Pass the text direction override value.
3096         (WebCore::RenderMenuList::menuStyle): Ditto. Also use the button's direction, not the inner text's.
3097         * rendering/RenderMenuList.h:
3098         * rendering/RenderTextControlSingleLine.cpp:
3099         (WebCore::RenderTextControlSingleLine::menuStyle): Pass the text direction override value.
3100
3101 2011-01-28  Adam Barth  <abarth@webkit.org>
3102
3103         Reviewed by Daniel Bates.
3104
3105         Teach XSSFilter how to filter <script> elements
3106         https://bugs.webkit.org/show_bug.cgi?id=53279
3107
3108         This patch adds the ability for the XSSFilter to block injected
3109         <script> elements.  Handling script elements is slightly subtle because
3110         these elements act very differently depending on whether they have a
3111         src attribute.
3112         
3113         In the "src case", which check whether the src attribute was present in
3114         the request.  In the "non-src case", we check whether the start tag and
3115         the body of the script element was included in the request.  Checking
3116         for the whole start tag means we miss out on some attribute splitting
3117         attacks inside of script tags, but that doesn't seem like that big a
3118         deal.
3119
3120         This patch also introduces some amount of state into the XSSFilter
3121         because inline script elements span multiple tokens.  There's a lot of
3122         tuning and optimization left in these cases, some of which I've noted
3123         with FIXMEs.
3124
3125         To test this patch, I played around with some of the existing
3126         XSSAuditor tests.  Hopefully I'll be able to run the test suite more
3127         systematically in the future.
3128
3129         * html/parser/HTMLToken.h:
3130         (WebCore::HTMLToken::eraseCharacters):
3131         (WebCore::HTMLToken::eraseValueOfAttribute):
3132         * html/parser/XSSFilter.cpp:
3133         (WebCore::HTMLNames::hasName):
3134         (WebCore::HTMLNames::findAttributeWithName):
3135         (WebCore::HTMLNames::isNameOfScriptCarryingAttribute):
3136         (WebCore::XSSFilter::XSSFilter):
3137         (WebCore::XSSFilter::filterToken):
3138         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
3139         (WebCore::XSSFilter::filterScriptToken):
3140         (WebCore::XSSFilter::snippetForRange):
3141         (WebCore::XSSFilter::snippetForAttribute):
3142         * html/parser/XSSFilter.h:
3143
3144 2011-01-28  Adam Barth  <abarth@webkit.org>
3145
3146         Reviewed by Daniel Bates.
3147
3148         Sketch out new XSS filter design (disabled by default)
3149         https://bugs.webkit.org/show_bug.cgi?id=53205
3150
3151         This patch adds a basic sketch of the new XSS filter design.  Rather
3152         than watching scripts as they execute, in this design, we watch tokens
3153         emitted by the tokenizer.  We then map the tokens directly back into
3154         input characters, which lets us skip all the complicated logic related
3155         to HTML entities and double-decoding of JavaScript URLs.
3156
3157         This patch contains only the bare essentially machinery.  I'll add more
3158         in future patches and eventually remove the previous code once this
3159         code is up and running correctly.
3160
3161         * Android.mk:
3162         * CMakeLists.txt:
3163         * GNUmakefile.am:
3164         * WebCore.gypi:
3165         * WebCore.pro:
3166         * WebCore.vcproj/WebCore.vcproj:
3167         * WebCore.xcodeproj/project.pbxproj:
3168         * html/parser/HTMLDocumentParser.cpp:
3169         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3170         (WebCore::HTMLDocumentParser::pumpTokenizer):
3171         (WebCore::HTMLDocumentParser::sourceForToken):
3172         * html/parser/HTMLDocumentParser.h:
3173         * html/parser/XSSFilter.cpp: Added.
3174         * html/parser/XSSFilter.h: Added.
3175
3176 2011-01-28  Michael Saboff  <msaboff@apple.com>
3177
3178         Reviewed by Geoffrey Garen.
3179
3180         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
3181         https://bugs.webkit.org/show_bug.cgi?id=53271
3182
3183         Reapplying this patch with the change that the second ASSERT in 
3184         RootObject::removeRuntimeObject was changed to use
3185         .uncheckedGet() instead of the failing .get().  The object in question
3186         could be in the process of being GC'ed.  The get() call will not return
3187         such an object while the uncheckedGet() call will return the (unsafe) 
3188         object.  This is the behavior we want.
3189
3190         Precautionary change.
3191         Changed RootObject to use WeakGCMap instead of HashSet.
3192         Found will looking for another issue, but can't produce a test case
3193         that is problematic.  THerefore there aren't any new tests.
3194
3195         * bridge/runtime_root.cpp:
3196         (JSC::Bindings::RootObject::invalidate):
3197         (JSC::Bindings::RootObject::addRuntimeObject):
3198         (JSC::Bindings::RootObject::removeRuntimeObject):
3199         * bridge/runtime_root.h:
3200
3201 2011-01-28  Adam Roben  <aroben@apple.com>
3202
3203         Notify CACFLayerTreeHost when the context is flushed
3204
3205         LegacyCACFLayerTreeHost was keeping this a secret, which meant that WebCore's animation
3206         timers were never starting.
3207
3208         Fixes <http://webkit.org/b/53302> [Windows 7 Release Tests] changesets 76853, 76856, and
3209         76858 broke ~36 animations, compositing, and transitions tests
3210
3211         Reviewed by Sam Weinig.
3212
3213         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
3214         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): Call up to the base class after we
3215         start our render timer.
3216
3217 2011-01-28  Antti Koivisto  <antti@apple.com>
3218
3219         Reviewed by Dan Bernstein.
3220
3221         Remove dead code that tried to map from CSS values to parser values
3222         https://bugs.webkit.org/show_bug.cgi?id=53318
3223
3224         * css/CSSFunctionValue.cpp:
3225         * css/CSSFunctionValue.h:
3226         * css/CSSPrimitiveValue.cpp:
3227         * css/CSSPrimitiveValue.h:
3228         * css/CSSValue.h:
3229         * css/CSSValueList.cpp:
3230         * css/CSSValueList.h:
3231
3232 2011-01-28  Enrica Casucci  <enrica@apple.com>
3233
3234         Reviewed by Adam Roben.
3235
3236         Some drag and drop tests fail since r76824
3237         https://bugs.webkit.org/show_bug.cgi?id=53304
3238
3239         There were '||' instead of '&&' in the checks for valid
3240         clipboard content.
3241         
3242         * platform/win/ClipboardWin.cpp:
3243         (WebCore::ClipboardWin::getData):
3244         (WebCore::ClipboardWin::types):
3245         (WebCore::ClipboardWin::files):
3246
3247 2011-01-28  Martin Robinson  <mrobinson@igalia.com>
3248
3249         [GTK] AudioProcessingEvent.h and JSJavaScriptAudioNode.h: No such file or directory
3250         https://bugs.webkit.org/show_bug.cgi?id=52889
3251
3252         Build fix for WebAudio. Include WebAudio source files on the source
3253         list when WebAudio is enabled.
3254
3255         * GNUmakefile.am: Include missing source files.
3256
3257 2011-01-28  Sam Weinig  <sam@webkit.org>
3258
3259         Reviewed by Maciej Stachowiak.
3260
3261         Add basic rubber banding support
3262         <rdar://problem/8219429>
3263         https://bugs.webkit.org/show_bug.cgi?id=53277
3264
3265         * page/EventHandler.cpp:
3266         (WebCore::EventHandler::handleGestureEvent):
3267         Pass gesture events to the FrameView.
3268
3269         * platform/ScrollAnimator.cpp:
3270         (WebCore::ScrollAnimator::handleGestureEvent):
3271         * platform/ScrollAnimator.h:
3272         Add stubbed out implementation.
3273
3274         * platform/ScrollView.cpp:
3275         (WebCore::ScrollView::ScrollView):
3276         (WebCore::ScrollView::overhangAmount):
3277         (WebCore::ScrollView::wheelEvent):
3278         * platform/ScrollView.h:
3279         * platform/ScrollableArea.cpp:
3280         (WebCore::ScrollableArea::ScrollableArea):
3281         (WebCore::ScrollableArea::handleGestureEvent):
3282         * platform/ScrollableArea.h:
3283         (WebCore::ScrollableArea::constrainsScrollingToContentEdge):
3284         (WebCore::ScrollableArea::setConstrainsScrollingToContentEdge):
3285         Move constrains scrolling bit to ScrollableArea from ScrollView.
3286
3287         (WebCore::ScrollableArea::contentsSize):
3288         (WebCore::ScrollableArea::overhangAmount):
3289         Add additional virtual functions for information needed by the animator.
3290
3291         * platform/mac/ScrollAnimatorMac.h:
3292         * platform/mac/ScrollAnimatorMac.mm:
3293         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3294         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
3295         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
3296         (WebCore::elasticDeltaForTimeDelta):
3297         (WebCore::elasticDeltaForReboundDelta):
3298         (WebCore::reboundDeltaForElasticDelta):
3299         (WebCore::scrollWheelMultiplier):
3300         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3301         (WebCore::ScrollAnimatorMac::handleGestureEvent):
3302         (WebCore::ScrollAnimatorMac::pinnedInDirection):
3303         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
3304         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
3305         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
3306         (WebCore::ScrollAnimatorMac::beginScrollGesture):
3307         (WebCore::ScrollAnimatorMac::endScrollGesture):
3308         (WebCore::ScrollAnimatorMac::snapRubberBand):
3309         (WebCore::roundTowardZero):
3310         (WebCore::roundToDevicePixelTowardZero):
3311         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
3312         Implement basic rubber banding.
3313
3314 2011-01-28  Dan Bernstein  <mitz@apple.com>
3315
3316         Reviewed by Anders Carlsson.
3317
3318         Changing unicode-bidi doesn’t force layout
3319         https://bugs.webkit.org/show_bug.cgi?id=53311
3320
3321         Test: fast/dynamic/unicode-bidi.html
3322
3323         * rendering/style/RenderStyle.cpp:
3324         (WebCore::RenderStyle::diff): Return a layout difference if unicode-bidi values differ.
3325
3326 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
3327
3328         Reviewed by Kent Tamura.
3329
3330         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
3331         https://bugs.webkit.org/show_bug.cgi?id=53122
3332
3333         This is the first step in converting HTMLMediaElement to the new shadow DOM.
3334
3335         Should not regress any existing tests. No observable change in behavior.
3336
3337         * css/CSSSelector.cpp:
3338         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
3339         (WebCore::nameToPseudoTypeMap): Ditto.
3340         (WebCore::CSSSelector::extractPseudoType): Ditto.
3341         * css/CSSSelector.h: Ditto.
3342         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
3343         * rendering/MediaControlElements.cpp:
3344         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
3345             which is now replaced with virtual shadowPseudoId on each corresponding class.
3346         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
3347         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
3348             display type in constructor.
3349         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
3350             constructor argument.
3351         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
3352         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
3353             to disambiguate from the MediaControlMuteButtonElement.
3354         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
3355         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
3356         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
3357             constructor argument.
3358         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
3359         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
3360             constructor argument.
3361         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
3362         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
3363         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
3364         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
3365         (WebCore::MediaControlSeekBackButtonElement::create): Added.
3366         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
3367         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
3368         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
3369         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
3370             constructor argument.
3371         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
3372         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
3373             constructor argument.
3374         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
3375         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
3376             constructor argument.
3377         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
3378         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
3379             constructor argument.
3380         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
3381         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
3382             constructor argument.
3383         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
3384         * rendering/MediaControlElements.h:
3385         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
3386         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
3387         * rendering/RenderMedia.cpp:
3388         (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
3389         (WebCore::RenderMedia::createSeekBackButton): Ditto.
3390         (WebCore::RenderMedia::createSeekForwardButton): Ditto.
3391         (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
3392         * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
3393
3394 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
3395
3396         Reviewed by Eric Carlson.
3397
3398         Split MediaControls out of RenderMedia.
3399         https://bugs.webkit.org/show_bug.cgi?id=53252
3400
3401         Near-mechanical moving of stuff, no change in behavior, thus no new tests.
3402
3403         * Android.mk: Added MediaControls to build system.
3404         * CMakeLists.txt: Ditto.
3405         * GNUmakefile.am: Ditto.
3406         * WebCore.gypi: Ditto.
3407         * WebCore.pro: Ditto.
3408         * WebCore.vcproj/WebCore.vcproj: Ditto.
3409         * WebCore.xcodeproj/project.pbxproj: Ditto.
3410         * html/HTMLMediaElement.cpp:
3411         (WebCore::HTMLMediaElement::defaultEventHandler): Changed to forward events to MediaControls.
3412         * html/shadow/MediaControls.cpp: Copied all controls-related methods from
3413             Source/WebCore/rendering/RenderMedia.cpp, pulled them into their own class called MediaControls. 
3414         * html/shadow/MediaControls.h: Ditto from Source/WebCore/rendering/RenderMedia.h.
3415         * rendering/MediaControlElements.cpp:
3416         (WebCore::MediaControlTimelineElement::defaultEventHandler): Changed to use MediaControls.
3417         * rendering/RenderMedia.cpp:
3418         (WebCore::RenderMedia::RenderMedia): Moved relevant constructor initializers out to MediaControls.
3419         (WebCore::RenderMedia::destroy): Changed to use MediaControls.
3420         (WebCore::RenderMedia::styleDidChange): Ditto.
3421         (WebCore::RenderMedia::layout): Ditto.
3422         (WebCore::RenderMedia::updateFromElement): Ditto.
3423         * rendering/RenderMedia.h: Updated defs accordingly and removed player() accessor, which
3424             is only used by sub-class RenderVideo.
3425         (WebCore::RenderMedia::controls): Added.
3426         * rendering/RenderVideo.cpp:
3427         (WebCore::RenderVideo::~RenderVideo): Changed to access MediaPlayer* directly from mediaElement().
3428         (WebCore::RenderVideo::calculateIntrinsicSize): Ditto.
3429         (WebCore::RenderVideo::paintReplaced): Ditto.
3430         (WebCore::RenderVideo::updatePlayer): Ditto.
3431         (WebCore::RenderVideo::supportsAcceleratedRendering): Ditto.
3432         (WebCore::RenderVideo::acceleratedRenderingStateChanged): Ditto.
3433
3434 2011-01-28  Pavel Feldman  <pfeldman@chromium.org>
3435
3436         Reviewed by Yury Semikhatsky.
3437
3438         Web Inspector: allow remote debugging with front-end
3439         served from the cloud.
3440         https://bugs.webkit.org/show_bug.cgi?id=53303
3441
3442         * inspector/front-end/inspector.js:
3443
3444 2011-01-28  Aparna Nandyal  <aparna.nand@wipro.com>
3445
3446         Reviewed by Andreas Kling.
3447
3448         Setting value of m_PressedPos to make scrolling smooth
3449
3450         Page scroll popup menu "Scroll here" option not working when cliking above scroll slider/handler.
3451         https://bugs.webkit.org/show_bug.cgi?id=51349
3452
3453         The value of m_PressedPos was getting set before moveThumb() call
3454         in all other scenarios except when "Scroll Here" option is used.
3455         Hence scrolling with this option was not as expected even in cases
3456         where scrolling was happening. The thumb would move in unexpected
3457         direction. m_PressedPos is now set to pressed position so delta is
3458         calculated.
3459         Unable to write a test case as the test needs to click on "Scroll
3460         Here" option of context sensitive menu and QTest is unable to do it.
3461         Besides no new functionality introduced.
3462
3463         * platform/qt/ScrollbarQt.cpp:
3464         (WebCore::Scrollbar::contextMenu):
3465
3466 2011-01-28  Andrey Kosyakov  <caseq@chromium.org>
3467
3468         Reviewed by Pavel Feldman.
3469
3470         Web Inspector: [Extensions API] add JSON schema for extensions API
3471         https://bugs.webkit.org/show_bug.cgi?id=53236
3472
3473         * inspector/front-end/ExtensionAPISchema.json: Added.
3474
3475 2011-01-27  Zhenyao Mo  <zmo@google.com>
3476
3477         Reviewed by Kenneth Russell.
3478
3479         Remove _LENGTH enumerants
3480         https://bugs.webkit.org/show_bug.cgi?id=53259
3481
3482         * html/canvas/WebGLRenderingContext.cpp: Remove queries for *LENGTH.
3483         (WebCore::WebGLRenderingContext::getProgramParameter):
3484         (WebCore::WebGLRenderingContext::getShaderParameter):
3485         * html/canvas/WebGLRenderingContext.idl: Remove *LENGTH.
3486
3487 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
3488
3489         Reviewed by Yury Semikhatsky.
3490
3491         Web Inspector: syntax highlight inline JS and CSS in HTML resources
3492         https://bugs.webkit.org/show_bug.cgi?id=30831
3493
3494         * inspector/front-end/SourceHTMLTokenizer.js:
3495         (WebInspector.SourceHTMLTokenizer):
3496         (WebInspector.SourceHTMLTokenizer.prototype.set line):
3497         (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
3498         * inspector/front-end/SourceHTMLTokenizer.re2js:
3499
3500 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
3501
3502         Reviewed by Yury Semikhatsky.
3503
3504         Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
3505         https://bugs.webkit.org/show_bug.cgi?id=53295
3506
3507         Select the current word suffix before switching to the next suggestion.
3508
3509         * inspector/front-end/StylesSidebarPane.js:
3510         ():
3511
3512 2011-01-28  Alejandro G. Castro  <alex@igalia.com>
3513
3514         Reviewed by Xan Lopez.
3515
3516         [GTK] Fix dist compilation for the release
3517         https://bugs.webkit.org/show_bug.cgi?id=53290
3518
3519         * GNUmakefile.am: Added inspector files to the extra dist.
3520
3521 2011-01-28  Ilya Sherman  <isherman@chromium.org>
3522
3523         Reviewed by Andreas Kling.
3524
3525         Const-correct HTMLSelectElement and WebSelectElement
3526         https://bugs.webkit.org/show_bug.cgi?id=53293
3527
3528         * html/HTMLSelectElement.cpp:
3529         (WebCore::HTMLSelectElement::value): const.
3530         * html/HTMLSelectElement.h:
3531
3532 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3533
3534         Unreviewed, rolling out r76893.
3535         http://trac.webkit.org/changeset/76893
3536         https://bugs.webkit.org/show_bug.cgi?id=53287
3537
3538         It made some tests crash on GTK and Qt debug bots (Requested
3539         by Ossy on #webkit).
3540
3541         * bridge/runtime_root.cpp:
3542         (JSC::Bindings::RootObject::invalidate):
3543         (JSC::Bindings::RootObject::addRuntimeObject):
3544         (JSC::Bindings::RootObject::removeRuntimeObject):
3545         * bridge/runtime_root.h:
3546
3547 2011-01-27  Greg Coletta  <greg.coletta@nokia.com>
3548
3549         Reviewed by Laszlo Gombos.
3550
3551         Get rid of prefix header dependency for WebKit2 build system
3552         https://bugs.webkit.org/show_bug.cgi?id=50174
3553
3554         Guard EmptyProtocalDefinitions.h to make sure it's not included twice.
3555
3556         * platform/mac/EmptyProtocolDefinitions.h:
3557
3558 2011-01-27  Abhishek Arya  <inferno@chromium.org>
3559
3560         Reviewed by Dan Bernstein.
3561
3562         Recalc table sections if needed before calculating the first line
3563         box baseline.
3564         https://bugs.webkit.org/show_bug.cgi?id=53265
3565
3566         When we try to calculate the baseline position of a table cell,
3567         we recurse through all the child sibling boxes (when children are
3568         non inline) and add their first linebox baseline values. If one of
3569         the children is a table with pending section recalc, we will access
3570         wrong table section values. We recalc table sections if it is needed.
3571
3572         Test: fast/table/recalc-section-first-body-crash-main.html
3573
3574         * rendering/RenderTable.cpp:
3575         (WebCore::RenderTable::firstLineBoxBaseline):
3576
3577 2011-01-27  Adrienne Walker  <enne@google.com>
3578