2011-01-22 Nikolas Zimmermann <nzimmermann@rim.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
2
3         Not reviewed.
4
5         Introduce FontMetrics abstraction
6         https://bugs.webkit.org/show_bug.cgi?id=51456
7
8         Fix Chromium/Win build.
9
10         * platform/graphics/chromium/UniscribeHelperTextRun.cpp: s/->/./
11         (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun):
12
13 2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
14
15         Reviewed by Dirk Schulze.
16
17         Introduce FontMetrics abstraction
18         https://bugs.webkit.org/show_bug.cgi?id=51456
19
20         Encapsulate ascent/descent/lineHeight/lineGap methods in a single FontMetrics class, instead of
21         having to define them in both Font & SimpleFontData. Changed to store floating point values
22         as default, in order to get accurate information for small sized fonts. All these methods
23         now have floating-point and integer versions. Whenever an integer variant of these functions
24         is called, lroundf() is used to round the value.
25
26         This makes it possible to support small font-sizes for SVG in a follow-up patch, as well
27         as fixing rounding issues when using SVG Fonts.
28         
29         Shouldn't affect existing tests.
30
31         * GNUmakefile.am: Add FontMetrics.h to build. 
32         * WebCore.gypi: Ditto.
33         * WebCore.pro: Ditto.
34         * WebCore.vcproj/WebCore.vcproj: Ditto.
35         * WebCore.xcodeproj/project.pbxproj: Ditto.
36         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
37         (baselinePositionForAccessibilityRenderObject):
38         * css/CSSPrimitiveValue.cpp:         
39         (WebCore::CSSPrimitiveValue::computeLengthDouble):
40         * html/canvas/CanvasRenderingContext2D.cpp: Ditto.
41         (WebCore::CanvasRenderingContext2D::drawTextInternal):
42         * inspector/InspectorController.cpp: Ditto.
43         (WebCore::InspectorController::drawElementTitle):
44         * platform/chromium/PopupMenuChromium.cpp: Ditto.
45         (WebCore::PopupListBox::paintRow):
46         (WebCore::PopupListBox::getRowHeight):
47         * platform/graphics/Font.h: Remove ascent/descent/height/lineGap/lineSpacing/xHeight/unitsPerEm accessor...
48         (WebCore::Font::fontMetrics): ... and only expose a single FontMetrics object here.
49         * platform/graphics/FontFastPath.cpp: Use fontMetrics() to query metrics information.
50         (WebCore::Font::emphasisMarkAscent):
51         (WebCore::Font::emphasisMarkDescent):
52         (WebCore::Font::emphasisMarkHeight):
53         (WebCore::Font::floatWidthForSimpleText):
54         * platform/graphics/FontMetrics.h: Added.
55         (WebCore::FontMetrics::FontMetrics): Creates a FontMetrics object, stored in SimpleFontData.
56         (WebCore::FontMetrics::unitsPerEm): Returns an unsigned describing the unitsPerEm.
57         (WebCore::FontMetrics::setUnitsPerEm): Sets the unitsPerEm value.
58         (WebCore::FontMetrics::floatAscent): Returns the stored m_ascent float.
59         (WebCore::FontMetrics::setAscent): Sets the stored m_ascent float.
60         (WebCore::FontMetrics::floatDescent): Returns the stored m_descent float.
61         (WebCore::FontMetrics::setDescent): Sets the stored m_descent float.
62         (WebCore::FontMetrics::floatHeight): Returns floatAscent() + floatDescent().
63         (WebCore::FontMetrics::floatLineGap): Returns the stored m_lineGap float.
64         (WebCore::FontMetrics::setLineGap): Sets the stored m_lineGap float.
65         (WebCore::FontMetrics::floatLineSpacing): Returns the stored m_lineSpacing float.
66         (WebCore::FontMetrics::setLineSpacing): Sets the stored m_lineSpacing float.
67         (WebCore::FontMetrics::xHeight): Returns the stored m_xHeight float (no integer version available, hence no 'float' prefix).
68         (WebCore::FontMetrics::setXHeight): Sets the stored m_xHeight float.
69         (WebCore::FontMetrics::ascent): Returns a rounded version of ascent().
70         (WebCore::FontMetrics::descent): Ditto (for descent).
71         (WebCore::FontMetrics::height): Returns ascent() + descent().
72         (WebCore::FontMetrics::lineGap): Returns a rounded version of lineGap().
73         (WebCore::FontMetrics::lineSpacing): Ditto (for lineSpacing).
74         (WebCore::FontMetrics::reset): Nulls all members, used only by the platform variants of SimpleFontData.
75         * platform/graphics/SimpleFontData.cpp: Adapt SVG Fonts code, to initialize the FontMetrics object, as the m_ascent/etc.. members are gone.
76         (WebCore::SimpleFontData::SimpleFontData):
77         (WebCore::SimpleFontData::initCharWidths):
78         * platform/graphics/SimpleFontData.h: Remove ascent/descent/height/lineSpacing/lineGap/xHeight/unitsPerEm accessors, and members, just store a FontMetrics object and expose it.
79         (WebCore::SimpleFontData::fontMetrics):
80         (WebCore::SimpleFontData::avgCharWidth):
81         * platform/graphics/chromium/FontChromiumWin.cpp: Use fontMetrics() to query font metrics.
82         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
83         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
84         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
85         (WebCore::Font::drawComplexText):
86         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Adapt platform code, to initialize the FontMetrics object.
87         (WebCore::SimpleFontData::platformInit):
88         * platform/graphics/chromium/SimpleFontDataLinux.cpp: Ditto.
89         (WebCore::SimpleFontData::platformInit):
90         * platform/graphics/chromium/UniscribeHelperTextRun.cpp: Use fontMetrics() to query font metrics.
91         (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun):
92         (WebCore::UniscribeHelperTextRun::nextWinFontData):
93         * platform/graphics/freetype/SimpleFontDataFreeType.cpp: Adapt platform code, to initialize the FontMetrics object.
94         (WebCore::SimpleFontData::platformInit):
95         * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Ditto.
96         (WebCore::SimpleFontData::platformInit):
97         * platform/graphics/mac/FontComplexTextMac.cpp: Use fontMetrics() to query font metrics.
98         (WebCore::Font::floatWidthForComplexText):
99         * platform/graphics/mac/FontMac.mm: Ditto.
100         (WebCore::showGlyphsWithAdvances):
101         * platform/graphics/mac/SimpleFontDataMac.mm: Adapt platform code, to initialize the FontMetrics object.
102         (WebCore::SimpleFontData::platformInit):
103         (WebCore::SimpleFontData::platformCharWidthInit):
104         * platform/graphics/pango/SimpleFontDataPango.cpp: Ditto.
105         (WebCore::SimpleFontData::platformInit):
106         * platform/graphics/qt/SimpleFontDataQt.cpp: Ditto. (+ Switch to QFontMetricsF to get floating-point accurancy.)
107         (WebCore::SimpleFontData::platformInit):
108         * platform/graphics/win/FontCGWin.cpp: Use fontMetrics() to query font metrics.
109         (WebCore::drawGDIGlyphs):
110         * platform/graphics/win/FontWin.cpp: Ditto.
111         (WebCore::Font::floatWidthForComplexText):
112         * platform/graphics/win/SimpleFontDataCGWin.cpp: Adapt platform code, to initialize the FontMetrics object.
113         (WebCore::SimpleFontData::platformInit):
114         (WebCore::SimpleFontData::platformBoundsForGlyph):
115         * platform/graphics/win/SimpleFontDataCairoWin.cpp: Ditto.
116         (WebCore::SimpleFontData::platformInit):
117         * platform/graphics/win/SimpleFontDataWin.cpp: Ditto.
118         (WebCore::SimpleFontData::initGDIFont):
119         * platform/graphics/wince/GraphicsContextWinCE.cpp: Use fontMetrics() to query font metrics.
120         (WebCore::GraphicsContext::drawText):
121         * platform/graphics/wince/SimpleFontDataWinCE.cpp: Adapt platform code, to initialize the FontMetrics object.
122         (WebCore::SimpleFontData::platformInit):
123         * platform/graphics/wx/SimpleFontDataWx.cpp: Ditto.
124         (WebCore::SimpleFontData::platformInit):
125         * platform/win/PopupMenuWin.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
126         (WebCore::PopupMenuWin::calculatePositionAndSize): 
127         (WebCore::PopupMenuWin::paint):
128         * rendering/EllipsisBox.cpp: Ditto.
129         (WebCore::EllipsisBox::paint):
130         (WebCore::EllipsisBox::nodeAtPoint):
131         * rendering/InlineBox.cpp: Ditto.
132         (WebCore::InlineBox::logicalHeight):
133         * rendering/InlineFlowBox.cpp: Ditto.
134         (WebCore::verticalPositionForBox):
135         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
136         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
137         * rendering/InlineTextBox.cpp: Ditto.
138         (WebCore::InlineTextBox::paint):
139         (WebCore::InlineTextBox::paintDecoration):
140         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
141         (WebCore::InlineTextBox::paintCompositionUnderline):
142         * rendering/RenderBlock.cpp: Ditto.
143         (WebCore::RenderBlock::baselinePosition):
144         (WebCore::RenderBlock::firstLineBoxBaseline):
145         (WebCore::RenderBlock::lastLineBoxBaseline):
146         * rendering/RenderBox.cpp: Ditto.
147         (WebCore::RenderBox::localCaretRect):
148         * rendering/RenderEmbeddedObject.cpp: Ditto.
149         (WebCore::RenderEmbeddedObject::paintReplaced):
150         * rendering/RenderImage.cpp: Ditto.
151         (WebCore::RenderImage::setImageSizeForAltText):
152         (WebCore::RenderImage::paintReplaced):
153         * rendering/RenderInline.cpp: Ditto.
154         (WebCore::RenderInline::baselinePosition):
155         * rendering/RenderListBox.cpp: Ditto.
156         (WebCore::RenderListBox::paintItemForeground):
157         (WebCore::RenderListBox::itemHeight):
158         * rendering/RenderListMarker.cpp: Ditto.
159         (WebCore::RenderListMarker::paint):
160         (WebCore::RenderListMarker::layout):
161         (WebCore::RenderListMarker::computePreferredLogicalWidths):
162         (WebCore::RenderListMarker::updateMargins):
163         (WebCore::RenderListMarker::getRelativeMarkerRect):
164         * rendering/RenderTextControl.cpp: Ditto.
165         (WebCore::RenderTextControl::paintPlaceholder):
166         * rendering/RenderTextControlSingleLine.cpp: Ditto.
167         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
168         * rendering/RenderThemeWin.cpp: Ditto.
169         (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
170         * rendering/mathml/RenderMathMLFraction.cpp: Ditto.
171         (WebCore::RenderMathMLFraction::baselinePosition):
172         * rendering/style/RenderStyle.h: Add "const FontMetrics& fontMetrics() const" accessor.
173         (WebCore::InheritedFlags::fontMetrics):
174         (WebCore::InheritedFlags::computedLineHeight):
175         * rendering/svg/RenderSVGInlineText.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
176         (WebCore::RenderSVGInlineText::positionForPoint):
177         * rendering/svg/SVGInlineTextBox.cpp: Ditto.
178         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
179         (WebCore::positionOffsetForDecoration):
180         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
181         (WebCore::SVGInlineTextBox::paintTextWithShadows):
182         (WebCore::SVGInlineTextBox::calculateBoundaries):
183         * rendering/svg/SVGTextLayoutEngineBaseline.cpp: Ditto.
184         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift):
185         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift):
186         (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphAdvanceAndOrientation):
187         * rendering/svg/SVGTextLayoutEngineSpacing.cpp: Ditto.
188         (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
189         * rendering/svg/SVGTextMetrics.cpp: Ditto.
190         (WebCore::SVGTextMetrics::SVGTextMetrics):
191         * rendering/svg/SVGTextQuery.cpp: Ditto.
192         (WebCore::calculateGlyphBoundaries):
193         * svg/SVGFontFaceElement.cpp: 
194         (WebCore::SVGFontFaceElement::unitsPerEm): Rename defaultUnitsPerEm global to gDefaultUnitsPerEm.
195         * svg/SVGLength.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
196         (WebCore::SVGLength::convertValueFromUserUnitsToEXS):
197         (WebCore::SVGLength::convertValueFromEXSToUserUnits):
198
199 2011-01-22  Ryosuke Niwa  <rniwa@webkit.org>
200
201         Reviewed by Eric Seidel.
202
203         Stop instantiating legacy editing positions in VisibleSelection, visible_units.cpp, Frame, and RenderBlock
204         https://bugs.webkit.org/show_bug.cgi?id=52759
205
206         Stopped instantiating legacy editing positions in the following files.
207
208         * editing/VisibleSelection.cpp:
209         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
210         * editing/visible_units.cpp:
211         (WebCore::previousBoundary):
212         (WebCore::previousLinePosition):
213         (WebCore::nextLinePosition):
214         (WebCore::startOfBlock):
215         * page/Frame.cpp:
216         (WebCore::Frame::visiblePositionForPoint):
217         * rendering/RenderBlock.cpp: Removed RenderBlock::positionForRenderer because it was not called anywhere.
218         * rendering/RenderBlock.h: Ditto.
219
220 2011-01-22  Adrienne Walker  <enne@google.com>
221
222         Reviewed by James Robinson.
223
224         [chromium] Fix compositor repaints for offscreen fixed elements
225         https://bugs.webkit.org/show_bug.cgi?id=52681
226
227         The fast path scrolling was clipping offscreen invalidations.
228         Additionally, the compositor was ignoring all invalidations that were
229         entirely out of the content rect.
230
231         Test: compositing/ to verify this caused no regressions.
232         Tested fix manually in browser as I could not generate a LayoutTest that reproduced the bug in run-webkit-tests.
233
234         * page/FrameView.cpp:
235         (WebCore::FrameView::scrollContentsFastPath):
236         * platform/graphics/chromium/LayerRendererChromium.cpp:
237         (WebCore::LayerRendererChromium::invalidateRootLayerRect):
238
239 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
240
241         Reviewed by Dan Bernstein.
242
243         https://bugs.webkit.org/show_bug.cgi?id=52951
244         WebKit2 generates a bad PDF for cross process messaging
245
246         * page/PrintContext.cpp: (WebCore::PrintContext::spoolRect): Use a correct offset to actually
247         draw inside the requested rectangle.
248
249 2011-01-21  Yury Semikhatsky  <yurys@chromium.org>
250
251         Reviewed by Adam Barth.
252
253         Regression: new window.onerror() implementation leaks cross-origin Javascript errors
254         https://bugs.webkit.org/show_bug.cgi?id=52903
255
256         In case of an exception in a script from different domain only generic message
257         will be passed to window.onerror hander.
258
259         Tests: http/tests/security/cross-origin-script-window-onerror-redirected.html
260                http/tests/security/cross-origin-script-window-onerror.html
261
262         * bindings/js/CachedScriptSourceProvider.h: use URL from the resource response to make sure we do all
263         cross origin checks agains real script URL, not the original URL which may have resulted in a sequence
264         of redirects to different domains.
265         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
266         * bindings/v8/ScriptSourceCode.h: same for v8.
267         (WebCore::ScriptSourceCode::url):
268         * dom/ScriptExecutionContext.cpp:
269         (WebCore::ScriptExecutionContext::dispatchErrorEvent): in case the error occurred in a script we cannot
270         access provide concise "Script error." message without any information about the error source. This is
271         what Firefox does in this case.
272
273 2011-01-21  Andreas Kling  <kling@webkit.org>
274
275         Reviewed by Kenneth Rohde Christiansen.
276
277         [Qt] Always set composition mode through GraphicsContext
278         https://bugs.webkit.org/show_bug.cgi?id=52940
279
280         GraphicsContext tracks the current composition mode so we should
281         never call through to the QPainter directly.
282
283         * platform/graphics/GraphicsContext.h:
284         * platform/graphics/qt/GraphicsContextQt.cpp:
285         (WebCore::toQtCompositionMode): Changed this method to a static inline
286         since it's only used by GraphicsContextQt.cpp now.
287
288         * platform/graphics/qt/ImageQt.cpp:
289         (WebCore::Image::drawPattern):
290         (WebCore::BitmapImage::draw):
291
292 2011-01-21  Dan Bernstein  <mitz@apple.com>
293
294         Reviewed by Adele Peterson.
295
296         Inconsistent handling of no-break space in justification logic
297         https://bugs.webkit.org/show_bug.cgi?id=52938
298
299         Test: fast/text/justify-nbsp.html
300
301         * rendering/RenderBlockLineLayout.cpp:
302         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Count no-break space as a
303         space when computing the distribution of space between text boxes on the line.
304
305 2011-01-21  Charlie Reis  <creis@chromium.org>
306
307         Reviewed by Darin Fisher.
308
309         Crash in WebCore::HistoryController::itemsAreClones
310         https://bugs.webkit.org/show_bug.cgi?id=52819
311
312         Adds sanity checks to help diagnose the crash.
313
314         * loader/HistoryController.cpp:
315
316 2011-01-21  Andreas Kling  <kling@webkit.org>
317
318         Reviewed by Ariya Hidayat.
319
320         [Qt] Let QPainter decide whether a composition mode is supported or not
321
322         Lacking Porter-Duff support in the paint engine shouldn't exclude the
323         Source and Source-Over modes (and has nothing to do with the blend
324         and raster-op modes.)
325
326         Delegate this decision to QPainter instead (this will cause warnings
327         if an unsupported mode is used, but that's a good thing.)
328
329         * platform/graphics/qt/GraphicsContextQt.cpp:
330         (WebCore::GraphicsContext::clearRect):
331         (WebCore::GraphicsContext::setPlatformCompositeOperation):
332         * platform/graphics/qt/TransparencyLayer.h:
333         (WebCore::TransparencyLayer::TransparencyLayer):
334
335 2011-01-21  Chris Rogers  <crogers@google.com>
336
337         Reviewed by Kenneth Russell.
338
339         fix audio build: header file should be "Noncopyable.h" and not "NonCopyable.h"
340         https://bugs.webkit.org/show_bug.cgi?id=52933
341
342         No new tests since this just fixes the build
343
344         * webaudio/RealtimeAnalyser.h:
345
346 2011-01-21  Chris Rogers  <crogers@google.com>
347
348         Reviewed by Kenneth Russell.
349
350         Fix audio build: change ChromiumBridge to PlatformBridge
351         https://bugs.webkit.org/show_bug.cgi?id=52928
352
353         No new tests since audio API is not yet implemented.
354
355         * platform/audio/chromium/AudioBusChromium.cpp:
356         (WebCore::AudioBus::loadPlatformResource):
357
358 2011-01-21  Chris Rogers  <crogers@google.com>
359
360         Reviewed by Kenneth Russell.
361
362         Add FFTFrameStub to avoid link errors during bringup on platforms without an FFT implementation
363         https://bugs.webkit.org/show_bug.cgi?id=52922
364
365         No new tests since audio API is not yet implemented.
366
367         * WebCore.gypi:
368         * platform/audio/FFTFrameStub.cpp: Added.
369         (WebCore::FFTFrame::FFTFrame):
370         (WebCore::FFTFrame::~FFTFrame):
371         (WebCore::FFTFrame::multiply):
372         (WebCore::FFTFrame::doFFT):
373         (WebCore::FFTFrame::doInverseFFT):
374         (WebCore::FFTFrame::cleanup):
375         (WebCore::FFTFrame::realData):
376         (WebCore::FFTFrame::imagData):
377
378 2011-01-21  Tony Chang  <tony@chromium.org>
379
380         Reviewed by Sam Weinig.
381
382         reduce number of FrameLoaderClient::didChangeScrollOffset calls
383         https://bugs.webkit.org/show_bug.cgi?id=52915
384
385         Only notify of changes in scroll offset when there actually is a change.
386         This regressed in r76291.
387
388         Covered by Chromium browser_tests.
389
390         * platform/ScrollAnimator.cpp:
391         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
392
393 2011-01-21  Pavel Feldman  <pfeldman@chromium.org>
394
395         Reviewed by Yury Semikhatsky.
396
397         Web Inspector: ~InspectorResourceAgent crashes on closing inspected page.
398         https://bugs.webkit.org/show_bug.cgi?id=52900
399
400         * inspector/InspectorController.cpp:
401         (WebCore::InspectorController::~InspectorController):
402         (WebCore::InspectorController::inspectedPageDestroyed):
403
404 2011-01-21  Chris Rogers  <crogers@google.com>
405
406         Reviewed by Darin Fisher.
407
408         Add run-time enable support for the web audio API
409         https://bugs.webkit.org/show_bug.cgi?id=52741
410
411         No new tests since audio API is not yet implemented.
412
413         * WebCore.exp.in:
414         * bindings/generic/RuntimeEnabledFeatures.cpp:
415         * bindings/generic/RuntimeEnabledFeatures.h:
416         (WebCore::RuntimeEnabledFeatures::setWebkitAudioContextEnabled):
417         (WebCore::RuntimeEnabledFeatures::webkitAudioContextEnabled):
418         * page/DOMWindow.idl:
419         * page/Settings.cpp:
420         (WebCore::Settings::Settings):
421         (WebCore::Settings::setWebAudioEnabled):
422         * page/Settings.h:
423         (WebCore::Settings::webAudioEnabled):
424
425 2011-01-21  Martin Robinson  <mrobinson@igalia.com>
426
427         Reviewed by Xan Lopez.
428
429         [GTK] Menulist text often collides with separator
430         https://bugs.webkit.org/show_bug.cgi?id=51155
431
432         Move menulist rendering to RenderThemeGtk and correct padding code
433         for separators in menulists.
434
435         * platform/gtk/RenderThemeGtk.cpp:
436         (WebCore::RenderThemeGtk::RenderThemeGtk): Initialize new widget members.
437         (WebCore::RenderThemeGtk::getComboBoxSeparatorWidth): Added.
438         (WebCore::RenderThemeGtk::comboBoxArrowSize): Added.
439         (WebCore::getButtonInnerBorder): Added.
440         (WebCore::RenderThemeGtk::getComboBoxPadding): Do this manually instead of using
441         Mozilla code.
442         (WebCore::RenderThemeGtk::paintMenuList): Ditto.
443         (WebCore::setupWidget): Abstracted this part of the setupWidgetAndAddToContainer
444         out to handle child widgets of comboboxes.
445         (WebCore::RenderThemeGtk::setupWidgetAndAddToContainer): Abstracted out setupWidget.
446         (WebCore::RenderThemeGtk::gtkContainer): Added.
447         (WebCore::getGtkComboBoxButton): Added.
448         (WebCore::getGtkComboBoxPieces): Added.
449         (WebCore::RenderThemeGtk::gtkComboBox): Call setupWidget here.
450         (WebCore::RenderThemeGtk::refreshComboBoxChildren): Added.
451         (WebCore::RenderThemeGtk::gtkComboBoxButton): Added.
452         (WebCore::RenderThemeGtk::gtkComboBoxArrow): Added.
453         (WebCore::RenderThemeGtk::gtkComboBoxSeparator): Added.
454         * platform/gtk/RenderThemeGtk.h: Added new members and methods.
455         * platform/gtk/WidgetRenderingContext.h: Added new members and methods.
456         * platform/gtk/WidgetRenderingContextGtk2.cpp:
457         (WebCore::WidgetRenderingContext::gtkPaintArrow):
458         (WebCore::WidgetRenderingContext::gtkPaintVLine):
459         * platform/gtk/WidgetRenderingContextGtk3.cpp:
460         (WebCore::WidgetRenderingContext::gtkPaintArrow):
461         (WebCore::WidgetRenderingContext::gtkPaintVLine):
462         * platform/gtk/gtk2drawing.c: Removed code for drawing menulists and buttons.
463         (moz_gtk_init):
464         (moz_gtk_get_widget_border):
465         (moz_gtk_widget_paint):
466         * platform/gtk/gtk3drawing.c:
467         (moz_gtk_init):
468         (moz_gtk_get_widget_border):
469         (moz_gtk_widget_paint):
470         * platform/gtk/gtkdrawing.h:
471
472 2011-01-21  Sam Weinig  <sam@webkit.org>
473
474         Fix chromium mac build.
475
476         * platform/chromium/ScrollbarThemeChromiumMac.mm:
477         (WebCore::scrollbarStateToThemeState):
478         (WebCore::ScrollbarThemeChromiumMac::paint):
479
480 2011-01-21  Sam Weinig  <sam@webkit.org>
481
482         Fix the windows build.
483
484         * platform/ScrollbarThemeComposite.cpp:
485         (WebCore::ScrollbarThemeComposite::paint):
486
487 2011-01-21  Chris Rogers  <crogers@google.com>
488
489         Reviewed by Kenneth Russell.
490
491         Add chromium bundled audio spatialization resources to WebAudio.grd
492         https://bugs.webkit.org/show_bug.cgi?id=52651
493
494         No new tests since audio API is not yet implemented.
495
496         * WebCore.gyp/WebCore.gyp:
497         * platform/audio/chromium/AudioBusChromium.cpp:
498         (WebCore::AudioBus::loadPlatformResource):
499
500 2011-01-21  Xiyuan Xia  <xiyuan@chromium.org>
501
502         Reviewed by Tony Chang.
503
504         Use WebThemeEngine for relevant RenderTheme parts for chromium/linux.
505         https://bugs.webkit.org/show_bug.cgi?id=52826
506
507         * platform/chromium/ChromiumBridge.h:
508         * rendering/RenderThemeChromiumLinux.cpp:
509         (WebCore::getWebThemeState):
510         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
511         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
512         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
513         (WebCore::RenderThemeChromiumLinux::paintRadio):
514         (WebCore::RenderThemeChromiumLinux::setRadioSize):
515         (WebCore::RenderThemeChromiumLinux::paintButton):
516         (WebCore::RenderThemeChromiumLinux::paintTextField):
517         (WebCore::RenderThemeChromiumLinux::paintMenuList):
518         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
519         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
520         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
521         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
522         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
523         * rendering/RenderThemeChromiumLinux.h:
524         * rendering/RenderThemeChromiumSkia.cpp:
525         (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
526         (WebCore::RenderThemeChromiumSkia::setSizeIfAuto):
527         (WebCore::RenderThemeChromiumSkia::indeterminateProgressValueRectFor):
528         * rendering/RenderThemeChromiumSkia.h:
529
530 2011-01-21  Sam Weinig  <sam@webkit.org>
531
532         Reviewed by Anders Carlsson.
533
534         Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
535         https://bugs.webkit.org/show_bug.cgi?id=52779
536
537         Rename ScrollbarClient -> ScrollableArea.
538
539         - Also replaces Scrollbar::setClient with Scrollbar::disconnectFromScrollableArea
540           since that was its only use case.
541
542         * CMakeLists.txt:
543         * GNUmakefile.am:
544         * WebCore.gypi:
545         * WebCore.pro:
546         * WebCore.vcproj/WebCore.vcproj:
547         * WebCore.xcodeproj/project.pbxproj:
548         * accessibility/AccessibilityScrollbar.cpp:
549         (WebCore::AccessibilityScrollbar::setValue):
550         * css/CSSStyleSelector.cpp:
551         (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass):
552         * page/FrameView.h:
553         * platform/PopupMenuClient.h:
554         * platform/ScrollAnimator.cpp:
555         (WebCore::ScrollAnimator::create):
556         (WebCore::ScrollAnimator::ScrollAnimator):
557         (WebCore::ScrollAnimator::scroll):
558         (WebCore::ScrollAnimator::notityPositionChanged):
559         * platform/ScrollAnimator.h:
560         * platform/ScrollAnimatorWin.cpp:
561         (WebCore::ScrollAnimator::create):
562         (WebCore::ScrollAnimatorWin::ScrollAnimatorWin):
563         (WebCore::ScrollAnimatorWin::scroll):
564         * platform/ScrollAnimatorWin.h:
565         * platform/ScrollView.cpp:
566         (WebCore::ScrollView::scroll):
567         (WebCore::ScrollView::updateScrollbars):
568         (WebCore::ScrollView::wheelEvent):
569         * platform/ScrollView.h:
570         * platform/ScrollableArea.cpp: Copied from WebCore/platform/ScrollbarClient.cpp.
571         (WebCore::ScrollableArea::ScrollableArea):
572         (WebCore::ScrollableArea::~ScrollableArea):
573         (WebCore::ScrollableArea::scroll):
574         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
575         (WebCore::ScrollableArea::scrollToXOffsetWithoutAnimation):
576         (WebCore::ScrollableArea::scrollToYOffsetWithoutAnimation):
577         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
578         * platform/ScrollableArea.h: Copied from WebCore/platform/ScrollbarClient.h.
579         * platform/Scrollbar.cpp:
580         (WebCore::Scrollbar::createNativeScrollbar):
581         (WebCore::Scrollbar::Scrollbar):
582         (WebCore::Scrollbar::offsetDidChange):
583         (WebCore::Scrollbar::autoscrollPressedPart):
584         (WebCore::Scrollbar::moveThumb):
585         (WebCore::Scrollbar::mouseMoved):
586         (WebCore::Scrollbar::isWindowActive):
587         (WebCore::Scrollbar::invalidateRect):
588         (WebCore::Scrollbar::convertToContainingView):
589         (WebCore::Scrollbar::convertFromContainingView):
590         * platform/Scrollbar.h:
591         (WebCore::Scrollbar::disconnectFromScrollableArea):
592         (WebCore::Scrollbar::scrollableArea):
593         * platform/ScrollbarClient.cpp: Removed.
594         * platform/ScrollbarClient.h: Removed.
595         * platform/ScrollbarThemeComposite.cpp:
596         * platform/chromium/FramelessScrollView.h:
597         * platform/chromium/ScrollbarThemeChromium.cpp:
598         (WebCore::ScrollbarThemeChromium::paintTickmarks):
599         * platform/efl/ScrollbarEfl.cpp:
600         (Scrollbar::createNativeScrollbar):
601         (ScrollbarEfl::ScrollbarEfl):
602         (scrollbarEflEdjeMessage):
603         * platform/efl/ScrollbarEfl.h:
604         * platform/gtk/MainFrameScrollbarGtk.cpp:
605         (MainFrameScrollbarGtk::create):
606         (MainFrameScrollbarGtk::MainFrameScrollbarGtk):
607         (MainFrameScrollbarGtk::gtkValueChanged):
608         * platform/gtk/MainFrameScrollbarGtk.h:
609         * platform/mac/ScrollAnimatorMac.h:
610         * platform/mac/ScrollAnimatorMac.mm:
611         (WebCore::ScrollAnimator::create):
612         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
613         (WebCore::ScrollAnimatorMac::scroll):
614         * platform/mac/ScrollbarThemeMac.mm:
615         (WebCore::ScrollbarThemeMac::paint):
616         * platform/qt/ScrollbarQt.cpp:
617         (WebCore::Scrollbar::contextMenu):
618         * platform/win/PopupMenuWin.cpp:
619         (WebCore::PopupMenuWin::scrollToRevealSelection):
620         (WebCore::PopupMenuWin::wndProc):
621         * platform/win/PopupMenuWin.h:
622         * platform/win/ScrollbarThemeSafari.cpp:
623         (WebCore::ScrollbarThemeSafari::paintTrackBackground):
624         (WebCore::ScrollbarThemeSafari::paintButton):
625         (WebCore::ScrollbarThemeSafari::paintThumb):
626         * platform/wx/ScrollbarThemeWx.cpp:
627         (WebCore::ScrollbarThemeWx::paint):
628         * rendering/RenderDataGrid.h:
629         * rendering/RenderLayer.cpp:
630         (WebCore::RenderLayer::scrollToOffset):
631         (WebCore::RenderLayer::destroyScrollbar):
632         (WebCore::RenderLayer::scroll):
633         * rendering/RenderLayer.h:
634         * rendering/RenderListBox.cpp:
635         (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
636         (WebCore::RenderListBox::scroll):
637         (WebCore::RenderListBox::logicalScroll):
638         (WebCore::RenderListBox::setScrollTop):
639         (WebCore::RenderListBox::destroyScrollbar):
640         * rendering/RenderListBox.h:
641         * rendering/RenderMenuList.cpp:
642         (WebCore::RenderMenuList::createScrollbar):
643         * rendering/RenderMenuList.h:
644         * rendering/RenderScrollbar.cpp:
645         (WebCore::RenderScrollbar::createCustomScrollbar):
646         (WebCore::RenderScrollbar::RenderScrollbar):
647         * rendering/RenderScrollbar.h:
648         * rendering/RenderTextControlSingleLine.cpp:
649         (WebCore::RenderTextControlSingleLine::createScrollbar):
650         * rendering/RenderTextControlSingleLine.h:
651
652 2011-01-21  Darin Adler  <darin@apple.com>
653
654         Fix Leopard build.
655
656         * rendering/mathml/RenderMathMLFraction.cpp:
657         (WebCore::RenderMathMLFraction::layout): Use ceilf instead of ceil.
658
659 2011-01-21  Anton Muhin  <antonm@chromium.org>
660
661         Reviewed by Nate Chapin.
662
663         [v8] Properly deal with the case when conversion to string throws an exception for HTMLCollection accessors
664         https://bugs.webkit.org/show_bug.cgi?id=52901
665
666         Test: fast/dom/htmlcollection-conversion-throws-exception.html
667
668         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
669         (WebCore::getItem):
670
671 2011-01-21  Adam Roben  <aroben@apple.com>
672
673         Separate flushing layer changes from rendering in CACFLayerTreeHost
674
675         Old model:
676           1) A change is made to a GraphicsLayer.
677           2) CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon is called, which schedules the
678              render timer.
679           3) The timer fires, which calls through to CACFLayerTreeHost::render, which performs the
680              flush and then renders.
681
682         New model:
683           1) A change is made to a GraphicsLayer.
684           2) CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon is called, which tells the new
685              LayerChangesFlusher singleton that this host has changes that need to be flushed.
686           3) LayerChangesFlusher sets up a Windows hook that will get called on the next iteration
687              of the message loop.
688           4) LayerChangesFlusher's hook is called, which calls through to
689              CACFLayerTreeHost::flushPendingLayerChangesNow.
690           5) CACFLayerTreeHost::flushPendingLayerChangesNow schedules the render timer so the changes
691              that were just flushed to the context will be rendered.
692
693         When a change is made to a PlatformCALayer that doesn't have a corresponding GraphicsLayer
694         (e.g., for rendering <video>), CACFLayerTreeHost::layerTreeDidChange takes care of
695         scheduling the flush.
696
697         This change has three advantages:
698           1) Whenever we flush layer changes, we first update layout. This can cause the page to
699              leave compositing mode, which in turn can cause all references to the CACFLayerTreeHost
700              to be dropped. By separating flushing (and thus updating layout) from rendering, we no
701              longer have to worry about this happen during rendering.
702           2) The new model is much more similar to how things work on the Mac, so will hopefully
703              reduce the number of platform-specific bugs.
704           3) CACFLayerTreeHost::shouldRender, which was used to make sure we didn't render while a
705              layout was pending, is no longer needed. It actually hasn't been needed since at least
706              r75987, but removing it before now would have resulted in a crash whenever a page came
707              out of compositing mode due to (1).
708
709         Fixes <http://webkit.org/b/52852> Flushing layer changes and rendering are intertwined in
710         CACFLayerTreeHost, but shouldn't be
711
712         Reviewed by Simon Fraser.
713
714         * WebCore.vcproj/WebCore.vcproj: Added LayerChangesFlusher.
715
716         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Added new #include, sorted existing
717         #includes.
718         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Initialize new member.
719         (WebCore::CACFLayerTreeHost::layerTreeDidChange): If we aren't already flushing changes,
720         schedule a flush. Removed the call to renderSoon(), which now happens when the flush is
721         finished.
722         (WebCore::CACFLayerTreeHost::destroyRenderer): Cancel any pending flush we had scheduled. Also
723         fixed a bug where we'd fail to clear the context's layer.
724         (WebCore::CACFLayerTreeHost::render): Removed code to ask the client if we should render, which
725         is no longer needed. Moved code to flush layer changes from here to
726         flushPendingLayerChangesNow, which is called via the above-described mechanism.
727         (WebCore::CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon): Schedule a flush. Removed
728         code to schedule a render, which now happens after we've flushed.
729         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Added. Some of this code came from
730         render(). First we flush GraphicsLayer changes from GraphicsLayers to their underlying
731         PlatformCALayers, then we flush changes from PlatformCALayers to the context, then we
732         schedule a render so that the changes will be rendered to the screen.
733
734         * platform/graphics/ca/win/CACFLayerTreeHost.h: Removed
735         CACFLayerTreeHostClient::shouldRender. Added flushPendingLayerChangesNow and
736         m_isFlushingLayerChanges.
737
738         * platform/graphics/ca/win/LayerChangesFlusher.cpp: Added.
739         (WebCore::LayerChangesFlusher::shared):
740         (WebCore::LayerChangesFlusher::LayerChangesFlusher):
741         (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon):
742         (WebCore::LayerChangesFlusher::cancelPendingFlush):
743         (WebCore::LayerChangesFlusher::hookCallback):
744         (WebCore::LayerChangesFlusher::hookFired):
745         (WebCore::LayerChangesFlusher::setHook):
746         (WebCore::LayerChangesFlusher::removeHook):
747
748         * platform/graphics/ca/win/LayerChangesFlusher.cpp: Added.
749         (WebCore::LayerChangesFlusher::shared): Returns the singleton.
750         (WebCore::LayerChangesFlusher::LayerChangesFlusher): Initialize our members.
751         (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon): Add the host to the set of
752         hosts with changes that need to be flushed, and set up our hook if we haven't already.
753         (WebCore::LayerChangesFlusher::cancelPendingFlush): Remove the host from the set of hosts
754         with changes that need to be flushed. If we have no more such hosts, remove our hook, unless
755         we're currently in the process of calling out to our hosts, in which case we'll take care of
756         the hook once we're done calling out.
757         (WebCore::LayerChangesFlusher::hookCallback): This is the function that Windows calls when
758         our hook fires. Just calls through to hookFired on the singleton.
759         (WebCore::LayerChangesFlusher::hookFired): Tell all the hosts with changes that needed to be
760         flushed that it's time to flush. If no hosts re-added themselves to our set during this
761         process, remove our hook.
762         (WebCore::LayerChangesFlusher::setHook): Calls through to ::SetWindowsHookExW.
763         (WebCore::LayerChangesFlusher::removeHook): Calls through to ::UnhookWindowsHookEx.
764
765         * platform/graphics/ca/win/LayerChangesFlusher.h: Added.
766
767 2011-01-21  Simon Fraser  <simon.fraser@apple.com>
768
769         Reviewed by Sam Weinig.
770
771         GraphicsLayer should be non-copyable
772         https://bugs.webkit.org/show_bug.cgi?id=52909
773
774         Use WTF_MAKE_NONCOPYABLE on GraphicsLayer, and WTF_MAKE_FAST_ALLOCATED
775         on that and KeyframeValueList.
776         
777         * platform/graphics/GraphicsLayer.h:
778
779 2011-01-21  Simon Fraser  <simon.fraser@apple.com>
780
781         Reviewed by Sam Weinig.
782
783         Report the sized used by canvases and types arrays
784         https://bugs.webkit.org/show_bug.cgi?id=52856
785
786         Report the memory cost associated with canvas elements,
787         and typed arrays to JavaScript as extraCost, so that it
788         can figure this into its GC behavior.
789
790         * bindings/js/JSArrayBufferViewHelper.h:
791         (WebCore::toJSArrayBufferView): New templatized function, similar
792         to getDOMObjectWrapper() but calls reportExtraMemoryCost() with
793         the byteLength of the array.
794         
795         * bindings/js/JSFloat32ArrayCustom.cpp:
796         (WebCore::toJS): Use toJSArrayBufferView.
797         * bindings/js/JSInt16ArrayCustom.cpp:
798         (WebCore::toJS): Use toJSArrayBufferView.
799         * bindings/js/JSInt32ArrayCustom.cpp:
800         (WebCore::toJS): Use toJSArrayBufferView.
801         * bindings/js/JSInt8ArrayCustom.cpp:
802         (WebCore::toJS): Use toJSArrayBufferView.
803         * bindings/js/JSUint16ArrayCustom.cpp:
804         (WebCore::toJS): Use toJSArrayBufferView.
805         * bindings/js/JSUint32ArrayCustom.cpp:
806         (WebCore::toJS): Use toJSArrayBufferView.
807         * bindings/js/JSUint8ArrayCustom.cpp:
808         (WebCore::toJS): Use toJSArrayBufferView.
809
810         * html/HTMLCanvasElement.cpp:
811         (WebCore::HTMLCanvasElement::createImageBuffer): Call heap.reportExtraMemoryCost()
812         with the size of the canvas backing store.
813         
814         * html/canvas/TypedArrayBase.h:
815         (WebCore::TypedArrayBase::byteLength): byteLength needs to
816         be public.
817         
818         * platform/graphics/ImageBuffer.h: Add dataSize() method.
819         
820         * platform/graphics/cairo/ImageBufferCairo.cpp:
821         (WebCore::ImageBuffer::dataSize): Implement dataSize().
822         * platform/graphics/cg/ImageBufferCG.cpp:
823         (WebCore::ImageBuffer::dataSize): Implement dataSize().
824         * platform/graphics/haiku/ImageBufferHaiku.cpp:
825         (WebCore::ImageBuffer::dataSize): Implement dataSize().
826         * platform/graphics/qt/ImageBufferQt.cpp:
827         (WebCore::ImageBuffer::dataSize): Implement dataSize().
828         * platform/graphics/skia/ImageBufferSkia.cpp:
829         (WebCore::ImageBuffer::dataSize): Implement dataSize().
830         * platform/graphics/wince/ImageBufferWinCE.cpp:
831         (WebCore::ImageBuffer::dataSize): Implement dataSize().
832         * platform/graphics/wx/ImageBufferWx.cpp:
833         (WebCore::ImageBuffer::dataSize): Implement dataSize().
834
835 2011-01-21  Adam Roben  <aroben@apple.com>
836
837         Rename WKCACFLayerRenderer[Client] to CACFLayerTreeHost[Client]
838
839         Also renamed a few functions and data members to match.
840
841         Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
842
843         Reviewed by Simon Fraser.
844
845         * WebCore.vcproj/WebCore.vcproj: Updated files' names and paths.
846
847         * WebCore.vcproj/WebCoreQuartzCore.vsprops: Added platform/graphics/ca/win to the include
848         path.
849
850         * WebCore.vcproj/copyForwardingHeaders.cmd: Copy headers from platform/graphics/ca/win, too.
851
852         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp.
853         * platform/graphics/ca/win/CACFLayerTreeHost.h: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.h.
854
855         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
856         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
857         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
858         Updated for renames.
859
860 2011-01-21  Patrick Gansterer  <paroga@paroga.com>
861
862         Original patch from François Sausset  <sausset@gmail.com>
863
864         Reviewed by Darin Adler.
865
866         Code cleaning in rendering/mathml/RenderMathMLFraction.cpp
867         https://bugs.webkit.org/show_bug.cgi?id=52201
868
869         Replace unneeded doubles by floats and remove unneeded casts.
870
871         * rendering/mathml/RenderMathMLFraction.cpp:
872         (WebCore::RenderMathMLFraction::paint):
873         * rendering/mathml/RenderMathMLFraction.h:
874
875 2011-01-21  Dimitri Glazkov  <dglazkov@chromium.org>
876
877         Reviewed by Darin Adler.
878
879         REGRESSION(r73618): Clicking on a search input causes a crash.
880         https://bugs.webkit.org/show_bug.cgi?id=52905
881
882         The problem is caused by TextControlInnerElement being used both as
883         shadow root and an element in a shadow subtree. The code assumed it is
884         only used as a shadow root.
885
886         Since this code is all just workaround for in-progress conversion to
887         new shadow DOM, I am just adding a check. This code will disappear
888         completely once bug 52788 is fixed.
889
890         Test: fast/dom/search-shadow-host-crash.html
891
892         * dom/Node.cpp:
893         (WebCore::Node::setShadowHost): Added an ASSERT for early detection
894             of attempting to stomp on the parentNode.
895         * rendering/TextControlInnerElements.cpp:
896         (WebCore::TextControlInnerElement::detach): Added a check to only
897             clear shadow host if we have one.
898
899 2011-01-21  Adam Roben  <aroben@apple.com>
900
901         Replace some "sync compositing state" terminology with "flush pending GraphicsLayer changes"
902
903         This seems to be the direction in which our code is moving. I chose "GraphicsLayer" as
904         opposed to just "layer" because there are cases where we flush changes to CACFLayers that
905         don't have a corresponding GraphicsLayer.
906
907         Fixes <http://webkit.org/b/52894> "Sync compositing state" terminology in
908         WKCACFLayerRenderer and friends is confusing
909
910         Reviewed by Simon Fraser.
911
912         * platform/graphics/win/WKCACFLayerRenderer.cpp:
913         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
914         (WebCore::WKCACFLayerRenderer::render):
915         Updated for renames.
916
917         (WebCore::WKCACFLayerRenderer::flushPendingGraphicsLayerChangesSoon): Renamed from
918         syncCompositingStateSoon, and updated for other renames.
919
920         * platform/graphics/win/WKCACFLayerRenderer.h: Renamed m_syncLayerChanges to
921         * m_shouldFlushPendingGraphicsLayerChanges.
922         (WebCore::WKCACFLayerRendererClient::flushPendingGraphicsLayerChanges): Renamed from
923         syncCompositingState.
924
925 2011-01-21  Adam Roben  <aroben@apple.com>
926
927         Clean up PlatformCAAnimationWin
928
929         Fixes <http://webkit.org/b/52904> PlatformCAAnimationWin is leaky and inefficient
930
931         Reviewed by Simon Fraser.
932
933         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
934         (toCACFFillModeType):
935         (fromCACFFillModeType):
936         (toCACFValueFunctionType):
937         (fromCACFValueFunctionType):
938         Changed to take and return CFStringRefs. There's no need to convert to WebCore::String just
939         so we can later convert back to CFStringRef.
940
941         (toCACFTimingFunction): Fixed leaks by changing this to return a RetainPtr and adopting the
942         results of CACFTimingFunctionCreate.
943         (PlatformCAAnimation::PlatformCAAnimation): Changed not to needlessly roundtrip through
944         WebCore::String. Also changed an ASSERT(0) to ASSERT_NOT_REACHED().
945
946         (PlatformCAAnimation::setFillMode):
947         (PlatformCAAnimation::setTimingFunction):
948         (PlatformCAAnimation::setValueFunction):
949         (PlatformCAAnimation::setTimingFunctions):
950         Updated for changes to the above conversion functions.
951
952 2011-01-21  Charlie Reis  <creis@chromium.org>
953
954         Reviewed by Darin Fisher.
955
956         FrameLoader::checkLoadCompleteForThisFrame uses wrong history item
957         https://bugs.webkit.org/show_bug.cgi?id=48812
958
959         Most calls to stopAllLoaders now clear the history's provisional item(s).
960         We can now avoid resetting the back/forward state if a new navigation
961         is in progress.
962
963         Test: http/tests/navigation/back-twice-without-commit.html
964         Test: http/tests/navigation/forward-and-cancel.html
965
966         * loader/FrameLoader.cpp:
967         * loader/FrameLoader.h:
968         * loader/FrameLoaderTypes.h:
969         * WebCore.exp.in: Update stopAllLoaders signature.
970
971 2011-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
972
973         Reviewed by Martin Robinson.
974
975         [GTK] Show caps lock indicator in password fields
976         https://bugs.webkit.org/show_bug.cgi?id=52878
977
978         Test: manual-tests/password-caps-lock.html
979
980         * platform/gtk/KeyEventGtk.cpp:
981         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Implement
982         currentCapsLockState() using GDK API.
983         * platform/gtk/RenderThemeGtk.cpp:
984         (WebCore::RenderThemeGtk::paintCapsLockIndicator): Paint an icon
985         in the password field when the caps lock modifier is locked.
986         * platform/gtk/RenderThemeGtk.h:
987
988 2011-01-21  Pavel Podivilov  <podivilov@chromium.org>
989
990         Reviewed by Pavel Feldman.
991
992         Web Inspector: move sticky breakpoints management from InspectorController to InspectorBrowserDebuggerAgent.
993         https://bugs.webkit.org/show_bug.cgi?id=52874
994
995         This is the first step of debugger api refactoring (see bug 52879).
996         JavaScript breakpoints are still in the same list as native breakpoints and are restored by InspectorBrowserDebuggerAgent.
997         The second step will be to move sticky JavaScript breakpoints to InspectorDebuggerAgent.
998
999         * inspector/Inspector.idl:
1000         * inspector/InspectorBrowserDebuggerAgent.cpp:
1001         (WebCore::InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints):
1002         (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
1003         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
1004         (WebCore::InspectorBrowserDebuggerAgent::discardBindings):
1005         (WebCore::InspectorBrowserDebuggerAgent::didInsertDOMNode):
1006         (WebCore::InspectorBrowserDebuggerAgent::didRemoveDOMNode):
1007         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
1008         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
1009         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
1010         (WebCore::InspectorBrowserDebuggerAgent::hasBreakpoint):
1011         (WebCore::InspectorBrowserDebuggerAgent::updateSubtreeBreakpoints):
1012         * inspector/InspectorBrowserDebuggerAgent.h:
1013         * inspector/InspectorController.cpp:
1014         (WebCore::InspectorController::restoreInspectorStateFromCookie):
1015         (WebCore::InspectorController::connectFrontend):
1016         (WebCore::InspectorController::didCommitLoad):
1017         (WebCore::InspectorController::enableDebugger):
1018         (WebCore::InspectorController::resume):
1019         (WebCore::InspectorController::inspectedURL):
1020         * inspector/InspectorController.h:
1021         * inspector/InspectorState.cpp:
1022         (WebCore::InspectorState::InspectorState):
1023         * inspector/InspectorState.h:
1024         * inspector/front-end/BreakpointManager.js:
1025         (WebInspector.BreakpointManager):
1026         (WebInspector.BreakpointManager.prototype._saveBreakpoints):
1027
1028 2011-01-21  John Knottenbelt  <jknotten@chromium.org>
1029
1030         Reviewed by Jeremy Orlow.
1031
1032         Turn off uninitialized errors for ARM linux build.
1033         https://bugs.webkit.org/show_bug.cgi?id=52893
1034
1035         Fix ARM compiler breakage.
1036
1037         * WebCore.gyp/WebCore.gyp:
1038
1039 2011-01-21  Mikhail Naganov  <mnaganov@chromium.org>
1040
1041         Reviewed by Yury Semikhatsky.
1042
1043         Web Inspector: [Chromium] REGRESSION: Using the "Back" button
1044         while profiling causes renderer crash.
1045
1046         https://bugs.webkit.org/show_bug.cgi?id=52808
1047
1048         * inspector/InspectorProfilerAgent.cpp:
1049         (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
1050         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
1051
1052 2011-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
1053
1054         Reviewed by Pavel Feldman.
1055
1056         Web Inspector: switch page/Console implementation from InspectorController to InspectorInstrumentation.
1057
1058         There are some places in WebCore where we still using direct InspectorController calls.
1059         The idea is to pass all the Inspector related calls via InspectorInstrumentaion which is the
1060         Inspector facade for WebCore.
1061
1062         https://bugs.webkit.org/show_bug.cgi?id=52869
1063
1064         * inspector/InspectorController.cpp:
1065         * inspector/InspectorController.h:
1066         * inspector/InspectorInstrumentation.cpp:
1067         (WebCore::InspectorInstrumentation::addProfileImpl):
1068         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
1069         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
1070         * inspector/InspectorInstrumentation.h:
1071         (WebCore::InspectorInstrumentation::addProfile):
1072         (WebCore::InspectorInstrumentation::profilerEnabled):
1073         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
1074         * page/Console.cpp:
1075         (WebCore::Console::profile):
1076         (WebCore::Console::profileEnd):
1077
1078 2011-01-12  Pavel Podivilov  <podivilov@chromium.org>
1079
1080         Reviewed by Pavel Feldman.
1081
1082         Web Inspector: breakpoints are restored incorrectly when reverting live edit.
1083         https://bugs.webkit.org/show_bug.cgi?id=52300
1084
1085         Fix breakpoints restoring when reverting to old revision by using text diff.
1086         Move live edit logic from ScriptsPanel to DebuggerModel.
1087         Eliminate unnecessary editLine delegate in TextViewer.
1088
1089         * inspector/front-end/DebuggerModel.js:
1090         (WebInspector.DebuggerModel):
1091         (WebInspector.DebuggerModel.prototype.reset):
1092         (WebInspector.DebuggerModel.prototype.editScriptSource):
1093         (WebInspector.DebuggerModel.prototype._updateScriptSource):
1094         (WebInspector.DebuggerModel.prototype.get callFrames):
1095         (WebInspector.DebuggerModel.prototype.pausedScript):
1096         (WebInspector.DebuggerModel.prototype.resumedScript):
1097         * inspector/front-end/Script.js:
1098         (WebInspector.Script.prototype.get source):
1099         * inspector/front-end/ScriptView.js:
1100         (WebInspector.ScriptView):
1101         * inspector/front-end/ScriptsPanel.js:
1102         (WebInspector.ScriptsPanel):
1103         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
1104         * inspector/front-end/SourceFrame.js:
1105         (WebInspector.SourceFrame):
1106         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
1107         (WebInspector.SourceFrame.prototype._doubleClick.didEditLine):
1108         (WebInspector.SourceFrame.prototype._doubleClick):
1109         * inspector/front-end/SourceView.js:
1110         (WebInspector.SourceView):
1111         * inspector/front-end/TextViewer.js:
1112         (WebInspector.TextViewer):
1113         (WebInspector.TextViewer.prototype._handleKeyDown):
1114         (WebInspector.TextViewer.prototype.editLine.finishEditing):
1115         (WebInspector.TextViewer.prototype.editLine):
1116         (WebInspector.TextChunk.prototype._createRow):
1117
1118 2011-01-21  Adam Klein  <adamk@chromium.org>
1119
1120         Reviewed by Eric Seidel.
1121
1122         [chromium] Rename ChromiumBridge to PlatformBridge
1123         https://bugs.webkit.org/show_bug.cgi?id=52471
1124
1125         No tests added as this is a rename; no change in behavior.
1126
1127         * WebCore.gypi:
1128         * bindings/v8/V8DOMWindowShell.cpp:
1129         (WebCore::reportFatalErrorInV8):
1130         * page/PageGroup.cpp:
1131         (WebCore::PageGroup::isLinkVisited):
1132         * platform/android/PlatformBridge.h:
1133         * platform/audio/chromium/AudioBusChromium.cpp:
1134         (WebCore::createBusFromInMemoryAudioFile):
1135         * platform/chromium/ChromiumBridge.h: Removed.
1136         * platform/chromium/ChromiumDataObjectLegacy.cpp:
1137         (WebCore::ChromiumDataObjectLegacy::getData):
1138         * platform/chromium/DragDataChromium.cpp:
1139         (WebCore::DragData::asURL):
1140         * platform/chromium/FileSystemChromium.cpp:
1141         (WebCore::deleteFile):
1142         (WebCore::deleteEmptyDirectory):
1143         (WebCore::getFileSize):
1144         (WebCore::getFileModificationTime):
1145         (WebCore::revealFolderInOS):
1146         (WebCore::directoryName):
1147         (WebCore::pathByAppendingComponent):
1148         (WebCore::makeAllDirectories):
1149         (WebCore::fileExists):
1150         (WebCore::openFile):
1151         (WebCore::closeFile):
1152         (WebCore::seekFile):
1153         (WebCore::truncateFile):
1154         (WebCore::readFromFile):
1155         (WebCore::writeToFile):
1156         * platform/chromium/LanguageChromium.cpp:
1157         (WebCore::platformDefaultLanguage):
1158         * platform/chromium/LinkHashChromium.cpp:
1159         (WebCore::visitedLinkHash):
1160         * platform/chromium/MIMETypeRegistryChromium.cpp:
1161         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
1162         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1163         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
1164         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
1165         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
1166         * platform/chromium/PasteboardChromium.cpp:
1167         (WebCore::Pasteboard::writeSelection):
1168         (WebCore::Pasteboard::writePlainText):
1169         (WebCore::Pasteboard::writeURL):
1170         (WebCore::Pasteboard::writeImage):
1171         (WebCore::Pasteboard::canSmartReplace):
1172         (WebCore::Pasteboard::plainText):
1173         (WebCore::Pasteboard::documentFragment):
1174         * platform/chromium/PlatformBridge.h:
1175         * platform/chromium/PlatformScreenChromium.cpp:
1176         (WebCore::screenDepth):
1177         (WebCore::screenDepthPerComponent):
1178         (WebCore::screenIsMonochrome):
1179         (WebCore::screenRect):
1180         (WebCore::screenAvailableRect):
1181         * platform/chromium/ReadableDataObject.cpp:
1182         (WebCore::ReadableDataObject::getData):
1183         (WebCore::ReadableDataObject::urlTitle):
1184         (WebCore::ReadableDataObject::htmlBaseUrl):
1185         (WebCore::ReadableDataObject::filenames):
1186         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
1187         * platform/chromium/SSLKeyGeneratorChromium.cpp:
1188         (WebCore::signedPublicKeyAndChallengeString):
1189         * platform/chromium/ScrollbarThemeChromium.cpp:
1190         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1191         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
1192         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
1193         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
1194         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
1195         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
1196         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
1197         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1198         (WebCore::scrollbarStateToThemeState):
1199         (WebCore::ScrollbarThemeChromiumMac::paint):
1200         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1201         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
1202         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
1203         (WebCore::ScrollbarThemeChromiumWin::paintButton):
1204         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
1205         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
1206         * platform/chromium/SharedTimerChromium.cpp:
1207         (WebCore::setSharedTimerFiredFunction):
1208         (WebCore::setSharedTimerFireTime):
1209         (WebCore::stopSharedTimer):
1210         * platform/chromium/SuddenTerminationChromium.cpp:
1211         (WebCore::disableSuddenTermination):
1212         (WebCore::enableSuddenTermination):
1213         * platform/chromium/SystemTimeChromium.cpp:
1214         (WebCore::currentTime):
1215         * platform/chromium/WritableDataObject.cpp:
1216         (WebCore::WritableDataObject::setData):
1217         * platform/graphics/chromium/CrossProcessFontLoading.mm:
1218         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1219         (WebCore::fontContainsCharacter):
1220         (WebCore::FillLogFont):
1221         * platform/graphics/chromium/FontCacheLinux.cpp:
1222         (WebCore::FontCache::getFontDataForCharacters):
1223         * platform/graphics/chromium/FontChromiumWin.cpp:
1224         (WebCore::Font::drawGlyphs):
1225         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
1226         (WebCore::FontPlatformData::scriptFontProperties):
1227         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1228         (WebCore::FontPlatformData::querySystemForRenderStyle):
1229         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
1230         (WebCore::fillBMPGlyphs):
1231         * platform/graphics/chromium/ImageChromium.cpp:
1232         (WebCore::Image::loadPlatformResource):
1233         * platform/graphics/chromium/ImageChromiumMac.mm:
1234         (WebCore::Image::loadPlatformResource):
1235         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
1236         (WebCore::SimpleFontData::platformInit):
1237         (WebCore::SimpleFontData::determinePitch):
1238         (WebCore::SimpleFontData::platformWidthForGlyph):
1239         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
1240         (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
1241         * platform/graphics/skia/FontCustomPlatformData.cpp:
1242         (WebCore::FontCustomPlatformData::fontPlatformData):
1243         * platform/network/chromium/CookieJarChromium.cpp:
1244         (WebCore::setCookies):
1245         (WebCore::cookies):
1246         (WebCore::cookieRequestHeaderFieldValue):
1247         (WebCore::cookiesEnabled):
1248         (WebCore::getRawCookies):
1249         (WebCore::deleteCookie):
1250         * platform/network/chromium/DNSChromium.cpp:
1251         (WebCore::prefetchDNS):
1252         * platform/qt/PlatformBridge.h:
1253         * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
1254         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
1255         (WebCore::SQLiteFileSystem::getDatabaseFileSize):
1256         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
1257         (chromiumOpen):
1258         (chromiumDelete):
1259         (chromiumAccess):
1260         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
1261         * plugins/chromium/PluginDataChromium.cpp:
1262         (WebCore::PluginCache::plugins):
1263         * rendering/RenderThemeChromiumMac.mm:
1264         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
1265         * rendering/RenderThemeChromiumSkia.cpp:
1266         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
1267         * rendering/RenderThemeChromiumWin.cpp:
1268         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
1269         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
1270         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
1271         (WebCore::RenderThemeChromiumWin::systemColor):
1272         (WebCore::RenderThemeChromiumWin::paintButton):
1273         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
1274         (WebCore::menuListButtonWidth):
1275         (WebCore::RenderThemeChromiumWin::paintMenuList):
1276         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
1277         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
1278         (WebCore::RenderThemeChromiumWin::paintProgressBar):
1279         * storage/chromium/IDBFactoryBackendInterface.cpp:
1280         (WebCore::IDBFactoryBackendInterface::create):
1281         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
1282         * storage/chromium/IDBKeyPathBackendImpl.cpp:
1283         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
1284
1285 2011-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1286
1287         Unreviewed, rolling out r76335.
1288         http://trac.webkit.org/changeset/76335
1289         https://bugs.webkit.org/show_bug.cgi?id=52875
1290
1291         profiler tests were broken (Requested by loislo on #webkit).
1292
1293         * inspector/InspectorController.cpp:
1294         (WebCore::InspectorController::addProfile):
1295         (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
1296         * inspector/InspectorController.h:
1297         * inspector/InspectorInstrumentation.cpp:
1298         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
1299         * inspector/InspectorInstrumentation.h:
1300         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
1301         (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForPage):
1302         * page/Console.cpp:
1303         (WebCore::Console::profile):
1304         (WebCore::Console::profileEnd):
1305
1306 2011-01-21  Ilya Tikhonovsky  <loislo@chromium.org>
1307
1308         Reviewed by Yury Semikhatsky.
1309
1310         Web Inspector: switch page/Console implementation from InspectorController to InspectorInstrumentation.
1311
1312         There are some places in WebCore where we still using direct InspectorController calls.
1313         The idea is to pass all the Inspector related calls via InspectorInstrumentaion which is the
1314         Inspector facade for WebCore.
1315
1316         https://bugs.webkit.org/show_bug.cgi?id=52869
1317
1318         * inspector/InspectorController.cpp:
1319         * inspector/InspectorController.h:
1320         * inspector/InspectorInstrumentation.cpp:
1321         (WebCore::InspectorInstrumentation::addProfileImpl):
1322         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
1323         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
1324         * inspector/InspectorInstrumentation.h:
1325         (WebCore::InspectorInstrumentation::addProfile):
1326         (WebCore::InspectorInstrumentation::profilerEnabled):
1327         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
1328         * page/Console.cpp:
1329         (WebCore::Console::profile):
1330         (WebCore::Console::profileEnd):
1331
1332 2011-01-20  Sam Weinig  <sam@webkit.org>
1333
1334         Reviewed by Gavin Barraclough.
1335
1336         Fix failing tests from r76291.
1337
1338         * platform/ScrollView.cpp:
1339         (WebCore::ScrollView::scrollPosition):
1340         (WebCore::ScrollView::updateScrollbars):
1341         Take the scroll origin into account in more places.
1342
1343 2011-01-20  Kent Tamura  <tkent@chromium.org>
1344
1345         Unreviewed, sorting an Xcode project file.
1346
1347         * WebCore.xcodeproj/project.pbxproj:
1348
1349 2011-01-20  Ben Vanik  <ben.vanik@gmail.com>
1350
1351         Reviewed by Kenneth Russell.
1352
1353         Implementation of the OES_standard_derivatives WebGL extension.
1354         https://bugs.webkit.org/show_bug.cgi?id=51678
1355
1356         Changes are modeled off of the existing OESTextureFloat extension. New files,
1357         extension retrieval, etc all match the existing code.
1358
1359         Changed ANGLEWebKitBridge to allow for multiple sets of the ANGLE shader compiler
1360         options. This supports the enabling of the standard derivatives flag when the
1361         extension is enabled. Refactored the cleanup code to make the destruction of the
1362         compilers (if they had been created) cleaner.
1363
1364         Tested with the WebGL conformance test:
1365         https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/oes-standard-derivatives.html
1366         Passes on WebKit/OSX, Chromium/OSX, and Chromium/Windows.
1367
1368         * CMakeLists.txt:
1369         * DerivedSources.make:
1370         * GNUmakefile.am:
1371         * WebCore.gypi:
1372         * WebCore.pri:
1373         * WebCore.pro:
1374         * WebCore.xcodeproj/project.pbxproj:
1375         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1376         (WebCore::toJS):
1377         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1378         (WebCore::toV8Object):
1379         * html/canvas/OESStandardDerivatives.cpp: Added.
1380         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
1381         (WebCore::OESStandardDerivatives::~OESStandardDerivatives):
1382         (WebCore::OESStandardDerivatives::getName):
1383         (WebCore::OESStandardDerivatives::create):
1384         * html/canvas/OESStandardDerivatives.h: Added.
1385         * html/canvas/OESStandardDerivatives.idl: Added.
1386         * html/canvas/WebGLExtension.h:
1387         * html/canvas/WebGLRenderingContext.cpp:
1388         (WebCore::WebGLRenderingContext::getExtension): Enable and return the new extension.
1389         (WebCore::WebGLRenderingContext::getParameter): Support extension enum when enabled.
1390         (WebCore::WebGLRenderingContext::getSupportedExtensions): 
1391         (WebCore::WebGLRenderingContext::hint): Validate extension enum when enabled.
1392         (WebCore::WebGLRenderingContext::getNumberOfExtensions):
1393         (WebCore::WebGLRenderingContext::getExtensionNumber):
1394         * html/canvas/WebGLRenderingContext.h:
1395         * platform/graphics/ANGLEWebKitBridge.cpp:
1396         (WebCore::ANGLEWebKitBridge::~ANGLEWebKitBridge): Cleaned up compiler cleanup.
1397         (WebCore::ANGLEWebKitBridge::cleanupCompilers): Destruct compilers.
1398         (WebCore::ANGLEWebKitBridge::setResources): Cleanup existing compilers when changing
1399         ANGLE settings.
1400         (WebCore::ANGLEWebKitBridge::validateShaderSource): Cleaned up compiler cleanup on error.
1401         * platform/graphics/ANGLEWebKitBridge.h:
1402         (WebCore::ANGLEWebKitBridge::getResources):
1403         * platform/graphics/Extensions3D.h: Added enumeration for the extension.
1404         * platform/graphics/GraphicsContext3D.h: lumbing for GraphicsContext3D.
1405         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1406         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Plumbed through a pointer to the
1407         GraphicsContext3D to handle resetting the shader compilers.
1408         (WebCore::Extensions3DOpenGL::supports): Desktop GL always supports this extension,
1409         so always return true.
1410         (WebCore::Extensions3DOpenGL::ensureEnabled): Reset shader compilers as required.
1411         * platform/graphics/opengl/Extensions3DOpenGL.h: Plumbing for GraphicsContext3D.
1412         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1413         (WebCore::GraphicsContext3D::getExtensions): Plumbing for GraphicsContext3D to
1414         Extensions3DOpenGL.
1415
1416 2011-01-20  Xiaomei Ji  <xji@chromium.org>
1417
1418         Reviewed by Dan Bernstein.
1419
1420         Fix regression(r71566): PDF in RTL block might messes up text directionality.
1421         https://bugs.webkit.org/show_bug.cgi?id=52776
1422
1423         Test: fast/dom/52776.html
1424
1425         * platform/text/BidiResolver.h:
1426         (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel):
1427         (WebCore::::lowerExplicitEmbeddingLevel):
1428         (WebCore::::raiseExplicitEmbeddingLevel):
1429         (WebCore::::createBidiRunsForLine):
1430
1431 2011-01-20  Beth Dakin  <bdakin@apple.com>
1432
1433         Reviewed by Anders Carlsson.
1434
1435         Follow-on for <rdar://problem/8890255>
1436
1437         This fixes a painting error with ScrollbarPainter scrollers
1438         and the new drawing area code path.
1439         * platform/mac/ScrollbarThemeMac.mm:
1440         (WebCore::updateArrowPlacement):
1441
1442 2011-01-20  Levi Weintraub  <leviw@chromium.org>
1443
1444         Unreviewed.
1445
1446         Fixing build breakage.
1447
1448         * editing/SelectionController.cpp:
1449         (WebCore::SelectionController::willBeModified):
1450
1451 2011-01-20  Levi Weintraub  <leviw@chromium.org>
1452
1453         Reviewed by Ryosuke Niwa.
1454
1455         RTL: Caret goes to the opposite direction when pressing an arrow key after selection is made
1456         https://bugs.webkit.org/show_bug.cgi?id=49511
1457
1458         Test: editing/selection/rtl-move-selection-right-left.html
1459
1460         * editing/SelectionController.cpp:
1461         (WebCore::SelectionController::willBeModified):
1462         Respecting the direction of the containing block when switching selection base and extent in
1463         RTL content.
1464
1465         (WebCore::SelectionController::modifyMovingRight):
1466         (WebCore::SelectionController::modifyMovingLeft):
1467         Using directionOfEnclosingBlock when deciding to use the selection start or end to do the
1468         correct thing for RTL.
1469
1470 2011-01-20  Nate Chapin  <japhet@chromium.org>
1471
1472         Reviewed by Adam Barth.
1473
1474         Null-check m_frame in DOMWindow::setLocation(), since it's
1475         possible to reach this point without it having been checked
1476         already.
1477         https://bugs.webkit.org/show_bug.cgi?id=52769
1478
1479         Test: fast/dom/Window/Location/set-location-after-close.html
1480
1481         * page/DOMWindow.cpp:
1482         (WebCore::DOMWindow::setLocation):
1483
1484 2011-01-20  Chang Shu  <chang.shu@nokia.com>
1485
1486         Reviewed by Darin Adler.
1487
1488         setContentEditable with invalid string should throw exception.
1489         https://bugs.webkit.org/show_bug.cgi?id=52057
1490
1491         Implemented exception throwing for setContentEditable according to the following spec:
1492         http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#attr-contenteditable
1493         Related quotas: "On setting, if the new value is an ASCII case-insensitive match for the 
1494         string 'inherit' then the content attribute must be removed, if the new value is an ASCII 
1495         case-insensitive match for the string 'true' then the content attribute must be set to the 
1496         string 'true', if the new value is an ASCII case-insensitive match for the string 'false' 
1497         then the content attribute must be set to the string 'false', and otherwise the attribute 
1498         setter must raise a SYNTAX_ERR exception."
1499
1500         * html/HTMLElement.cpp:
1501         (WebCore::HTMLElement::setContentEditable): Throw exception on invalid input strings; Make setting values case-insensitive and also convert them to lower cases according to the spec.
1502         * html/HTMLElement.h: Add additional parameter ExceptionCode& for function setContentEditable.
1503         * html/HTMLElement.idl: Add exception throwing support for contentEditable setter.
1504
1505 2011-01-19  Adrienne Walker  <enne@google.com>
1506
1507         Reviewed by James Robinson.
1508
1509         [chromium] Composited render surfaces should allow writes to alpha channel.
1510         https://bugs.webkit.org/show_bug.cgi?id=52766
1511
1512         Test: LayoutTests/platform/chromium/compositing
1513
1514         * platform/graphics/chromium/LayerRendererChromium.cpp:
1515         (WebCore::LayerRendererChromium::drawLayers):
1516
1517 2011-01-14  Jer Noble  <jer.noble@apple.com>
1518
1519         Reviewed by Eric Carlson.
1520
1521         REGRESSION (r71842): Compass video is not playing in Safari welcome page
1522         https://bugs.webkit.org/show_bug.cgi?id=52506
1523
1524         New test: LayoutTests/media/video-currentTime-delay.html
1525
1526         Call invalidateCachedTime() every time one of the cached property dependencies changes,
1527         i.e. m_paused and m_playbackRate.
1528
1529         * html/HTMLMediaElement.cpp:
1530         (WebCore::HTMLMediaElement::prepareForLoad):
1531         (WebCore::HTMLMediaElement::setReadyState):
1532         (WebCore::HTMLMediaElement::setPlaybackRate):
1533         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
1534
1535 2011-01-20  Beth Dakin  <bdakin@apple.com>
1536
1537         Reviewed by Geoffrey Garen.
1538
1539         Fix for <rdar://problem/8890255>
1540
1541         Allow WebKitSystemInterface to draw scrollbars 
1542         when appropriate.
1543         * WebCore.exp.in:
1544         * platform/mac/ScrollbarThemeMac.mm:
1545         (WebCore::scrollbarMap):
1546         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
1547         (WebCore::ScrollbarThemeMac::registerScrollbar):
1548         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
1549         (WebCore::ScrollbarThemeMac::paint):
1550         * platform/mac/WebCoreSystemInterface.h:
1551         * platform/mac/WebCoreSystemInterface.mm:
1552
1553 2011-01-20  Sam Weinig  <sam@webkit.org>
1554
1555         Reviewed by Dave Hyatt.
1556
1557         Cleanup Scrollbar/ScrollbarClient relationship
1558         https://bugs.webkit.org/show_bug.cgi?id=52779
1559
1560         Pipe all scrolling through the ScrollbarClient/ScrollAnimator
1561         rather than through the Scrollbar. The Scrollbar now is just
1562         a "view" on the scroll position of the scrollable area it is
1563         attached to.
1564
1565         There are now two ways to scroll a scrollable area:
1566         - ScrollbarClient::scroll()
1567         - ScrollbarClient::scrollToOffsetWithoutAnimation()
1568
1569         Both of these go through the ScrollAnimator (updating its state
1570         or starting an animation). The ScrollAnimator, in turn, now calls
1571         ScrollbarClient::setScrollOffsetFromAnimation, which tells the
1572         Scrollbars to pull a new offset (via Scrollbar::offsetDidChange)
1573         and tells the class that derives from ScrollbarClient to scroll
1574         its contents (via ScrollbarClient::setScrollOffset).
1575
1576         * WebCore.xcodeproj/project.pbxproj:
1577         Move Scrollbar.cpp to the right place.
1578
1579         * accessibility/AccessibilityScrollbar.cpp:
1580         (WebCore::AccessibilityScrollbar::setValue):
1581         Initiate the scroll through the scrollbar client, rather than the
1582         scrollbar itself.
1583
1584         * page/FrameView.cpp:
1585         (WebCore::FrameView::scrollTo):
1586         * page/FrameView.h:
1587         Condense the two valueChanged overrides to a single override of the
1588         scrollTo function.
1589
1590         * platform/ScrollAnimator.cpp:
1591         (WebCore::ScrollAnimator::scroll):
1592         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
1593         (WebCore::ScrollAnimator::currentPosition):
1594         (WebCore::ScrollAnimator::notityPositionChanged):
1595         * platform/ScrollAnimator.h:
1596         * platform/ScrollAnimatorWin.cpp:
1597         (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation):
1598         (WebCore::ScrollAnimatorWin::animateScroll):
1599         * platform/ScrollAnimatorWin.h:
1600         * platform/mac/ScrollAnimatorMac.h:
1601         * platform/mac/ScrollAnimatorMac.mm:
1602         (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
1603         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
1604         Change setScrollPositionAndStopAnimation to scrollToOffsetWithoutAnimation
1605         and bottleneck all client notification of changed position through a new
1606         notityPositionChanged() function.
1607
1608         * platform/ScrollView.cpp:
1609         (WebCore::ScrollView::setScrollOffset):
1610         (WebCore::ScrollView::scrollTo):
1611         (WebCore::ScrollView::scrollPosition):
1612         (WebCore::ScrollView::scroll):
1613         (WebCore::ScrollView::updateScrollbars):
1614         (WebCore::ScrollView::wheelEvent):
1615         * platform/ScrollView.h:
1616         (WebCore::ScrollView::horizontalScrollbar):
1617         (WebCore::ScrollView::verticalScrollbar):
1618         Update to scroll via the ScrollbarClient rather than the Scrollbar.
1619
1620         * platform/Scrollbar.cpp:
1621         (WebCore::Scrollbar::offsetDidChange):
1622         (WebCore::Scrollbar::autoscrollPressedPart):
1623         (WebCore::Scrollbar::moveThumb):
1624         (WebCore::Scrollbar::mouseMoved):
1625         * platform/Scrollbar.h:
1626         (WebCore::Scrollbar::setPressedPos):
1627         Change the scrollbar to only updates its offset in response to
1628         an offsetDidChange call.
1629
1630         * platform/ScrollbarClient.cpp:
1631         (WebCore::ScrollbarClient::scroll):
1632         (WebCore::ScrollbarClient::scrollToOffsetWithoutAnimation):
1633         (WebCore::ScrollbarClient::scrollToXOffsetWithoutAnimation):
1634         (WebCore::ScrollbarClient::scrollToYOffsetWithoutAnimation):
1635         (WebCore::ScrollbarClient::setScrollOffsetFromAnimation):
1636         * platform/ScrollbarClient.h:
1637         (WebCore::ScrollbarClient::horizontalScrollbar):
1638         (WebCore::ScrollbarClient::verticalScrollbar):
1639         Make the increasingly misnamed ScrollbarClient responsible for
1640         scrolling.
1641
1642         * platform/efl/ScrollbarEfl.cpp:
1643         (scrollbarEflEdjeMessage):
1644         * platform/gtk/MainFrameScrollbarGtk.cpp:
1645         (MainFrameScrollbarGtk::gtkValueChanged):
1646         * platform/qt/ScrollbarQt.cpp:
1647         (WebCore::Scrollbar::contextMenu):
1648         Update to move scrolling through the client.
1649
1650         * platform/win/PopupMenuWin.cpp:
1651         (WebCore::PopupMenuWin::scrollToRevealSelection):
1652         (WebCore::PopupMenuWin::scrollPosition):
1653         (WebCore::PopupMenuWin::setScrollOffset):
1654         (WebCore::PopupMenuWin::scrollTo):
1655         (WebCore::PopupMenuWin::wndProc):
1656         * platform/win/PopupMenuWin.h:
1657         (WebCore::PopupMenuWin::verticalScrollbar):
1658         * rendering/RenderLayer.cpp:
1659         (WebCore::RenderLayer::scrollToOffset):
1660         (WebCore::RenderLayer::scrollTo):
1661         (WebCore::RenderLayer::setScrollOffset):
1662         (WebCore::RenderLayer::scrollPosition):
1663         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1664         (WebCore::RenderLayer::scroll):
1665         * rendering/RenderLayer.h:
1666         * rendering/RenderListBox.cpp:
1667         (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
1668         (WebCore::RenderListBox::scroll):
1669         (WebCore::RenderListBox::logicalScroll):
1670         (WebCore::RenderListBox::scrollPosition):
1671         (WebCore::RenderListBox::setScrollOffset):
1672         (WebCore::RenderListBox::scrollTo):
1673         (WebCore::RenderListBox::setScrollTop):
1674         * rendering/RenderListBox.h:
1675         (WebCore::RenderListBox::verticalScrollbar):
1676         Update to scroll via the ScrollbarClient rather than the Scrollbar.
1677
1678         * rendering/RenderMarquee.cpp:
1679         (WebCore::RenderMarquee::start):
1680         Simplify initial paint to just do an immediate scroll to the position.
1681
1682 2011-01-20  Patrick Gansterer  <paroga@webkit.org>
1683
1684         Unreviewed WinCE build fix for r76170.
1685
1686         * platform/graphics/wince/FontWinCE.cpp: Added a missing include.
1687         * platform/graphics/wince/ImageBufferData.h: Added a missing include and fixed style.
1688
1689 2011-01-20  James Robinson  <jamesr@chromium.org>
1690
1691         Reviewed by Darin Fisher.
1692
1693         Implement mozilla's requestAnimationFrame API
1694         https://bugs.webkit.org/show_bug.cgi?id=51218
1695
1696         This implements mozilla's proposed requestAnimationFrame API.  The idea with this API is that
1697         an author driving an animation from script could use window.requestAnimationFrame(callback)
1698         instead of window.setTimeout(callback, 0) to schedule their update logic and let the browser
1699         decide when to update the animations.  This avoids doing unnecessary work when the page content
1700         is offscreen or is being displayed at a different framerate than what the page author expects.
1701
1702         Mozilla's proposal is here: https://developer.mozilla.org/en/DOM/window.mozRequestAnimationFrame
1703         This implements window.mozRequestAnimationFrame as window.webkitRequestAnimationFrame with the
1704         following changes:
1705         *) Only the callback syntax is supported, there is no before paint event
1706         *) webkitRequestAnimationFrame supports a second parameter Element to let the author indicate
1707             what content they intend to animate.  That way if the page is being displayed but the element
1708             in question is offscreen, we can avoid invoking the callback.
1709         *) No timestamp is provided to the caller and there is no window.animationStartTime property
1710             (see https://bugs.webkit.org/show_bug.cgi?id=51952 for discussion of this property)
1711         *) window.webkitRequestAnimationFrame returns a numerical id that can be used to cancel the callback
1712             using window.cancelWebkitRequestAnimationFrame, to parallel window.setTimeout()/window.clearTime().
1713
1714         The implementation depends on the embedder scheduling the callbacks since the callback invocation
1715         depends on the page's visibility and the embedder's paint scheduling, neither of which are exposed
1716         to WebCore.  The expectation for the embedder is that at some point Chrome::scheduleAnimation() is
1717         called FrameView::serviceScriptedAnimations() should be called for the associated Page's main frame.
1718         Ideally serviceScriptedAnimations() would be called prior to rendering - although in practice the
1719         embedder has to rate limit callbacks and may not be able to tie the callback directly to the
1720         rendering loop.
1721
1722         Tests: fast/animation/request-animation-frame-cancel.html
1723                fast/animation/request-animation-frame-cancel2.html
1724                fast/animation/request-animation-frame-display.html
1725                fast/animation/request-animation-frame-within-callback.html
1726                fast/animation/request-animation-frame.html
1727
1728         * WebCore.gypi:
1729         * dom/Document.cpp:
1730         (WebCore::Document::Document):
1731         (WebCore::Document::webkitRequestAnimationFrame):
1732         (WebCore::Document::webkitCancelRequestAnimationFrame):
1733         (WebCore::Document::serviceScriptedAnimations):
1734         * dom/Document.h:
1735         * dom/RequestAnimationFrameCallback.h: Added.
1736         (WebCore::RequestAnimationFrameCallback::~RequestAnimationFrameCallback):
1737         * dom/RequestAnimationFrameCallback.idl: Added.
1738         * loader/EmptyClients.h:
1739         (WebCore::EmptyChromeClient::scheduleAnimation):
1740         * page/Chrome.cpp:
1741         (WebCore::Chrome::scheduleAnimation):
1742         * page/Chrome.h:
1743         * page/ChromeClient.h:
1744         * page/DOMWindow.cpp:
1745         (WebCore::DOMWindow::webkitRequestAnimationFrame):
1746         (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
1747         * page/DOMWindow.h:
1748         * page/DOMWindow.idl:
1749         * page/FrameView.cpp:
1750         (WebCore::FrameView::scheduleAnimation):
1751         (WebCore::FrameView::serviceScriptedAnimations):
1752         * page/FrameView.h:
1753         * platform/HostWindow.h:
1754
1755 2011-01-20  James Robinson  <jamesr@chromium.org>
1756
1757         Reviewed by Nate Chapin.
1758
1759         [v8] CodeGeneratorV8 generates incorrect code for callbacks with no parameters
1760         https://bugs.webkit.org/show_bug.cgi?id=52837
1761
1762         When generating code to invoke a callback with no parameters CodeGeneratorV8.pm was generating the following:
1763         v8::Handle<v8::Value> argv[] = {}; which does not compile in visual studio.  Instead, if the argument count
1764         is 0, we can just pass a NULL pointer for the argv parameter.
1765
1766         Test added to bindings/scripts/test/TestCallback.idl and covered by run-bindings-tests.  This
1767         patch also includes some spurious changes to the bindings tests golden files (mostly GObject)
1768         because the old golden files were out of date.
1769
1770         * bindings/scripts/CodeGeneratorV8.pm:
1771         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
1772         (WebDOMTestCallback::callbackWithNoParam):
1773         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
1774         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1775         (webkit_dom_test_callback_callback_with_no_param):
1776         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1777         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1778         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1779         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1780         * bindings/scripts/test/JS/JSTestCallback.cpp:
1781         (WebCore::JSTestCallback::callbackWithNoParam):
1782         * bindings/scripts/test/JS/JSTestCallback.h:
1783         * bindings/scripts/test/JS/JSTestInterface.cpp:
1784         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1785         * bindings/scripts/test/JS/JSTestObj.cpp:
1786         * bindings/scripts/test/ObjC/DOMTestCallback.h:
1787         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1788         (-[DOMTestCallback callbackWithNoParam]):
1789         * bindings/scripts/test/TestCallback.idl:
1790         * bindings/scripts/test/V8/V8TestCallback.cpp:
1791         (WebCore::V8TestCallback::callbackWithNoParam):
1792         * bindings/scripts/test/V8/V8TestCallback.h:
1793         * bindings/scripts/test/V8/V8TestObj.cpp:
1794         (WebCore::TestObjInternal::reflectedUnsignedIntegralAttrAttrGetter):
1795
1796 2011-01-20  James Robinson  <jamesr@chromium.org>
1797
1798         Reviewed by Eric "Baller" Seidel.
1799
1800         RenderTableSection's setNeedsCellRecalc needs to null check table()
1801         https://bugs.webkit.org/show_bug.cgi?id=52770
1802
1803         Null checks table() before deferencing it in RenderTableSection::setNeedsCellRecalc.
1804         This can be null during detach().  Test constructed by Eric Seidel.
1805
1806         Test: fast/css-generated-content/table-with-scrollbar-corner.html
1807
1808         * rendering/RenderTableSection.cpp:
1809         (WebCore::RenderTableSection::setNeedsCellRecalc):
1810         * rendering/RenderTableSection.h:
1811
1812 2011-01-20  Dirk Schulze  <krit@webkit.org>
1813
1814         Reviewed by Rob Buis.
1815
1816         SVG Pattern doesn't take preserveAspectRatio of references Pattern
1817         https://bugs.webkit.org/show_bug.cgi?id=52802
1818
1819         SVGPattern didn't take preserveAspectRatio of a referenced SVGPattern into account. Store preserveAspectRatio
1820         in PatternAttributes as well, if the attribute was set on the referenced SVGPattern element.
1821
1822         Test: svg/custom/pattern-referencing-preserve-aspect-ratio.svg
1823
1824         * rendering/svg/RenderSVGResourcePattern.cpp:
1825         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
1826         * svg/PatternAttributes.h:
1827         (WebCore::PatternAttributes::PatternAttributes):
1828         (WebCore::PatternAttributes::preserveAspectRatio):
1829         (WebCore::PatternAttributes::setPreserveAspectRatio):
1830         (WebCore::PatternAttributes::hasPreserveAspectRatio):
1831         * svg/SVGPatternElement.cpp:
1832         (WebCore::SVGPatternElement::collectPatternAttributes):
1833
1834 2011-01-20  Dan Bernstein  <mitz@apple.com>
1835
1836         Reviewed by Adele Peterson.
1837
1838         <rdar://problem/8765498> REGRESSION (r72141): Cannot order prints with Aperture 3.1
1839
1840         <rdar://problem/8884648> REGRESSION (r72141): Safari hangs when visiting a page on www.bfmtv.com
1841         https://bugs.webkit.org/show_bug.cgi?id=52765
1842
1843         <rdar://problem/8890909> REGRESSION (r72141): Very Slow Rendering With Certain Markup
1844         https://bugs.webkit.org/show_bug.cgi?id=52265
1845
1846         Test: fast/block/line-layout/negative-max-height.html
1847
1848         Integer overflow detection led to a block having a huge height. This manifested as broken layout
1849         in the first bug and as extreme slowness in the latter bugs because of
1850         https://bugs.webkit.org/show_bug.cgi?id=52832
1851
1852         * rendering/RootInlineBox.cpp:
1853         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Clamp maxHeight to 0 so the next line
1854         cannot start above this line. The negative maxHeight also caused the integer overflow detection
1855         logic to give the block a huge height.
1856
1857 2011-01-20  Yi Shen  <yi.4.shen@nokia.com>
1858
1859         Reviewed by Eric Carlson.
1860
1861         Clean up the Media Controls CSS for Qt
1862         https://bugs.webkit.org/show_bug.cgi?id=52822
1863
1864         Split the audio::-webkit-media-xxx and video::-webkit-media-xxx rules 
1865         in mediaControlsQt.css, and remove the duplicate audio::-webkit-media-xxx
1866         rules from mediaControlsQtFullscreen.css.
1867
1868         * css/mediaControlsQt.css:
1869         (audio::-webkit-media-controls-panel):
1870         (video::-webkit-media-controls-panel):
1871         (audio::-webkit-media-controls-mute-button):
1872         (video::-webkit-media-controls-mute-button):
1873         (audio::-webkit-media-controls-play-button):
1874         (video::-webkit-media-controls-play-button):
1875         (audio::-webkit-media-controls-timeline-container):
1876         (video::-webkit-media-controls-timeline-container):
1877         (audio::-webkit-media-controls-current-time-display):
1878         (video::-webkit-media-controls-current-time-display):
1879         (audio::-webkit-media-controls-time-remaining-display):
1880         (video::-webkit-media-controls-time-remaining-display):
1881         (audio::-webkit-media-controls-timeline):
1882         (video::-webkit-media-controls-timeline):
1883         (audio::-webkit-media-controls-volume-slider-container):
1884         (video::-webkit-media-controls-volume-slider-container):
1885         (audio::-webkit-media-controls-volume-slider):
1886         (video::-webkit-media-controls-volume-slider):
1887         (audio::-webkit-media-controls-seek-back-button):
1888         (video::-webkit-media-controls-seek-back-button):
1889         (audio::-webkit-media-controls-seek-forward-button):
1890         (video::-webkit-media-controls-seek-forward-button):
1891         (audio::-webkit-media-controls-fullscreen-button):
1892         (video::-webkit-media-controls-fullscreen-button):
1893         (audio::-webkit-media-controls-rewind-button):
1894         (video::-webkit-media-controls-rewind-button):
1895         (audio::-webkit-media-controls-return-to-realtime-button):
1896         (video::-webkit-media-controls-return-to-realtime-button):
1897         (audio::-webkit-media-controls-toggle-closed-captions-button):
1898         (video::-webkit-media-controls-toggle-closed-captions-button):
1899         * css/mediaControlsQtFullscreen.css:
1900         (video::-webkit-media-controls-time-remaining-display):
1901         (video::-webkit-media-controls-seek-back-button):
1902         (video::-webkit-media-controls-seek-forward-button):
1903         (video::-webkit-media-controls-rewind-button):
1904         (video::-webkit-media-controls-return-to-realtime-button):
1905         (video::-webkit-media-controls-toggle-closed-captions-button):
1906
1907 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
1908
1909         Reviewed by Pavel Feldman.
1910
1911         Web Inspector: [REGRESSION] Canceling of CSS numeric values increment/decrement is broken
1912         https://bugs.webkit.org/show_bug.cgi?id=52816
1913
1914         * inspector/front-end/StylesSidebarPane.js:
1915         (WebInspector.StylePropertyTreeElement.prototype):
1916
1917 2011-01-20  Dawit Alemayehu  <adawit@kde.org>
1918
1919         Reviewed by Andreas Kling.
1920
1921         [Qt] Fix Layering violation in MediaPlayerPrivateQt.
1922         https://bugs.webkit.org/show_bug.cgi?id=52733
1923
1924         No new tests. no behavioral change.
1925
1926        * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1927         (WebCore::MediaPlayerPrivateQt::commitLoad):
1928
1929 2011-01-20  Nate Chapin  <japhet@chromium.org>
1930
1931         Reviewed by Darin Fisher.
1932
1933         [V8] Call malloc and memcpy directly instead of
1934         of strdup in convertV8ObjectToNPVariant() when
1935         converting strings. If there is a null character
1936         in the string, our use of strdup causes us to allocate
1937         too little memory, leading to out of bounds reads.
1938
1939         https://bugs.webkit.org/show_bug.cgi?id=52631
1940
1941         * bindings/v8/V8NPUtils.cpp:
1942         (WebCore::convertV8ObjectToNPVariant):
1943
1944 2011-01-20  Andreas Kling  <kling@webkit.org>
1945
1946         Reviewed by Ariya Hidayat.
1947
1948         [Qt] Fill shadow scratch buffer with proper transparent pixels
1949
1950         QImage::fill() has no Qt::GlobalColor overload in Qt 4.7 (coming in 4.8)
1951         so doing QImage::fill(Qt::transparent) will actually fill all pixels with
1952         the RGBA value 0x00000013.
1953
1954         * platform/graphics/qt/ContextShadowQt.cpp:
1955         (WebCore::ShadowBuffer::scratchImage):
1956
1957 2011-01-19  Adam Roben  <aroben@apple.com>
1958
1959         Remove WKCACFContextFlusher
1960
1961         It wasn't doing anything.
1962
1963         Fixes <http://webkit.org/b/52752> WKCACFContextFlusher is unused
1964
1965         Reviewed by Simon Fraser.
1966
1967         * WebCore.vcproj/WebCore.vcproj: Removed WKCACFContextFlusher. Also let VS have its way with
1968         the file.
1969
1970         * platform/graphics/win/WKCACFContextFlusher.cpp: Removed.
1971         * platform/graphics/win/WKCACFContextFlusher.h: Removed.
1972
1973         * platform/graphics/win/WKCACFLayerRenderer.cpp:
1974         (WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer):
1975         (WebCore::WKCACFLayerRenderer::layerTreeDidChange):
1976         Stop telling WKCACFContextFlusher about our context, since it never did anything with it.
1977
1978 2011-01-19  Adam Roben  <aroben@apple.com>
1979
1980         Only flush our own context when we get resized
1981
1982         Fixes <http://webkit.org/b/52751> All WKCACFContexts with uncommitted
1983         changes get flushed whenever any composited page is resized
1984
1985         Reviewed by Simon Fraser.
1986
1987         * platform/graphics/win/WKCACFLayerRenderer.cpp:
1988         (WebCore::WKCACFLayerRenderer::resize): Just flush our own context, not all contexts
1989         WKCACFContextFlusher knows about. After all, ours is the only one that just got resized!
1990
1991 2011-01-19  Adam Roben  <aroben@apple.com>
1992
1993         Make WKCACFLayerRenderer ref-counted
1994
1995         This will be needed to handle cases where the client might release its reference to us while
1996         we're calling out to it.
1997
1998         WKCACFLayerRenderer now has a setClient function, which is used rather than passing the
1999         client to create(). This allows clients to null out the client pointer when they're done
2000         with the renderer.
2001
2002         Fixes <http://webkit.org/b/52749> WKCACFLayerRenderer should be
2003         ref-counted
2004
2005         Reviewed by Simon Fraser.
2006
2007         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
2008         (WebCore::MediaPlayerPrivateFullscreenWindow::MediaPlayerPrivateFullscreenWindow):
2009         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
2010         Updated for WKCACFLayerRenderer changes.
2011
2012         * platform/graphics/win/WKCACFLayerRenderer.cpp:
2013         (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable): Updated for changes to
2014         create().
2015         (WebCore::WKCACFLayerRenderer::create): No longer takes a WKCACFLayerRendererClient. Now
2016         returns a PassOwnPtr.
2017         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): No longer takes a
2018         WKCACFLayerRendererClient.
2019
2020         * platform/graphics/win/WKCACFLayerRenderer.h: Made WKCACFLayerRenderer inherit from
2021         RefCounted.
2022         (WebCore::WKCACFLayerRenderer::setClient): Added this simple setter.
2023
2024 2011-01-20  Csaba Osztrogonác  <ossy@webkit.org>
2025
2026         [Qt][V8] Unreviewed buildfix after r76248.
2027
2028         * bindings/v8/ScriptCachedFrameData.h: Add missing include.
2029
2030 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
2031
2032         Reviewed by Yury Semikhatsky.
2033
2034         Web Inspector: enable resource agent upon request.
2035         https://bugs.webkit.org/show_bug.cgi?id=52815
2036
2037         We should not send network-related notifications unless front-end
2038         is interested.
2039
2040         * inspector/Inspector.idl:
2041         * inspector/InspectorController.cpp:
2042         (WebCore::InspectorController::restoreInspectorStateFromCookie):
2043         (WebCore::InspectorController::connectFrontend):
2044         (WebCore::InspectorController::resourceAgent):
2045         * inspector/InspectorController.h:
2046         (WebCore::InspectorController::consoleAgent):
2047         (WebCore::InspectorController::cssAgent):
2048         (WebCore::InspectorController::domAgent):
2049         (WebCore::InspectorController::injectedScriptAgent):
2050         (WebCore::InspectorController::runtimeAgent):
2051         (WebCore::InspectorController::databaseAgent):
2052         (WebCore::InspectorController::domStorageAgent):
2053         (WebCore::InspectorController::fileSystemAgent):
2054         * inspector/InspectorInstrumentation.cpp:
2055         (WebCore::InspectorInstrumentation::retrieveResourceAgent):
2056         * inspector/InspectorResourceAgent.cpp:
2057         (WebCore::InspectorResourceAgent::restore):
2058         (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
2059         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
2060         * inspector/InspectorResourceAgent.h:
2061         (WebCore::InspectorResourceAgent::create):
2062         * inspector/InspectorState.cpp:
2063         (WebCore::InspectorState::InspectorState):
2064         * inspector/InspectorState.h:
2065
2066 2011-01-20  Zoltan Horvath  <zoltan@webkit.org>
2067
2068         Reviewed by Csaba Osztrogonác.
2069
2070         Refactoring of the custom allocation framework
2071         https://bugs.webkit.org/show_bug.cgi?id=49897
2072
2073         Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
2074         The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
2075         equivalent macro implementation at the necessary places.
2076
2077 2011-01-20  Mikhail Naganov  <mnaganov@chromium.org>
2078
2079         Reviewed by Pavel Feldman.
2080
2081         Web Inspector: [Chromium] CPU Profiles are cleared when navigating back and forth.
2082
2083         Profiles are now not cleared unless renderer instance was changed.
2084
2085         https://bugs.webkit.org/show_bug.cgi?id=52807
2086
2087         * inspector/InspectorController.cpp:
2088         (WebCore::InspectorController::restoreProfiler):
2089         * inspector/InspectorProfilerAgent.cpp:
2090         (WebCore::InspectorProfilerAgent::resetState):
2091         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
2092         * inspector/InspectorProfilerAgent.h:
2093
2094 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
2095
2096         Unreviewed, add new JS file refs missing from r76116.
2097
2098         * WebCore.gypi:
2099         * WebCore.vcproj/WebCore.vcproj:
2100         * inspector/front-end/WebKit.qrc:
2101
2102 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
2103
2104         Reviewed by Pavel Feldman.
2105
2106         Web Inspector: Crash when adding a rule for an ImageDocument
2107         https://bugs.webkit.org/show_bug.cgi?id=52811
2108
2109         * inspector/InspectorCSSAgent.cpp:
2110         (WebCore::InspectorCSSAgent::addRule2):
2111         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2112
2113 2011-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
2114
2115         Reviewed by Pavel Feldman.
2116
2117         Web Inspector: cleanup InspectorController's friends list.
2118         We have a plan to extract InspectorAgent from InspectorController.
2119         InspectorAgent will be accessible only from InspectorController.
2120         As result we can simply made some methods public and remove long
2121         friends list.
2122
2123         https://bugs.webkit.org/show_bug.cgi?id=52806
2124
2125         * inspector/InjectedScriptHost.cpp:
2126         (WebCore::InjectedScriptHost::databaseForId):
2127         (WebCore::InjectedScriptHost::selectDatabase):
2128         (WebCore::InjectedScriptHost::selectDOMStorage):
2129         (WebCore::InjectedScriptHost::inspectorDOMAgent):
2130         (WebCore::InjectedScriptHost::frontend):
2131         * inspector/InspectorBrowserDebuggerAgent.cpp:
2132         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
2133         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
2134         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
2135         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
2136         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
2137         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
2138         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
2139         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
2140         * inspector/InspectorController.h:
2141         (WebCore::InspectorController::frontend):
2142         * inspector/InspectorInstrumentation.cpp:
2143         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
2144         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
2145         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
2146         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
2147         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
2148         (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
2149         (WebCore::InspectorInstrumentation::characterDataModifiedImpl):
2150         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
2151         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
2152         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
2153         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
2154         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
2155         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
2156         (WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
2157         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
2158         (WebCore::InspectorInstrumentation::retrieveResourceAgent):
2159
2160 2011-01-19  Pavel Podivilov  <podivilov@chromium.org>
2161
2162         Reviewed by Yury Semikhatsky.
2163
2164         Web Inspector: implement JavaScriptBreakpointsSidebarPane based on events from debugger model.
2165         https://bugs.webkit.org/show_bug.cgi?id=52723
2166
2167         Extract all breakpoints-related presentation code from debugger model to JavaScriptBreakpointSidebarPane.
2168
2169         * inspector/front-end/Breakpoint.js:
2170         (WebInspector.Breakpoint):
2171         (WebInspector.Breakpoint.prototype.get data):
2172         (WebInspector.Breakpoint.prototype.remove):
2173         * inspector/front-end/BreakpointsSidebarPane.js:
2174         (WebInspector.JavaScriptBreakpointsSidebarPane):
2175         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded):
2176         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointRemoved):
2177         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointEnableChanged):
2178         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointItemCheckboxClicked):
2179         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenuEventFired):
2180         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._debuggerPaused):
2181         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._debuggerResumed):
2182         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._addListElement):
2183         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._removeListElement):
2184         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._projectChanged):
2185         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compare):
2186         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
2187         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement.didGetSourceLine):
2188         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement):
2189         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointIdForDebuggerPausedEvent):
2190         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setBreakpointEnabled):
2191         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._removeBreakpoint):
2192         (WebInspector.NativeBreakpointsSidebarPane):
2193         (WebInspector.XHRBreakpointsSidebarPane.prototype.addBreakpointItem):
2194         * inspector/front-end/DebuggerModel.js:
2195         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
2196         (WebInspector.DebuggerModel.prototype.breakpointForId):
2197         (WebInspector.DebuggerModel.prototype._pausedScript):
2198         (WebInspector.DebuggerModel.prototype._resumedScript):
2199         * inspector/front-end/ScriptsPanel.js:
2200         (WebInspector.ScriptsPanel):
2201         * inspector/front-end/inspector.js:
2202
2203 2011-01-20  Dirk Schulze  <krit@webkit.org>
2204
2205         Reviewed by Andreas Kling.
2206
2207         SVG Pattern doesn't take the viewBox of a referenced Pattern
2208         https://bugs.webkit.org/show_bug.cgi?id=52804
2209         
2210         SVGPattern element didn't use the viewBox of another SVGPattern element, referenced
2211         by xlink:href. Modified PatternAttributes, to take the value of the viewBox of the
2212         SVGPattern element as well, if the attribute was set.
2213         This gets checked by a W3C SVG test case.        
2214
2215         Test: svg/W3C-SVG-1.1-SE/pservers-pattern-04-f.svg
2216
2217         * rendering/svg/RenderSVGResourcePattern.cpp:
2218         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
2219         * svg/PatternAttributes.h:
2220         (WebCore::PatternAttributes::PatternAttributes):
2221         (WebCore::PatternAttributes::viewBox):
2222         (WebCore::PatternAttributes::setViewBox):
2223         (WebCore::PatternAttributes::hasViewBox):
2224         * svg/SVGPatternElement.cpp:
2225         (WebCore::SVGPatternElement::collectPatternAttributes):
2226
2227 2011-01-19  Stephen White  <senorblanco@chromium.org>
2228
2229         [Re-land of r76159 with a compile fix for the Chromium linux shlib
2230         build.]
2231
2232         Reviewed by James Robinson.
2233
2234         Implement accelerated path drawing and clipping for the Canvas2D GPU
2235         path.
2236         https://bugs.webkit.org/show_bug.cgi?id=52627
2237         
2238         This is done with a simple curve interpolator and the GLU tesselator,
2239         which is good enough for a 3-5X speedup on
2240         http://ie.microsoft.com/testdrive/Performance/Galactic/Default.html.
2241
2242         Covered by canvas/philip/2d.path.clip.basic.html, and many, many more.
2243         All tests canvas/philip and fast/canvas paths pass with no
2244         regressions, although two have minor pixel differences which require
2245         rebaselining.
2246
2247         * WebCore.gyp/WebCore.gyp:
2248         Add internal_glu include path to chromium build.
2249         * WebCore.gypi:
2250         Add internal_glu files to chromium build.
2251         * html/canvas/CanvasRenderingContext2D.cpp:
2252         (WebCore::CanvasRenderingContext2D::reset):
2253         (WebCore::CanvasRenderingContext2D::platformLayer):
2254         Make CanvasRenderingContext2D more robust against failure to create
2255         a DrawingBuffer.
2256         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2257         (WebCore::DrawingBuffer::DrawingBuffer):
2258         As in DrawingBufferMac.cpp, call reset() from the constructor.
2259         Also initialize size to (-1, -1), so reset() doesn't early-out.
2260         Add initializers for depthBuffer and stencilBuffer, and remove
2261         multisampleDepthStencilBuffer.
2262         * platform/graphics/chromium/GLES2Canvas.cpp:
2263         Remove some unused #includes.
2264         (WebCore::GLES2Canvas::State::State):
2265         Add clipping state, and implement save/restore via the copy constructor.
2266         (WebCore::operator*):
2267         (WebCore::Quadratic::Quadratic):
2268         (WebCore::Quadratic::fromBezier):
2269         (WebCore::Quadratic::evaluate):
2270         Quadratic Bezier curve class.
2271         (WebCore::Cubic::Cubic):
2272         (WebCore::Cubic::fromBezier):
2273         (WebCore::Cubic::evaluate):
2274         Cubic Bezier curve class.
2275         (WebCore::GLES2Canvas::clearRect):
2276         Add clipping support to clearRect().
2277         (WebCore::GLES2Canvas::fillPath):
2278         Implement fillPath().
2279         (WebCore::GLES2Canvas::fillRect):
2280         Add clipping support to fillRect().
2281         (WebCore::GLES2Canvas::clipPath):
2282         Implement clipPath().
2283         (WebCore::GLES2Canvas::clipOut):
2284         Stub out clipOut() (not called by Canvas 2D).
2285         (WebCore::GLES2Canvas::restore):
2286         When restoring, draw any remaining clipping paths to the stencil buffer.
2287         (WebCore::GLES2Canvas::drawTexturedRect):
2288         Add clipping support.
2289         (WebCore::interpolateQuadratic):
2290         (WebCore::interpolateCubic):
2291         Simple curve interpolation, using the Cubic and Quadratic classes.
2292         (WebCore::PolygonData::PolygonData):
2293         A struct to hold the tesselation data for callbacks.
2294         (WebCore::beginData):
2295         (WebCore::edgeFlagData):
2296         (WebCore::vertexData):
2297         (WebCore::endData):
2298         (WebCore::combineData):
2299         internal_glu tesselation callbacks.
2300         (WebCore::GLES2Canvas::createVertexBufferFromPath):
2301         Build an interpolated, tesselated vertex buffer and element array buffer from a given path, suitable for filling.
2302         (WebCore::GLES2Canvas::beginStencilDraw):
2303         Enable stencilling, and disable draws to the color buffer.
2304         (WebCore::GLES2Canvas::applyClipping):
2305         If clipping is enabled, set the appropriate GL state.
2306         * platform/graphics/chromium/GLES2Canvas.h:
2307         Document the flavours of drawTexturedRect() a bit, so I don't get confused.
2308         * platform/graphics/gpu/DrawingBuffer.cpp:
2309         (WebCore::DrawingBuffer::clear):
2310         (WebCore::DrawingBuffer::createSecondaryBuffers):
2311         (WebCore::DrawingBuffer::resizeDepthStencil):
2312         (WebCore::DrawingBuffer::reset):
2313         * platform/graphics/gpu/DrawingBuffer.h:
2314         Unify m_multisampleDepthStencilBuffer with m_depthStencilBuffer. 
2315         Implement separate depth and stencil buffers for when
2316         OES_packed_depth_stencil is not available.  Refactor creation of
2317         multisampled and non-multisampled depth and stencil buffers into
2318         resizeDepthStencil().
2319         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2320         (WebCore::SharedGraphicsContext3D::create):
2321         Turn on stencil, turn off depth, turn off antialiasing (for now).
2322         (WebCore::SharedGraphicsContext3D::enableStencil):
2323         * platform/graphics/gpu/SharedGraphicsContext3D.h:
2324         Implement stencil enable/disable.
2325         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
2326         (WebCore::DrawingBuffer::DrawingBuffer):
2327         Remove m_multisampleDepthStencilBuffer.  Set the size to (-1, -1)
2328         on creation, so reset() doesn't early-out.  Initialize m_depthBuffer
2329         and m_stencilBuffer.
2330         * platform/graphics/skia/GraphicsContextSkia.cpp:
2331         (WebCore::GraphicsContext::canvasClip):
2332         (WebCore::GraphicsContext::clipOut):
2333         (WebCore::GraphicsContext::clipPath):
2334         (WebCore::GraphicsContext::fillPath):
2335         Put in GPU hooks for path clipping, and path drawing.
2336         * platform/graphics/skia/PlatformContextSkia.cpp:
2337         (WebCore::PlatformContextSkia::canAccelerate):
2338         Don't check for clipping paths in canAccelerate() (since we can
2339         now accelerate them).
2340         (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
2341         Don't do clipping when uploading software draws to hardware.
2342         * thirdparty/glu/README.webkit:
2343         * thirdparty/glu/gluos.h:
2344         #undef MIN and MAX, to fix warnings-as-errors in Chrome/Mac build.
2345         * thirdparty/glu/libtess/geom.c:
2346         * thirdparty/glu/libtess/priorityq.c:
2347         * thirdparty/glu/libtess/render.c:
2348         Use do{}while(0) instead of if(1)else construct in macro.
2349         * thirdparty/glu/libtess/sweep.c:
2350         (IsWindingInside):
2351         (DoneEdgeDict):
2352         Fix some warnings treated as errors for the Linux Release build.
2353
2354
2355 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
2356
2357         Web Inspector: move releaseObjectGroup to the new Runtime agent.
2358         https://bugs.webkit.org/show_bug.cgi?id=52803
2359         (accedentally landed as r76231)
2360
2361         * inspector/InspectorContorller.h:
2362         * inspector/InspectorContorller.cpp:
2363         * inspector/InspectorRuntimeAgent.h:
2364         * inspector/InspectorRuntimeAgent.cpp:
2365
2366 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
2367
2368         Not reviewed: build fix.
2369
2370         * inspector/InspectorState.h:
2371         (WebCore::InspectorState::setBoolean):
2372         (WebCore::InspectorState::setString):
2373         (WebCore::InspectorState::setLong):
2374
2375 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
2376
2377         Reviewed by Yury Semikhatsky.
2378
2379         Web Inspector: further simplify InspectorState.
2380         https://bugs.webkit.org/show_bug.cgi?id=52731
2381
2382         This change moves XHR logging flag into console agent,
2383         removes InspectorState pushing to the front-end.
2384
2385         * inspector/Inspector.idl:
2386         * inspector/InspectorConsoleAgent.cpp:
2387         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
2388         (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
2389         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2390         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
2391         (WebCore::InspectorConsoleAgent::addConsoleMessage):
2392         * inspector/InspectorConsoleAgent.h:
2393         * inspector/InspectorController.cpp:
2394         (WebCore::InspectorController::InspectorController):
2395         * inspector/InspectorController.h:
2396         (WebCore::InspectorController::state):
2397         (WebCore::InspectorController::settings):
2398         * inspector/InspectorState.cpp:
2399         (WebCore::InspectorState::InspectorState):
2400         (WebCore::InspectorState::registerBoolean):
2401         (WebCore::InspectorState::registerString):
2402         (WebCore::InspectorState::registerLong):
2403         (WebCore::InspectorState::registerObject):
2404         (WebCore::InspectorState::Property::create):
2405         * inspector/InspectorState.h:
2406         * inspector/front-end/ConsoleView.js:
2407         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
2408         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.monitoringXHRStateChanged):
2409         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2410         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
2411         * inspector/front-end/inspector.js:
2412
2413 2011-01-20  Csaba Osztrogonác  <ossy@webkit.org>
2414
2415         Unreviewed buildfix.
2416
2417         [Qt][V8] Remove unnecessary files after r76224.
2418
2419         * WebCore.pro:
2420
2421 2011-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
2422
2423         Reviewed by Yury Semikhatsky.
2424
2425         Web Inspector: prepare for extracting InspectorAgent from InspectorController.
2426         https://bugs.webkit.org/show_bug.cgi?id=52797
2427
2428         * inspector/CodeGeneratorInspector.pm:
2429         * inspector/InspectorController.h:
2430         (WebCore::InspectorController::inspectorAgent):
2431         (WebCore::InspectorController::cssAgent):
2432         (WebCore::InspectorController::injectedScriptAgent):
2433         (WebCore::InspectorController::resourceAgent):
2434         (WebCore::InspectorController::runtimeAgent):
2435         (WebCore::InspectorController::timelineAgent):
2436         (WebCore::InspectorController::databaseAgent):
2437         (WebCore::InspectorController::domStorageAgent):
2438         (WebCore::InspectorController::fileSystemAgent):
2439         (WebCore::InspectorController::browserDebuggerAgent):
2440         (WebCore::InspectorController::debuggerAgent):
2441         (WebCore::InspectorController::profilerAgent):
2442         (WebCore::InspectorController::applicationCacheAgent):
2443
2444 2011-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2445
2446         Unreviewed, rolling out r76215.
2447         http://trac.webkit.org/changeset/76215
2448         https://bugs.webkit.org/show_bug.cgi?id=52799
2449
2450         Caused regressions in Chromium; morrita is going to look at it
2451         tomrorow (Requested by jorlow on #webkit).
2452
2453         * dom/TextEvent.h:
2454         * dom/TextEventInputType.h:
2455         * editing/CompositeEditCommand.cpp:
2456         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
2457         * editing/CompositeEditCommand.h:
2458         * editing/Editor.cpp:
2459         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2460         (WebCore::Editor::confirmComposition):
2461         (WebCore::Editor::setComposition):
2462         * editing/Editor.h:
2463         * editing/InsertTextCommand.cpp:
2464         (WebCore::InsertTextCommand::input):
2465         * editing/InsertTextCommand.h:
2466         * editing/TypingCommand.cpp:
2467         (WebCore::TypingCommand::TypingCommand):
2468         (WebCore::TypingCommand::insertText):
2469         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
2470         * editing/TypingCommand.h:
2471         (WebCore::TypingCommand::create):
2472
2473 2010-12-14  Yury Semikhatsky  <yurys@chromium.org>
2474
2475         Reviewed by Adam Barth.
2476
2477         [V8] Get rid of delayed exception reporting in V8ConsoleMessage.cpp
2478         https://bugs.webkit.org/show_bug.cgi?id=51044
2479
2480         * WebCore.gypi:
2481         * bindings/v8/V8ConsoleMessage.cpp: Removed.
2482         * bindings/v8/V8ConsoleMessage.h: Removed.
2483         * bindings/v8/V8DOMWindowShell.cpp:
2484         (WebCore::v8UncaughtExceptionHandler):
2485         (WebCore::reportUnsafeJavaScriptAccess):
2486         (WebCore::V8DOMWindowShell::initContextIfNeeded):
2487         * bindings/v8/V8Proxy.cpp:
2488         (WebCore::addMessageToConsole):
2489         (WebCore::logInfo):
2490         (WebCore::V8Proxy::reportUnsafeAccessTo):
2491         (WebCore::V8Proxy::runScript):
2492         (WebCore::V8Proxy::callFunction):
2493         (WebCore::V8Proxy::newInstance):
2494         * bindings/v8/V8Proxy.h:
2495         * bindings/v8/WorkerContextExecutionProxy.cpp:
2496         * bindings/v8/specialization/V8BindingState.cpp:
2497         (WebCore::::immediatelyReportUnsafeAccessTo):
2498
2499 2011-01-19  MORITA Hajime  <morrita@google.com>
2500
2501         Reviewed by Eric Seidel.
2502
2503         ShadowElement::m_shadowParent should be removed
2504         https://bugs.webkit.org/show_bug.cgi?id=52558
2505
2506         No new tests. No behavioral change.
2507
2508         * rendering/ShadowElement.h:
2509         (WebCore::ShadowElement::ShadowElement):
2510
2511 2011-01-20  Hans Wennborg  <hans@chromium.org>
2512
2513         Reviewed by Jeremy Orlow.
2514
2515         IndexedDB: IDBObjectStore.get should fire onsuccess rather than onerror
2516         https://bugs.webkit.org/show_bug.cgi?id=52725
2517
2518         Let IDBObjectStore.get() fire the onsuccess handler with the value
2519         'undefined' for when an object does not exist in the store.
2520
2521         Update SerializedScriptValue to provide such an undefined value.
2522
2523         * bindings/v8/SerializedScriptValue.cpp:
2524         (WebCore::SerializedScriptValue::nullValue):
2525         (WebCore::SerializedScriptValue::undefinedValue):
2526         * bindings/v8/SerializedScriptValue.h:
2527         * storage/IDBObjectStoreBackendImpl.cpp:
2528         (WebCore::IDBObjectStoreBackendImpl::getInternal):
2529
2530 2010-12-27  Yury Semikhatsky  <yurys@chromium.org>
2531
2532         Reviewed by Pavel Feldman.
2533
2534         WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown
2535         https://bugs.webkit.org/show_bug.cgi?id=8519
2536
2537         Uncaught exceptions are propagated to window.onerror hander if one is present.
2538         The handler is expected to be a function accepting three arguments: error message,
2539         resource url and line number where the exception occured.
2540
2541         It was decided to dispatch ErrorEvent to all listeners/handlers no matter if they
2542         were created in the same isolated world where the exception occured or not.
2543
2544         Tests: fast/events/window-onerror1.html
2545                fast/events/window-onerror10.html
2546                fast/events/window-onerror11.html
2547                fast/events/window-onerror12.html
2548                fast/events/window-onerror2.html
2549                fast/events/window-onerror3.html
2550                fast/events/window-onerror4.html
2551                fast/events/window-onerror5.html
2552                fast/events/window-onerror6.html
2553                fast/events/window-onerror7.html
2554                fast/events/window-onerror8.html
2555                fast/events/window-onerror9.html
2556                http/tests/security/window-onerror-exception-in-iframe.html
2557                userscripts/window-onerror-for-isolated-world-1.html
2558                userscripts/window-onerror-for-isolated-world-2.html
2559
2560         * Android.jscbindings.mk:
2561         * CMakeLists.txt:
2562         * GNUmakefile.am:
2563         * WebCore.gypi:
2564         * WebCore.order:
2565         * WebCore.pro:
2566         * WebCore.vcproj/WebCore.vcproj:
2567         * WebCore.xcodeproj/project.pbxproj:
2568         * bindings/js/JSBindingsAllInOne.cpp:
2569         * bindings/js/JSDOMBinding.cpp:
2570         (WebCore::reportException):
2571         * bindings/js/JSErrorHandler.cpp: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.cpp.
2572         (WebCore::JSErrorHandler::JSErrorHandler):
2573         (WebCore::JSErrorHandler::~JSErrorHandler):
2574         (WebCore::JSErrorHandler::handleEvent):
2575         * bindings/js/JSErrorHandler.h: Copied from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
2576         (WebCore::JSErrorHandler::create):
2577         (WebCore::createJSErrorHandler):
2578         * bindings/js/JSEventListener.h:
2579         * bindings/scripts/CodeGeneratorJS.pm:
2580         * bindings/scripts/CodeGeneratorV8.pm:
2581         * bindings/v8/V8ConsoleMessage.cpp:
2582         (WebCore::V8ConsoleMessage::dispatchNow):
2583         (WebCore::V8ConsoleMessage::handler): the method was changed to use generic WebCore exception
2584         reporting mechanism which is also used by JSC bindings.
2585         * bindings/v8/V8ConsoleMessage.h:
2586         * bindings/v8/V8EventListener.h:
2587         * bindings/v8/V8WindowErrorHandler.cpp: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
2588         (WebCore::V8WindowErrorHandler::V8WindowErrorHandler):
2589         (WebCore::V8WindowErrorHandler::callListenerFunction):
2590         * bindings/v8/V8WindowErrorHandler.h: Copied from WebCore/dom/ErrorEvent.cpp.
2591         (WebCore::V8WindowErrorHandler::create):
2592         * bindings/v8/WorkerContextExecutionProxy.cpp:
2593         (WebCore::v8MessageHandler):
2594         * bindings/v8/WorkerScriptController.cpp:
2595         (WebCore::WorkerScriptController::evaluate):
2596         * dom/Document.cpp:
2597         (WebCore::Document::errorEventTarget):
2598         (WebCore::Document::logExceptionToConsole):
2599         (WebCore::Document::addMessage):
2600         * dom/Document.h:
2601         * dom/ErrorEvent.cpp:
2602         * dom/ErrorEvent.h:
2603         * dom/Event.cpp:
2604         (WebCore::Event::isErrorEvent):
2605         * dom/Event.h:
2606         * dom/ScriptExecutionContext.cpp:
2607         (WebCore::ScriptExecutionContext::PendingException::PendingException):
2608         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2609         (WebCore::ScriptExecutionContext::reportException): this method is not virtual anymore to
2610         ensure that error event dispatching algorithm is the same in WorkerContext and in Document.
2611         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
2612         * dom/ScriptExecutionContext.h:
2613         * websockets/WebSocket.cpp:
2614         (WebCore::WebSocket::connect):
2615         * websockets/WebSocketChannel.cpp:
2616         (WebCore::WebSocketChannel::didOpen):
2617         (WebCore::WebSocketChannel::didFail):
2618         (WebCore::WebSocketChannel::appendToBuffer):
2619         * websockets/WebSocketHandshake.cpp:
2620         (WebCore::WebSocketHandshake::readServerHandshake):
2621         (WebCore::WebSocketHandshake::readStatusLine):
2622         (WebCore::WebSocketHandshake::readHTTPHeaders):
2623         (WebCore::WebSocketHandshake::checkResponseHeaders):
2624         * workers/DefaultSharedWorkerRepository.cpp:
2625         (WebCore::postExceptionTask):
2626         (WebCore::postConsoleMessageTask):
2627         * workers/WorkerContext.cpp:
2628         (WebCore::WorkerContext::WorkerContext):
2629         (WebCore::WorkerContext::errorEventTarget):
2630         (WebCore::WorkerContext::logExceptionToConsole):
2631         (WebCore::WorkerContext::addMessage):
2632         * workers/WorkerContext.h:
2633         * workers/WorkerMessagingProxy.cpp:
2634         (WebCore::WorkerExceptionTask::performTask):
2635         (WebCore::postConsoleMessageTask):
2636         * xml/XMLHttpRequest.cpp:
2637         (WebCore::reportUnsafeUsage):
2638
2639 2011-01-19  MORITA Hajime  <morrita@google.com>
2640
2641         Reviewed by Ryosuke Niwa.
2642
2643         Space and tab characters "sent" by an input method give totally different results than typing them directly
2644         https://bugs.webkit.org/show_bug.cgi?id=5241
2645         
2646         * Introduced TextEvent::InputTypeComposition and TypingCommand::TextCompositionType to 
2647           distinguish text input which is originated by composition.
2648         * Generalized rebalanceWhitespaceAt() to rebalanceWhitespaceOnTextSubstring() to rebalancing 
2649           range of string on text node, instead of surrounding part of that.
2650
2651         Test: editing/inserting/insert-composition-whitespace.html
2652
2653         * dom/TextEvent.h:
2654         (WebCore::TextEvent::isComposition):
2655         * dom/TextEventInputType.h: Added TextEventInputComposition as a member of TextEvent::InputType
2656         * editing/CompositeEditCommand.cpp:
2657         (WebCore::containsOnlyWhitespace):
2658         (WebCore::CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor):
2659         (WebCore::CompositeEditCommand::canRebalance):
2660         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
2661         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Added: A generalized version of rebalanceWhitespaceAt(), which takes a range inside Text string.
2662         * editing/CompositeEditCommand.h:
2663         * editing/Editor.cpp:
2664         (WebCore::Editor::insertTextForConfirmedComposition): Added.
2665         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2666         (WebCore::Editor::confirmComposition): Now uses insertTextForConfirmedComposition().
2667         (WebCore::Editor::setComposition):
2668         * editing/Editor.h:
2669         * editing/InsertTextCommand.cpp:
2670         (WebCore::InsertTextCommand::input):
2671         * editing/InsertTextCommand.h:
2672         * editing/TypingCommand.cpp:
2673         (WebCore::TypingCommand::TypingCommand):
2674         (WebCore::TypingCommand::insertText):
2675         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
2676         * editing/TypingCommand.h: Added TypingCommand::m_compositionType and TypingCommand::TextCompositionType
2677         (WebCore::TypingCommand::setCompositionType): Added.
2678         (WebCore::TypingCommand::create):
2679
2680 2011-01-19  Dominic Cooney  <dominicc@google.com>
2681
2682         Reviewed by Kent Tamura.
2683
2684         Make <keygen> no longer appear to be a <select> element to script.
2685         https://bugs.webkit.org/show_bug.cgi?id=52557
2686
2687         The intent is to put <keygen> options into shadow DOM. This change
2688         takes the first step by hiding the <select> element from
2689         JavaScript.
2690
2691         Test: fast/dom/HTMLKeygenElement/keygen.html
2692
2693         * CMakeLists.txt: Adds new IDL-derived wrapper.
2694         * DerivedSources.cpp:
2695         * DerivedSources.make:
2696         * GNUmakefile.am:
2697         * WebCore.gypi:
2698         * WebCore.pri:
2699         * WebCore.vcproj/WebCore.vcproj:
2700         * WebCore.xcodeproj/project.pbxproj:
2701         * bindings/gobject/GNUmakefile.am:
2702         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
2703         (WebKit::createKeygenWrapper):
2704         (WebKit::createHTMLElementWrapper):
2705         * bindings/objc/DOM.mm:
2706         (WebCore::createElementClassMap): Keygen no longer DOMHTMLSelectElement
2707         * html/HTMLKeygenElement.h:
2708         (WebCore::HTMLKeygenElement::willValidate): Now public.
2709         * html/HTMLKeygenElement.idl: Added.
2710         * html/HTMLTagNames.in: Keygen's wrapper is HTMLKeygenElement.
2711         * page/DOMWindow.idl: Add HTMLKeygenElement constructor.
2712
2713 2011-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
2714
2715         Unreviewed, rolling out r76203.
2716         http://trac.webkit.org/changeset/76203
2717         https://bugs.webkit.org/show_bug.cgi?id=52784
2718
2719         Broke Win compile on Chromium bots (Requested by dimich on
2720         #webkit).
2721
2722         * WebCore.gypi:
2723         * bindings/v8/V8DOMWindowShell.cpp:
2724         (WebCore::reportFatalErrorInV8):
2725         * page/PageGroup.cpp:
2726         (WebCore::PageGroup::isLinkVisited):
2727         * platform/android/PlatformBridge.h:
2728         * platform/audio/chromium/AudioBusChromium.cpp:
2729         (WebCore::createBusFromInMemoryAudioFile):
2730         * platform/chromium/ChromiumBridge.h: Added.
2731         * platform/chromium/ChromiumDataObjectLegacy.cpp:
2732         (WebCore::ChromiumDataObjectLegacy::getData):
2733         * platform/chromium/DragDataChromium.cpp:
2734         (WebCore::DragData::asURL):
2735         * platform/chromium/FileSystemChromium.cpp:
2736         (WebCore::deleteFile):
2737         (WebCore::deleteEmptyDirectory):
2738         (WebCore::getFileSize):
2739         (WebCore::getFileModificationTime):
2740         (WebCore::revealFolderInOS):
2741         (WebCore::directoryName):
2742         (WebCore::pathByAppendingComponent):
2743         (WebCore::makeAllDirectories):
2744         (WebCore::fileExists):
2745         (WebCore::openFile):
2746         (WebCore::closeFile):
2747         (WebCore::seekFile):
2748         (WebCore::truncateFile):
2749         (WebCore::readFromFile):
2750         (WebCore::writeToFile):
2751         * platform/chromium/LanguageChromium.cpp:
2752         (WebCore::platformDefaultLanguage):
2753         * platform/chromium/LinkHashChromium.cpp:
2754         (WebCore::visitedLinkHash):
2755         * platform/chromium/MIMETypeRegistryChromium.cpp:
2756         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2757         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2758         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2759         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
2760         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
2761         * platform/chromium/PasteboardChromium.cpp:
2762         (WebCore::Pasteboard::writeSelection):
2763         (WebCore::Pasteboard::writePlainText):
2764         (WebCore::Pasteboard::writeURL):
2765         (WebCore::Pasteboard::writeImage):
2766         (WebCore::Pasteboard::canSmartReplace):
2767         (WebCore::Pasteboard::plainText):
2768         (WebCore::Pasteboard::documentFragment):
2769         * platform/chromium/PlatformBridge.h:
2770         * platform/chromium/PlatformScreenChromium.cpp:
2771         (WebCore::screenDepth):
2772         (WebCore::screenDepthPerComponent):
2773         (WebCore::screenIsMonochrome):
2774         (WebCore::screenRect):
2775         (WebCore::screenAvailableRect):
2776         * platform/chromium/ReadableDataObject.cpp:
2777         (WebCore::ReadableDataObject::getData):
2778         (WebCore::ReadableDataObject::urlTitle):
2779         (WebCore::ReadableDataObject::htmlBaseUrl):
2780         (WebCore::ReadableDataObject::filenames):
2781         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
2782         * platform/chromium/SSLKeyGeneratorChromium.cpp:
2783         (WebCore::signedPublicKeyAndChallengeString):
2784         * platform/chromium/ScrollbarThemeChromium.cpp:
2785         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2786         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
2787         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
2788         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
2789         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
2790         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
2791         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
2792         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2793         (WebCore::scrollbarStateToThemeState):
2794         (WebCore::ScrollbarThemeChromiumMac::paint):
2795         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2796         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
2797         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
2798         (WebCore::ScrollbarThemeChromiumWin::paintButton):
2799         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
2800         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
2801         * platform/chromium/SharedTimerChromium.cpp:
2802         (WebCore::setSharedTimerFiredFunction):
2803         (WebCore::setSharedTimerFireTime):
2804         (WebCore::stopSharedTimer):
2805         * platform/chromium/SuddenTerminationChromium.cpp:
2806         (WebCore::disableSuddenTermination):
2807         (WebCore::enableSuddenTermination):
2808         * platform/chromium/SystemTimeChromium.cpp:
2809         (WebCore::currentTime):
2810         * platform/chromium/WritableDataObject.cpp:
2811         (WebCore::WritableDataObject::setData):
2812         * platform/graphics/chromium/CrossProcessFontLoading.mm:
2813         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2814         (WebCore::fontContainsCharacter):
2815         (WebCore::FillLogFont):
2816         * platform/graphics/chromium/FontCacheLinux.cpp:
2817         (WebCore::FontCache::getFontDataForCharacters):
2818         * platform/graphics/chromium/FontChromiumWin.cpp:
2819         (WebCore::Font::drawGlyphs):
2820         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2821         (WebCore::FontPlatformData::scriptFontProperties):
2822         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2823         (WebCore::FontPlatformData::querySystemForRenderStyle):
2824         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
2825         (WebCore::fillBMPGlyphs):
2826         * platform/graphics/chromium/ImageChromium.cpp:
2827         (WebCore::Image::loadPlatformResource):
2828         * platform/graphics/chromium/ImageChromiumMac.mm:
2829         (WebCore::Image::loadPlatformResource):
2830         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
2831         (WebCore::SimpleFontData::platformInit):
2832         (WebCore::SimpleFontData::determinePitch):
2833         (WebCore::SimpleFontData::platformWidthForGlyph):
2834         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
2835         (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
2836         * platform/graphics/skia/FontCustomPlatformData.cpp:
2837         (WebCore::FontCustomPlatformData::fontPlatformData):
2838         * platform/network/chromium/CookieJarChromium.cpp:
2839         (WebCore::setCookies):
2840         (WebCore::cookies):
2841         (WebCore::cookieRequestHeaderFieldValue):
2842         (WebCore::cookiesEnabled):
2843         (WebCore::getRawCookies):
2844         (WebCore::deleteCookie):
2845         * platform/network/chromium/DNSChromium.cpp:
2846         (WebCore::prefetchDNS):
2847         * platform/qt/PlatformBridge.h:
2848         * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
2849         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
2850         (WebCore::SQLiteFileSystem::getDatabaseFileSize):
2851         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
2852         (chromiumOpen):
2853         (chromiumDelete):
2854         (chromiumAccess):
2855         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
2856         * plugins/chromium/PluginDataChromium.cpp:
2857         (WebCore::PluginCache::plugins):
2858         * rendering/RenderThemeChromiumMac.mm:
2859         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
2860         * rendering/RenderThemeChromiumSkia.cpp:
2861         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
2862         * rendering/RenderThemeChromiumWin.cpp:
2863         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
2864         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
2865         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
2866         (WebCore::RenderThemeChromiumWin::systemColor):
2867         (WebCore::RenderThemeChromiumWin::paintButton):
2868         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2869         (WebCore::menuListButtonWidth):
2870         (WebCore::RenderThemeChromiumWin::paintMenuList):
2871         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
2872         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
2873         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2874         * storage/chromium/IDBFactoryBackendInterface.cpp:
2875         (WebCore::IDBFactoryBackendInterface::create):
2876         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
2877         * storage/chromium/IDBKeyPathBackendImpl.cpp:
2878         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
2879
2880 2011-01-19  Helder Correia  <helder@sencha.com>
2881
2882         Reviewed by Andreas Kling.
2883
2884         [Qt] GraphicsContext::strokePath() paints solid shadows with incorrect alpha
2885         https://bugs.webkit.org/show_bug.cgi?id=52705
2886
2887         This is related to bug 52611. The shadow color alpha must be multiplied
2888         by the context pen alpha. Fixing this results in correct behavior for
2889         Canvas path stroke() and strokeRect() [which relies on stroke()].
2890
2891         Tests: fast/canvas/canvas-strokePath-alpha-shadow.html
2892                fast/canvas/canvas-strokeRect-alpha-shadow.html
2893
2894         * platform/graphics/qt/GraphicsContextQt.cpp:
2895         (WebCore::GraphicsContext::strokePath):
2896
2897 2011-01-19  Darin Fisher  <darin@chromium.org>
2898
2899         Reviewed by Mihai Parparita.
2900
2901         Re-initialize the HistoryItem fully when navigating to a HistoryItem,
2902         or replacing a HistoryItem, results in a different URL.
2903
2904         https://bugs.webkit.org/show_bug.cgi?id=49654
2905
2906         This patch also forces all HistoryItems to record the post-redirect
2907         URL.  Previously, frames would remember the pre-redirect URL.  This is
2908         problematic since other members of the HistoryItem correspond to the
2909         post-redirect URL.
2910
2911         Tests: fast/history/history-replace-updates-current-item.html
2912                http/tests/navigation/redirect-on-back-updates-history-item.html
2913                http/tests/navigation/redirect-on-reload-updates-history-item.html
2914
2915         * history/HistoryItem.cpp:
2916         (WebCore::HistoryItem::HistoryItem):
2917         (WebCore::HistoryItem::reset):
2918         * history/HistoryItem.h:
2919         * loader/HistoryController.cpp:
2920         (WebCore::HistoryController::updateForBackForwardNavigation):
2921         (WebCore::HistoryController::updateForReload):
2922         (WebCore::HistoryController::updateForStandardLoad):
2923         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2924         (WebCore::HistoryController::initializeItem):
2925         (WebCore::HistoryController::createItem):
2926         (WebCore::HistoryController::createItemTree):
2927         (WebCore::HistoryController::updateCurrentItem):
2928         * loader/HistoryController.h:
2929
2930 2011-01-19  Adam Klein  <adamk@chromium.org>
2931
2932         Reviewed by Darin Fisher.
2933
2934         [chromium] Rename ChromiumBridge to PlatformBridge
2935         https://bugs.webkit.org/show_bug.cgi?id=52471
2936
2937         No tests added as this is a rename; no change in behavior.
2938
2939         * WebCore.gypi:
2940         * bindings/v8/V8DOMWindowShell.cpp:
2941         (WebCore::reportFatalErrorInV8):
2942         * page/PageGroup.cpp:
2943         (WebCore::PageGroup::isLinkVisited):
2944         * platform/android/PlatformBridge.h:
2945         * platform/audio/chromium/AudioBusChromium.cpp:
2946         (WebCore::createBusFromInMemoryAudioFile):
2947         * platform/chromium/ChromiumBridge.h: Removed.
2948         * platform/chromium/ChromiumDataObjectLegacy.cpp:
2949         (WebCore::ChromiumDataObjectLegacy::getData):
2950         * platform/chromium/DragDataChromium.cpp:
2951         (WebCore::DragData::asURL):
2952         * platform/chromium/FileSystemChromium.cpp:
2953         (WebCore::deleteFile):
2954         (WebCore::deleteEmptyDirectory):
2955         (WebCore::getFileSize):
2956         (WebCore::getFileModificationTime):
2957         (WebCore::revealFolderInOS):
2958         (WebCore::directoryName):
2959         (WebCore::pathByAppendingComponent):
2960         (WebCore::makeAllDirectories):
2961         (WebCore::fileExists):
2962         (WebCore::openFile):
2963         (WebCore::closeFile):
2964         (WebCore::seekFile):
2965         (WebCore::truncateFile):
2966         (WebCore::readFromFile):
2967         (WebCore::writeToFile):
2968         * platform/chromium/LanguageChromium.cpp:
2969         (WebCore::platformDefaultLanguage):
2970         * platform/chromium/LinkHashChromium.cpp:
2971         (WebCore::visitedLinkHash):
2972         * platform/chromium/MIMETypeRegistryChromium.cpp:
2973         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2974         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2975         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2976         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
2977         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
2978         * platform/chromium/PasteboardChromium.cpp:
2979         (WebCore::Pasteboard::writeSelection):
2980         (WebCore::Pasteboard::writePlainText):
2981         (WebCore::Pasteboard::writeURL):
2982         (WebCore::Pasteboard::writeImage):
2983         (WebCore::Pasteboard::canSmartReplace):
2984         (WebCore::Pasteboard::plainText):
2985         (WebCore::Pasteboard::documentFragment):
2986         * platform/chromium/PlatformBridge.h:
2987         * platform/chromium/PlatformScreenChromium.cpp:
2988         (WebCore::screenDepth):
2989         (WebCore::screenDepthPerComponent):
2990         (WebCore::screenIsMonochrome):
2991         (WebCore::screenRect):
2992         (WebCore::screenAvailableRect):
2993         * platform/chromium/ReadableDataObject.cpp:
2994         (WebCore::ReadableDataObject::getData):
2995         (WebCore::ReadableDataObject::urlTitle):
2996         (WebCore::ReadableDataObject::htmlBaseUrl):
2997         (WebCore::ReadableDataObject::filenames):
2998         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
2999         * platform/chromium/SSLKeyGeneratorChromium.cpp:
3000         (WebCore::signedPublicKeyAndChallengeString):
3001         * platform/chromium/ScrollbarThemeChromium.cpp:
3002         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
3003         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
3004         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
3005         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
3006         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
3007         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
3008         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
3009         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3010         (WebCore::scrollbarStateToThemeState):
3011         (WebCore::ScrollbarThemeChromiumMac::paint):
3012         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
3013         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
3014         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
3015         (WebCore::ScrollbarThemeChromiumWin::paintButton):
3016         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
3017         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
3018         * platform/chromium/SharedTimerChromium.cpp:
3019         (WebCore::setSharedTimerFiredFunction):
3020         (WebCore::setSharedTimerFireTime):
3021         (WebCore::stopSharedTimer):
3022         * platform/chromium/SuddenTerminationChromium.cpp:
3023         (WebCore::disableSuddenTermination):
3024         (WebCore::enableSuddenTermination):
3025         * platform/chromium/SystemTimeChromium.cpp:
3026         (WebCore::currentTime):
3027         * platform/chromium/WritableDataObject.cpp:
3028         (WebCore::WritableDataObject::setData):
3029         * platform/graphics/chromium/CrossProcessFontLoading.mm:
3030         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3031         (WebCore::fontContainsCharacter):
3032         (WebCore::FillLogFont):
3033         * platform/graphics/chromium/FontCacheLinux.cpp:
3034         (WebCore::FontCache::getFontDataForCharacters):
3035         * platform/graphics/chromium/FontChromiumWin.cpp:
3036         (WebCore::Font::drawGlyphs):
3037         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
3038         (WebCore::FontPlatformData::scriptFontProperties):
3039         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
3040         (WebCore::FontPlatformData::querySystemForRenderStyle):
3041         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
3042         (WebCore::fillBMPGlyphs):
3043         * platform/graphics/chromium/ImageChromium.cpp:
3044         (WebCore::Image::loadPlatformResource):
3045         * platform/graphics/chromium/ImageChromiumMac.mm:
3046         (WebCore::Image::loadPlatformResource):
3047         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
3048         (WebCore::SimpleFontData::platformInit):
3049         (WebCore::SimpleFontData::determinePitch):
3050         (WebCore::SimpleFontData::platformWidthForGlyph):
3051         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
3052         (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
3053         * platform/graphics/skia/FontCustomPlatformData.cpp:
3054         (WebCore::FontCustomPlatformData::fontPlatformData):
3055         * platform/network/chromium/CookieJarChromium.cpp:
3056         (WebCore::setCookies):
3057         (WebCore::cookies):
3058         (WebCore::cookieRequestHeaderFieldValue):
3059         (WebCore::cookiesEnabled):
3060         (WebCore::getRawCookies):
3061         (WebCore::deleteCookie):
3062         * platform/network/chromium/DNSChromium.cpp:
3063         (WebCore::prefetchDNS):
3064         * platform/qt/PlatformBridge.h:
3065         * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
3066         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
3067         (WebCore::SQLiteFileSystem::getDatabaseFileSize):
3068         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
3069         (chromiumOpen):
3070         (chromiumDelete):
3071         (chromiumAccess):
3072         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
3073         * plugins/chromium/PluginDataChromium.cpp:
3074         (WebCore::PluginCache::plugins):
3075         * rendering/RenderThemeChromiumMac.mm:
3076         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
3077         * rendering/RenderThemeChromiumSkia.cpp:
3078         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
3079         * rendering/RenderThemeChromiumWin.cpp:
3080         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
3081         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
3082         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
3083         (WebCore::RenderThemeChromiumWin::systemColor):
3084         (WebCore::RenderThemeChromiumWin::paintButton):
3085         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
3086         (WebCore::menuListButtonWidth):
3087         (WebCore::RenderThemeChromiumWin::paintMenuList):
3088         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
3089         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
3090         (WebCore::RenderThemeChromiumWin::paintProgressBar):
3091         * storage/chromium/IDBFactoryBackendInterface.cpp:
3092         (WebCore::IDBFactoryBackendInterface::create):
3093         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
3094         * storage/chromium/IDBKeyPathBackendImpl.cpp:
3095         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
3096
3097 2011-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
3098
3099         Unreviewed, rolling out r76187.
3100         http://trac.webkit.org/changeset/76187
3101         https://bugs.webkit.org/show_bug.cgi?id=52778
3102
3103         Broke caret-showing tests on SnowLeopard and Chromium
3104         (Requested by dimich on #webkit).
3105
3106         * rendering/RenderText.cpp:
3107         (WebCore::RenderText::localCaretRect):
3108
3109 2011-01-19  Yuzo Fujishima  <yuzo@google.com>
3110
3111         Reviewed by Kent Tamura.
3112
3113         Fix for Bug 52279 - WebCore::RenderBlock::updateFirstLetter crashes for anonymous blocks
3114         https://bugs.webkit.org/show_bug.cgi?id=52279
3115
3116         In constructing text fragments to handle first-letter rule, first add
3117         the text for the non-first letters and then remove the original text,
3118         rather than the other way around. Otherwise, the text can be added to
3119         an anoymous block that is different from the original one. This breaks
3120         the assumption that a first letter render object has a non-null sibling
3121         for the non-first letters and causes a crash.
3122
3123         Test: fast/css/first-letter-anonymous-block-crash.html
3124
3125         * rendering/RenderBlock.cpp:
3126         (WebCore::RenderBlock::updateFirstLetter):
3127
3128 2011-01-19  James Robinson  <jamesr@chromium.org>
3129
3130         Unreviewed, rolling out r76194.
3131         http://trac.webkit.org/changeset/76194
3132         https://bugs.webkit.org/show_bug.cgi?id=51218
3133
3134         Caused mysterious compile failure on the chromium win
3135         build.webkit.org bots
3136
3137         * WebCore.gypi:
3138         * dom/Document.cpp:
3139         (WebCore::Document::Document):
3140         * dom/Document.h:
3141         * dom/RequestAnimationFrameCallback.h: Removed.
3142         * dom/RequestAnimationFrameCallback.idl: Removed.
3143         * loader/EmptyClients.h:
3144         * page/Chrome.cpp:
3145         * page/Chrome.h:
3146         * page/ChromeClient.h:
3147         * page/DOMWindow.cpp:
3148         * page/DOMWindow.h:
3149         * page/DOMWindow.idl:
3150         * page/FrameView.cpp:
3151         * page/FrameView.h:
3152         * platform/HostWindow.h:
3153
3154 2011-01-19  Simon Fraser  <simon.fraser@apple.com>
3155
3156         Reviewed by Sam Weinig.
3157
3158         GraphicsLayers in subframes can get sync'd multiple times
3159         https://bugs.webkit.org/show_bug.cgi?id=52489
3160
3161         Some cleanup that will work towards fixing this bug.
3162         
3163         Tested by existing iframe compositing tests.
3164
3165         * WebCore.exp.in: syncCompositingStateRecursive()
3166         was renamed to syncCompositingStateIncludingSubframes().
3167
3168         * page/FrameView.h:
3169         * page/FrameView.cpp:
3170         (WebCore::FrameView::syncCompositingStateForThisFrame): Some
3171         code cleanup: do all the word we need to do for this frame,
3172         including the needsLayout() check.
3173         (WebCore::FrameView::syncCompositingStateIncludingSubframes):
3174         This is no longer recursive; instead, it iterates over descendant
3175         frames via the frame tree, calling syncCompositingStateForThisFrame()
3176         on each Frame's view.
3177
3178         * rendering/RenderLayerCompositor.h:
3179         (WebCore::RenderLayerCompositor::isFlushingLayers): Getter for the flag.
3180         * rendering/RenderLayerCompositor.cpp: 
3181         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
3182         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Maintain
3183         a flag to say if we're flushing, which allows us to assert on re-entrant flushes.
3184         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
3185         Add the ability to get the rootmost compositor that is in the middle
3186         of a flush.
3187
3188 2011-01-19  James Robinson  <jamesr@chromium.org>
3189
3190         Reviewed by Darin Fisher.
3191
3192         Implement mozilla's requestAnimationFrame API
3193         https://bugs.webkit.org/show_bug.cgi?id=51218
3194
3195         This implements mozilla's proposed requestAnimationFrame API.  The idea with this API is that
3196         an author driving an animation from script could use window.requestAnimationFrame(callback)
3197         instead of window.setTimeout(callback, 0) to schedule their update logic and let the browser
3198         decide when to update the animations.  This avoids doing unnecessary work when the page content
3199         is offscreen or is being displayed at a different framerate than what the page author expects.
3200
3201         Mozilla's proposal is here: https://developer.mozilla.org/en/DOM/window.mozRequestAnimationFrame
3202         This implements window.mozRequestAnimationFrame as window.webkitRequestAnimationFrame with the
3203         following changes:
3204         *) Only the callback syntax is supported, there is no before paint event
3205         *) webkitRequestAnimationFrame supports a second parameter Element to let the author indicate
3206             what content they intend to animate.  That way if the page is being displayed but the element
3207             in question is offscreen, we can avoid invoking the callback.
3208         *) No timestamp is provided to the caller and there is no window.animationStartTime property
3209             (see https://bugs.webkit.org/show_bug.cgi?id=51952 for discussion of this property)
3210         *) window.webkitRequestAnimationFrame returns a numerical id that can be used to cancel the callback
3211             using window.cancelWebkitRequestAnimationFrame, to parallel window.setTimeout()/window.clearTime().
3212
3213         The implementation depends on the embedder scheduling the callbacks since the callback invocation
3214         depends on the page's visibility and the embedder's paint scheduling, neither of which are exposed
3215         to WebCore.  The expectation for the embedder is that at some point Chrome::scheduleAnimation() is
3216         called FrameView::serviceScriptedAnimations() should be called for the associated Page's main frame.
3217         Ideally serviceScriptedAnimations() would be called prior to rendering - although in practice the
3218         embedder has to rate limit callbacks and may not be able to tie the callback directly to the
3219         rendering loop.
3220
3221         Tests: fast/animation/request-animation-frame-cancel.html
3222                fast/animation/request-animation-frame-cancel2.html
3223                fast/animation/request-animation-frame-display.html
3224                fast/animation/request-animation-frame-within-callback.html
3225                fast/animation/request-animation-frame.html
3226
3227         * WebCore.gypi:
3228         * dom/Document.cpp:
3229         (WebCore::Document::Document):
3230         (WebCore::Document::webkitRequestAnimationFrame):
3231         (WebCore::Document::webkitCancelRequestAnimationFrame):
3232         (WebCore::Document::serviceScriptedAnimations):
3233         * dom/Document.h:
3234         * dom/RequestAnimationFrameCallback.h: Added.
3235         (WebCore::RequestAnimationFrameCallback::~RequestAnimationFrameCallback):
3236         * dom/RequestAnimationFrameCallback.idl: Added.
3237         * loader/EmptyClients.h:
3238         (WebCore::EmptyChromeClient::scheduleAnimation):
3239         * page/Chrome.cpp:
3240         (WebCore::Chrome::scheduleAnimation):
3241         * page/Chrome.h:
3242         * page/ChromeClient.h:
3243         * page/DOMWindow.cpp:
3244         (WebCore::DOMWindow::webkitRequestAnimationFrame):
3245         (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
3246         * page/DOMWindow.h:
3247         * page/DOMWindow.idl:
3248         * page/FrameView.cpp:
3249         (WebCore::FrameView::scheduleAnimation):
3250         (WebCore::FrameView::serviceScriptedAnimations):
3251         * page/FrameView.h:
3252         * platform/HostWindow.h:
3253
3254 2011-01-13  Martin Robinson  <mrobinson@igalia.com>
3255
3256         Reviewed by Daniel Bates.
3257
3258         [GTK] Move progress bar painting out of gtk2drawing.c
3259         https://bugs.webkit.org/show_bug.cgi?id=52385
3260
3261         Move progress bar painting to RenderThemeGtk2 and share some animation
3262         logic between the GTK+ 2.x and GTK+ 3.x port.
3263
3264         No new tests. This should not change functionality.
3265
3266         * platform/gtk/RenderThemeGtk.cpp:
3267         (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar): Moved from RenderThemeGtk3.
3268         (WebCore::RenderThemeGtk::animationDurationForProgressBar): Ditto.
3269         (WebCore::RenderThemeGtk::calculateProgressRect): Calculate the proper rectangle for the
3270         progress indicator given the rect for the maximum size of the indicator.
3271         * platform/gtk/RenderThemeGtk.h: Added calculateProgressRect declaration and
3272         a new widget member for GTK+ 2.x
3273         * platform/gtk/RenderThemeGtk2.cpp:
3274         (WebCore::RenderThemeGtk::platformInit): Added initialization for the new widget member.
3275         (WebCore::RenderThemeGtk::paintProgressBar): Paint the progress bar manually instead of
3276         calling the old Mozilla code.
3277         (WebCore::RenderThemeGtk::gtkProgressBar): Added.
3278         * platform/gtk/RenderThemeGtk3.cpp:
3279         (WebCore::RenderThemeGtk::paintProgressBar): Call calculateProgressRect now to get
3280         the area of the progress indicator.
3281         * platform/gtk/gtk2drawing.c: Remove unused code.
3282         (moz_gtk_get_widget_border):
3283         (moz_gtk_widget_paint):
3284         * platform/gtk/gtkdrawing.h: Ditto.
3285
3286 2011-01-19  Dmitry Titov  <dimich@chromium.org>
3287
3288         [Chromium] Not reviewed, reverts the following changes:
3289         http://trac.webkit.org/changeset/76164 (build fix)
3290         http://trac.webkit.org/changeset/76159 (main change)
3291
3292         The change broke Chromium Linux-shlib build.
3293
3294         Original issue:
3295         Accelerated canvas2D has bad clipping performance.
3296         https://bugs.webkit.org/show_bug.cgi?id=52627
3297
3298         * WebCore.gyp/WebCore.gyp:
3299         * WebCore.gypi:
3300         * html/canvas/CanvasRenderingContext2D.cpp:
3301         (WebCore::CanvasRenderingContext2D::reset):
3302         (WebCore::CanvasRenderingContext2D::platformLayer):
3303         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3304         (WebCore::DrawingBuffer::DrawingBuffer):
3305         * platform/graphics/chromium/GLES2Canvas.cpp:
3306         (WebCore::GLES2Canvas::State::State):
3307         (WebCore::GLES2Canvas::clearRect):
3308         (WebCore::GLES2Canvas::fillRect):
3309         (WebCore::GLES2Canvas::restore):
3310         (WebCore::GLES2Canvas::drawTexturedRect):
3311         * platform/graphics/chromium/GLES2Canvas.h:
3312         * platform/graphics/gpu/DrawingBuffer.cpp:
3313         (WebCore::DrawingBuffer::clear):
3314         (WebCore::DrawingBuffer::createSecondaryBuffers):
3315         (WebCore::DrawingBuffer::reset):
3316         * platform/graphics/gpu/DrawingBuffer.h:
3317         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
3318         (WebCore::SharedGraphicsContext3D::create):
3319         * platform/graphics/gpu/SharedGraphicsContext3D.h:
3320         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
3321         (WebCore::DrawingBuffer::DrawingBuffer):
3322         * platform/graphics/skia/GraphicsContextSkia.cpp:
3323         (WebCore::GraphicsContext::canvasClip):
3324         (WebCore::GraphicsContext::clipOut):
3325         (WebCore::GraphicsContext::clipPath):
3326         (WebCore::GraphicsContext::fillPath):
3327         * platform/graphics/skia/PlatformContextSkia.cpp:
3328         (WebCore::PlatformContextSkia::canAccelerate):
3329         (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
3330         * thirdparty/glu/README.webkit:
3331         * thirdparty/glu/gluos.h:
3332         * thirdparty/glu/libtess/geom.c:
3333         * thirdparty/glu/libtess/priorityq.c:
3334         * thirdparty/glu/libtess/render.c:
3335         * thirdparty/glu/libtess/sweep.c:
3336         (IsWindingInside):
3337         (DoneEdgeDict):
3338
3339 2011-01-19  Levi Weintraub  <leviw@google.com>
3340
3341         Reviewed by Darin Adler.
3342
3343         Re-committing this with the proper expected results.
3344
3345         Changing RenderText::localCaretRect to clip to its containing block's logicalLeft and
3346         logicalRightLayoutOverflow instead of simply using logicalLeft and logicalRight, as this
3347         resulted in the caret being placed incorrectly in overflowing editable IFrame content.
3348
3349         Long lines in non-white-space-pre editable documents show cursor in wrong place
3350         https://bugs.webkit.org/show_bug.cgi?id=48132
3351
3352         Test: editing/selection/caret-painting-in-overflowing-autowrap-content.html
3353
3354         * rendering/RenderText.cpp:
3355         (WebCore::RenderText::localCaretRect):
3356
3357 2011-01-18 MORITA Hajime <morrita@google.com>
3358
3359         Reviewed by David Levin.
3360
3361         ElementRareData::m_shadowRoot should not be RefPtr.
3362         https://bugs.webkit.org/show_bug.cgi?id=51914
3363
3364         Makes ElementRareData::m_shadowRoot a raw pointer because
3365         ElementRareData::m_shadowRoot should be like a
3366         ContaineNode::m_firstChild, which is also a raw pointer.
3367         pointer. Which also means that both the shadow root and the shadow
3368         host reference each other as a parent-and-child relationship, via
3369         a raw pointer.
3370         
3371         Note that it is safe not to manipulate the ref-count of
3372         m_shadowRoot because Node::m_parent of the shadow root points its
3373         shadow host, and the object isn't deleted even if the refcount is
3374         zero, as long as the node has non-null m_parent. (See TreeShared.)
3375         
3376         The shadow root node is finally destroyed inside
3377         removeShadowRoot(), where we store the root node into a local
3378         RefPtr, then make the node's m_parent null, which results the
3379         destroy the node, at the end of the function, by RefPtr::~RefPtr.
3380         
3381         No new tests. No behavioral change.
3382
3383         * dom/Element.cpp:
3384         (WebCore::Element::~Element):
3385         (WebCore::Element::shadowRoot):
3386         (WebCore::Element::setShadowRoot):
3387         (WebCore::Element::removeShadowRoot):
3388         * dom/ElementRareData.h:
3389         (WebCore::ElementRareData::ElementRareData):
3390         (WebCore::ElementRareData::~ElementRareData):
3391
3392 2011-01-12  Martin Robinson  <mrobinson@igalia.com>
3393
3394         Reviewed by Gustavo Noronha Silva.
3395
3396         [GTK] Move text field painting out of gtk2drawing.c
3397         https://bugs.webkit.org/show_bug.cgi?id=52327
3398
3399         No new tests. This should not change behavior.
3400
3401         * platform/gtk/RenderThemeGtk2.cpp:
3402         (WebCore::RenderThemeGtk::paintButton): Use the setWidgetHasFocus helper.
3403         (WebCore::RenderThemeGtk::paintTextField): Do this manually now instead
3404         of calling into the Mozilla code.
3405         * platform/gtk/WidgetRenderingContext.cpp: Added a couple more wrappers
3406         for GTK+ theme functions.
3407         (WebCore::WidgetRenderingContext::gtkPaintFlatBox):
3408         (WebCore::WidgetRenderingContext::gtkPaintShadow):
3409         * platform/gtk/WidgetRenderingContext.h: Added new method declarations.
3410         * platform/gtk/gtk2drawing.c: Remove unused code.
3411         (moz_gtk_get_widget_border):
3412         (moz_gtk_widget_paint):
3413         * platform/gtk/gtkdrawing.h:
3414
3415 2011-01-19  Antti Koivisto  <antti@apple.com>
3416
3417         Reviewed by Oliver Hunt.
3418
3419         Cache function offsets to speed up javascript parsing
3420         https://bugs.webkit.org/show_bug.cgi?id=52622
3421         
3422         Use cache to save function offsets and some other info.
3423         This avoids quite a bit of work when reparsing the source.
3424
3425         * bindings/js/CachedScriptSourceProvider.h:
3426         (WebCore::CachedScriptSourceProvider::cache):
3427         (WebCore::CachedScriptSourceProvider::cacheSizeChanged):
3428         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
3429         * bindings/js/ScriptSourceProvider.h:
3430         (WebCore::ScriptSourceProvider::ScriptSourceProvider):
3431         * loader/cache/CachedScript.cpp:
3432         (WebCore::CachedScript::destroyDecodedData):
3433         (WebCore::CachedScript::sourceProviderCache):
3434         (WebCore::CachedScript::sourceProviderCacheSizeChanged):
3435         * loader/cache/CachedScript.h:
3436
3437 2011-01-11  Martin Robinson  <mrobinson@igalia.com>
3438
3439         Reviewed by Gustavo Noronha Silva.
3440
3441         [GTK] Move toggle button rendering out of gtk2drawing.c
3442         https://bugs.webkit.org/show_bug.cgi?id=52258
3443
3444         * platform/gtk/RenderThemeGtk.h:
3445         * platform/gtk/RenderThemeGtk2.cpp:
3446         (WebCore::RenderThemeGtk::platformInit): Initialize new button members.
3447         (WebCore::adjustRectForFocus): Added this function which inflates a rect based
3448         on a widget's exterior focus.
3449         (WebCore::RenderThemeGtk::adjustRepaintRect): Account for exterior focus.
3450         (WebCore::setToggleSize): Only listen to indicator-size to properly size
3451         checkboxes and radio buttons.
3452         (WebCore::RenderThemeGtk::setCheckboxSize): Call new setToggleSize properly.
3453         (WebCore::paintToggle): Added.
3454         (WebCore::RenderThemeGtk::paintCheckbox): Call paintToggle.
3455         (WebCore::RenderThemeGtk::setRadioSize): Call new setToggleSize properly.
3456         (WebCore::RenderThemeGtk::paintRadio): Call paintToggle.
3457         (WebCore::RenderThemeGtk::gtkRadioButton): Added.
3458         (WebCore::RenderThemeGtk::gtkCheckButton): Added.
3459         * platform/gtk/WidgetRenderingContext.cpp:
3460         (WebCore::WidgetRenderingContext::WidgetRenderingContext): Use a static extra space
3461         variable. This is good enough for all themes that I've tested and prevents having to
3462         pass information from RenderThemeGtk about every single type of widget.
3463         (WebCore::WidgetRenderingContext::gtkPaintFocus): Use the paintRect
3464         to draw instead of m_paintRect. This is important when we're painting
3465         something that isn't the size of the total rect.
3466         (WebCore::WidgetRenderingContext::gtkPaintCheck): Added.
3467         (WebCore::WidgetRenderingContext::gtkPaintOption): Added.
3468         * platform/gtk/WidgetRenderingContext.h: Updated to reflect new methods.
3469         * platform/gtk/gtkdrawing.h: Remove newly unused code.
3470         * platform/gtk/gtk2drawing.c: Ditto.
3471
3472 2011-01-19  Tony Gentilcore  <tonyg@chromium.org>
3473
3474         Unreviewed build fix.
3475
3476         Build fix for r76170
3477         https://bugs.webkit.org/show_bug.cgi?id=52758
3478
3479         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
3480
3481 2011-01-19  David D. Kilzer  <ddkilzer@apple.com>
3482
3483         <http://webkit.org/b/52687> Clean up FrameLoader methods for PLUGIN_PROXY_FOR_VIDEO
3484
3485         Reviewed by Eric Carlson.
3486
3487         * loader/FrameLoader.cpp: Declare the methods here.
3488         (WebCore::FrameLoader::hideMediaPlayerProxyPlugin):
3489         (WebCore::FrameLoader::showMediaPlayerProxyPlugin):
3490         * loader/FrameLoader.cpp: Moved methods to here...
3491         (WebCore::FrameLoader::hideMediaPlayerProxyPlugin):
3492         (WebCore::FrameLoader::showMediaPlayerProxyPlugin):
3493         * loader/SubframeLoader.cpp: ...from here.
3494         (WebCore::FrameLoader::hideMediaPlayerProxyPlugin):
3495         (WebCore::FrameLoader::showMediaPlayerProxyPlugin):
3496
3497 2011-01-19  Tony Gentilcore  <tonyg@chromium.org>
3498
3499         Reviewed by Mihai Parparita.
3500
3501         Perform some forward declaration
3502         https://bugs.webkit.org/show_bug.cgi?id=52522
3503
3504         No new tests because no new functionality.
3505
3506         * accessibility/AccessibilityObject.h:
3507         * css/WebKitCSSMatrix.cpp:
3508         * html/HTMLAreaElement.cpp:
3509         * html/canvas/CanvasRenderingContext2D.cpp:
3510         * inspector/InspectorController.cpp:
3511         * platform/graphics/FloatPoint.cpp:
3512         * platform/graphics/Font.cpp:
3513         * platform/graphics/Font.h:
3514         * platform/graphics/FontFastPath.cpp:
3515         * platform/graphics/GraphicsContext.cpp:
3516         * platform/graphics/ImageBuffer.h:
3517         * platform/graphics/StringTruncator.cpp:
3518         * platform/graphics/WidthIterator.cpp:
3519         * platform/graphics/mac/ComplexTextController.cpp:
3520         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
3521         * platform/graphics/mac/FontComplexTextMac.cpp:
3522         * platform/graphics/transforms/TransformationMatrix.cpp:
3523         * platform/graphics/transforms/TransformationMatrix.h:
3524         * rendering/EllipsisBox.cpp:
3525         * rendering/InlineTextBox.cpp:
3526         * rendering/RenderBlock.cpp:
3527         * rendering/RenderBlockLineLayout.cpp:
3528         * rendering/RenderEmbeddedObject.cpp:
3529         * rendering/RenderFileUploadControl.cpp:
3530         * rendering/RenderFlexibleBox.cpp:
3531         * rendering/RenderImage.cpp:
3532         * rendering/RenderListBox.cpp:
3533         * rendering/RenderListMarker.cpp:
3534         * rendering/RenderMenuList.cpp:
3535         * rendering/RenderObject.h:
3536         * rendering/RenderText.cpp:
3537         * rendering/RenderTextControl.cpp:
3538         * rendering/svg/SVGInlineTextBox.cpp:
3539         * rendering/svg/SVGMarkerLayoutInfo.h:
3540         * rendering/svg/SVGTextMetrics.cpp:
3541         * svg/SVGFont.cpp:
3542
3543 2011-01-19  Adrienne Walker  <enne@google.com>
3544
3545         Reviewed by Kenneth Russell.
3546
3547         [chromium] Tiled compositor should use texture manager
3548         https://bugs.webkit.org/show_bug.cgi?id=52418
3549
3550         Test: compositing/
3551
3552         * platform/graphics/chromium/LayerRendererChromium.cpp:
3553         (WebCore::LayerRendererChromium::~LayerRendererChromium):
3554         (WebCore::LayerRendererChromium::cleanupSharedObjects):
3555         * platform/graphics/chromium/LayerTilerChromium.cpp:
3556         (WebCore::LayerTilerChromium::LayerTilerChromium):
3557         (WebCore::LayerTilerChromium::reset):
3558         (WebCore::LayerTilerChromium::createTile):
3559         (WebCore::LayerTilerChromium::update):
3560         (WebCore::LayerTilerChromium::draw):
3561         * platform/graphics/chromium/LayerTilerChromium.h:
3562         (WebCore::LayerTilerChromium::Tile::Tile):
3563         (WebCore::LayerTilerChromium::Tile::texture):
3564
3565 2011-01-19  Stephen White  <senorblanco@chromium.org>
3566
3567         Unreviewed; build fix for chromium.
3568
3569         * platform/graphics/chromium/GLES2Canvas.cpp:
3570         (WebCore::GLES2Canvas::fillPath):
3571
3572 2011-01-18  Stephen White  <senorblanco@chromium.org>
3573
3574         Reviewed by James Robinson.
3575
3576         Implement accelerated path drawing and clipping for the Canvas2D GPU
3577         path.
3578         https://bugs.webkit.org/show_bug.cgi?id=52627
3579         
3580         This is done with a simple curve interpolator and the GLU tesselator,
3581         which is good enough for a 3-5X speedup on
3582         http://ie.microsoft.com/testdrive/Performance/Galactic/Default.html.
3583
3584         Covered by canvas/philip/2d.path.clip.basic.html, and many, many more.
3585         All tests canvas/philip and fast/canvas paths pass with no
3586         regressions, although two have minor pixel differences which require
3587         rebaselining.
3588
3589         * WebCore.gyp/WebCore.gyp:
3590         Add internal_glu include path to chromium build.
3591         * WebCore.gypi:
3592         Add internal_glu files to chromium build.
3593         * html/canvas/CanvasRenderingContext2D.cpp:
3594         (WebCore::CanvasRenderingContext2D::reset):
3595         (WebCore::CanvasRenderingContext2D::platformLayer):
3596         Make CanvasRenderingContext2D more robust against failure to create
3597         a DrawingBuffer.
3598         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3599         (WebCore::DrawingBuffer::DrawingBuffer):
3600         As in DrawingBufferMac.cpp, call reset() from the constructor.
3601         Also initialize size to (-1, -1), so reset() doesn't early-out.
3602         Add initializers for depthBuffer and stencilBuffer, and remove
3603         multisampleDepthStencilBuffer.
3604         * platform/graphics/chromium/GLES2Canvas.cpp:
3605         Remove some unused #includes.
3606         (WebCore::GLES2Canvas::State::State):
3607         Add clipping state, and implement save/restore via the copy constructor.
3608         (WebCore::operator*):
3609         (WebCore::Quadratic::Quadratic):
3610         (WebCore::Quadratic::fromBezier):
3611         (WebCore::Quadratic::evaluate):
3612         Quadratic Bezier curve class.
3613         (WebCore::Cubic::Cubic):
3614         (WebCore::Cubic::fromBezier):
3615         (WebCore::Cubic::evaluate):
3616         Cubic Bezier curve class.
3617         (WebCore::GLES2Canvas::clearRect):
3618         Add clipping support to clearRect().
3619         (WebCore::GLES2Canvas::fillPath):
3620         Implement fillPath().
3621         (WebCore::GLES2Canvas::fillRect):
3622         Add clipping support to fillRect().
3623         (WebCore::GLES2Canvas::clipPath):
3624         Implement clipPath().
3625         (WebCore::GLES2Canvas::clipOut):
3626         Stub out clipOut() (not called by Canvas 2D).
3627         (WebCore::GLES2Canvas::restore):
3628         When restoring, draw any remaining clipping paths to the stencil buffer.
3629         (WebCore::GLES2Canvas::drawTexturedRect):
3630         Add clipping support.
3631         (WebCore::interpolateQuadratic):
3632         (WebCore::interpolateCubic):
3633         Simple curve interpolation, using the Cubic and Quadratic classes.
3634         (WebCore::PolygonData::PolygonData):
3635         A struct to hold the tesselation data for callbacks.
3636         (WebCore::beginData):
3637         (WebCore::edgeFlagData):
3638         (WebCore::vertexData):
3639         (WebCore::endData):
3640         (WebCore::combineData):
3641         internal_glu tesselation callbacks.
3642         (WebCore::GLES2Canvas::createVertexBufferFromPath):
3643         Build an interpolated, tesselated vertex buffer and element array buffer from a given path, suitable for filling.
3644         (WebCore::GLES2Canvas::beginStencilDraw):
3645         Enable stencilling, and disable draws to the color buffer.
3646         (WebCore::GLES2Canvas::applyClipping):
3647         If clipping is enabled, set the appropriate GL state.
3648         * platform/graphics/chromium/GLES2Canvas.h:
3649         Document the flavours of drawTexturedRect() a bit, so I don't get confused.
3650         * platform/graphics/gpu/DrawingBuffer.cpp:
3651         (WebCore::DrawingBuffer::clear):
3652         (WebCore::DrawingBuffer::createSecondaryBuffers):
3653         (WebCore::DrawingBuffer::resizeDepthStencil):
3654         (WebCore::DrawingBuffer::reset):
3655         * platform/graphics/gpu/DrawingBuffer.h:
3656         Unify m_multisampleDepthStencilBuffer with m_depthStencilBuffer. 
3657         Implement separate depth and stencil buffers for when
3658         OES_packed_depth_stencil is not available.  Refactor creation of
3659         multisampled and non-multisampled depth and stencil buffers into
3660         resizeDepthStencil().
3661         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
3662         (WebCore::SharedGraphicsContext3D::create):
3663         Turn on stencil, turn off depth, turn off antialiasing (for now).
3664         (WebCore::SharedGraphicsContext3D::enableStencil):
3665         * platform/graphics/gpu/SharedGraphicsContext3D.h:
3666         Implement stencil enable/disable.
3667         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
3668         (WebCore::DrawingBuffer::DrawingBuffer):
3669         Remove m_multisampleDepthStencilBuffer.  Set the size to (-1, -1)
3670         on creation, so reset() doesn't early-out.  Initialize m_depthBuffer
3671         and m_stencilBuffer.
3672         * platform/graphics/skia/GraphicsContextSkia.cpp:
3673         (WebCore::GraphicsContext::canvasClip):
3674         (WebCore::GraphicsContext::clipOut):
3675         (WebCore::GraphicsContext::clipPath):
3676         (WebCore::GraphicsContext::fillPath):
3677         Put in GPU hooks for path clipping, and path drawing.
3678         * platform/graphics/skia/PlatformContextSkia.cpp:
3679         (WebCore::PlatformContextSkia::canAccelerate):
3680         Don't check for clipping paths in canAccelerate() (since we can
3681         now accelerate them).
3682         (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
3683         Don't do clipping when uploading software draws to hardware.
3684         * thirdparty/glu/README.webkit:
3685         * thirdparty/glu/gluos.h:
3686         #undef MIN and MAX, to fix warnings-as-errors in Chrome/Mac build.
3687         * thirdparty/glu/libtess/geom.c:
3688         * thirdparty/glu/libtess/priorityq.c:
3689         * thirdparty/glu/libtess/render.c:
3690         Use do{}while(0) instead of if(1)else construct in macro.
3691         * thirdparty/glu/libtess/sweep.c:
3692         (IsWindingInside):
3693         (DoneEdgeDict):
3694         Fix some warnings treated as errors for the Linux Release build.
3695
3696 2011-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
3697
3698         Unreviewed, rolling out r76144.
3699         http://trac.webkit.org/changeset/76144
3700         https://bugs.webkit.org/show_bug.cgi?id=52737
3701
3702         Broke tests on multiple bots, mostly Chromium Canaries
3703         (Requested by dimich on #webkit).
3704
3705         * rendering/RenderText.cpp:
3706         (WebCore::RenderText::localCaretRect):
3707
3708 2011-01-19  Simon Fraser  <simon.fraser@apple.com>
3709
3710         Reviewed by Adam Roben.
3711
3712         [CSS Gradients] Crash due to out-of-memory with repeating-linear-gradient and latter stop positioned before former
3713         https://bugs.webkit.org/show_bug.cgi?id=52732
3714         
3715         When repeating gradient stops, make sure that the first and last stops are not at the same
3716         place, otherwise we'll add stops indefinitely and run out of memory.
3717
3718         Test: fast/gradients/zero-range-repeating-gradient-hang.html
3719
3720         * css/CSSGradientValue.cpp:
3721         (WebCore::CSSGradientValue::addStops):
3722
3723 2011-01-14  Dimitri Glazkov  <dglazkov@chromium.org>
3724
3725         Reviewed by Darin Adler.
3726
3727         Remove event forwarding logic from input[type=range], simplify event flow and thumb positioning logic.
3728         https://bugs.webkit.org/show_bug.cgi?id=52464
3729
3730         This change has two parts:
3731
3732         1) Utilize shadow DOM event retargeting to get rid of forwarding events
3733            via render tree;
3734         2) Move thumb positioning logic from RenderSlider to SliderThumbElement.
3735
3736         These two are highly co-dependent. It looked ugly when I tried to
3737         separate them.
3738
3739         No change in behavior, covered by existing tests.
3740
3741         * html/HTMLInputElement.cpp:
3742         (WebCore::HTMLInputElement::defaultEventHandler): Added invocation of
3743             InputType::handleMouseDownEvent.
3744         * html/InputType.cpp:
3745         (WebCore::InputType::handleMouseDownEvent): Added empty decl.
3746         * html/InputType.h: Added def.
3747         * html/RangeInputType.cpp:
3748         (WebCore::RangeInputType::handleMouseDownEvent): Added to handle the case
3749             when the user clicks on the track of the slider. Also removed the
3750             forwardEvent method.
3751         * html/RangeInputType.h: Added/removed defs.
3752         * html/shadow/SliderThumbElement.cpp:
3753         (WebCore::SliderThumbElement::dragFrom): Added a helper method to start
3754             dragging from any position.
3755         (WebCore::SliderThumbElement::dragTo): Added a helper method to drag to
3756             specified position.
3757         (WebCore::SliderThumbElement::setPosition): Collapsed most of the positioning
3758             logic in RenderSlider into this method, which is now a simple calculation
3759             and adjusting of thumb position based on supplied coordinates.
3760         (WebCore::SliderThumbElement::startDragging): Added.
3761         (WebCore::SliderThumbElement::stopDragging): Added.
3762         (WebCore::SliderThumbElement::defaultEventHandler): Removed most of the
3763             old position-sniffing logic and replaced with simple calls to start,
3764             stop, and drag the thumb.
3765         * html/shadow/SliderThumbElement.h: Added defs.
3766         * rendering/RenderSlider.cpp: Removed a bunch of code that is no longer
3767             necessary.
3768         * rendering/RenderSlider.h: Removed defs, removed now-unnecessary friendliness.
3769
3770 2011-01-19  Shane Stephens  <shanestephens@google.com>
3771
3772         Reviewed by Chris Marrin.
3773
3774         Make AffineTransform and TransformationMatrix do matrix multiplication in the correct order (Column Major)
3775         https://bugs.webkit.org/show_bug.cgi?id=48031
3776
3777         Fixed reversal, renamed matrix methods to be clearer, found all examples of operator* and
3778         operator*= usage and switched operand order.
3779
3780         No new tests as this refactor doesn't add functionality.
3781
3782         * html/HTMLCanvasElement.cpp:
3783         (WebCore::HTMLCanvasElement::baseTransform):
3784         * html/canvas/CanvasRenderingContext2D.cpp:
3785         (WebCore::CanvasRenderingContext2D::transform):
3786         (WebCore::CanvasRenderingContext2D::setTransform):
3787         * platform/graphics/cg/PatternCG.cpp:
3788         (WebCore::Pattern::createPlatformPattern):
3789         * platform/graphics/chromium/GLES2Canvas.cpp:
3790         (WebCore::GLES2Canvas::fillRect):
3791         (WebCore::GLES2Canvas::concatCTM):
3792         (WebCore::GLES2Canvas::drawQuad):
3793         * platform/graphics/chromium/TransparencyWin.cpp:
3794         (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer):
3795         (WebCore::TransparencyWin::setupTransformForKeepTransform):
3796         * platform/graphics/transforms/AffineTransform.cpp:
3797         (WebCore::AffineTransform::multiply):
3798         (WebCore::AffineTransform::rotate):
3799         * platform/graphics/transforms/AffineTransform.h:
3800         (WebCore::AffineTransform::operator*=):
3801         (WebCore::AffineTransform::operator*):
3802         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3803         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
3804         * platform/graphics/wince/SharedBitmap.cpp:
3805         (WebCore::SharedBitmap::drawPattern):
3806         * rendering/svg/RenderSVGResourceContainer.cpp:
3807         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
3808         * rendering/svg/RenderSVGResourceGradient.cpp:
3809         (WebCore::clipToTextMask):
3810         (WebCore::RenderSVGResourceGradient::applyResource):
3811         * rendering/svg/RenderSVGResourcePattern.cpp:
3812         (WebCore::RenderSVGResourcePattern::applyResource):
3813         * rendering/svg/RenderSVGRoot.cpp:
3814         (WebCore::RenderSVGRoot::localToBorderBoxTransform):
3815         * rendering/svg/SVGImageBufferTools.cpp:
3816         (WebCore::SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem):
3817         (WebCore::SVGImageBufferTools::renderSubtreeToImageBuffer):
3818         * rendering/svg/SVGTextLayoutEngine.cpp:
3819         (WebCore::SVGTextLayoutEngine::finalizeTransformMatrices):
3820         * svg/SVGLocatable.cpp:
3821         (WebCore::SVGLocatable::computeCTM):
3822         (WebCore::SVGLocatable::getTransformToElement):
3823         * svg/SVGMatrix.h:
3824         (WebCore::SVGMatrix::multiply):
3825         * svg/SVGSVGElement.cpp:
3826         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
3827         (WebCore::SVGSVGElement::viewBoxToViewTransform):
3828         * svg/SVGStyledTransformableElement.cpp:
3829         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
3830         * svg/SVGTextElement.cpp:
3831         (WebCore::SVGTextElement::animatedLocalTransform):
3832         * svg/SVGTransformList.cpp:
3833         (WebCore::SVGTransformList::concatenate):
3834
3835 2011-01-19  Chang Shu  <chang.shu@nokia.com>
3836
3837         Reviewed by Darin Adler.
3838
3839         The return value of contentEditable() function should depend on the DOM attribute
3840         instead of render style userModify. The code change fixed test cases in the bug
3841         and partially fixed test cases in other contentEditable bugs;
3842
3843         https://bugs.webkit.org/show_bug.cgi?id=52056
3844
3845         * html/HTMLElement.cpp:
3846         (WebCore::HTMLElement::contentEditable):
3847
3848 2011-01-19  Levi Weintraub  <leviw@chromium.org>
3849
3850         Reviewed by Darin Adler.
3851
3852         Changing RenderText::localCaretRect to clip to its containing block's logicalLeft and
3853         logicalRightLayoutOverflow instead of simply using logicalLeft and logicalRight, as this
3854         resulted in the caret being placed incorrectly in overflowing editable IFrame content.
3855
3856         Long lines in non-white-space-pre editable documents show cursor in wrong place
3857         https://bugs.webkit.org/show_bug.cgi?id=48132
3858
3859         Test: editing/selection/caret-painting-in-overflowing-autowrap-content.html
3860
3861         * rendering/RenderText.cpp:
3862         (WebCore::RenderText::localCaretRect):
3863
3864 2011-01-19  Chris Marrin  <cmarrin@apple.com>
3865
3866         Reviewed by Simon Fraser.
3867
3868         WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
3869         https://bugs.webkit.org/show_bug.cgi?id=52695
3870
3871         Added ASSERTs to the places we assume a non-null superlayer.
3872
3873         * platform/graphics/ca/GraphicsLayerCA.cpp:
3874         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
3875         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3876
3877 2011-01-18  Beth Dakin  <bdakin@apple.com>
3878
3879         Reviewed by Maciej Stachowiak.
3880
3881         Fix for <rdar://problem/8882916> Overlay scrollers require 
3882         content to layout underneath the scrollbar area
3883
3884         The render tree should not include scrollbar size for
3885         overlay scrollers. This patch will allow scrollers on
3886         the WebView to behave like overflow:overlay.
3887
3888         Treat overlay scrollers the same way as the !includeScrollbars
3889         case.
3890         * platform/ScrollView.cpp:
3891         (WebCore::ScrollView::visibleContentRect):
3892
3893         No corner rect for overlay scrollers.
3894         (WebCore::ScrollView::scrollCornerRect):
3895
3896         usesOverlayScrollbars() currently always returns no.
3897         * platform/ScrollbarTheme.h:
3898         (WebCore::ScrollbarTheme::usesOverlayScrollbars):
3899         * platform/mac/ScrollbarThemeMac.h:
3900         * platform/mac/ScrollbarThemeMac.mm:
3901         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
3902
3903         includeVerticalScrollbarSize() and includeHorizontalScrollbarSize()
3904         should return false for overlay scrollers. They already return
3905         false for overflow:overlay.
3906         * rendering/RenderBox.cpp:
3907         (WebCore::RenderBox::includeVerticalScrollbarSize):
3908         (WebCore::RenderBox::includeHorizontalScrollbarSize):
3909         * rendering/RenderBox.h:
3910
3911         In the render tree, always treat overlay scrollers like
3912         they have a width and height of 0.
3913         * rendering/RenderLayer.cpp:
3914         (WebCore::RenderLayer::verticalScrollbarWidth):
3915         (WebCore::RenderLayer::horizontalScrollbarHeight):
3916         * rendering/RenderListBox.cpp:
3917         (WebCore::RenderListBox::verticalScrollbarWidth):
3918
3919 2011-01-18  Evan Martin  <evan@chromium.org>
3920
3921         Reviewed by Tony Chang.
3922
3923         [chromium] simplify complex text code, fixing a handful of layout tests
3924         https://bugs.webkit.org/show_bug.cgi?id=52661
3925
3926         Change ComplexTextControllerLinux to lay out RTL text to the left from
3927         the starting point.  (Previously it always went to the right.)  This allows
3928         us to map pixel offsets more directly into offsets within the text runs,
3929         simplifying a few of the text-fiddling functions (they no longer need to
3930         track the current position, as ComplexTextController now does it).
3931
3932         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
3933         (WebCore::ComplexTextController::ComplexTextController):
3934         (WebCore::ComplexTextController::reset):
3935         (WebCore::ComplexTextController::setGlyphXPositions):
3936         * platform/graphics/chromium/ComplexTextControllerLinux.h:
3937         (WebCore::ComplexTextController::offsetX):
3938         * platform/graphics/chromium/FontLinux.cpp:
3939         (WebCore::Font::drawComplexText):
3940         (WebCore::Font::floatWidthForComplexText):
3941         (WebCore::glyphIndexForXPositionInScriptRun):
3942         (WebCore::Font::offsetForPositionForComplexText):
3943         (WebCore::Font::selectionRectForComplexText):
3944
3945 2011-01-19  Pavel Feldman  <pfeldman@chromium.org>
3946
3947         Reviewed by Yury Semikhatsky.
3948
3949         Web Inspector: move methods from InjectedScript domain into DOM,
3950         Runtime and Debugger domains. Introduce InspectorRuntimeAgent.
3951         https://bugs.webkit.org/show_bug.cgi?id=52717
3952
3953         * CMakeLists.txt:
3954         * GNUmakefile.am:
3955         * WebCore.gypi:
3956         * WebCore.pro:
3957         * WebCore.vcproj/WebCore.vcproj:
3958         * WebCore.xcodeproj/project.pbxproj:
3959         * inspector/CodeGeneratorInspector.pm:
3960         * inspector/InjectedScript.cpp:
3961         (WebCore::InjectedScript::evaluateOnCallFrame):
3962         (WebCore::InjectedScript::getCompletions):
3963         (WebCore::InjectedScript::getCompletionsOnCallFrame):
3964         * inspector/InjectedScript.h:
3965         * inspector/InjectedScriptHost.cpp:
3966         (WebCore::InjectedScriptHost::injectedScriptForMainWorld):
3967         * inspector/InjectedScriptHost.h:
3968         * inspector/InjectedScriptSource.js:
3969         (.):
3970         ():
3971         * inspector/Inspector.idl:
3972         * inspector/InspectorController.cpp:
3973         (WebCore::InspectorController::connectFrontend):
3974         (WebCore::InspectorController::releaseFrontendLifetimeAgents):
3975         * inspector/InspectorController.h:
3976         * inspector/InspectorDOMAgent.cpp:
3977         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
3978         (WebCore::InspectorDOMAgent::resolveNode):
3979         (WebCore::InspectorDOMAgent::getNodeProperties):
3980         (WebCore::InspectorDOMAgent::getNodePrototypes):
3981         (WebCore::InspectorDOMAgent::injectedScriptForNodeId):
3982         * inspector/InspectorDOMAgent.h:
3983         (WebCore::EventListenerInfo::EventListenerInfo):
3984         (WebCore::InspectorDOMAgent::DOMListener::~DOMListener):
3985         (WebCore::InspectorDOMAgent::create):
3986         (WebCore::InspectorDOMAgent::cast):
3987         (WebCore::InspectorDOMAgent::documents):
3988     &n