[GTK] Build fix for Accelerated Compositing with OpenGL
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-06  Joone Hur  <joone.hur@intel.com>
2
3         [GTK] Build fix for Accelerated Compositing with OpenGL
4         https://bugs.webkit.org/show_bug.cgi?id=88292
5
6         Reviewed by Martin Robinson.
7
8         Build fix after r119247.
9         Do not include GraphicsSurface.h when not building
10         with GRAPHICS_SURFACE.
11
12         No new tests. This is only a build fix.
13
14         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
15         * platform/graphics/texmap/TextureMapperBackingStore.h:
16         * platform/graphics/texmap/TextureMapperGL.cpp:
17
18 2012-06-05  Joe Thomas  <joethomas@motorola.com>
19
20         ASSERTION FAILED: ASSERT(!isPercentageIntrinsicSize) in RenderReplaced::computeIntrinsicRatioInformationForRenderBox
21         https://bugs.webkit.org/show_bug.cgi?id=88197
22
23         Reviewed by Daniel Bates.
24
25         RenderSVGRoot extends RenderReplaced and it overrides the computeIntrinsicRatioInformation() 
26         method of RenderReplaced. RenderSVGRoot::computeIntrinsicRatioInformation
27         sets isPercentageIntrinsicSize to true while it handles width and height of percentage types.
28         So this assertion should be fired only if intrinsicRatio is non-zero.
29
30         Test: svg/in-html/svg-assert-failure-percentage.html
31
32         * rendering/RenderReplaced.cpp:
33         (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox):
34
35 2012-06-05  Tony Chang  <tony@chromium.org>
36
37         Changing flexbox justify/alignment doesn't update their positioning
38         https://bugs.webkit.org/show_bug.cgi?id=88366
39
40         Reviewed by Ojan Vafai.
41
42         Test: css3/flexbox/style-change.html
43
44         * rendering/style/RenderStyle.cpp:
45         (WebCore::RenderStyle::diff): Since these member variables were moved
46         out of StyleFlexibleBoxData, we have to compare them in RenderStyle::diff.
47
48 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
49
50         JSC implementation of SerializedScriptValue for IndexedDB
51         https://bugs.webkit.org/show_bug.cgi?id=88048
52
53         Reviewed by George Staikos.
54
55         No new tests. All the current indexeddb test cases apply when indexeddb works for JSC.
56
57         * bindings/js/SerializedScriptValue.cpp:
58         (WebCore::CloneSerializer::serializeNumber):
59         (CloneSerializer):
60         (WebCore::CloneDeserializer::toWireString):
61         (CloneDeserializer):
62         (WebCore::SerializedScriptValue::create):
63         (WebCore::SerializedScriptValue::toWireString):
64         (WebCore):
65         (WebCore::SerializedScriptValue::createFromWire):
66         (WebCore::SerializedScriptValue::numberValue):
67         (WebCore::SerializedScriptValue::deserialize):
68
69 2012-06-05  Ojan Vafai  <ojan@chromium.org>
70
71         Nested CSS flexbox renders incorrectly
72         https://bugs.webkit.org/show_bug.cgi?id=87679
73
74         Reviewed by Julien Chaffraix.
75
76         If the containing block with a perpendicular writing mode has an overrideHeight,
77         then its logical height should be based off that instead of its RenderStyle.
78
79         Test: css3/flexbox/perpendicular-writing-modes-inside-flex-item.html
80
81         * rendering/RenderBox.cpp:
82         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
83
84 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
85
86         Need special-case toJS(IDBAny) for IDBCursorWithValue
87         https://bugs.webkit.org/show_bug.cgi?id=87963
88
89         Reviewed by George Staikos.
90
91         No new tests, this is for indexedDB, which is not working for JSC binding.
92         When indexedDB working for JSC, all the indexdb test cases should apply.
93
94         * bindings/js/JSIDBAnyCustom.cpp:
95         (WebCore::toJS):
96
97 2012-06-05  Michal Mocny  <mmocny@google.com>
98
99         [chromium] Set default memory allocation limit bytes when GL_CHROMIUM_gpu_memory_manager is not supported by graphics context.
100         https://bugs.webkit.org/show_bug.cgi?id=87996
101
102         Reviewed by James Robinson.
103
104         Soon we hope to have renderers not manage there own memory allocation limits, and rely exclusively on the
105         allocation given by GpuMemoryManager.  However, when the graphics context does not support the
106         GL_CHROMIUM_gpu_memory_manager extension, such as the one used by DumpRenderTree, we must default the
107         memory allocation limit to some non-0 value.
108
109         * platform/graphics/chromium/LayerRendererChromium.cpp:
110         (WebCore::LayerRendererChromium::initialize):
111         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
112         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
113         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
114         (WebCore):
115         (DebugScopedSetMainThreadFromEither):
116         (WebCore::DebugScopedSetMainThreadFromEither::DebugScopedSetMainThreadFromEither):
117         (WebCore::DebugScopedSetMainThreadFromEither::~DebugScopedSetMainThreadFromEither):
118
119 2012-06-05  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
120
121         [Qt] Use GraphicsContext3DOpenGLES.cpp when using OpenGL ES
122         https://bugs.webkit.org/show_bug.cgi?id=78720
123
124         Reviewed by Noam Rosenthal.
125
126         Functions are removed from GraphicsContext3DQt that already implemented
127         in GraphicsContext3DCommon. Macros that not supported at GLES have been
128         changed to their appropriate pair that found in GraphicsContext3D
129         (e.g. GL_FRAMEBUFFER_EXT to GraphicsContext3D::FRAMEBUFFER).
130         It was needed because OpenGLES does not support these macros.
131         Extensions3DQt is removed beceause it has never been used.
132         Some functions have been moved fron GraphicsContext3DCommon to *OpenGL
133         and *OpenGLES to provide specialization.
134         The "m_depthStencilBuffer" member is added to Qt port because it uses
135         "m_depthStencilBuffer" like the other platforms.
136
137         * Target.pri:
138         * platform/graphics/GraphicsContext3D.h:
139         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
140         (WebCore::GraphicsContext3D::depthRange):
141         (WebCore):
142         (WebCore::GraphicsContext3D::clearDepth):
143         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
144         (WebCore::GraphicsContext3D::prepareTexture):
145         (WebCore::GraphicsContext3D::readRenderingResults):
146         (WebCore::GraphicsContext3D::reshape):
147         (WebCore::GraphicsContext3D::copyTexImage2D):
148         (WebCore::GraphicsContext3D::copyTexSubImage2D):
149         (WebCore::GraphicsContext3D::readPixels):
150         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
151         (WebCore::GraphicsContext3D::reshapeFBOs):
152         (WebCore::GraphicsContext3D::depthRange):
153         (WebCore):
154         (WebCore::GraphicsContext3D::clearDepth):
155         * platform/graphics/qt/GraphicsContext3DQt.cpp:
156         (WebCore::GraphicsContext3D::isGLES2Compliant):
157         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebuffer):
158         (WebCore::GraphicsContext3D::GraphicsContext3D):
159         (WebCore::GraphicsContext3D::~GraphicsContext3D):
160         (WebCore):
161
162 2012-06-05  Vitaly Buka  <vitalybuka@chromium.org>
163
164         Special layout handler should be done on top frame being printed.
165         https://bugs.webkit.org/show_bug.cgi?id=88201
166
167         Reviewed by Brady Eidson.
168
169         No new tests. Root case is already covered by tests.
170         Case described in the issue can be reproduced only by direct call
171         to Frame::setPrinting of subframe. Probably it's not possible with
172         layout tests.
173
174         * page/Frame.cpp:
175         (WebCore::Frame::setPrinting):
176         Use shouldUsePrintingLayout to choose proper version of forceLayout().
177         (WebCore::Frame::shouldUsePrintingLayout):
178         Checks if current frame is the top frame being printed.
179         * rendering/RenderView.cpp:
180         (WebCore::RenderView::shouldUsePrintingLayout): Forward to Frame.
181
182 2012-06-05  Max Feil  <mfeil@rim.com>
183
184         [BlackBerry] Conditionally enlarge HTML5 video controls in fullscreen mode
185         https://bugs.webkit.org/show_bug.cgi?id=87551
186
187         Reviewed by Antonio Gomes.
188
189         Changes to make media controls larger in fullscreen mode. The
190         BlackBerry media controls used to be sized by a combination
191         of CSS styles specified in mediaControlsBlackBerry.css and
192         hard coded constants in RenderThemeBlackBerry.cpp. This patch
193         moves all the dimensional sizes to a common location, i.e.
194         RenderThemeBlackBerry.cpp. Having all the logic in C++ code allows
195         more complex decision making for when and how much to enlarge the
196         media controls. Currently the controls are enlarged by a factor
197         of 2 if the document is in fullscreen mode, the video element
198         is the current fullscreen element, and the deviceScaleFactor of
199         the page is less than 2.0. This avoids overly large controls
200         on pages which are already at least doubling the size of the
201         controls via viewport meta tag device-width settings. In other
202         words, if the CSS pixels are already enlarged compared to device
203         pixels by a factor of at least 2 in length and width.
204
205         In order to accomplish this, I had to add a new Element* parameter
206         to RenderTheme::adjustSliderThumbSize(). This is needed so
207         that fullscreen mode can be checked and the deviceScaleFactor
208         retrieved. I feel that this does not have a big impact on the
209         code and the other ports, for which I will simply be adding the
210         additional parameter in their platform code.
211
212         Tests:
213         video-controls-enlarged-fullscreen-meta.html
214         video-controls-enlarged-fullscreen-nometa.html
215
216         * css/mediaControlsBlackBerry.css:
217         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
218         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
219         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
220         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
221         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
222         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
223         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
224         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
225         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
226         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
227         * html/shadow/SliderThumbElement.cpp:
228         (WebCore::RenderSliderThumb::updateAppearance):
229         * platform/blackberry/RenderThemeBlackBerry.cpp:
230         (WebCore):
231         (WebCore::determineRenderSlider):
232         (WebCore::determineFullScreenMultiplier):
233         (WebCore::RenderThemeBlackBerry::adjustSliderThumbSize):
234         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
235         (WebCore::RenderThemeBlackBerry::adjustSliderTrackStyle):
236         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
237         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
238         * platform/blackberry/RenderThemeBlackBerry.h:
239         (RenderThemeBlackBerry):
240         * platform/efl/RenderThemeEfl.cpp:
241         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
242         * platform/efl/RenderThemeEfl.h:
243         (RenderThemeEfl):
244         * platform/gtk/RenderThemeGtk.h:
245         * platform/gtk/RenderThemeGtk2.cpp:
246         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
247         * platform/gtk/RenderThemeGtk3.cpp:
248         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
249         * platform/qt/RenderThemeQt.cpp:
250         (WebCore::RenderThemeQt::adjustSliderThumbSize):
251         * platform/qt/RenderThemeQt.h:
252         (RenderThemeQt):
253         * platform/qt/RenderThemeQtMobile.cpp:
254         (WebCore::RenderThemeQtMobile::adjustSliderThumbSize):
255         * platform/qt/RenderThemeQtMobile.h:
256         (RenderThemeQtMobile):
257         * rendering/RenderThemeChromiumLinux.cpp:
258         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
259         * rendering/RenderThemeChromiumLinux.h:
260         (RenderThemeChromiumLinux):
261         * rendering/RenderThemeChromiumSkia.cpp:
262         (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
263         * rendering/RenderThemeChromiumSkia.h:
264         (RenderThemeChromiumSkia):
265         * rendering/RenderThemeChromiumWin.cpp:
266         (WebCore):
267         (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
268         * rendering/RenderThemeChromiumWin.h:
269         (RenderThemeChromiumWin):
270         * rendering/RenderThemeMac.h:
271         (RenderThemeMac):
272         * rendering/RenderThemeSafari.cpp:
273         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
274         * rendering/RenderThemeSafari.h:
275         (RenderThemeSafari):
276         * rendering/RenderThemeWin.cpp:
277         (WebCore::RenderThemeWin::adjustSliderThumbSize):
278         * rendering/RenderThemeWin.h:
279         (RenderThemeWin):
280         * rendering/RenderThemeWinCE.cpp:
281         (WebCore::RenderThemeWinCE::adjustSliderThumbSize):
282         * rendering/RenderThemeWinCE.h:
283         (RenderThemeWinCE):
284         * rendering/RenderTheme.cpp:
285         (WebCore::RenderTheme::adjustStyle):
286         (WebCore::RenderTheme::adjustMediaControlStyle):
287         (WebCore):
288         (WebCore::RenderTheme::adjustSliderThumbStyle):
289         (WebCore::RenderTheme::adjustSliderThumbSize):
290         * rendering/RenderTheme.h:
291         (RenderTheme):
292
293 2012-06-05  Stephanie Lewis  <slewis@apple.com>
294
295         https://bugs.webkit.org/show_bug.cgi?id=88370
296         Memory sampler should trigger low memory signal
297
298         Reviewed by Geoff Garen.
299
300         No new tests. Verify by running stress test which crashes 
301         in a few minutes without the fix.
302
303         Fix assumption in block code.  We could get in a state where timer_event_source
304         had already been released before the block ran.
305
306         * platform/mac/MemoryPressureHandlerMac.mm:
307         (WebCore::MemoryPressureHandler::holdOff):
308
309 2012-06-05  Yoshifumi Inoue  <yosin@chromium.org>
310
311         [Forms] Introduce InputNumber type as an alias of double for replacing it to Decimal
312         https://bugs.webkit.org/show_bug.cgi?id=88275
313
314         Reviewed by Kent Tamura.
315
316         This patch introduced InputNumber type as alias of double to be
317         replaced to Decimal and convertDoubleToInputNumber and 
318         convertToInputNumberToDouble for reducing size of patch when we
319         introduce Decimal type.
320
321         This patch added new vairables to use const variable to reduce
322         copy operation when introducing Decimal type.
323
324         In the implementation, we use InputNumber, will be Decimal, however some methods in IDL
325         use double. To clarify internal usage of value and external usage, thit patch renamed
326         following functions:
327
328         - parseToDouble => parseNumber
329         - setValueAsNumber => setValueAsDouble and setValueAsInputNumber
330         - valueAsNumber => valueAsDouble
331
332         This patch is a part of introducing Decimal, https://bugs.webkit.org/show_bug.cgi?id=80009
333
334         No new tests. This patch doesn't change behavior.
335
336         * html/BaseDateAndTimeInputType.cpp:
337         (WebCore::BaseDateAndTimeInputType::valueAsDate): Replaced parseToNumber() to valueAsDouble()
338         (WebCore::BaseDateAndTimeInputType::setValueAsDate): Inserted convertDoubleToInputNumber.
339         (WebCore::BaseDateAndTimeInputType::valueAsDouble): Use new function parseToDouble().
340         (WebCore::BaseDateAndTimeInputType::setValueAsInputNumber): Added.
341         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp): Changed return type to InputNumber.
342         (WebCore::BaseDateAndTimeInputType::parseToNumber): This is replacement of parseToDouble().
343         (WebCore::BaseDateAndTimeInputType::parseToDouble): Added for valueAsDate and valueAsDouble.
344         (WebCore::BaseDateAndTimeInputType::serialize): Changed parameter type to InputNumber.
345         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Replace double to InputNumber for getAllowdStep.
346         * html/BaseDateAndTimeInputType.h:
347         (BaseDateAndTimeInputType):
348         * html/DateInputType.cpp:
349         (WebCore::DateInputType::createStepRange): Replaced double to InputNumber.
350         * html/DateInputType.h:
351         (DateInputType):
352         * html/DateTimeInputType.cpp:
353         (WebCore::DateTimeInputType::defaultValueForStepUp): Changed return type to InputNumber.
354         (WebCore::DateTimeInputType::createStepRange): Replaced double to InputNumber.
355         * html/DateTimeInputType.h:
356         (DateTimeInputType):
357         * html/DateTimeLocalInputType.cpp:
358         (WebCore::DateTimeLocalInputType::createStepRange): Replaced double to InputNumber.
359         * html/DateTimeLocalInputType.h:
360         (DateTimeLocalInputType):
361         * html/HTMLInputElement.cpp:
362         (WebCore::HTMLInputElement::getAllowedValueStep): Changed parameter type to InputNumber.
363         (WebCore::HTMLInputElement::valueAsNumber): Use InputType::valueAsDouble.
364         (WebCore::HTMLInputElement::setValueAsNumber): Use InputType::valueAsDouble.
365         * html/HTMLInputElement.h:
366         (HTMLInputElement):
367         * html/InputType.cpp:
368         (WebCore::InputType::valueAsDouble): Replacement of valueAsNumber.
369         (WebCore::InputType::setValueAsDouble): Replacement of valueAsNumber.
370         (WebCore::InputType::setValueAsInputNumber): Replacement of valueAsNumber.
371         (WebCore::InputType::rangeUnderflow): Replaced double to InputNumber.
372         (WebCore::InputType::rangeOverflow): Replaced double to InputNumber.
373         (WebCore::InputType::defaultValueForStepUp): Changed return type to InputNumber.
374         (WebCore::InputType::isInRange): Replaced double to InputNumber.
375         (WebCore::InputType::isOutOfRange): Replaced double to InputNumber.
376         (WebCore::InputType::stepMismatch): Replaced double to InputNumber.
377         (WebCore::InputType::validationMessage): Replaced double to InputNumber.
378         (WebCore::InputType::parseToNumber): Replacement of parseToDouble.
379         (WebCore::InputType::parseToNumberOrNaN): Added for reducing number of std::numeric_limits<double>::quiet_NaN().
380         (WebCore::InputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber.
381         (WebCore::InputType::serialize): Changed parameter type to InputNumber.
382         (WebCore::InputType::applyStep): Replaced double to InputNumber.
383         (WebCore::InputType::getAllowedValueStep): Changed parameter type to InputNumber.
384         (WebCore::InputType::stepUpFromRenderer): Replaced double to InputNumber.
385         * html/InputType.h:
386         (InputType):
387         * html/MonthInputType.cpp:
388         (WebCore::MonthInputType::defaultValueForStepUp): Changed return type to InputNumber.
389         (WebCore::MonthInputType::createStepRange): Replaced double to InputNumber.
390         (WebCore::MonthInputType::parseToNumber): Replacement of parseToDouble.
391         * html/MonthInputType.h:
392         (MonthInputType):
393         * html/NumberInputType.cpp:
394         (WebCore::NumberInputType::valueAsDouble): Replacement of valueAsNumber. Changed to use parseToDoubleForNumberType.
395         (WebCore::NumberInputType::setValueAsDouble):  Replacement of setValueAsNumber.  Changed to use serializeForNumberType.
396         (WebCore::NumberInputType::setValueAsInputNumber): Replacement of setValueAsNumber.
397         (WebCore::NumberInputType::createStepRange): Replaced double to InputNumber.
398         (WebCore::NumberInputType::parseToNumber): Replacement of parseToDouble.
399         (WebCore::NumberInputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber.
400         (WebCore::NumberInputType::serialize):
401         * html/NumberInputType.h:
402         (NumberInputType):
403         * html/RangeInputType.cpp:
404         (WebCore::ensureMaximum): Replaced double to InputNumber.
405         (WebCore::RangeInputType::valueAsDouble): Replacement of valueAsNumber.
406         (WebCore::RangeInputType::setValueAsInputNumber):  Replacement of setValueAsNumber.
407         (WebCore::RangeInputType::createStepRange): Replaced double to InputNumber.
408         (WebCore::RangeInputType::handleKeydownEvent): Replaced double to InputNumber.
409         (WebCore::RangeInputType::parseToNumber): Replacement of parseToDouble.
410         (WebCore::RangeInputType::serialize): Changed parameter type to InputNumber.
411         (WebCore::RangeInputType::sanitizeValue): Replaced double to InputNumber.
412         * html/RangeInputType.h:
413         (RangeInputType):
414         * html/StepRange.cpp:
415         (WebCore::StepRange::StepRange): Replaced double to InputNumber.
416         (WebCore::StepRange::acceptableError): Replaced double to InputNumber.
417         (WebCore::StepRange::alignValueForStep): Replaced double to InputNumber.
418         (WebCore):
419         (WebCore::StepRange::clampValue): Replaced double to InputNumber.
420         (WebCore::StepRange::stepMismatch): Replaced double to InputNumber.
421         * html/StepRange.h:
422         (WebCore::convertDoubleToInputNumber): Added.
423         (WebCore::convertInputNumberToDouble): Added.
424         (WebCore::StepRange::NumberWithDecimalPlaces::NumberWithDecimalPlaces): Replaced double to InputNumber.
425         (WebCore::StepRange::StepDescription::defaultValue): Replaced double to InputNumber.
426         (StepRange):
427         (WebCore::StepRange::maximum): Replaced double to InputNumber.
428         (WebCore::StepRange::minimum): Replaced double to InputNumber.
429         (WebCore::StepRange::step): Replaced double to InputNumber.
430         (WebCore::StepRange::stepBase): Replaced double to InputNumber.
431         (WebCore::StepRange::defaultValue): Replaced double to InputNumber.
432         (WebCore::StepRange::proportionFromValue): Replaced double to InputNumber.
433         (WebCore::StepRange::valueFromProportion): Replaced double to InputNumber.
434         * html/TimeInputType.cpp:
435         (WebCore::TimeInputType::defaultValueForStepUp): Replaced double to InputNumber.
436         (WebCore::TimeInputType::createStepRange): Replaced double to InputNumber.
437         * html/TimeInputType.h:
438         (TimeInputType):
439         * html/WeekInputType.cpp:
440         (WebCore::WeekInputType::createStepRange): Replaced double to InputNumber.
441         * html/WeekInputType.h:
442         (WeekInputType):
443         * html/shadow/CalendarPickerElement.cpp:
444         (WebCore::CalendarPickerElement::writeDocument): Replaced double to InputNumber.
445         * html/shadow/SliderThumbElement.cpp:
446         (WebCore::sliderPosition): Replaced double to InputNumber.
447         (WebCore::RenderSliderThumb::layout): Replaced double to InputNumber.
448         (WebCore::SliderThumbElement::setPositionFromPoint): Replaced double to InputNumber.
449
450 2012-06-05  Ryosuke Niwa  <rniwa@webkit.org>
451
452         Build fix after r119527.
453
454         * dom/ViewportArguments.cpp:
455         (WebCore::computeViewportAttributes):
456
457 2012-06-05  Martin Robinson  <mrobinson@igalia.com>
458
459         [Cairo] [OpenGL] Enable GL_OES_standard_derivatives
460         https://bugs.webkit.org/show_bug.cgi?id=87583
461
462         Reviewed by Alejandro G. Castro.
463
464         No new tests. This is covered by oes-standard-derivatives.html
465         in the Khronos WebGL conformance tests, which may one day be part
466         of the WebKit test suite.
467
468         Activate the GL_OES_standard_derivatives on Cairo along with
469         Qt and Mac.
470
471         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
472         (WebCore::Extensions3DOpenGL::ensureEnabled):
473         (WebCore::Extensions3DOpenGL::isEnabled):
474
475 2012-06-05  Simon Fraser  <simon.fraser@apple.com>
476
477         Avoid creating compositing layers for preserve-3d without transformed descendants
478         https://bugs.webkit.org/show_bug.cgi?id=88115
479
480         Reviewed by Antti Koivisto.
481         
482         Avoid creating compositing layers, and therefore using excess backing store,
483         for elements that have -webkit-transform-style: preserve-3d, but no 3D-transformed
484         descendants that would be affected by that preserve-3d.
485         
486         Test: compositing/layer-creation/no-compositing-for-preserve-3d.html
487
488         * rendering/RenderLayer.h: Replace the "mustOverlap" flag with a enum
489         that describes the different reasons for indirect compositing, so that
490         we can use that information to decide whether to allocate backing store.
491         (WebCore::RenderLayer::setIndirectCompositingReason):
492         (WebCore::RenderLayer::indirectCompositingReason):
493         (WebCore::RenderLayer::mustCompositeForIndirectReasons):
494         * rendering/RenderLayer.cpp:
495         (WebCore::RenderLayer::RenderLayer): Initialize m_indirectCompositingReason
496
497         * rendering/RenderLayerCompositor.h: New out param for computeCompositingRequirements()
498         that is uses to indicate that a 3d-transformed descendant has been encountered.
499         Rename requiresCompositingWhenDescendantsAreCompositing() to requiresCompositingForIndirectReason(),
500         and return the reason as an out param.
501         
502         * rendering/RenderLayerCompositor.cpp:
503         (WebCore::RenderLayerCompositor::updateCompositingLayers): Pass in the saw3DTransform
504         param to computeCompositingRequirements().
505         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Return a flag
506         from computeCompositingRequirements() that is set to true if we've seen descendants
507         that have 3d transforms. This is later used to decide whether to composite for
508         perspective or preserve-3d.
509         Change the "mustOverlapCompositedLayers" code to use the new "indirect compositing"
510         enum flags.
511         After enumerating children, call requiresCompositingForIndirectReason() and 
512         record the reason in the layer.
513         (WebCore::RenderLayerCompositor::needsToBeComposited): Use mustCompositeForIndirectReasons() now.
514         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Consult the indirect compositing
515         reason rather than just looking for the overlap flag.
516         (WebCore::RenderLayerCompositor::reasonForCompositing): Now that we have more information
517         about indirect compositing reasons, the logging can be more detailed.
518         (WebCore::RenderLayerCompositor::requiresCompositingForTransform): This now only looks
519         for 3d transforms. We now treat perspective and perserve-3d as "indirect" reasons, because
520         whether they composite depends on descendants having non-affine transforms.
521         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): Includes the logic
522         previously in requiresCompositingWhenDescendantsAreCompositing(), and now determines
523         whether to composite for preserve-3d and perspective, based on whether we have transformed descendants.
524
525 2012-06-05  Levi Weintraub  <leviw@chromium.org>
526
527         Block selection gaps painted not properly pixel snapped
528         https://bugs.webkit.org/show_bug.cgi?id=88000
529
530         Reviewed by Ryosuke Niwa.
531
532         Fixes for selection painting in both inline line heights and block gaps. We were unintentionally
533         flooring inline and block offsets in RenderBlock, but actually need to intentionally floor the
534         logical left and right values in logical(Left|Right)SelectionGap to properly align our block
535         selection gaps. This is to properly mirror the behavior in pixelSnappedLogicalRightOffsetForLine.
536
537         We were also unintentionally upcasting LayoutUnits to floats in InlineTextBox's selection painting
538         routine. Now we're properly rounding.
539
540         Test: fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
541
542         * rendering/InlineTextBox.cpp:
543         (WebCore::InlineTextBox::paintSelection): Move paint values to integers and do proper rounding.
544         * rendering/RenderBlock.cpp:
545         (WebCore::blockDirectionOffset): Fix incorrect flooring in return value.
546         (WebCore::inlineDirectionOffset): Ditto.
547         (WebCore): Removing previous attempt to properly mirror inline box selection pixel alignment. This
548         implementation rounded the final x value instead of properly rounding our block offset then flooring
549         the offset that corresponds to the behavior in InlineTextBox. It also didn't properly pixel snap
550         the y offset and height.
551         (WebCore::RenderBlock::blockSelectionGap): Properly pixel snapping the gap rect before painting.
552         (WebCore::RenderBlock::logicalLeftSelectionGap): Correctly match InlineTextBox's selection pixel
553         alignment by flooring the logicalLeft and pixel snapping the subsequent rect. We do this in order
554         to maintain proper render tree pixel snapping while simultaneously mirroring the flooring in the
555         inline direction that occurs in InlineTextBox.cpp's alignSelectionRectToDevicePixels method.
556         (WebCore::RenderBlock::logicalRightSelectionGap): Ditto with the right.
557
558 2012-06-05  Adam Barth  <abarth@webkit.org>
559
560         Remove support for target-densitydpi in the viewport meta tag
561         https://bugs.webkit.org/show_bug.cgi?id=88047
562
563         Reviewed by Kenneth Rohde Christiansen.
564
565         The target-densitydpi parameter was originally implemented on Android,
566         but it does not appear to be widely used and introduces significant
567         implementation complexity because it forces us to track three scale
568         factors (defaultDeviceScaleFactor, deviceScaleFactor, and
569         pageScaleFactor) rather than just two (deviceScaleFactor and
570         pageScaleFactor).
571
572         There don't appear to be many web sites that use target-densitydpi
573         because it is not supported on iOS.  There are also concerns from the
574         standards community about the design of the feature.  It seems our best
575         course of action is to remove target-densitydpi and address these use
576         cases via other mechanisms, such as responsive images and device units
577         in CSS because those approaches are likely to be implemented broadly.
578
579         * dom/ViewportArguments.cpp:
580         (WebCore::computeViewportAttributes):
581         (WebCore):
582         (WebCore::setViewportFeature):
583         (WebCore::viewportErrorMessageTemplate):
584         (WebCore::viewportErrorMessageLevel):
585         * dom/ViewportArguments.h:
586         (WebCore::ViewportArguments::ViewportArguments):
587         (ViewportArguments):
588         (WebCore::ViewportArguments::operator==):
589
590 2012-06-05  Erik Arvidsson  <arv@chromium.org>
591
592         [V8] Improve variable resolution order on window
593         https://bugs.webkit.org/show_bug.cgi?id=84247
594
595         Reviewed by Ojan Vafai.
596
597         This changes the V8 flag to turn on es52_globals and updates the layout tests to reflect the fixed behavior.
598
599         Test: fast/dom/Window/window-property-shadowing-onclick.html
600
601         * bindings/v8/V8DOMWindowShell.cpp:
602         (WebCore::V8DOMWindowShell::initContextIfNeeded): Set the flag as we initialize V8.
603         * bindings/v8/WorkerContextExecutionProxy.cpp:
604         (WebCore::WorkerContextExecutionProxy::initIsolate): Ditto.
605
606 2012-06-05  Ojan Vafai  <ojan@chromium.org>
607
608         Delete dead code from RenderBox::computeLogicalWidthInRegion
609         https://bugs.webkit.org/show_bug.cgi?id=88353
610
611         Reviewed by Tony Chang.
612
613         No new tests obviously since this is dead code.
614
615         * rendering/RenderBox.cpp:
616         (WebCore::RenderBox::computeLogicalWidthInRegion):
617
618 2012-06-05  Greg Billock  <gbillock@google.com>
619
620         New constructor for WebIntent to be used for delivery
621         https://bugs.webkit.org/show_bug.cgi?id=87143
622
623         Reviewed by Darin Fisher.
624
625         * Modules/intents/Intent.cpp:
626         (WebCore::Intent::setExtras):
627         (WebCore):
628         * Modules/intents/Intent.h:
629         (Intent):
630
631 2012-06-01  Ojan Vafai  <ojan@chromium.org>
632
633         Change overrideSizes to be content-box instead of border-box
634         https://bugs.webkit.org/show_bug.cgi?id=88116
635
636         Reviewed by Tony Chang.
637
638         Previously, the code used border-box everywhere except for one place
639         where it used content-box when setting the override size. Conversely,
640         it subtracted the borderAndPaddingSize everywhere it grabbed the override
641         size except for one.
642
643         Instead, make the override size override the content-box size.
644         Converging on using the border-box size would be tricky given RenderTableCell's
645         tricky management of intrinsic padding.
646
647         There is no behavior change except in RenderBox::availableLogicalHeightUsing,
648         which fixes a table test.
649
650         * rendering/RenderBox.cpp:
651         (WebCore::RenderBox::setOverrideLogicalContentHeight):
652         (WebCore::RenderBox::setOverrideLogicalContentWidth):
653         (WebCore::RenderBox::overrideLogicalContentWidth):
654         (WebCore::RenderBox::overrideLogicalContentHeight):
655         (WebCore::RenderBox::computeLogicalWidthInRegion):
656         (WebCore::RenderBox::computeLogicalHeight):
657         (WebCore::RenderBox::computePercentageLogicalHeight):
658         (WebCore::RenderBox::availableLogicalHeightUsing):
659         We were incorrectly subtracting the borderAndPaddingLogicalWidth instead
660         of the borderAndPaddingLogicalHeight.
661
662         * rendering/RenderBox.h:
663         (RenderBox):
664         * rendering/RenderDeprecatedFlexibleBox.cpp:
665         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
666         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
667         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
668         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
669         * rendering/RenderFlexibleBox.cpp:
670         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
671         (WebCore::RenderFlexibleBox::setLogicalOverrideSize):
672         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
673         * rendering/RenderTableCell.cpp:
674         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
675
676 2012-06-05  Andy Estes  <aestes@apple.com>
677
678         REGRESSION (r118197): PluginStrategy should be used even if ENABLE(NETSCAPE_PLUGIN_API) is false
679         https://bugs.webkit.org/show_bug.cgi?id=88296
680
681         Reviewed by Dan Bernstein.
682
683         refresh() and initPlugins() should call into PluginStrategy even if
684         ENABLE(NETSCAPE_PLUGIN_API) is false. Some ports support non-Netscape
685         plug-ins, so PluginStrategy should be consulted even if Netscape
686         plug-ins specifically are disabled.
687
688         Ports that support platform strategies but not Netscape plug-ins should
689         handle this inside their PluginStrategy rather than modifying generic
690         plug-in code.
691
692         * plugins/PluginData.cpp:
693         (WebCore::PluginData::refresh):
694         (WebCore::PluginData::initPlugins):
695
696 2012-06-05  Douglas Stockwell  <dstockwell@chromium.org>
697
698         Crash when modifying fixed-position elements in a detached frame
699         https://bugs.webkit.org/show_bug.cgi?id=88288
700
701         Reviewed by James Robinson.
702
703         Test: fast/block/positioning/fixed-position-detached-frame.html
704
705         * css/StyleResolver.cpp:
706         (WebCore::StyleResolver::collectMatchingRulesForList):
707
708 2012-06-05  Andrey Kosyakov  <caseq@chromium.org>
709
710         Web Inspector: render timeline paint category dark green
711         https://bugs.webkit.org/show_bug.cgi?id=88333
712
713         Reviewed by Pavel Feldman.
714
715         - Added a new, dark-green color for timeline events.
716
717         * WebCore.gypi: Added timelineBarDarkGreen.png
718         * inspector/front-end/Images/timelineBarDarkGreen.png: Added.
719         * inspector/front-end/Images/timelineCheckmarks.png: Added a dark-green checkbox.
720         * inspector/front-end/Images/timelineDots.png: Added a dark-green dot.
721         * inspector/front-end/TimelinePresentationModel.js:
722         (WebInspector.TimelinePresentationModel.categories):
723         * inspector/front-end/WebKit.qrc: Added timelineBarDarkGreen.png.
724         * inspector/front-end/timelinePanel.css:
725         (.timeline-category-statusbar-item.timeline-category-painting .timeline-category-checkbox):
726         (.timeline-category-painting .timeline-graph-bar):
727         (.popover .timeline-painting):
728         (.timeline-category-painting .timeline-tree-icon):
729
730 2012-06-05  Alexei Filippov  <alexeif@chromium.org>
731
732         Web Inspector: serialize edge counts instead of indexes in heap snapshot
733         https://bugs.webkit.org/show_bug.cgi?id=88324
734
735         The serialized node structure currently holds an index
736         of its first containment edge in the edges array.
737         The index can be quite big (up to 7 digits for large snapshots).
738         The patch changes the serialization format to pass
739         node containment edge count instead. For most nodes the count
740         is just a single digit number.
741         This reduces serialized snapshot size and therefore its transfer time.
742
743         Reviewed by Yury Semikhatsky.
744
745         * inspector/front-end/HeapSnapshot.js:
746         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart):
747         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
748         (WebInspector.HeapSnapshotNode.prototype._ordinal):
749         (WebInspector.HeapSnapshotNodeIterator):
750         (WebInspector.HeapSnapshot.prototype._init):
751         (WebInspector.HeapSnapshot.prototype._buildEdgeIndexes):
752         (WebInspector.HeapSnapshot.prototype._buildRetainers):
753         (WebInspector.HeapSnapshot.prototype._bfs):
754         (WebInspector.HeapSnapshot.prototype._buildAggregates):
755         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
756         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
757         (WebInspector.HeapSnapshot.prototype._markPageOwnedNodes):
758         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
759
760 2012-06-05  Arpita Bahuguna  <arpitabahuguna@gmail.com>
761
762         CSS 2.1 failure: border-conflict-element-021a
763         https://bugs.webkit.org/show_bug.cgi?id=86885
764
765         Reviewed by Julien Chaffraix.
766
767         When two adjacent table row groups (thead, tbody, tfoot) have the same border-width
768         and the same border-style in a 'border-collapse: collapse' table the color of the border
769         from the top-most table row wins.
770
771         Tests: fast/table/border-collapsing/adjacent-row-groups-multi.html
772                fast/table/border-collapsing/adjacent-row-groups.html
773
774         * rendering/RenderTable.cpp:
775         (WebCore::RenderTable::paintObject):
776         Currently each row group is sent for paint from top (firstChild) to bottom thereby causing
777         the borders of the bottom-most row group (which is painted last) to overlap over the
778         previous row-group. This breaks the precedence for collapsed borders between adjacent cells.
779
780         This fix thus reverses the order in which the row-groups/sections are passed for painting.
781         Additional change has been done to iterate over the RenderTableSections directly.
782
783         (WebCore):
784         (WebCore::RenderTable::bottomSection):
785         * rendering/RenderTable.h:
786         New function has been added to obtain the last section of the table.
787
788         (RenderTable):
789         * rendering/RenderTableSection.h:
790         (RenderTableSection):
791         RenderTableSection's paint() method has now been made public so as to make it accessible
792         from RenderTable.
793
794 2012-06-05  Csaba Osztrogonác  <ossy@webkit.org>
795
796         [Qt][Win] Fix IDL dependency generation
797         https://bugs.webkit.org/show_bug.cgi?id=88304
798
799         Reviewed by Tor Arne Vestbø.
800
801         * DerivedSources.pri:
802
803 2012-06-05  Sheriff Bot  <webkit.review.bot@gmail.com>
804
805         Unreviewed, rolling out r119467, r119471, and r119476.
806         http://trac.webkit.org/changeset/119467
807         http://trac.webkit.org/changeset/119471
808         http://trac.webkit.org/changeset/119476
809         https://bugs.webkit.org/show_bug.cgi?id=88332
810
811         it broke chromium-mac static initializers test.\ (Requested by
812         loislo on #webkit).
813
814         * WebCore.gyp/WebCore.gyp:
815         * WebCore.gypi:
816         * platform/graphics/FontPlatformData.h:
817         (FontPlatformData):
818         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
819         (WebCore::FontPlatformData::platformDataInit):
820         (WebCore::FontPlatformData::platformDataAssign):
821         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Removed.
822         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Removed.
823         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Removed.
824         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Removed.
825         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Removed.
826         * platform/graphics/mac/FontComplexTextMac.cpp:
827         (WebCore::Font::selectionRectForComplexText):
828         (WebCore::Font::drawComplexText):
829         (WebCore::Font::floatWidthForComplexText):
830         (WebCore::Font::offsetForPositionForComplexText):
831
832 2012-06-05  Alexander Pavlov  <apavlov@chromium.org>
833
834         Web Inspector: SHIFT key as helper to color adjustment in color picker
835         https://bugs.webkit.org/show_bug.cgi?id=88319
836
837         Reviewed by Pavel Feldman.
838
839         With Shift depressed, the dragger in the color picker will snap to the horizontal
840         or vertical axis while dragging, depending on which axis offset is greater.
841
842         * inspector/front-end/Spectrum.js:
843         (WebInspector.Spectrum.colorDragStart):
844         (WebInspector.Spectrum.colorDrag):
845         (WebInspector.Spectrum.draggable.move):
846         (WebInspector.Spectrum.draggable.start):
847
848 2012-06-05  Andrey Kosyakov  <caseq@chromium.org>
849
850         Web Inspector: aggregate all events before first frame into a fake frame
851         https://bugs.webkit.org/show_bug.cgi?id=88229
852
853         - in Timeline's frame mode, start aggregating events by frame even before we get first frame marker.
854
855         * inspector/front-end/TimelineFrameController.js:
856         (WebInspector.TimelineFrameController.prototype._addRecord):
857         (WebInspector.TimelineFrameController.prototype._flushFrame):
858         (WebInspector.TimelineFrameController.prototype._createFrame):
859
860 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
861
862         JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for IDB
863         https://bugs.webkit.org/show_bug.cgi?id=88283
864
865         Reviewed by Kentaro Hara.
866
867         No new tests, idb not working for JSC yet.
868
869         * bindings/js/Dictionary.cpp:
870         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
871         * bindings/js/Dictionary.h:
872         (Dictionary):
873         * bindings/js/JSDictionary.cpp:
874         (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
875         (WebCore):
876         * bindings/js/JSDictionary.h:
877         (JSDictionary):
878
879 2012-06-05  Dongwoo Im  <dw.im@samsung.com>
880
881         Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'.
882         https://bugs.webkit.org/show_bug.cgi?id=73176
883
884         Reviewed by Adam Barth.
885
886         Two more APIs are added in Custom Scheme Handler specification.
887         http://dev.w3.org/html5/spec/Overview.html#custom-handlers
888         One is 'isProtocolHandlerRegistered' to query whether the specific URL
889         is registered or not.
890         The other is 'unregisterProtocolHandler' to remove the registered URL.
891
892         Test: fast/dom/unregister-protocol-handler.html
893
894         * Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.
895         * loader/EmptyClients.h: Add prototypes.
896         (EmptyChromeClient):
897         (WebCore::EmptyChromeClient::isProtocolHandlerRegistered):
898         (WebCore::EmptyChromeClient::unregisterProtocolHandler):
899         * page/ChromeClient.h:
900         (ChromeClient):
901         * page/NavigatorRegisterProtocolHandler.cpp:
902         (WebCore):
903         (WebCore::customHandlersStateString):
904         (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered): Query if the handler is registered.
905         (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler): Unregister the registered handler.
906         * page/NavigatorRegisterProtocolHandler.h:
907         (NavigatorRegisterProtocolHandler):
908         * page/NavigatorRegisterProtocolHandler.idl:
909
910 2012-06-04  Kinuko Yasuda  <kinuko@chromium.org>
911
912         Chromium tests: "Add support for the Blob constructor" [r115582] regressed blob layout tests
913         https://bugs.webkit.org/show_bug.cgi?id=85174
914
915         Reviewed by Kentaro Hara.
916
917         This fixes a crash problem which could happen when the constructor is
918         given an array which contains String-type item(s).
919
920         There're still some Text mismatches between v8 results and
921         JSC results, most of them are v8 not throwing exception
922         when it is given an object whose toString() method throws
923         exception.  (The issue will be addresse in a separate patch.)
924
925         Test: fast/files/blob-constructor.html
926
927         * bindings/v8/custom/V8BlobCustom.cpp:
928         (WebCore::V8Blob::constructorCallback):
929
930 2012-06-05  Kentaro Hara  <haraken@chromium.org>
931
932         Remove unnecessary constructor of SelectorQueryCache
933         https://bugs.webkit.org/show_bug.cgi?id=87942
934
935         Reviewed by Ryosuke Niwa.
936
937         Per the comment from darin@ (https://bugs.webkit.org/show_bug.cgi?id=87942#c27),
938         this patch removes an inline constructor that has no arguments.
939         To have the compiler generate the constructor,
940         this patch also removes WTF_MAKE_NONCOPYABLE().
941
942         No tests. No change in behavior.
943
944         * dom/SelectorQuery.h:
945         (SelectorQueryCache):
946
947 2012-06-05  Kentaro Hara  <haraken@chromium.org>
948
949         Remove unused methods from SelectorQuery.h
950         https://bugs.webkit.org/show_bug.cgi?id=88289
951
952         Reviewed by Antti Koivisto.
953
954         This patch removes SelectorDataList::size() and
955         SelectorDataList::SelectorDataList().
956         SelectorDataList::size() is not used by anybody.
957         SelectorDataList::SelectorDataList() can be auto-generated
958         by a compiler.
959
960         No tests. No change in behavior.
961
962         * dom/SelectorQuery.cpp:
963         * dom/SelectorQuery.h:
964         (SelectorDataList):
965
966 2012-06-05  Kent Tamura  <tkent@chromium.org>
967
968         Build fix for r119470.
969
970         * loader/EmptyClients.cpp: Add #include "IntentRequest.h".
971
972 2012-06-05  Kent Tamura  <tkent@chromium.org>
973
974         Remove unused function: Document::formElements
975         https://bugs.webkit.org/show_bug.cgi?id=88272
976
977         Reviewed by Kentaro Hara.
978
979         No new tests. No behavior change.
980
981         * dom/Document.h:
982         (Document): remove formElements(). It was used for radio group
983         validation, but the current code doesn't use it any more.
984
985 2012-06-05  Kenichi Ishibashi  <bashi@chromium.org>
986
987         Unreviewed build fix on Chromium mac
988
989         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
990         (WebCore::isAATFont):
991
992 2012-06-05  Kent Tamura  <tkent@chromium.org>
993
994         Move some function definitions in EmptyClients.h to EmptyClients.cpp
995         https://bugs.webkit.org/show_bug.cgi?id=88285
996
997         Reviewed by Ryosuke Niwa.
998
999         If we have definitions of functions with RefPtr<> in EmptyClients.h like
1000
1001             virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { }
1002
1003         and a source file includes EmptyClient.h, the source file needs to
1004         include FileChooser.h though the source file doesn't use FileChooser
1005         class explicitly because the definition of runOpenPanel() needs to call
1006         FileChooser::deref().
1007         To avoid this, we had better move such functions to EmptyClients.cpp.
1008
1009         No new tests. No behavior changes.
1010
1011         * loader/EmptyClients.cpp: Move such functions from EmptyClients.h to
1012         here, and move EmptyPopupMenu and EmptySearchPopupMenu too because
1013         they're used only by EmptyChromeClient.
1014         (WebCore):
1015         (EmptyPopupMenu):
1016         (WebCore::EmptyPopupMenu::show):
1017         (WebCore::EmptyPopupMenu::hide):
1018         (WebCore::EmptyPopupMenu::updateFromElement):
1019         (WebCore::EmptyPopupMenu::disconnectClient):
1020         (EmptySearchPopupMenu):
1021         (WebCore::EmptySearchPopupMenu::popupMenu):
1022         (WebCore::EmptySearchPopupMenu::saveRecentSearches):
1023         (WebCore::EmptySearchPopupMenu::loadRecentSearches):
1024         (WebCore::EmptySearchPopupMenu::enabled):
1025         (WebCore::EmptyChromeClient::createPopupMenu):
1026         (WebCore::EmptyChromeClient::createSearchPopupMenu):
1027         (WebCore::EmptyChromeClient::createColorChooser):
1028         (WebCore::EmptyChromeClient::runOpenPanel):
1029         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1030         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1031         (WebCore::EmptyFrameLoaderClient::dispatchWillSendSubmitEvent):
1032         (WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
1033         (WebCore::EmptyFrameLoaderClient::createDocumentLoader):
1034         (WebCore::EmptyFrameLoaderClient::createFrame):
1035         (WebCore::EmptyFrameLoaderClient::createPlugin):
1036         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
1037         (WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin):
1038         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
1039         (WebCore::EmptyFrameLoaderClient::dispatchIntent):
1040         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
1041         (WebCore::EmptyEditorClient::registerUndoStep):
1042         (WebCore::EmptyEditorClient::registerRedoStep):
1043         (WebCore::EmptyContextMenuClient::customizeMenu):
1044         * loader/EmptyClients.h: Move such function definitions to
1045         EmptyClient.cpp, and append OVERRIDE.
1046         (EmptyChromeClient):
1047         (EmptyFrameLoaderClient):
1048         (EmptyTextCheckerClient):
1049         (EmptyEditorClient):
1050         (EmptyContextMenuClient):
1051         * svg/graphics/SVGImage.cpp: Remove unnecessary #includes.
1052
1053 2012-06-05  Alexander Pavlov  <apavlov@chromium.org>
1054
1055         Web Inspector: "-webkit"-prefixed properties are considered inherited in the Computed Style pane
1056         https://bugs.webkit.org/show_bug.cgi?id=88257
1057
1058         Reviewed by Pavel Feldman.
1059
1060         Canonical names for properties should be used when checking if they are inherited (since only canonical names
1061         are put into the usedProperties set).
1062
1063         * inspector/front-end/StylesSidebarPane.js:
1064         (WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited):
1065
1066 2012-06-05  Kenichi Ishibashi  <bashi@chromium.org>
1067
1068         [Chromium] Implement font shaping with font-feature-settings on Mac
1069         https://bugs.webkit.org/show_bug.cgi?id=69826
1070
1071         Reviewed by Tony Chang.
1072
1073         Add HarfBuzz-ng text shaper.
1074         Chromium mac port uses it as secondary text shaper to support OpenType features.
1075         HarfBuzz-ng is only used when -webkit-font-feature-settings is specified and
1076         corresponding font is not an AAT font.
1077
1078         No new tests. css3/font-feature-settings-rendering.html should pass on Chromium mac port.
1079
1080         * WebCore.gyp/WebCore.gyp: Added harfbuzz-ng dependencies.
1081         * WebCore.gypi: Added harfbuzz-ng files.
1082         * platform/graphics/FontPlatformData.h:
1083         (FontPlatformData): Added m_harfbuzzFace.
1084         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1085         (WebCore::FontPlatformData::platformDataInit): Copy m_harfbuzzFace.
1086         (WebCore::FontPlatformData::platformDataAssign): Ditto.
1087         (WebCore):
1088         (WebCore::isAATFont):
1089         (WebCore::FontPlatformData::harfbuzzFace):
1090         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Added.
1091         (WebCore):
1092         (WebCore::harfbuzzFaceCache):
1093         (WebCore::HarfBuzzFace::HarfBuzzFace):
1094         (WebCore::HarfBuzzFace::~HarfBuzzFace):
1095         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Added.
1096         (WebCore):
1097         (HarfBuzzFace):
1098         (WebCore::HarfBuzzFace::create):
1099         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Added.
1100         (WebCore):
1101         (WebCore::floatToHarfBuzzPosition):
1102         (WebCore::getGlyph):
1103         (WebCore::getGlyphHorizontalAdvance):
1104         (WebCore::getGlyphHorizontalOrigin):
1105         (WebCore::getGlyphExtents):
1106         (WebCore::harfbuzzCoreTextGetFontFuncs):
1107         (WebCore::releaseTableData):
1108         (WebCore::harfbuzzCoreTextGetTable):
1109         (WebCore::HarfBuzzFace::createFace):
1110         (WebCore::HarfBuzzFace::createFont):
1111         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
1112         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Added.
1113         (WebCore):
1114         (WebCore::harfbuzzPositionToFloat):
1115         (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
1116         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions):
1117         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
1118         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
1119         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1120         (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
1121         (WebCore::HarfBuzzShaper::setFontFeatures):
1122         (WebCore::HarfBuzzShaper::shape):
1123         (WebCore::HarfBuzzShaper::setupHarfBuzzRun):
1124         (WebCore::HarfBuzzShaper::shapeHarfBuzzRun):
1125         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun):
1126         (WebCore::HarfBuzzShaper::offsetForPosition):
1127         (WebCore::HarfBuzzShaper::selectionRect):
1128         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Added.
1129         (WebCore):
1130         (HarfBuzzShaper):
1131         (WebCore::HarfBuzzShaper::totalWidth):
1132         (HarfBuzzRun):
1133         (WebCore::HarfBuzzShaper::HarfBuzzRun::create):
1134         (WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth):
1135         (WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters):
1136         (WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs):
1137         (WebCore::HarfBuzzShaper::HarfBuzzRun::width):
1138         (WebCore::HarfBuzzShaper::HarfBuzzRun::rtl):
1139         * platform/graphics/mac/FontComplexTextMac.cpp:
1140         (WebCore):
1141         (WebCore::preferHarfBuzz): Added.
1142         (WebCore::Font::selectionRectForComplexText): Use HarfBuzzShaper if font-feature-settings exists.
1143         (WebCore::Font::drawComplexText): Ditto.
1144         (WebCore::Font::floatWidthForComplexText): Ditto.
1145         (WebCore::Font::offsetForPositionForComplexText): Ditto.
1146
1147 2012-06-05  Li Yin  <li.yin@intel.com>
1148
1149         IETC: FileList.item(-1) should return null instead of raising
1150         https://bugs.webkit.org/show_bug.cgi?id=77899
1151
1152         Reviewed by Kentaro Hara.
1153
1154         IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm
1155         Accroding to http://es5.github.com/#x9.6
1156         When the index is negative, it should not raise exception.
1157         Firefox and IE returns null when there is not indexth File object.
1158
1159         Test: fast/files/file-list-test.html
1160
1161         * fileapi/FileList.idl:
1162
1163 2012-06-05  Adam Barth  <abarth@webkit.org>
1164
1165         EventHandler shouldn't dispatch fake mousemove events when scrolling on devices that don't have a mouse
1166         https://bugs.webkit.org/show_bug.cgi?id=88270
1167
1168         Reviewed by James Robinson.
1169
1170         This patch adds a setting analogous to deviceSupportsTouch to determine
1171         whether the device supports mouse. We then don't dispatch fake mouse
1172         events on devices that don't have a mouse in the first place.
1173
1174         Test: fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
1175
1176         * page/EventHandler.cpp:
1177         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
1178         * page/Settings.cpp:
1179         (WebCore::Settings::Settings):
1180         * page/Settings.h:
1181         (WebCore::Settings::setDeviceSupportsMouse):
1182         (WebCore::Settings::deviceSupportsMouse):
1183         (Settings):
1184         * testing/InternalSettings.cpp:
1185         (WebCore::InternalSettings::InternalSettings):
1186         (WebCore::InternalSettings::restoreTo):
1187         (WebCore::InternalSettings::setDeviceSupportsMouse):
1188         (WebCore):
1189         * testing/InternalSettings.h:
1190         (InternalSettings):
1191         * testing/InternalSettings.idl:
1192
1193 2012-06-04  Simon Fraser  <simon.fraser@apple.com>
1194
1195         Leaking ClipRects
1196         https://bugs.webkit.org/show_bug.cgi?id=88282
1197
1198         Reviewed by Dan Bernstein.
1199
1200         In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
1201         was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
1202         there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.
1203
1204         * rendering/RenderLayer.cpp:
1205         (WebCore::RenderLayer::updateClipRects):
1206         * rendering/RenderLayer.h:
1207         (WebCore::ClipRects::ClipRects):
1208
1209 2012-06-04  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
1210
1211         Add missing FractionalLayoutUnit += operator and move LineWidth to use all floats
1212         https://bugs.webkit.org/show_bug.cgi?id=88259
1213
1214         Reviewed by Ryosuke Niwa.
1215
1216         Fix two rounding bugs in LineLayout and RenderBlock that caused inlines
1217         and floats to wrap incorrectly.
1218
1219         Tests: fast/sub-pixel/float-containing-block-with-margin.html
1220                fast/sub-pixel/float-with-right-margin-zoom.html
1221                fast/sub-pixel/inline-block-with-padding.html
1222
1223         * platform/FractionalLayoutUnit.h:
1224         (WebCore::operator+=):
1225         Add missing float version of += operator thus avoiding a silent cast to
1226         int loosing precision.
1227         
1228         * rendering/RenderBlockLineLayout.cpp:
1229         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
1230         (WebCore::LineWidth::updateAvailableWidth):
1231         Change LineWidth left/right to floating point and instead of rounding the
1232         left and right edge separately.
1233         
1234         * rendering/RenderFlexibleBox.cpp:
1235         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
1236         Use explicit cast to avoid compiler ambiguity warning.
1237
1238 2012-06-04  Tony Chang  <tony@chromium.org>
1239
1240         CSS property 'order' should be a number rather than an int
1241         https://bugs.webkit.org/show_bug.cgi?id=88111
1242
1243         Reviewed by Ojan Vafai.
1244
1245         This changed in the spec:
1246         http://dev.w3.org/csswg/css3-flexbox/#order
1247
1248         I also fixed the compile with CSS3_FLEXBOX disabled.
1249
1250         No new tests, covered by existing tests.
1251
1252         * css/CSSComputedStyleDeclaration.cpp:
1253         (WebCore):
1254         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1255         * css/CSSParser.cpp:
1256         (WebCore::CSSParser::parseValue):
1257         * css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>.
1258         (WebCore::CSSProperty::isInheritedProperty):
1259         * css/StyleBuilder.cpp:
1260         (WebCore::StyleBuilder::StyleBuilder):
1261         * css/StyleResolver.cpp:
1262         (WebCore::StyleResolver::collectMatchingRulesForList):
1263         * rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>.
1264         (RenderFlexibleBox::OrderIterator):
1265         * rendering/RenderFlexibleBox.h:
1266         * rendering/style/RenderStyle.h:
1267         * rendering/style/StyleRareNonInheritedData.h:
1268         (StyleRareNonInheritedData):
1269
1270 2012-06-04  Hugo Parente Lima  <hugo.lima@openbossa.org>
1271
1272         Turn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag.
1273         https://bugs.webkit.org/show_bug.cgi?id=88243
1274
1275         Reviewed by Adam Barth.
1276
1277         No new tests needed, this just rename a compiler flag.
1278
1279         * dom/Document.cpp:
1280         (WebCore::Document::setDocType):
1281         * dom/ViewportArguments.h:
1282         * html/HTMLMetaElement.cpp:
1283         (WebCore::HTMLMetaElement::process):
1284
1285 2012-06-04  Dana Jansens  <danakj@chromium.org>
1286
1287         [chromium] Remove redundant setNeedsCommit when prepareToDraw fails
1288         https://bugs.webkit.org/show_bug.cgi?id=88246
1289
1290         Reviewed by James Robinson.
1291
1292         When prepareToDraw fails it explicitly calls setNeedsCommit, but the
1293         scheduler already takes care of this for it. When a frame is not
1294         successfully drawn, the scheduler state machine sets the needsCommit
1295         bit itself.
1296
1297         This behaviour is covered by CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
1298
1299         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1300         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1301
1302 2012-06-04  Takashi Toyoshima  <toyoshim@chromium.org>
1303
1304         [WebSocket] Send requires super linear time against data size
1305         https://bugs.webkit.org/show_bug.cgi?id=87383
1306
1307         Reviewed by Kent Tamura.
1308
1309         WebSocket send operation requires super linear time to send data
1310         against data size. This is because removing sent data in Vector<char>
1311         always requires data copy.
1312         Introduced wtf/StreamBuffer realizes O(n) buffer operations.
1313         This patch is only for optimization. No new tests are needed.
1314
1315         * platform/network/SocketStreamHandleBase.cpp:
1316         (WebCore::SocketStreamHandleBase::sendPendingData):
1317         * platform/network/SocketStreamHandleBase.h:
1318         (SocketStreamHandleBase):
1319
1320 2012-06-04  Tim Horton  <timothy_horton@apple.com>
1321
1322         Mock scrollbars differ by 1px in DRT vs. WKTR
1323         https://bugs.webkit.org/show_bug.cgi?id=80879
1324
1325         Rubber-stamped by Ryosuke Niwa.
1326
1327         Disable r119431 except for Apple Mac port.
1328
1329         * platform/ScrollbarThemeComposite.cpp:
1330         (WebCore::ScrollbarThemeComposite::thumbLength):
1331
1332 2012-06-04  Jeffrey Pfau  <jpfau@apple.com>
1333
1334         Document cleanup can get confused if parser still exists
1335         https://bugs.webkit.org/show_bug.cgi?id=88250
1336
1337         Reviewed by Geoffrey Garen.
1338
1339         No new tests; no behavior changes.
1340
1341         * dom/Document.cpp:
1342         (WebCore::Document::removedLastRef): Detach parser earlier
1343
1344 2012-06-04  Andrew Lo  <anlo@rim.com>
1345
1346         [BlackBerry] Split AnimationFrameRateController into its own file
1347         https://bugs.webkit.org/show_bug.cgi?id=88242
1348
1349         Reviewed by Antonio Gomes.
1350
1351         Include new header file to reflect re-organization of platform animation
1352         header files.
1353
1354         * platform/graphics/DisplayRefreshMonitor.h:
1355
1356 2012-06-04  Dana Jansens  <danakj@chromium.org>
1357
1358         [chromium] Allow CCLayerImpl to find its layer tree host, and use this for CCVideoLayerImpl instead of always-null pointer.
1359         https://bugs.webkit.org/show_bug.cgi?id=88252
1360
1361         Reviewed by James Robinson.
1362
1363         CCVideoLayerImpl has a pointer to its CCLayerTreeHostImpl which is never
1364         set to be non-null currently. Instead of making this a special case, we
1365         move the CCLayerTreeHostImpl* up to the CCLayerImpl base class, and set
1366         the pointer on every layer during commit via the TreeSynchronizer's walk
1367         through the layer tree.
1368
1369         Unit tests: Tested by TreeSynchronizer tests.
1370
1371         * platform/graphics/chromium/TreeSynchronizer.cpp:
1372         (WebCore::TreeSynchronizer::synchronizeTrees):
1373         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
1374         * platform/graphics/chromium/TreeSynchronizer.h:
1375         (WebCore):
1376         (TreeSynchronizer):
1377         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1378         (WebCore::CCLayerImpl::CCLayerImpl):
1379         * platform/graphics/chromium/cc/CCLayerImpl.h:
1380         (WebCore):
1381         (WebCore::CCLayerImpl::layerTreeHostImpl):
1382         (WebCore::CCLayerImpl::setLayerTreeHostImpl):
1383         (CCLayerImpl):
1384         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1385         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1386         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1387         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
1388         (WebCore::CCVideoLayerImpl::setNeedsRedraw):
1389         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
1390
1391 2012-06-04  Tim Horton  <timothy_horton@apple.com>
1392
1393         Mock scrollbars differ by 1px in DRT vs. WKTR
1394         https://bugs.webkit.org/show_bug.cgi?id=80879
1395
1396         Reviewed by Simon Fraser.
1397
1398         Round the length of the scrollbar thumb instead of truncating it.
1399
1400         No new tests, fixes a mismatch between pixel results from DRT and WKTR.
1401         Change is covered by all existing tests with scrollbars run with low tolerance.
1402
1403         * platform/ScrollbarThemeComposite.cpp:
1404         (WebCore::ScrollbarThemeComposite::thumbLength):
1405
1406 2012-06-04  Anders Carlsson  <andersca@apple.com>
1407
1408         Fix an unused result warning when building with clang.
1409
1410         * platform/cf/BinaryPropertyList.cpp:
1411         (WebCore::BinaryPropertyListWriter::writePropertyList):
1412
1413 2012-06-04  Ami Fischman  <fischman@chromium.org>
1414
1415         Don't crash when re-parenting a removed HTMLMediaElement
1416         https://bugs.webkit.org/show_bug.cgi?id=88058
1417
1418         Reviewed by Eric Carlson.
1419
1420         Test: media/media-reparent.html
1421
1422         * html/HTMLMediaElement.cpp:
1423         (WebCore::HTMLMediaElement::userCancelledLoad): Clear the pending load flags because any pending load has been cancelled.
1424
1425 2012-06-04  Sheriff Bot  <webkit.review.bot@gmail.com>
1426
1427         Unreviewed, rolling out r119421 and r119425.
1428         http://trac.webkit.org/changeset/119421
1429         http://trac.webkit.org/changeset/119425
1430         https://bugs.webkit.org/show_bug.cgi?id=88256
1431
1432         not reliable, let's have a do-over (Requested by kling on
1433         #webkit).
1434
1435         * dom/Element.cpp:
1436         (WebCore::Element::detachAttribute):
1437         (WebCore::Element::removeAttribute):
1438         (WebCore::Element::attributes):
1439         (WebCore::Element::setAttributeInternal):
1440         (WebCore::Element::parserSetAttributes):
1441         (WebCore::Element::hasEquivalentAttributes):
1442         (WebCore::Element::createAttributeData):
1443         (WebCore):
1444         (WebCore::Element::setAttributeNode):
1445         (WebCore::Element::removeAttributeNode):
1446         (WebCore::Element::getAttributeNode):
1447         (WebCore::Element::getAttributeNodeNS):
1448         (WebCore::Element::hasAttribute):
1449         (WebCore::Element::hasAttributeNS):
1450         (WebCore::Element::normalizeAttributes):
1451         (WebCore::Element::cloneAttributesFromElement):
1452         * dom/Element.h:
1453         (WebCore::Element::attributeData):
1454         (Element):
1455         (WebCore::Element::ensureAttributeData):
1456         (WebCore::Element::updatedAttributeData):
1457         (WebCore::Element::ensureUpdatedAttributeData):
1458         * dom/ElementAttributeData.cpp:
1459         (WebCore::ElementAttributeData::attrIfExists):
1460         (WebCore::ElementAttributeData::ensureAttr):
1461         (WebCore::ElementAttributeData::setAttr):
1462         (WebCore::ElementAttributeData::removeAttr):
1463         (WebCore::ElementAttributeData::setClass):
1464         (WebCore):
1465         (WebCore::ElementAttributeData::ensureInlineStyle):
1466         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
1467         (WebCore::ElementAttributeData::destroyInlineStyle):
1468         (WebCore::ElementAttributeData::addAttribute):
1469         (WebCore::ElementAttributeData::removeAttribute):
1470         (WebCore::ElementAttributeData::isEquivalent):
1471         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
1472         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
1473         (WebCore::ElementAttributeData::cloneDataFrom):
1474         (WebCore::ElementAttributeData::clearAttributes):
1475         (WebCore::ElementAttributeData::replaceAttribute):
1476         (WebCore::ElementAttributeData::getAttributeNode):
1477         * dom/ElementAttributeData.h:
1478         (WebCore::ElementAttributeData::create):
1479         (ElementAttributeData):
1480         (WebCore::ElementAttributeData::setIdForStyleResolution):
1481         (WebCore::ElementAttributeData::setAttributeStyle):
1482         (WebCore::ElementAttributeData::length):
1483         (WebCore::ElementAttributeData::isEmpty):
1484         (WebCore::ElementAttributeData::attributeItem):
1485         (WebCore::ElementAttributeData::getAttributeItem):
1486         (WebCore::ElementAttributeData::ElementAttributeData):
1487         (WebCore::ElementAttributeData::attributeVector):
1488         (WebCore::ElementAttributeData::clonedAttributeVector):
1489         (WebCore::ElementAttributeData::getAttributeItemIndex):
1490         * dom/StyledElement.cpp:
1491         (WebCore::StyledElement::style):
1492         (WebCore::StyledElement::classAttributeChanged):
1493         (WebCore::StyledElement::removeInlineStyleProperty):
1494         (WebCore::StyledElement::addSubresourceAttributeURLs):
1495         * html/parser/HTMLConstructionSite.cpp:
1496         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
1497         * xml/parser/XMLDocumentParserQt.cpp:
1498         (WebCore::XMLDocumentParser::XMLDocumentParser):
1499
1500 2012-06-04  Andreas Kling  <kling@webkit.org>
1501
1502         Unreviewed build fixes for cr-android and Qt.
1503
1504         * dom/ElementAttributeData.h:
1505         (WebCore::ElementAttributeData::setClass):
1506         Change ElementAttributeData::setClass() to take an AtomicString instead of a String.
1507         The only call site has an AtomicString anyway.
1508         * xml/parser/XMLDocumentParserQt.cpp:
1509         (WebCore::XMLDocumentParser::XMLDocumentParser): Add missing const.
1510
1511 2012-06-04  Sadrul Habib Chowdhury  <sadrul@chromium.org>
1512
1513         [chromium] Fix software rendering for device-scale-factor > 1
1514         https://bugs.webkit.org/show_bug.cgi?id=88136
1515
1516         Reviewed by Darin Fisher.
1517
1518         Test: fast/hidpi/device-scale-factor-paint.html
1519
1520         * WebCore.exp.in:
1521         * testing/InternalSettings.cpp:
1522         (WebCore::InternalSettings::setDeviceScaleFactor):
1523         (WebCore):
1524         * testing/InternalSettings.h:
1525         (InternalSettings):
1526         * testing/InternalSettings.idl:
1527
1528 2012-06-04  Andreas Kling  <kling@webkit.org>
1529
1530         Make ElementAttributeData a variable-sized object to reduce memory use.
1531         <http://webkit.org/b/88240>
1532
1533         Reviewed by Antti Koivisto.
1534
1535         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
1536         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
1537         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
1538         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
1539
1540         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
1541         that nothing tries to mutate an element with a raw attribute array.
1542
1543         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
1544         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
1545
1546         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
1547         This is a 35% reduction in DOM attribute memory use.
1548
1549         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
1550         adding of "class" attributes. For more static pages, savings are even greater.
1551
1552         * dom/Element.cpp:
1553         (WebCore::Element::detachAttribute):
1554         (WebCore::Element::removeAttribute):
1555         (WebCore::Element::attributes):
1556         (WebCore::Element::setAttributeInternal):
1557         (WebCore::Element::parserSetAttributes):
1558         (WebCore::Element::hasEquivalentAttributes):
1559         (WebCore::Element::setAttributeNode):
1560         (WebCore::Element::removeAttributeNode):
1561         (WebCore::Element::getAttributeNode):
1562         (WebCore::Element::getAttributeNodeNS):
1563         (WebCore::Element::hasAttribute):
1564         (WebCore::Element::hasAttributeNS):
1565         (WebCore::Element::normalizeAttributes):
1566         (WebCore::Element::cloneAttributesFromElement):
1567         (WebCore::Element::createMutableAttributeData):
1568         * dom/Element.h:
1569         (WebCore::Element::attributeData):
1570         (Element):
1571         (WebCore::Element::updatedAttributeData):
1572         (WebCore::Element::ensureAttributeData):
1573         (WebCore::Element::ensureUpdatedAttributeData):
1574         (WebCore::Element::mutableAttributeData):
1575         * dom/ElementAttributeData.cpp:
1576         (WebCore::ElementAttributeData::createImmutable):
1577         (WebCore::ElementAttributeData::ElementAttributeData):
1578         (WebCore::ElementAttributeData::~ElementAttributeData):
1579         (WebCore::ElementAttributeData::attrIfExists):
1580         (WebCore::ElementAttributeData::ensureAttr):
1581         (WebCore::ElementAttributeData::setAttr):
1582         (WebCore::ElementAttributeData::removeAttr):
1583         (WebCore::ElementAttributeData::ensureInlineStyle):
1584         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
1585         (WebCore::ElementAttributeData::destroyInlineStyle):
1586         (WebCore::ElementAttributeData::addAttribute):
1587         (WebCore::ElementAttributeData::removeAttribute):
1588         (WebCore::ElementAttributeData::isEquivalent):
1589         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
1590         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
1591         (WebCore::ElementAttributeData::cloneDataFrom):
1592         (WebCore::ElementAttributeData::clearAttributes):
1593         (WebCore::ElementAttributeData::replaceAttribute):
1594         (WebCore::ElementAttributeData::getAttributeNode):
1595         * dom/ElementAttributeData.h:
1596         (ElementAttributeData):
1597         (WebCore::ElementAttributeData::setClass):
1598         (WebCore::ElementAttributeData::setIdForStyleResolution):
1599         (WebCore::ElementAttributeData::inlineStyle):
1600         (WebCore::ElementAttributeData::setAttributeStyle):
1601         (WebCore::ElementAttributeData::isMutable):
1602         (WebCore::ElementAttributeData::makeMutable):
1603         (WebCore::ElementAttributeData::length):
1604         (WebCore::ElementAttributeData::isEmpty):
1605         (WebCore::ElementAttributeData::array):
1606         (WebCore::ElementAttributeData::attributeItem):
1607         (WebCore::ElementAttributeData::getAttributeItem):
1608         (WebCore::ElementAttributeData::getAttributeItemIndex):
1609         * dom/StyledElement.cpp:
1610         (WebCore::StyledElement::style):
1611         (WebCore::StyledElement::classAttributeChanged):
1612         (WebCore::StyledElement::removeInlineStyleProperty):
1613         (WebCore::StyledElement::addSubresourceAttributeURLs):
1614         * html/parser/HTMLConstructionSite.cpp:
1615         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
1616         * xml/parser/XMLDocumentParserQt.cpp:
1617         (WebCore::XMLDocumentParser::XMLDocumentParser):
1618
1619 2012-06-04  Sadrul Habib Chowdhury  <sadrul@chromium.org>
1620
1621         [chromium] Combobox options and autofill options should not be scaled for device-scale factor
1622         https://bugs.webkit.org/show_bug.cgi?id=87921
1623
1624         Reviewed by Darin Fisher.
1625
1626         Chrome takes care of scaling the combobox/autofill lists in the browser side. So it is not
1627         necessary to scale here. This change reverts parts of changes in r111539.
1628
1629         Manually tested with different scale factors.
1630
1631         * platform/chromium/PopupListBox.cpp:
1632         (WebCore::PopupListBox::paint):
1633         (WebCore::PopupListBox::paintRow):
1634         (WebCore::PopupListBox::getRowHeight):
1635         * platform/chromium/PopupListBox.h:
1636         (PopupContainerSettings):
1637         * platform/chromium/PopupMenuChromium.cpp:
1638         (WebCore::PopupMenuChromium::show):
1639         * rendering/RenderMenuList.cpp:
1640         (WebCore::RenderMenuList::showPopup):
1641
1642 2012-06-04  Dana Jansens  <danakj@chromium.org>
1643
1644         [chromium] Make LayerRendererChromium use RenderPasses instead of RenderSurfaces
1645         https://bugs.webkit.org/show_bug.cgi?id=88132
1646
1647         Reviewed by Adrienne Walker.
1648
1649         This patch is partly renaming, partly moving data into CCRenderPass
1650         and CCRenderPassDrawQuad. LayerRendererChromium should accept as input
1651         a set of RenderPasses and this should be sufficient for drawing. It
1652         should have no notion of RenderSurfaces at all.
1653
1654         First, what isn't done: RenderSurfaces still hold the textures
1655         where RenderPasses are drawn to/from, so that these textures can
1656         persist across frames. This will be addressed separately.
1657
1658         Otherwise, this completely removes the concept of RenderSurface from
1659         LayerRenderChromium and the CCDrawQuad, replacing it with RenderPass.
1660         The "renderSurfaceTextureManager" is renamed to the "implTextureManager"
1661         and like-wise for the TextureAllocator, as these are not used
1662         exclusively for render surfaces (passes), and a texture manager for
1663         render passes that does not require a RenderSurface* will be the focus
1664         of future changes.
1665
1666         Covered by existing tests.
1667
1668         * WebCore.gypi:
1669         * platform/graphics/chromium/LayerRendererChromium.cpp:
1670         (WebCore::LayerRendererChromium::LayerRendererChromium):
1671         (WebCore::LayerRendererChromium::setVisible):
1672         (WebCore::LayerRendererChromium::releaseRenderPassTextures):
1673         (WebCore::LayerRendererChromium::viewportChanged):
1674         (WebCore::LayerRendererChromium::clearRenderPass):
1675         (WebCore::LayerRendererChromium::beginDrawingFrame):
1676         (WebCore::LayerRendererChromium::drawRenderPass):
1677         (WebCore::LayerRendererChromium::drawQuad):
1678         (WebCore::LayerRendererChromium::drawBackgroundFilters):
1679         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1680         (WebCore::LayerRendererChromium::copyPlaneToTexture):
1681         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
1682         (WebCore::LayerRendererChromium::finishDrawingFrame):
1683         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
1684         (WebCore::LayerRendererChromium::getFramebufferTexture):
1685         (WebCore::LayerRendererChromium::isCurrentRenderPass):
1686         (WebCore::LayerRendererChromium::useRenderPass):
1687         (WebCore::LayerRendererChromium::useManagedTexture):
1688         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
1689         (WebCore::LayerRendererChromium::setScissorToRect):
1690         (WebCore::LayerRendererChromium::setDrawFramebufferRect):
1691         (WebCore::LayerRendererChromium::initializeSharedObjects):
1692         (WebCore::LayerRendererChromium::renderPassProgram):
1693         (WebCore::LayerRendererChromium::renderPassProgramAA):
1694         (WebCore::LayerRendererChromium::renderPassMaskProgram):
1695         (WebCore::LayerRendererChromium::renderPassMaskProgramAA):
1696         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1697         * platform/graphics/chromium/LayerRendererChromium.h:
1698         (WebCore):
1699         (LayerRendererChromium):
1700         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
1701         (WebCore::CCDrawQuad::toRenderPassDrawQuad):
1702         * platform/graphics/chromium/cc/CCDrawQuad.h:
1703         (WebCore):
1704         (CCDrawQuad):
1705         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1706         (WebCore::CCHeadsUpDisplay::draw):
1707         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1708         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1709         (WebCore::CCLayerTreeHostImpl::drawLayers):
1710         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1711         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1712         (WebCore::CCRenderPass::CCRenderPass):
1713         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1714         * platform/graphics/chromium/cc/CCRenderPass.h:
1715         (CCRenderPass):
1716         (WebCore::CCRenderPass::framebufferOutputRect):
1717         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp.
1718         (WebCore):
1719         (WebCore::CCRenderPassDrawQuad::create):
1720         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
1721         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h.
1722         (WebCore):
1723         (CCRenderPassDrawQuad):
1724         (WebCore::CCRenderPassDrawQuad::renderPass):
1725         (WebCore::CCRenderPassDrawQuad::isReplica):
1726         (WebCore::CCRenderPassDrawQuad::maskTextureId):
1727         (WebCore::CCRenderPassDrawQuad::filters):
1728         (WebCore::CCRenderPassDrawQuad::backgroundFilters):
1729         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1730         (WebCore::CCRenderSurface::prepareContentsTexture):
1731         (WebCore::CCRenderSurface::prepareBackgroundTexture):
1732         (WebCore::CCRenderSurface::appendQuads):
1733         * platform/graphics/chromium/cc/CCRenderSurface.h:
1734         (WebCore):
1735         (CCRenderSurface):
1736         * platform/graphics/chromium/cc/CCRenderer.h:
1737         (CCRenderer):
1738         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
1739         (WebCore::CCScrollbarLayerImpl::willDraw):
1740         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1741         (WebCore::CCVideoLayerImpl::reserveTextures):
1742
1743 2012-06-04  Abhishek Arya  <inferno@chromium.org>
1744
1745         Crash in multi-column layout.
1746         https://bugs.webkit.org/show_bug.cgi?id=88022
1747
1748         Reviewed by Ojan Vafai.
1749
1750         The patch addresses two problems::
1751         1. |this| in RenderBlock::splitBlocks can get destroyed when we
1752         move its children to the clone and later call updateBeforeAfterContent
1753         on the parent. So, we stop accessing its member variables and cache
1754         it in a local.
1755         2. Positioned objects were not getting cleared from our grand parents.
1756         This will happen if our immediate children got moved to a clone tree,
1757         however at our parent nothing was moved. So, we make sure to remove
1758         the positioned objects at every level while we are doing the cloning.
1759
1760         Tests: fast/multicol/span/empty-anonymous-block-split-crash.html
1761                fast/multicol/span/positioned-objects-not-removed-crash.html
1762
1763         * rendering/RenderBlock.cpp:
1764         (WebCore::RenderBlock::splitBlocks):
1765
1766 2012-06-04  Tim Horton  <timothy_horton@apple.com>
1767
1768         Mac build fails with SVG disabled
1769         https://bugs.webkit.org/show_bug.cgi?id=88165
1770
1771         Reviewed by Dirk Schulze.
1772
1773         Wrap all of SVGCSSPropertyNames in #if ENABLE(SVG),
1774         and mark an unused argument in collectMatchingRulesForList.
1775
1776         * css/SVGCSSPropertyNames.in:
1777         * css/StyleResolver.cpp:
1778         (WebCore::StyleResolver::collectMatchingRulesForList):
1779
1780 2012-06-04  David Kilzer  <ddkilzer@apple.com>
1781
1782         BUILD FIX: Unused variable with ENABLE(CONTEXT_MENUS) off
1783
1784         This broke in r118374.
1785
1786         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1787         (WebCore::JSInspectorFrontendHost::showContextMenu): Add
1788         UNUSED_PARAM(exec) when ENABLE(CONTEXT_MENUS) is off.
1789
1790 2012-06-04  Sheriff Bot  <webkit.review.bot@gmail.com>
1791
1792         Unreviewed, rolling out r119393.
1793         http://trac.webkit.org/changeset/119393
1794         https://bugs.webkit.org/show_bug.cgi?id=88236
1795
1796         Test is incorrect (duplicate content) and is causing Chromium
1797         failures (Requested by schenney on #webkit).
1798
1799         * html/canvas/CanvasRenderingContext2D.cpp:
1800         (WebCore::CanvasRenderingContext2D::drawImage):
1801
1802 2012-06-04  Zeev Lieber  <zlieber@chromium.org>
1803
1804         [chromium] Cleanup scissor rect computation/use with damage
1805         https://bugs.webkit.org/show_bug.cgi?id=87167
1806
1807         Reviewed by Adrienne Walker.
1808
1809         Performing scissorRect computation during
1810         calculateRenderPasses. Storing scissorRect in shared quad state
1811         instead of computing it during drawQuad. Added scissorRect fields
1812         into layers and render surfaces.
1813
1814         Covered by existing layout tests. Introduced more unit tests to
1815         test end-to-end drawing using mock graphic context, and added more
1816         test cases to CCLayerTreeHostCommon to verify scissorRect computation.
1817
1818         * platform/graphics/chromium/LayerChromium.h:
1819         (WebCore::LayerChromium::scissorRect):
1820         (WebCore::LayerChromium::setScissorRect):
1821         (LayerChromium):
1822         * platform/graphics/chromium/LayerRendererChromium.cpp:
1823         (WebCore::LayerRendererChromium::clearRenderSurface):
1824         (WebCore::LayerRendererChromium::drawRenderPass):
1825         (WebCore::LayerRendererChromium::drawQuad):
1826         (WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
1827         * platform/graphics/chromium/LayerRendererChromium.h:
1828         (LayerRendererChromium):
1829         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1830         (WebCore::RenderSurfaceChromium::computeRootScissorRectInCurrentSurface):
1831         (WebCore):
1832         * platform/graphics/chromium/RenderSurfaceChromium.h:
1833         (WebCore::RenderSurfaceChromium::scissorRect):
1834         (WebCore::RenderSurfaceChromium::setScissorRect):
1835         (RenderSurfaceChromium):
1836         * platform/graphics/chromium/cc/CCDrawQuad.h:
1837         (WebCore::CCDrawQuad::scissorRect):
1838         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1839         (WebCore::CCLayerImpl::createSharedQuadState):
1840         * platform/graphics/chromium/cc/CCLayerImpl.h:
1841         (CCLayerImpl):
1842         (WebCore::CCLayerImpl::scissorRect):
1843         (WebCore::CCLayerImpl::setScissorRect):
1844         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1845         (WebCore::CCLayerTreeHost::updateLayers):
1846         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1847         (WebCore):
1848         (WebCore::calculateLayerScissorRect):
1849         (WebCore::calculateSurfaceScissorRect):
1850         (WebCore::calculateDrawTransformsInternal):
1851         (WebCore::calculateVisibleAndScissorRectsInternal):
1852         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
1853         (WebCore::CCLayerTreeHostCommon::calculateVisibleAndScissorRects):
1854         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
1855         (CCLayerTreeHostCommon):
1856         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1857         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
1858         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1859         (WebCore::CCLayerTreeHostImpl::drawLayers):
1860         (WebCore::CCLayerTreeHostImpl::swapBuffers):
1861         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1862         (CCLayerTreeHostImpl):
1863         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1864         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1865         * platform/graphics/chromium/cc/CCRenderPass.h:
1866         (CCRenderPass):
1867         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1868         (WebCore::CCRenderSurface::createSharedQuadState):
1869         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
1870         (WebCore):
1871         (WebCore::CCRenderSurface::computeRootScissorRectInCurrentSurface):
1872         (WebCore::CCRenderSurface::appendQuads):
1873         * platform/graphics/chromium/cc/CCRenderSurface.h:
1874         (CCRenderSurface):
1875         (WebCore::CCRenderSurface::setScissorRect):
1876         (WebCore::CCRenderSurface::scissorRect):
1877         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp:
1878         (WebCore::CCRenderSurfaceDrawQuad::create):
1879         (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
1880         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h:
1881         (CCRenderSurfaceDrawQuad):
1882         * platform/graphics/chromium/cc/CCRenderer.h:
1883         (CCRenderer):
1884         * platform/graphics/chromium/cc/CCSharedQuadState.cpp:
1885         (WebCore::CCSharedQuadState::create):
1886         (WebCore::CCSharedQuadState::CCSharedQuadState):
1887         * platform/graphics/chromium/cc/CCSharedQuadState.h:
1888         (CCSharedQuadState):
1889         (WebCore::CCSharedQuadState::scissorRect):
1890
1891 2012-06-04  Kentaro Hara  <haraken@chromium.org>
1892
1893         Remove SelectorQueryCacheEntry from SelectorQuery.h
1894         https://bugs.webkit.org/show_bug.cgi?id=88204
1895
1896         Reviewed by Hajime Morita.
1897
1898         As anttik@ pointed out in https://bugs.webkit.org/show_bug.cgi?id=87942#c15,
1899         we can remove SelectorQueryCacheEntry by having SelectorQuery hold CSSSelectorList.
1900
1901         Tests: fast/dom/SelectorAPI/* No change in test results.
1902
1903         * dom/SelectorQuery.cpp:
1904         (WebCore::SelectorQuery::SelectorQuery):
1905         (WebCore::SelectorQueryCache::add):
1906         * dom/SelectorQuery.h:
1907         (SelectorQuery):
1908         (SelectorQueryCache):
1909
1910 2012-06-04  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1911
1912         [GTK] Memory leak in PasteboardHelper
1913         https://bugs.webkit.org/show_bug.cgi?id=88216
1914
1915         Reviewed by Martin Robinson.
1916
1917         Fixed a memory leak in PasteboardHelper by using adoptRef instead
1918         of just getting a new reference of TargetList.
1919
1920         No new tests because of no behavior changes.
1921
1922         * platform/gtk/PasteboardHelper.cpp:
1923         (WebCore::PasteboardHelper::dropAtomsForContext):
1924
1925 2012-06-04  Rob Buis  <rbuis@rim.com>
1926
1927         Hit ASSERT when editing attribute value in Element in SVG Document
1928         https://bugs.webkit.org/show_bug.cgi?id=88179
1929
1930         Reviewed by Pavel Feldman.
1931
1932         Make sure the <span> is created as a HTML Element regardless of document in use.
1933
1934         * inspector/InspectorDOMAgent.cpp:
1935         (WebCore):
1936         (WebCore::InspectorDOMAgent::setAttributesAsText):
1937
1938 2012-06-04  Yoshifumi Inoue  <yosin@chromium.org>
1939
1940         [Forms] Change function and variable names independent from "double" type
1941         https://bugs.webkit.org/show_bug.cgi?id=88220
1942
1943         Reviewed by Kent Tamura.
1944
1945         This patch is a part of introducing decimal arithmetic to input type.
1946
1947         This patch renames function and variable names which contain term "double"
1948         to "number" to separate concept and implementation.
1949
1950         No new tests. This patch doesn't change behavior.
1951
1952         * html/BaseDateAndTimeInputType.cpp:
1953         (WebCore::BaseDateAndTimeInputType::valueAsDate): Replace parseToDouble to parseToNumber.
1954         (WebCore::BaseDateAndTimeInputType::valueAsNumber): ditto.
1955         (WebCore::BaseDateAndTimeInputType::parseToNumber): ditto.
1956         * html/BaseDateAndTimeInputType.h:
1957         (BaseDateAndTimeInputType):
1958         * html/DateInputType.cpp:
1959         (WebCore::DateInputType::createStepRange): Replace parseToDouble to parseToNumber.
1960         * html/DateTimeInputType.cpp:
1961         (WebCore::DateTimeInputType::createStepRange): Replace parseToDouble to parseToNumber.
1962         * html/DateTimeLocalInputType.cpp:
1963         (WebCore::DateTimeLocalInputType::createStepRange): Replace parseToDouble to parseToNumber.
1964         * html/InputType.cpp:
1965         (WebCore::InputType::rangeUnderflow): Replace parseToDouble to parseToNumber and doubleValue to numericValue.
1966         (WebCore::InputType::rangeOverflow): ditto.
1967         (WebCore::InputType::isInRange): ditto.
1968         (WebCore::InputType::isOutOfRange): ditto.
1969         (WebCore::InputType::stepMismatch): ditto.
1970         (WebCore::InputType::validationMessage): ditto.
1971         (WebCore::InputType::parseToNumber): ditto.
1972         (WebCore::InputType::parseToDoubleWithDecimalPlaces): ditto.
1973         (WebCore::InputType::stepUpFromRenderer): dttio.
1974         * html/InputType.h:
1975         (InputType):
1976         * html/MonthInputType.cpp:
1977         (WebCore::MonthInputType::createStepRange): Replace parseToDouble to parseToNumber.
1978         (WebCore::MonthInputType::parseToNumber): ditto.
1979         * html/MonthInputType.h:
1980         (MonthInputType):
1981         * html/NumberInputType.cpp:
1982         (WebCore::NumberInputType::valueAsNumber): Replace parseToDouble to parseToNumber.
1983         (WebCore::NumberInputType::createStepRange): ditto.
1984         (WebCore::NumberInputType::parseToNumber): ditto.
1985         * html/NumberInputType.h:
1986         * html/RangeInputType.cpp:
1987         (WebCore::ensureMaximum): Added helper function for createStepRange for avoiding cast in max() and using "const".
1988         (WebCore::RangeInputType::valueAsNumber): Replace parseToDouble to parseToNumber.
1989         (WebCore::RangeInputType::createStepRange): ditto.
1990         (WebCore::RangeInputType::handleKeydownEvent): ditto.
1991         (WebCore::RangeInputType::parseToNumber): ditto.
1992         (WebCore::RangeInputType::sanitizeValue): ditto.
1993         * html/RangeInputType.h:
1994         (RangeInputType):
1995         * html/StepRange.cpp:
1996         (WebCore::StepRange::parseStep): Replace DoubleWithDecimalPlaces to NumberWithDecimalPlaces.
1997         (WebCore::StepRange::stepMismatch): Replace parseToDouble to parseToNumber.
1998         * html/StepRange.h:
1999         (WebCore::StepRange::NumberWithDecimalPlaces): Renamed from DoubleWithDecimalPlaces.
2000         (WebCore::StepRange::NumberWithDecimalPlacesOrMissing): Renamed from DoubleWithDecimalPlacesOrMissing.
2001         * html/TimeInputType.cpp:
2002         (WebCore::TimeInputType::createStepRange): Replace parseToDouble to parseToNumber.
2003         * html/WeekInputType.cpp:
2004         (WebCore::WeekInputType::createStepRange): Replace parseToDouble to parseToNumber.
2005
2006 2012-06-04  David Kilzer  <ddkilzer@apple.com>
2007
2008         BUILD FIX: FeatureDefines.xcconfig should match across projects
2009
2010         * Configurations/FeatureDefines.xcconfig:
2011         - Add missing ENABLE_CSS_IMAGE_RESOLUTION.
2012
2013 2012-06-04  Justin Novosad  <junov@chromium.org>
2014
2015         Canvas 2D - Source rectangles that overlap the source image boundary, not supported by drawImage
2016         https://bugs.webkit.org/show_bug.cgi?id=66574
2017
2018         Reviewed by Stephen White.
2019
2020         Test: fast/canvas/drawImage-clipped-source.html
2021
2022         When the source rectangle argument to drawImage is not entirely
2023         contatained by the domain of the source image, the source rectangle
2024         is clipped, and the destination rectangle is clipped proportionately
2025         Old behavior was to silently fail, which did not comply with the spec.
2026
2027         * html/canvas/CanvasRenderingContext2D.cpp:
2028         (WebCore::normalizeAndClipRects):
2029         (WebCore):
2030         (WebCore::CanvasRenderingContext2D::drawImage):
2031
2032 2012-06-04  Dominik Röttsches  <dominik.rottsches@intel.com>
2033
2034         [Cairo] Implementation of GraphicsContext does not save/restore ImageInterpolation correctly
2035         https://bugs.webkit.org/show_bug.cgi?id=87985
2036
2037         Reviewed by Gustavo Noronha Silva.
2038
2039         Moving image interpolation quality setting into state so that it's saved and restored.
2040
2041         Covered by existing test fast/canvas/canvas-imageSmoothingEnabled.html which is now passing.
2042
2043         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
2044         (GraphicsContextPlatformPrivate): Removing stale member that was never used.
2045         * platform/graphics/cairo/PlatformContextCairo.cpp:
2046         (WebCore::PlatformContextCairo::State::State):
2047         (PlatformContextCairo::State):
2048         (WebCore::PlatformContextCairo::PlatformContextCairo):
2049         (WebCore::PlatformContextCairo::drawSurfaceToContext):
2050         (WebCore::PlatformContextCairo::setImageInterpolationQuality):
2051         (WebCore):
2052         (WebCore::PlatformContextCairo::imageInterpolationQuality):
2053         * platform/graphics/cairo/PlatformContextCairo.h:
2054         (PlatformContextCairo): Moving implementations for image interpolation quality setter into implementation file.
2055
2056 2012-06-04  Philip Rogers  <pdr@google.com>
2057
2058         Fix assert in non-scaling strokes in patterns
2059         https://bugs.webkit.org/show_bug.cgi?id=88198
2060
2061         When calculating the CTM for a rect or path in a pattern we need to use
2062         an SVGPatternElement's local transform. Pattern did not expose the transform
2063         because it does not extend from from SVGStyledLocatable or SVGStyledTransformable.
2064         This patch exposes the pattern's transform in localCoordinateSpaceTransform.
2065
2066         SVGGradientElement does not need this special handling because the children
2067         of a gradient element are restricted to not include shape and structural elements
2068         that would need to calculate a CTM.
2069
2070         Before this patch the added test would assert.
2071         This patch is a prerequisite to a major refactoring of RenderSVGShape &
2072         friends, and the test will be unskipped in a followup patch.
2073
2074         Reviewed by Dirk Schulze.
2075
2076         Tests: svg/stroke/non-scaling-stroke-pattern-expected.svg
2077                svg/stroke/non-scaling-stroke-pattern.svg
2078
2079         * svg/SVGPatternElement.cpp:
2080         (WebCore::SVGPatternElement::localCoordinateSpaceTransform):
2081         (WebCore):
2082         * svg/SVGPatternElement.h:
2083         (SVGPatternElement):
2084         * svg/SVGStyledElement.cpp:
2085         (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
2086
2087 2012-06-04  Alexei Filippov  <alexeif@chromium.org>
2088
2089         Web Inspector: speed up _calculateRetainedSizes function
2090         https://bugs.webkit.org/show_bug.cgi?id=87863
2091
2092         Reviewed by Yury Semikhatsky.
2093
2094         * inspector/front-end/HeapSnapshot.js:
2095         (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes):
2096
2097 2012-06-04  Yury Semikhatsky  <yurys@chromium.org>
2098
2099         Web Inspector: add unknown size to the memory pie-chart legend
2100         https://bugs.webkit.org/show_bug.cgi?id=88081
2101
2102         Reviewed by Pavel Feldman.
2103
2104         Added "Unknown" part size to the memory pie-chart legend.
2105
2106         * inspector/front-end/NativeMemorySnapshotView.js:
2107         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
2108         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
2109         (WebInspector.MemoryBlockViewProperties._initialize):
2110         (WebInspector.NativeMemoryPieChart.prototype._paint):
2111
2112 2012-06-04  Mike West  <mkwst@chromium.org>
2113
2114         Adding explicit console error for duplicated CSP directives.
2115         https://bugs.webkit.org/show_bug.cgi?id=88193
2116
2117         This patch adds an explicit error message for duplicated CSP
2118         directives instead of reusing the "unrecognized directive" error.
2119
2120         Reviewed by Adam Barth.
2121
2122         Test: http/tests/security/contentSecurityPolicy/duplicate-directive.html
2123
2124         * page/ContentSecurityPolicy.cpp:
2125         (CSPDirectiveList):
2126         (WebCore::CSPDirectiveList::logDuplicateDirective):
2127         (WebCore):
2128         (WebCore::CSPDirectiveList::parseReportURI):
2129         (WebCore::CSPDirectiveList::setCSPDirective):
2130         (WebCore::CSPDirectiveList::applySandboxPolicy):
2131         (WebCore::CSPDirectiveList::addDirective):
2132
2133 2012-06-04  Yoshifumi Inoue  <yosin@chromium.org>
2134
2135         REGRESSION(r117929) [Forms] input type=number thinks 0 is not a number
2136         https://bugs.webkit.org/show_bug.cgi?id=88208
2137
2138         Reviewed by Kent Tamura.
2139
2140         This patch fixes invalid handling of return value of parseToDoubleForNumberType
2141         in NumberInputType::isAcceptableValue to use isfinite() function for checking
2142         whether specified string is valid number or not. Before r117929, return value
2143         of parseToDoubleForNumberType was bool, but after r117929, it is double.
2144
2145         Test: fast/forms/number/input-number-from-renderer.html
2146
2147         * html/NumberInputType.cpp:
2148         (WebCore::NumberInputType::isAcceptableValue): Use isfinite()
2149
2150 2012-06-04  Antti Koivisto  <antti@apple.com>
2151
2152         Crash in WebCore::RenderView::getRetainedWidgets
2153         https://bugs.webkit.org/show_bug.cgi?id=88217
2154
2155         Reviewed by Kenneth Rohde Christiansen.
2156         
2157         There is no known repro, the crash has been seen on the field. It is likely that it happens with frame
2158         flattening enabled only.
2159
2160         Null check root renderer in performPostLayoutTasks. The root can legitimely be null for several reasons and
2161         is mostly null checked everywhere else.
2162
2163         * page/FrameView.cpp:
2164         (WebCore::FrameView::performPostLayoutTasks):
2165
2166 2012-06-04  Kentaro Hara  <haraken@chromium.org>
2167
2168         Use SelectorQuery in Element::webkitMatchesSelector()
2169         https://bugs.webkit.org/show_bug.cgi?id=88209
2170
2171         Reviewed by Antti Koivisto.
2172
2173         By using SelectorQuery in Element::webkitMatchesSelector(),
2174         we can not only simplify the code but also improve the performance
2175         thanks to the cache mechanism of SelectorQuery which was implemented
2176         in bug 87942.
2177
2178         Tests: fast/dom/SelectorAPI/*. No change in test results.
2179
2180         * dom/Element.cpp:
2181         (WebCore::Element::webkitMatchesSelector):
2182         * dom/SelectorQuery.cpp:
2183         (WebCore::SelectorQuery::matches):
2184         (WebCore):
2185         * dom/SelectorQuery.h:
2186         (SelectorQuery):
2187
2188 2012-05-31  Kinuko Yasuda  <kinuko@chromium.org>
2189
2190         [chromium] DataTransferItem.webkitGetAsEntry() should synchronously return entry
2191         https://bugs.webkit.org/show_bug.cgi?id=87969
2192
2193         Reviewed by Tony Chang.
2194
2195         Per discussion on whatwg we should make webkitGetAsEntry synchronous.
2196         http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Apr/0079.html
2197
2198         Tests: editing/pasteboard/data-transfer-items-drag-drop-entry.html
2199                fast/filesystem/cross-filesystem-op.html
2200
2201         * Modules/filesystem/DataTransferItemFileSystem.h:
2202         (DataTransferItemFileSystem):
2203         * Modules/filesystem/DataTransferItemFileSystem.idl:
2204         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp:
2205         (WebCore::DataTransferItemFileSystem::webkitGetAsEntry): Changed it to synchronously return entry.
2206
2207 2012-06-03  Dominic Cooney  <dominicc@chromium.org>
2208
2209         EventTarget.idl should generate JS bindings
2210         https://bugs.webkit.org/show_bug.cgi?id=88120
2211
2212         This is one step in a larger change to expose a constructor for
2213         EventTarget and put EventTarget on the prototype chain of DOM
2214         objects that are event targets, in line with DOM Core. See
2215         <https://bugs.webkit.org/show_bug.cgi?id=67312>
2216
2217         Reviewed by Adam Barth.
2218
2219         No new tests. This change does not change any functionality.
2220
2221         * CMakeLists.txt: Generate JSEventTarget.
2222         * DerivedSources.cpp:
2223         * DerivedSources.make:
2224         * DerivedSources.pri:
2225         * GNUmakefile.list.am:
2226         * Target.pri:
2227         * UseJSC.cmake:
2228         * WebCore.gyp/WebCore.gyp:
2229         * WebCore.gypi:
2230         * WebCore.vcproj/WebCore.vcproj:
2231         * WebCore.xcodeproj/project.pbxproj:
2232         * bindings/js/JSBindingsAllInOne.cpp: JSEventTarget.cpp was renamed.
2233         * bindings/js/JSEventTarget.h: Removed. Generated now.
2234         * bindings/js/JSEventTargetCustom.cpp: Renamed from Source/WebCore/bindings/js/JSEventTarget.cpp.
2235         * bindings/scripts/CodeGeneratorV8.pm:
2236         (GetInternalFields): EventTarget is an EventTarget.
2237         * dom/EventTarget.idl: Defer to toJS, toEventTarget in JSEventTargetCustom.cpp.
2238
2239 2012-06-03  Hayato Ito  <hayato@chromium.org>
2240
2241         Supports traversing nodes in an orphaned shadow subtree in ComposedShadowTreeParentWalker.
2242         https://bugs.webkit.org/show_bug.cgi?id=87924
2243
2244         Reviewed by Dimitri Glazkov.
2245
2246         Some events, such as a 'click' event, can be dispatched on nodes in an orphaned shadow subtree.
2247         When resolving a parent node of a shadow root which is not assigned to any shadow insertion point,
2248         we have to return its shadow host as a parent node.
2249
2250         The related shadow DOM spec section is:
2251         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events
2252
2253         Test: fast/dom/shadow/shadow-dom-event-dispatching.html
2254
2255         * dom/ComposedShadowTreeWalker.cpp:
2256         (WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot):
2257
2258 2012-06-03  Sheriff Bot  <webkit.review.bot@gmail.com>
2259
2260         Unreviewed, rolling out r119359.
2261         http://trac.webkit.org/changeset/119359
2262         https://bugs.webkit.org/show_bug.cgi?id=88189
2263
2264         This broke platform/mac/fast/dom/wrapper-classes-objc.html.
2265         (Requested by dominicc on #webkit).
2266
2267         * bindings/objc/PublicDOMInterfaces.h:
2268         * bindings/scripts/CodeGeneratorObjC.pm:
2269         (GetBaseClass):
2270         * dom/MouseEvent.h:
2271         (MouseEvent):
2272         * dom/WheelEvent.cpp:
2273         (WebCore::WheelEvent::WheelEvent):
2274         * dom/WheelEvent.h:
2275         (WheelEvent):
2276         * dom/WheelEvent.idl:
2277
2278 2012-06-03  Dominic Cooney  <dominicc@chromium.org>
2279
2280         WheelEvent should inherit from MouseEvent
2281         https://bugs.webkit.org/show_bug.cgi?id=76104
2282
2283         Reviewed by Kentaro Hara.
2284
2285         The spec for WheelEvent is
2286         <http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-WheelEvent>
2287
2288         Tests: fast/events/event-creation.html
2289                http://samples.msdn.microsoft.com/ietestcenter/dominheritance/showdominheritancetest.htm?Prototype_WheelEvent
2290
2291         * bindings/objc/PublicDOMInterfaces.h: Remove redundant MouseEvent API from WheelEvent
2292         * bindings/scripts/CodeGeneratorObjC.pm: MouseEvents are Events
2293         * dom/MouseEvent.h: Expose no-arg constructor to WheelEvent
2294         * dom/WheelEvent.cpp:
2295         (WebCore::WheelEvent::WheelEvent): Call MouseEvent superconstructor
2296         * dom/WheelEvent.h: Extend MouseEvent
2297         * dom/WheelEvent.idl: "
2298
2299 2012-06-03  Varun Jain  <varunjain@google.com>
2300
2301         [chromium] Add new gesture type (two finger tap) that triggers context menu.
2302         https://bugs.webkit.org/show_bug.cgi?id=88173
2303
2304         Reviewed by Adam Barth.
2305
2306         Test: fast/events/touch/gesture/context-menu-on-two-finger-tap.html
2307
2308         * platform/PlatformEvent.h:
2309
2310 2012-06-02  Andy Estes  <aestes@apple.com>
2311
2312         __ZNK7WebCore4Node27traverseNextAncestorSiblingEv should be exported even if ENABLE(FULLSCREEN_API) is false
2313         https://bugs.webkit.org/show_bug.cgi?id=88184
2314
2315         Reviewed by Dan Bernstein.
2316
2317         Node::traverseNextAncestorSibling() is called in several inline
2318         functions defined in ContainerNode.h (a private header), so its symbol
2319         needs to be exported regardless of whether full-screen API is enabled.
2320
2321         * WebCore.exp.in:
2322
2323 2012-06-02  Xianzhu Wang  <wangxianzhu@chromium.org>
2324
2325         SVGImageCache leaks image data
2326         https://bugs.webkit.org/show_bug.cgi?id=87792
2327
2328         There are two functions to remove a client from a CachedImage:
2329         - CachedResource::removeClient()
2330         - CachedImage::removeClientForRenderer().
2331         It's easy to make error to call the former which will leak the cached
2332         image buffers in SVGImageCache.
2333
2334         This change combined the two by adding the virtual 
2335         CachedResource::didRemoveClient(). CachedImage will do SVGImageCache
2336         cleanup in the function.
2337
2338         Reviewed by Nikolas Zimmermann.
2339
2340         Test: svg/as-image/svg-image-leak-cached-data.html
2341
2342         * loader/cache/CachedFont.h:
2343         (WebCore::CachedFontClient::resourceClientType): Added 'const'.
2344         * loader/cache/CachedImage.cpp:
2345         (WebCore):
2346         (WebCore::CachedImage::didRemoveClient): Removes the client from SVGImageCache.
2347         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
2348         * loader/cache/CachedImage.h:
2349         (CachedImage):
2350         (WebCore::CachedImageClient::resourceClientType): Added 'const'.
2351         * loader/cache/CachedRawResource.h:
2352         (WebCore::CachedRawResourceClient::resourceClientType): Added 'const'.
2353         * loader/cache/CachedResource.cpp:
2354         (WebCore::CachedResource::removeClient): Added invocation of didRemoveClient().
2355         * loader/cache/CachedResource.h:
2356         (WebCore::CachedResource::didRemoveClient): Added for subclasses to do additional works.
2357         * loader/cache/CachedResourceClient.h:
2358         (WebCore::CachedResourceClient::resourceClientType): Added 'const'.
2359         * loader/cache/CachedSVGDocument.h:
2360         (WebCore::CachedSVGDocumentClient::resourceClientType): Added 'const'.
2361         * loader/cache/CachedStyleSheetClient.h:
2362         (WebCore::CachedStyleSheetClient::resourceClientType): Added 'const'.
2363         * rendering/style/StyleCachedImage.cpp:
2364         (WebCore::StyleCachedImage::removeClient):
2365         * rendering/style/StyleCachedImageSet.cpp:
2366         (WebCore::StyleCachedImageSet::removeClient):
2367         * svg/graphics/SVGImageCache.cpp:
2368         (WebCore::SVGImageCache::~SVGImageCache): Added checking for leaks.
2369         (WebCore::SVGImageCache::removeClientFromCache):
2370         (WebCore::SVGImageCache::setRequestedSizeAndScales): 
2371         (WebCore::SVGImageCache::requestedSizeAndScales):
2372         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForClient):
2373         * svg/graphics/SVGImageCache.h:
2374         (WebCore):
2375         (SVGImageCache):
2376
2377 2012-06-02  Ryosuke Niwa  <rniwa@webkit.org>
2378
2379         Windows build fix after r119330. Unnest the class for now.
2380
2381         * dom/SelectorQuery.cpp:
2382         (WebCore::SelectorQueryCacheEntry::SelectorQueryCacheEntry):
2383         (WebCore::SelectorQueryCache::add):
2384         * dom/SelectorQuery.h:
2385         (SelectorQueryCacheEntry):
2386         (WebCore::SelectorQueryCacheEntry::selectorQuery):
2387         (WebCore):
2388         (SelectorQueryCache):
2389
2390 2012-06-02  Geoffrey Garen  <ggaren@apple.com>
2391
2392         DOM string cache should hash pointers, not characters
2393         https://bugs.webkit.org/show_bug.cgi?id=88175
2394
2395         Reviewed by Phil Pizlo and Sam Weinig.
2396
2397         Dromaeo DOM Core reports no change.
2398
2399         http://trac.webkit.org/changeset/84934 accidentally changed from hashing
2400         pointers to hashing characters, due to template defaults. Let's change back.
2401
2402         Hashing characters is not so good because:
2403
2404         (1) It's not memory-safe with HashMap::set(). HashMap::set() replaces
2405         the value but not the key. Since our values own our keys, we need to
2406         ensure object identity between key and value, or the key can be freed
2407         prematurely. (This is impossible to demonstrate with our current
2408         eager sweep behavior, but it shows up as crashes in layout tests if you
2409         change to lazy sweep.)
2410
2411         (2) It's slower.
2412
2413         * bindings/js/DOMWrapperWorld.h:
2414         (WebCore): Override the default hash, which hashes based on characters.
2415
2416 2012-06-02  Eli Fidler  <efidler@rim.com>
2417
2418         Don't crash if we ask for fonts that don't exist.
2419         https://bugs.webkit.org/show_bug.cgi?id=88106
2420
2421         Reviewed by Dan Bernstein.
2422
2423         RIM PR 161219
2424
2425         If the site doesn't ask for a reasonable font and the system doesn't
2426         provide a good fallback, FontFallBackList::primaryFontData can be 0,
2427         which can cause a crash.
2428
2429         * platform/graphics/skia/FontCacheSkia.cpp:
2430         (WebCore::FontCache::getLastResortFallbackFont):
2431
2432 2012-06-02  Kentaro Hara  <haraken@chromium.org>
2433
2434         [Performance] Optimize querySelector() by caching SelectorQuery objects
2435         https://bugs.webkit.org/show_bug.cgi?id=87942
2436
2437         Reviewed by Antti Koivisto.
2438
2439         This patch improves performance of Node::querySelector() by 7.1x in Safari/Mac
2440         and by 8.5x in Chromium/Linux.
2441
2442         Performance test: Parser/query-selector-first.html, Parser/query-selector-last.html
2443
2444         [query-selector-first.html]
2445         Safari/Mac      264.97 runs/s  =>  1872.78 runs/s  (7.06x speed-up)
2446         Chromium/Linux  244.84 runs/s  =>  2071.60 runs/s  (8.46x speed-up)
2447
2448         [query-selector-last.html]
2449         Safari/Mac      393.73 runs/s  =>  466.05 runs/s   (1.18x speed-up)
2450         Chromium/Linux  401.15 runs/s  =>  484.45 runs/s   (1.20x speed-up)
2451
2452         Previously Node::querySelector() and Node::querySelectorAll() had been
2453         parsing CSS queries every time. This patch optimizes the performance by caching
2454         parsed results onto a Document.
2455
2456         The cache is invalidated when any of CSS related variables is updated.
2457         As per the current implementation of CSSParserContext::operator==(), the CSS related
2458         variables are as follows:
2459
2460         - baseURI
2461         - charset
2462         - mode
2463         - isHTMLDocument
2464         - isCSSCustomFilterEnabled
2465         - isCSSRegionsEnabled
2466         - needsSiteSpecificQuirks
2467         - enforcesCSSMIMETypeInNoQuirksMode
2468
2469         Actually, we do not need to watch all of these variables:
2470
2471         - The current implementation does not watch the change of charset.
2472         charset is always set to a null String by CSSParserContext::CSSParserContext().
2473
2474         - isHTMLDocument never changes.
2475
2476         - isCSSCustomFilterEnabled, isCSSRegionsEnabled, needsSiteSpecificQuirks and
2477         enforcesCSSMIMETypeInNoQuirksMode are not flipped in a user scenario.
2478         If someone changes them, it would be reasonable to expect them
2479         to take the effect only on subsequent document loads.
2480         Thus we do not need to invalidate the cache when these variables are updated.
2481
2482         Consequently, the condition under which we have to invalidate the cache is
2483         that any of the following variables is updated:
2484
2485         - baseURI
2486         - mode
2487
2488         Tests: fast/dom/SelectorAPI/*. No change in test results.
2489
2490         * dom/SelectorQuery.h: SelectorQueryCache is a cache from CSS selectors to parsed results.
2491         SelectorQueryCache::Entry is an entry of the cache.
2492         SelectorQueryCache::Entry holds a SelectorQuery object and a CSSSelectorList object.
2493         The reason why SelectorQueryCache::Entry needs to hold the CSSSelectorList object
2494         is that the CSSSelectorList object keeps the lifetime of CSSSelector objects
2495         in the SelectorQuery object. Since the SelectorQuery object just holds pointers
2496         to CSSSelector objects, the CSSSelectorList object must not be destructed
2497         before the SelectorQuery object is destructed.
2498         (WebCore):
2499         (SelectorDataList):
2500         (WebCore::SelectorQuery::SelectorQuery):
2501         (SelectorQuery):
2502         (SelectorQueryCache):
2503         (WebCore::SelectorQueryCache::SelectorQueryCache):
2504         (Entry):
2505         (WebCore::SelectorQueryCache::Entry::selectorQuery):
2506         * dom/SelectorQuery.cpp:
2507         (WebCore::SelectorQuery::initialize):
2508         (WebCore::SelectorQueryCache::Entry::Entry):
2509         (WebCore::SelectorQueryCache::add): Returns a cached SelectorQuery object if any.
2510         Otherwise, parses a given CSS selector, creates a SelectorQuery object,
2511         adds the SelectorQuery object to a new entry in the cache, returns the SelectorQuery
2512         object.
2513         (WebCore::SelectorQueryCache::invalidate): Clears the cache.
2514
2515         * dom/Document.h:
2516         (WebCore):
2517         (Document):
2518         * dom/Document.cpp:
2519         (WebCore::Document::selectorQueryCache):
2520         (WebCore):
2521         (WebCore::Document::setCompatibilityMode): Invalidates the cache
2522         when m_compatibilityMode is updated.
2523         (WebCore::Document::updateBaseURL): Invalidates the cache
2524         when m_baseURL is updated.
2525
2526         * dom/Node.h: Changed String to AtomicString, since the key of the cache
2527         should be AtomicString.
2528         (Node):
2529         * dom/Node.cpp: Optimized the code by using the cache.
2530         (WebCore::Node::querySelector):
2531         (WebCore::Node::querySelectorAll):
2532
2533 2012-06-02  Dan Bernstein  <mitz@apple.com>
2534
2535         Reverted the last change.
2536
2537         * WebCore.xcodeproj/project.pbxproj:
2538
2539 2012-06-02  Dan Bernstein  <mitz@apple.com>
2540
2541         Stop treating Perl code as private headers.
2542
2543         * WebCore.xcodeproj/project.pbxproj: Removed CodeGenerator.pm, generate-bindings.pl,
2544         IDLParser.pm, IDLStructure.pm, and preprocessor.pm from the Copy Headers build phase.
2545
2546 2012-06-02  Zeno Albisser  <zeno@webkit.org>
2547
2548         Fix and enable WebGL for WebKit2 on Qt.
2549         https://bugs.webkit.org/show_bug.cgi?id=86214
2550
2551         Make GraphicsContext3DPrivate use GraphicsSurfaces
2552         for WK2. The GraphicsContext3D then uses the existing
2553         RenderBuffer for multisample rendering.
2554         When WebGraphicsLayer::syncCompositingState is being
2555         executed, the canvas is being synced as well. This means
2556         that the RenderBuffer contents are being blit onto
2557         a GraphicsSurface, and the GraphicsSurface token is
2558         being sent to the UIProcess.
2559         The WebLayerTreeRenderer then creates a
2560         TextureMapperSurfaceBackingStore for the canvas and
2561         passes the GraphicsSurface token as an argument.
2562         The token can then be used to identify the GraphicsSurface
2563         from the UIProcess side.
2564
2565         Reviewed by Noam Rosenthal.
2566
2567         * platform/graphics/GraphicsContext3D.h:
2568         Added createGraphicsSurfaces function. This is currently only
2569         being used by the Qt port.
2570
2571         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2572         (WebCore::GraphicsContext3D::reshape):
2573         Calling the createGraphicsSurfaces function when the GraphicsContext3D
2574         is reshaped. This is currently only relevant for the Qt port.
2575
2576         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2577         (GraphicsContext3DPrivate):
2578         Added m_frontBufferGraphicsSurface, m_backBufferGraphicsSurface
2579         and m_surfaceFlags members.
2580         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2581         In case of WK2, create a QOpenGLContext and two GraphicsSurface
2582         for sharing the WebGL content with the UIProcess. One GraphicsSurface
2583         is being used as the front, the other one as the backbuffer.
2584         Creating a QOpenGLContext currently requires showing a QWindow.
2585         For the moment we therefore create a minimal QWindow and place
2586         it offscreen.
2587         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
2588         This new function is called from the WebGraphicsLayer,
2589         to blit the multisample framebuffer and copy its contents
2590         onto the GraphicsSurface.
2591         (WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces):
2592         Whenever the GraphicsContext3D is being reshaped,
2593         new GraphicsSurfaces must be created with the updated dimensions.
2594         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
2595
2596         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
2597         Added a new virtual function copyToGraphicsSurface.
2598         (TextureMapperPlatformLayer):
2599         (WebCore::TextureMapperPlatformLayer::copyToGraphicsSurface):
2600
2601 2012-06-02  Tony Chang  <tony@chromium.org>
2602
2603         Rename the flexbox CSS propery values from start to flex-start and end to flex-end
2604         https://bugs.webkit.org/show_bug.cgi?id=88152
2605
2606         Reviewed by Ojan Vafai.
2607
2608         The spec changed. This is to differentiate from start/end which will
2609         depend on writing mode direction, rather than flex direction.
2610
2611         No new tests, just updated the existing values.
2612
2613         * css/CSSParser.cpp:
2614         (WebCore::isValidKeywordPropertyAndValue):
2615         * css/CSSPrimitiveValueMappings.h:
2616         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2617         (WebCore::CSSPrimitiveValue::operator EAlignItems):
2618         (WebCore::CSSPrimitiveValue::operator EJustifyContent):
2619         (WebCore::CSSPrimitiveValue::operator EAlignContent):
2620         * css/CSSValueKeywords.in:
2621         * rendering/RenderFlexibleBox.cpp:
2622         (WebCore::initialJustifyContentOffset):
2623         (WebCore::alignmentForChild):
2624         (WebCore::initialAlignContentOffset):
2625         (WebCore::RenderFlexibleBox::alignFlexLines):
2626         (WebCore::RenderFlexibleBox::alignChildren):
2627         * rendering/style/RenderStyle.h:
2628         * rendering/style/RenderStyleConstants.h:
2629
2630 2012-06-01  Alexandre Elias  <aelias@google.com>
2631
2632         [chromium] Software compositor initialization and base classes
2633         https://bugs.webkit.org/show_bug.cgi?id=87920
2634
2635         Reviewed by James Robinson.
2636
2637         This introduces new wrapper class CCGraphicsContext and base class
2638         CCRenderer which will be used for software compositing support.
2639         If no GraphicsContext3D is available, early return for now.
2640
2641         No new tests. (No-op change in 3d mode.)
2642
2643         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2644         (WebCore::BitmapCanvasLayerTextureUpdater::Texture::updateRect):
2645         (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect):
2646         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2647         (Texture):
2648         (BitmapCanvasLayerTextureUpdater):
2649         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2650         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
2651         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::updateTextureRect):
2652         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2653         (Texture):
2654         (BitmapSkPictureCanvasLayerTextureUpdater):
2655         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
2656         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
2657         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
2658         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
2659         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
2660         (Texture):
2661         (FrameBufferSkPictureCanvasLayerTextureUpdater):
2662         * platform/graphics/chromium/ImageLayerChromium.cpp:
2663         (WebCore::ImageLayerTextureUpdater::Texture::updateRect):
2664         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
2665         * platform/graphics/chromium/LayerChromium.h:
2666         (WebCore):
2667         * platform/graphics/chromium/LayerRendererChromium.cpp:
2668         (WebCore::CCRenderer::toGLMatrix):
2669         (WebCore):
2670         (WebCore::LayerRendererChromium::create):
2671         (WebCore::CCRenderer::CCRenderer):
2672         (WebCore::LayerRendererChromium::LayerRendererChromium):
2673         (WebCore::LayerRendererChromium::copyPlaneToTexture):
2674         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
2675         (WebCore::LayerRendererChromium::getFramebufferTexture):
2676         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
2677         * platform/graphics/chromium/LayerRendererChromium.h:
2678         (CCRenderer):
2679         (WebCore::CCRenderer::~CCRenderer):
2680         (WebCore::CCRenderer::ccContext):
2681         (WebCore::CCRenderer::settings):
2682         (WebCore::CCRenderer::viewportSize):
2683         (WebCore::CCRenderer::viewportWidth):
2684         (WebCore::CCRenderer::viewportHeight):
2685         (WebCore::CCRenderer::projectionMatrix):
2686         (WebCore::CCRenderer::windowMatrix):
2687         (WebCore::CCRenderer::sharedGeometryQuad):
2688         (WebCore):
2689         (LayerRendererChromium):
2690         * platform/graphics/chromium/LayerTextureSubImage.cpp:
2691         (WebCore::LayerTextureSubImage::upload):
2692         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
2693         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
2694         * platform/graphics/chromium/LayerTextureSubImage.h:
2695         (WebCore):
2696         (LayerTextureSubImage):
2697         * platform/graphics/chromium/LayerTextureUpdater.h:
2698         (WebCore):
2699         (Texture):
2700         * platform/graphics/chromium/ManagedTexture.cpp:
2701         (WebCore::ManagedTexture::bindTexture):
2702         (WebCore::ManagedTexture::framebufferTexture2D):
2703         * platform/graphics/chromium/ManagedTexture.h:
2704         (WebCore):
2705         (ManagedTexture):
2706         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2707         * platform/graphics/chromium/TextureCopier.cpp:
2708         (WebCore::AcceleratedTextureCopier::copyTexture):
2709         * platform/graphics/chromium/TextureCopier.h:
2710         (TextureCopier):
2711         (AcceleratedTextureCopier):
2712         * platform/graphics/chromium/TextureUploader.h:
2713         (TextureUploader):
2714         * platform/graphics/chromium/ThrottledTextureUploader.cpp:
2715         (WebCore::ThrottledTextureUploader::uploadTexture):
2716         * platform/graphics/chromium/ThrottledTextureUploader.h:
2717         (ThrottledTextureUploader):
2718         * platform/graphics/chromium/cc/CCGraphicsContext.h: Copied from Source/WebCore/platform/graphics/chromium/CanvasLayerTextureUpdater.h.
2719         (WebCore):
2720         (CCGraphicsContext):
2721         (WebCore::CCGraphicsContext::create2D):
2722         (WebCore::CCGraphicsContext::create3D):
2723         (WebCore::CCGraphicsContext::context3D):
2724         (WebCore::CCGraphicsContext::CCGraphicsContext):
2725         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2726         (WebCore::CCHeadsUpDisplay::draw):
2727         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2728         (WebCore::CCLayerImpl::willDraw):
2729         (WebCore::CCLayerImpl::bindContentsTexture):
2730         * platform/graphics/chromium/cc/CCLayerImpl.h:
2731         (WebCore):
2732         (CCLayerImpl):
2733         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2734         (WebCore::CCLayerTreeHost::createContext):
2735         (WebCore::CCLayerTreeHost::context):
2736         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2737         (CCLayerTreeHostClient):
2738         (WebCore::CCSettings::CCSettings):
2739         (CCSettings):
2740         (CCLayerTreeHost):
2741         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2742         (WebCore::CCLayerTreeHostImpl::context):
2743         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
2744         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2745         (CCLayerTreeHostImpl):
2746         (WebCore::CCLayerTreeHostImpl::layerRenderer):
2747         * platform/graphics/chromium/cc/CCProxy.h:
2748         (WebCore):
2749         (CCProxy):
2750         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2751         (WebCore::CCScrollbarLayerImpl::willDraw):
2752         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2753         (CCScrollbarLayerImpl):
2754         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2755         (WebCore::CCSingleThreadProxy::context):
2756         (WebCore::CCSingleThreadProxy::initializeContext):
2757         (WebCore::CCSingleThreadProxy::recreateContext):
2758         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2759         (CCSingleThreadProxy):
2760         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
2761         (WebCore::CCTextureUpdater::update):
2762         * platform/graphics/chromium/cc/CCTextureUpdater.h:
2763         (CCTextureUpdater):
2764         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2765         (WebCore::CCThreadProxy::context):
2766         (WebCore::CCThreadProxy::initializeContext):
2767         (WebCore::CCThreadProxy::recreateContext):
2768         (WebCore::CCThreadProxy::beginFrame):
2769         (WebCore::CCThreadProxy::initializeContextOnImplThread):
2770         (WebCore::CCThreadProxy::recreateContextOnImplThread):
2771         * platform/graphics/chromium/cc/CCThreadProxy.h:
2772         (CCThreadProxy):
2773         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2774         (WebCore::CCVideoLayerImpl::willDraw):
2775         (WebCore::CCVideoLayerImpl::willDrawInternal):
2776         (WebCore::CCVideoLayerImpl::reserveTextures):
2777         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2778         (CCVideoLayerImpl):
2779
2780 2012-06-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2781
2782         Unreviewed, rolling out r119283, r119287, and r119291.
2783         http://trac.webkit.org/changeset/119283
2784         http://trac.webkit.org/changeset/119287
2785         http://trac.webkit.org/changeset/119291
2786         https://bugs.webkit.org/show_bug.cgi?id=88159
2787
2788         Not only broke compilation in the initial commit but also
2789         broke LayerChromiumTest.basicCreateAndDestroy (Requested by
2790         rniwa on #webkit).
2791
2792         * WebCore.gypi:
2793         * platform/graphics/chromium/AnimationTranslationUtil.cpp: Removed.
2794         * platform/graphics/chromium/AnimationTranslationUtil.h: Removed.
2795         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2796         (WebCore::GraphicsLayerChromium::addAnimation):
2797         * platform/graphics/chromium/LayerChromium.cpp:
2798         (WebCore::LayerChromium::addAnimation):
2799         * platform/graphics/chromium/LayerChromium.h:
2800         (LayerChromium):
2801         * platform/graphics/chromium/LinkHighlight.cpp:
2802         (WebCore::LinkHighlight::LinkHighlight):
2803         * platform/graphics/chromium/cc/CCAnimationCurve.h:
2804         (CCTransformAnimationCurve):
2805         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp:
2806         (WebCore::CCTransformKeyframe::create):
2807         (WebCore::CCTransformKeyframe::CCTransformKeyframe):
2808         (WebCore::CCTransformKeyframe::value):
2809         (WebCore::CCTransformKeyframe::clone):
2810         (WebCore::CCKeyframedTransformAnimationCurve::getValue):
2811         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h:
2812         (CCTransformKeyframe):
2813         (CCKeyframedTransformAnimationCurve):
2814         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2815         (WebCore::CCLayerAnimationController::addAnimation):
2816         (WebCore):
2817         (WebCore::CCLayerAnimationController::add):
2818         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
2819         (WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
2820         (WebCore::CCLayerAnimationController::tickAnimations):
2821         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
2822         (CCLayerAnimationControllerClient):
2823         (CCLayerAnimationController):
2824         * platform/graphics/chromium/cc/CCLayerImpl.h:
2825
2826 2012-06-01  Levi Weintraub  <leviw@chromium.org>
2827
2828         Large number constant in TransformationMatrix::projectPoint overflows FractionalLayoutUnits with sub-pixel layout enabled
2829         https://bugs.webkit.org/show_bug.cgi?id=87896
2830
2831         Reviewed by James Robinson.
2832
2833         kLargeNumber is meant to avoid overflowing when projecting a point through a transform. Unfortunately,
2834         due to FractionalLayoutUnit's diminished range compared to integers, we were overflowing anyways. This
2835         change adjusts our large number by the same value, but adjusted for our denominator.
2836
2837         This was originally missed because transforms/3d is marked as pass/fail in Chromium's test_expectations.txt
2838         https://bugs.webkit.org/show_bug.cgi?id=66989 tracks removing this problem.
2839
2840         No new tests. Covered by transforms/3d/hit-testing/perspective-clipped.html
2841
2842         * platform/graphics/transforms/TransformationMatrix.cpp:
2843         (WebCore::TransformationMatrix::projectPoint):
2844
2845 2012-06-01  Tim Horton  <timothy_horton@apple.com>
2846
2847         Cleanup GeneratorGeneratedImage/Gradient changes from r117858
2848         https://bugs.webkit.org/show_bug.cgi?id=88063
2849
2850         Reviewed by Simon Fraser.
2851
2852         No new tests, code cleanup.
2853
2854         * platform/graphics/Generator.h:
2855         (WebCore::Generator::hash): hash() should be const.
2856         * platform/graphics/GeneratorGeneratedImage.cpp:
2857         (WebCore::GeneratorGeneratedImage::drawPattern): Minor cleanup.
2858         * platform/graphics/Gradient.cpp:
2859         (WebCore::Gradient::Gradient): Rename m_hashCache to m_cachedHash.
2860         (WebCore::Gradient::addColorStop): Rename clearHashCache to invalidateHash.
2861         (WebCore::Gradient::sortStopsIfNecessary): Rename clearHashCache to invalidateHash.
2862         (WebCore::Gradient::setSpreadMethod): Rename clearHashCache to invalidateHash.
2863         (WebCore::Gradient::setGradientSpaceTransform): Rename clearHashCache to invalidateHash.
2864         (WebCore::Gradient::hash): Use intHash instead of the pair hasher. Add compile time size checks
2865         for structures being passed to StringHasher.
2866         * platform/graphics/Gradient.h:
2867         (WebCore::Gradient::setP0): Rename clearHashCache to invalidateHash.
2868         (WebCore::Gradient::setP1): Rename clearHashCache to invalidateHash.
2869         (WebCore::Gradient::setStartRadius): Rename clearHashCache to invalidateHash.
2870         (WebCore::Gradient::setEndRadius): Rename clearHashCache to invalidateHash.
2871         (WebCore::Gradient::invalidateHash):  Rename clearHashCache to invalidateHash.
2872         * platform/graphics/GraphicsContext.cpp:
2873         (WebCore::scalesMatch): Added. Determine if the scale of two AffineTransforms match.
2874         (WebCore::GraphicsContext::isCompatibleWithBuffer): Make use of scalesMatch to simplify the logic.
2875
2876 2012-06-01  Raymond Toy  <rtoy@google.com>
2877
2878         Remove RefInfo class
2879         https://bugs.webkit.org/show_bug.cgi?id=87904
2880
2881         Reviewed by Chris Rogers.
2882
2883         No new tests; covered by existing tests.
2884
2885         * Modules/webaudio/AudioBufferSourceNode.cpp:
2886         (WebCore::AudioBufferSourceNode::~AudioBufferSourceNode): Clear
2887         panner node.
2888         (WebCore::AudioBufferSourceNode::totalPitchRate):
2889         (WebCore::AudioBufferSourceNode::setPannerNode): Use
2890         RefTypeConnection counting for panner node.
2891         (WebCore):
2892         (WebCore::AudioBufferSourceNode::clearPannerNode): New function to
2893          clear panner node in AudioBufferSourceNode.
2894         (WebCore::AudioBufferSourceNode::finish): Clear panner node when done.
2895         * Modules/webaudio/AudioBufferSourceNode.h:
2896         (AudioBufferSourceNode): Add virtual finish(), m_pannerNode is not
2897         a RefPtr anymore.
2898         * Modules/webaudio/AudioContext.cpp:
2899         (WebCore::AudioContext::addDeferredFinishDeref): Remove unneeded RefTyp.
2900         (WebCore::AudioContext::handleDeferredFinishDerefs): Remove
2901         unneeded RefType.
2902         * Modules/webaudio/AudioContext.h:
2903         (AudioContext): Update addDeferredFinishDeref signature.
2904         * Modules/webaudio/AudioNode.cpp:
2905         (WebCore::AudioNode::deref): Update call to addDeferredFinishDeref. 
2906         * Modules/webaudio/AudioScheduledSourceNode.h:
2907         (AudioScheduledSourceNode): Make finish() virtual.
2908
2909 2012-06-01  Tony Chang  <tony@chromium.org>
2910
2911         rename -webkit-flex-pack and -webkit-flex-line-pack to -webkit-justify-content and -webkit-align-content
2912         https://bugs.webkit.org/show_bug.cgi?id=88113
2913
2914         Reviewed by Ojan Vafai.
2915
2916         This recently changed in the spec:
2917         http://dev.w3.org/csswg/css3-flexbox/#justify-content-property
2918         http://dev.w3.org/csswg/css3-flexbox/#align-content-property
2919
2920         No new tests, updated existing tests.
2921
2922         * css/CSSComputedStyleDeclaration.cpp:
2923         (WebCore):
2924         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2925         * css/CSSParser.cpp:
2926         (WebCore::isValidKeywordPropertyAndValue):
2927         (WebCore::isKeywordPropertyID):
2928         (WebCore::CSSParser::parseValue):
2929         * css/CSSPrimitiveValueMappings.h:
2930         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2931         (WebCore::CSSPrimitiveValue::operator EJustifyContent):
2932         (WebCore::CSSPrimitiveValue::operator EAlignContent):
2933         * css/CSSProperty.cpp:
2934         (WebCore::CSSProperty::isInheritedProperty):
2935         * css/CSSPropertyNames.in:
2936         * css/StyleBuilder.cpp:
2937         (WebCore::StyleBuilder::StyleBuilder):
2938         * css/StyleResolver.cpp:
2939         (WebCore::StyleResolver::collectMatchingRulesForList):
2940         * rendering/RenderFlexibleBox.cpp:
2941         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
2942         (WebCore::initialJustifyContentOffset):
2943         (WebCore::justifyContentSpaceBetweenChildren):
2944         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2945         (WebCore::RenderFlexibleBox::layoutColumnReverse):
2946         (WebCore::initialAlignContentOffset):
2947         (WebCore::alignContentSpaceBetweenChildren):
2948         (WebCore::RenderFlexibleBox::alignFlexLines):
2949         * rendering/RenderFlexibleBox.h:
2950         * rendering/style/RenderStyle.h:
2951         * rendering/style/RenderStyleConstants.h:
2952         * rendering/style/StyleFlexibleBoxData.cpp:
2953         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
2954         (WebCore::StyleFlexibleBoxData::operator==):
2955         * rendering/style/StyleFlexibleBoxData.h:
2956         (StyleFlexibleBoxData):
2957         * rendering/style/StyleRareNonInheritedData.cpp:
2958         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2959         (WebCore::StyleRareNonInheritedData::operator==):
2960         * rendering/style/StyleRareNonInheritedData.h:
2961         (StyleRareNonInheritedData):
2962
2963 2012-06-01  Adam Barth  <abarth@webkit.org>
2964
2965         Overflow scrolling doesn't need to create a stacking context is the overflow is hidden
2966         https://bugs.webkit.org/show_bug.cgi?id=88057
2967
2968         Reviewed by James Robinson.
2969
2970         This patch causes us to match the iOS implementation of this feature.
2971
2972         * css/StyleResolver.cpp:
2973         (WebCore::StyleResolver::collectMatchingRulesForList):
2974
2975 2012-06-01  James Robinson  <jamesr@chromium.org>
2976
2977         [chromium] Unreviewed compile fix for r119283
2978
2979         For the record, Dana Jensens <danakj@chromium.org> wrote this slightly faster than I did.
2980
2981         * platform/graphics/chromium/LayerChromium.h:
2982         (WebCore::LayerChromium::bounds):
2983         * platform/graphics/chromium/cc/CCLayerImpl.h:
2984         (WebCore::CCLayerImpl::bounds):
2985
2986 2012-06-01  Ian Vollick  <vollick@chromium.org>
2987
2988         [chromium] Accelerated animations should use WebTransformOperations
2989         https://bugs.webkit.org/show_bug.cgi?id=87686
2990
2991         Reviewed by James Robinson.
2992
2993         CCTransformKeyframe new owns a WebTransformOperations rather than a
2994         TransformOperations. LayerChromium's API has been changed so that
2995         LayerChromium::addAnimation should take only a CCActiveAnimation.
2996         GraphicsLayerChromium is new responsible for translating to
2997         WebTransformOperations and creating CCActiveAnimations. Tests that use
2998         the public API (that is, they call addAnimation with KeyframeValueList
2999         and Animation arguments) have been moved to GraphicsLayerChromiumTest.
3000
3001         Unit tests:
3002             GraphicsLayerChromiumTest.createOpacityAnimation
3003             GraphicsLayerChromiumTest.createTransformAnimation
3004             GraphicsLayerChromiumTest.createTransformAnimationWithBigRotation
3005             GraphicsLayerChromiumTest.createTransformAnimationWithSingularMatrix
3006             GraphicsLayerChromiumTest.createReversedAnimation
3007             GraphicsLayerChromiumTest.createAlternatingAnimation
3008             GraphicsLayerChromiumTest.createReversedAlternatingAnimation
3009
3010         * WebCore.gypi:
3011         * platform/graphics/chromium/AnimationTranslationUtil.cpp: Added.
3012         (WebCore):
3013         (WebCore::toWebTransformOperations):
3014         (WebCore::appendKeyframe):
3015         (WebCore::CCKeyframedTransformAnimationCurve):
3016         (WebCore::createActiveAnimation):
3017         * platform/graphics/chromium/AnimationTranslationUtil.h: Added.
3018         (WebCore):
3019         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3020         (WebCore::GraphicsLayerChromium::addAnimation):
3021         * platform/graphics/chromium/LayerChromium.cpp:
3022         (WebCore::LayerChromium::addAnimation):
3023         * platform/graphics/chromium/LayerChromium.h:
3024         (WebCore):
3025         (LayerChromium):
3026         * platform/graphics/chromium/LinkHighlight.cpp:
3027         (WebCore::LinkHighlight::LinkHighlight):
3028         * platform/graphics/chromium/cc/CCAnimationCurve.h:
3029         (CCTransformAnimationCurve):
3030         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp:
3031         (WebCore::CCTransformKeyframe::create):
3032         (WebCore::CCTransformKeyframe::CCTransformKeyframe):
3033         (WebCore::CCTransformKeyframe::value):
3034         (WebCore::CCTransformKeyframe::clone):
3035         (WebCore::CCKeyframedTransformAnimationCurve::getValue):
3036         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h:
3037         (CCTransformKeyframe):
3038         (CCKeyframedTransformAnimationCurve):
3039         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
3040         (WebCore::CCLayerAnimationController::removeAnimation):
3041         (WebCore):
3042         (WebCore::CCLayerAnimationController::addAnimation):
3043         (WebCore::CCLayerAnimationController::getActiveAnimation):
3044         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
3045         (WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
3046         (WebCore::CCLayerAnimationController::tickAnimations):
3047         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
3048         (CCLayerAnimationControllerClient):
3049         (CCLayerAnimationController):
3050
3051 2012-06-01  Mihai Parparita  <mihaip@chromium.org>
3052
3053         Improve synchronous XHR disabling
3054         https://bugs.webkit.org/show_bug.cgi?id=88032
3055
3056         Reviewed by Alexey Proskuryakov.
3057
3058         * testing/InternalSettings.cpp:
3059         (WebCore::InternalSettings::setSyncXHRInDocumentsEnabled): Fix a
3060         copy-and-paste error
3061         * xml/XMLHttpRequest.cpp:
3062         (WebCore::XMLHttpRequest::open): Improves the disabled message, as
3063         suggested in a comment after r118599 was put in the commit queue.
3064
3065 2012-06-01  Beth Dakin  <bdakin@apple.com>
3066
3067         https://bugs.webkit.org/show_bug.cgi?id=87774
3068         REGRESSION (r105515): reflection masks are truncated at zoom levels < 1
3069         -and corresponding-
3070         <rdar://problem/11387506>
3071
3072         Reviewed by Simon Fraser.
3073
3074         paintNinePieceImage() expects un-zoomed results from 
3075         calculateImageIntrinsicDimensions(). This was previously addressed by having 
3076         paintNinePieceImage() divide the effective zoom out of the result from 
3077         calculateImageIntrinsicDimensions(). However, that results in buggy behavior for 
3078         generated images and images with percentage sizes. In the end it seems best to 
3079         just send a parameter to calculateImageIntrinsicDimensions() indicating whether 
3080         the caller wants the result to be scaled by the effective zoom when appropriate.
3081
3082         * rendering/RenderBoxModelObject.cpp:
3083         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
3084         (WebCore::RenderBoxModelObject::calculateFillTileSize):
3085         (WebCore::RenderBoxModelObject::paintNinePieceImage):
3086         * rendering/RenderBoxModelObject.h:
3087         (RenderBoxModelObject):
3088
3089 2012-06-01  Julien Chaffraix  <jchaffraix@webkit.org>
3090
3091         Prepare table collapsed border computation to support mixed directionality on row group
3092         https://bugs.webkit.org/show_bug.cgi?id=88110
3093
3094         Reviewed by Ojan Vafai.
3095
3096         No expected change in behavior.
3097
3098         One big issue with supporting mixed directionality inside a table is that the start / end
3099         borders don't align between table parts anymore: the start border of a ltr table will have
3100         to match the end border of a rtl row group for the purpose of collapsed border computation.
3101
3102         This change adds the concept of adjoining borders in the table direction so that we can safely
3103         hide which exact borders we pick up for the collapsed border computation.
3104
3105         * rendering/RenderTable.cpp:
3106         (WebCore::RenderTable::calcBorderStart):
3107         (WebCore::RenderTable::calcBorderEnd):
3108         Refactored those functions to use proper naming along with the new APIs. The name 'adjoining' is
3109         used extensively as we cannot make any assumptions on which borders we will get.
3110
3111         (WebCore::RenderTable::recalcBordersInRowDirection):
3112         Added a FIXME found during testing.
3113
3114         * rendering/RenderTableCell.h:
3115         (WebCore::RenderTableCell::borderAdjoiningTableStart):
3116         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
3117         * rendering/RenderTableRow.h:
3118         (WebCore::RenderTableRow::borderAdjoiningTableStart):
3119         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
3120         * rendering/RenderTableSection.h:
3121         (WebCore::RenderTableSection::borderAdjoiningTableStart):
3122         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
3123         Those functions are the same at the moment to match the existing code. They
3124         will be changed to use the proper directionality in a follow up patch.
3125
3126         * rendering/RenderTableSection.cpp:
3127         (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart):
3128         (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd):
3129         Those functions return the cells that is adjoining a table edge. Due to us flipping
3130         the cells at layout to match the section's direction, those functions will need to
3131         account for mixed direction in determining the right cell to consider.
3132
3133 2012-06-01  Shezan Baig  <shezbaig.wk@gmail.com>
3134
3135         Indenting a paragraph that begins with a link 3 times breaks the paragraph into two paragraphs
3136         https://bugs.webkit.org/show_bug.cgi?id=87428
3137
3138         Reviewed by Ryosuke Niwa.
3139
3140         Fix the way lastNode (our insertion point) is updated whenever
3141         traverseNextSibling moves up to a new parent, so that the relative
3142         depth between the next sibling and the original start node is
3143         maintained in the clone. The divergence in depth broke the paragraph
3144         into two paragraphs because the next sibling was inserted outside the
3145         blockquote that was created for the indentation.
3146
3147         Note that the topNode is not required anymore because it is no longer
3148         used anywhere.
3149
3150         Tests: editing/execCommand/indent-nested-inlines-1.html
3151                editing/execCommand/indent-nested-inlines-2.html
3152
3153         * editing/CompositeEditCommand.cpp:
3154         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
3155
3156 2012-06-01  Joe Thomas  <joethomas@motorola.com>
3157
3158         getComputedStyle for background shorthand property does not return background-origin and background-clip.
3159         https://bugs.webkit.org/show_bug.cgi?id=86155
3160
3161         Reviewed by Tony Chang.
3162
3163         Added background-origin and background-clip CSS Property values to the background shorthand CSSValueList.
3164
3165         * css/CSSComputedStyleDeclaration.cpp:
3166         (WebCore::CSSComputedStyleDeclaration::getBackgroundShorthandValue):
3167
3168 2012-06-01  Mark Pilgrim  <pilgrim@chromium.org>
3169
3170         [Chromium] Call clipboard methods directly
3171         https://bugs.webkit.org/show_bug.cgi?id=88038
3172
3173         Reviewed by Adam Barth.
3174
3175         Part of a refactoring series. See tracking bug 82948.
3176
3177         * WebCore.gypi:
3178         * platform/Pasteboard.h:
3179         (Pasteboard):
3180         * platform/chromium/ChromiumDataObject.cpp:
3181         (WebCore::ChromiumDataObject::createFromPasteboard):
3182         * platform/chromium/ChromiumDataObjectItem.cpp:
3183         (WebCore::ChromiumDataObjectItem::getAsFile):
3184         (WebCore::ChromiumDataObjectItem::internalGetAsString):
3185         * platform/chromium/ClipboardUtilitiesChromium.cpp:
3186         (WebCore::currentPasteboardBuffer):
3187         * platform/chromium/ClipboardUtilitiesChromium.h:
3188         (WebCore):
3189         * platform/chromium/PasteboardChromium.cpp:
3190         (WebCore::Pasteboard::writeSelection):
3191         (WebCore::Pasteboard::writePlainText):
3192         (WebCore::Pasteboard::writeURL):
3193         (WebCore::Pasteboard::writeImage):
3194         (WebCore::Pasteboard::writeClipboard):
3195         (WebCore::Pasteboard::canSmartReplace):
3196         (WebCore::Pasteboard::plainText):
3197         (WebCore::Pasteboard::documentFragment):
3198         * platform/chromium/PasteboardPrivate.h: Removed.
3199         * platform/chromium/PlatformSupport.h:
3200         (WebCore):
3201         (PlatformSupport):
3202
3203 2012-06-01  Hugo Parente Lima  <hugo.lima@openbossa.org>
3204
3205         Improve handling of legacy viewport meta tags
3206         https://bugs.webkit.org/show_bug.cgi?id=55874
3207
3208         Reviewed by Adam Barth.
3209
3210         We now support MobileOptimized and HandheldFriendly as well.
3211
3212         We set width equal to device-width for HandheldFriendly and
3213         for MobileOptimized, the content value of MobileOptimized is
3214         ignored and the initial-scale set to 1 to fit Android behavior.
3215
3216         The prioritizing is done the same way as on Windows Phone 7:
3217
3218         XHTML Mobile Profile found
3219         HandheldFriendly
3220         MobileOptimized (overrides HandheldFriendly)
3221         Viewport (overrides all above)
3222
3223         Original patch by Kenneth Rohde Christiansen.
3224
3225         Tests: fast/viewport/viewport-legacy-handheldfriendly.html
3226                fast/viewport/viewport-legacy-mobileoptimized-2.html
3227                fast/viewport/viewport-legacy-mobileoptimized-3.html
3228                fast/viewport/viewport-legacy-mobileoptimized.html
3229                fast/viewport/viewport-legacy-ordering-1.html
3230                fast/viewport/viewport-legacy-ordering-2.html
3231                fast/viewport/viewport-legacy-ordering-3.html
3232                fast/viewport/viewport-legacy-ordering-4.html
3233                fast/viewport/viewport-legacy-ordering-5.html
3234                fast/viewport/viewport-legacy-ordering-6.html
3235                fast/viewport/viewport-legacy-ordering-7.html
3236                fast/viewport/viewport-legacy-ordering-8.html
3237                fast/viewport/viewport-legacy-ordering-9.html
3238
3239         * dom/Document.cpp:
3240         (WebCore::Document::setDocType):
3241         (WebCore::Document::processViewport): Add an origin parameter to
3242         tell what is changing the viewport.
3243         * dom/Document.h:
3244         (Document):
3245         * dom/ViewportArguments.h:
3246         * html/HTMLMetaElement.cpp:
3247         (WebCore::HTMLMetaElement::process):
3248
3249 2012-06-01  Tony Chang  <tony@chromium.org>
3250
3251         rename -webkit-flex-order to -webkit-order
3252         https://bugs.webkit.org/show_bug.cgi?id=88104
3253
3254         Reviewed by Ojan Vafai.
3255
3256         This recently changed in the spec:
3257         http://dev.w3.org/csswg/css3-flexbox/#order-property
3258
3259         No new tests, just updated existing results.
3260
3261         * css/CSSComputedStyleDeclaration.cpp:
3262         (WebCore):
3263         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3264         * css/CSSParser.cpp:
3265         (WebCore::CSSParser::parseValue):
3266         * css/CSSProperty.cpp:
3267         (WebCore::CSSProperty::isInheritedProperty):
3268         * css/CSSPropertyNames.in:
3269         * css/StyleBuilder.cpp:
3270         (WebCore::StyleBuilder::StyleBuilder):
3271         * css/StyleResolver.cpp:
3272         (WebCore::StyleResolver::collectMatchingRulesForList):
3273         * rendering/RenderFlexibleBox.cpp:
3274         (WebCore::RenderFlexibleBox::OrderIterator::OrderIterator):
3275         (WebCore::RenderFlexibleBox::OrderIterator::next):
3276         (WebCore::RenderFlexibleBox::layoutBlock):
3277         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
3278         (WebCore::RenderFlexibleBox::layoutFlexItems):
3279         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
3280         (WebCore::RenderFlexibleBox::computeNextFlexLine):
3281         (WebCore::RenderFlexibleBox::packFlexLines):
3282         (WebCore::RenderFlexibleBox::alignChildren):
3283         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
3284         (WebCore::RenderFlexibleBox::flipForWrapReverse):
3285         * rendering/RenderFlexibleBox.h:
3286         * rendering/style/RenderStyle.h:
3287         * rendering/style/StyleFlexibleBoxData.cpp:
3288         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
3289         (WebCore::StyleFlexibleBoxData::operator==):
3290         * rendering/style/StyleFlexibleBoxData.h:
3291         (StyleFlexibleBoxData):
3292         * rendering/style/StyleRareNonInheritedData.cpp:
3293         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3294         (WebCore::StyleRareNonInheritedData::operator==):
3295         * rendering/style/StyleRareNonInheritedData.h:
3296         (StyleRareNonInheritedData):
3297
3298 2012-06-01  Zeno Albisser  <zeno@webkit.org>
3299
3300         Unreviewed build fix after r119247.
3301
3302         Do not include TextureMapperGL.h when not building
3303         with GRAPHICS_SURFACE.
3304
3305         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
3306
3307 2012-06-01  Mario Sanchez Prada  <msanchez@igalia.com>
3308
3309         [GTK] Add a new and reusable Geoclue-based geolocation provider in WebCore
3310         https://bugs.webkit.org/show_bug.cgi?id=87800
3311
3312         Reviewed by Carlos Garcia Campos.
3313
3314         Added new and reusable Geoclue-based geolocation provider to WebCore.
3315
3316         * GNUmakefile.am:
3317         * GNUmakefile.list.am:
3318         * platform/geoclue/GeolocationProviderGeoclue.cpp: Added.
3319         (getPositionCallback):
3320         (positionChangedCallback):
3321         (GeolocationProviderGeoclue::GeolocationProviderGeoclue):
3322         (GeolocationProviderGeoclue::~GeolocationProviderGeoclue):
3323         (GeolocationProviderGeoclue::startUpdating):
3324         (GeolocationProviderGeoclue::stopUpdating):
3325         (GeolocationProviderGeoclue::setEnableHighAccuracy):
3326         (GeolocationProviderGeoclue::setGeoclueClient):
3327         (GeolocationProviderGeoclue::setGeocluePosition):
3328         (GeolocationProviderGeoclue::updateClientRequirements):
3329         (GeolocationProviderGeoclue::positionChanged):
3330         (GeolocationProviderGeoclue::errorOccured):
3331         * platform/geoclue/GeolocationProviderGeoclue.h: Added.
3332         (WebCore):
3333         (GeolocationProviderGeoclue):
3334         * platform/geoclue/GeolocationProviderGeoclueClient.h: Added.
3335         (WebCore):
3336         (GeolocationProviderGeoclueClient):
3337
3338 2012-06-01  Thiago Marcos P. Santos  <thiago.santos@intel.com>
3339
3340         [Qt] Remove deprecated Q_GLOBAL_STATIC_WITH_INITIALIZER
3341         https://bugs.webkit.org/show_bug.cgi?id=88100
3342
3343         Reviewed by Tor Arne Vestbø.
3344
3345         It will be deprecated on Qt5.
3346
3347         * platform/text/qt/TextBreakIteratorInternalICUQt.cpp:
3348         (WebCore):
3349
3350 2012-06-01  Zeno Albisser  <zeno@webkit.org>
3351
3352         Make TextureMapper work with GraphicsSurface.
3353         https://bugs.webkit.org/show_bug.cgi?id=87738
3354
3355         Add TextureMapperSurfaceBackingStore, a new backing store
3356         that allows to import textures from a GraphicsSurface.
3357         On Mac the GraphicsSurface is backed by an IOSurface
3358         which must be used with a GL_TEXTURE_RECTANGLE_ARB texture.
3359         Therefore it is also necessary to add new shader programs
3360         for directly painting these textures on screen.
3361
3362         Reviewed by Noam Rosenthal.
3363
3364         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
3365         Add a new TextureMapperBackingStore implementation that can directly
3366         reuse textures as they are being passed from the GraphicsSurface.
3367         (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
3368         (WebCore::TextureMapperSurfaceBackingStore::texture):
3369         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
3370         * platform/graphics/texmap/TextureMapperBackingStore.h:
3371         (GraphicsSurfaceData):
3372         (WebCore::GraphicsSurfaceData::setSurface):
3373         (WebCore::GraphicsSurfaceData::GraphicsSurfaceData):
3374         (TextureMapperSurfaceBackingStore):
3375         (WebCore::TextureMapperSurfaceBackingStore::create):
3376         (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore):
3377         (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
3378
3379         * platform/graphics/texmap/TextureMapperGL.cpp:
3380         Add a drawing function for textures of type GL_TEXTURE_RECTANGLE_ARB.
3381         (WebCore::TextureMapperGL::drawTextureRectangleARB):
3382         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
3383         (WebCore::TextureMapperShaderManager::getShaderProgram):
3384         (WebCore::TextureMapperShaderProgramSimple::create):
3385         (WebCore::TextureMapperShaderProgramSimple::initialize):
3386         (WebCore::TextureMapperShaderProgramSolidColor::create):
3387         (WebCore::TextureMapperShaderProgramSolidColor::initialize):
3388         (WebCore::TextureMapperShaderProgramRectSimple::create):
3389         (WebCore::TextureMapperShaderProgramRectSimple::fragmentShaderSource):
3390         (WebCore::TextureMapperShaderProgramOpacityAndMask::create):
3391         (WebCore::TextureMapperShaderProgramOpacityAndMask::initialize):
3392         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::create):
3393         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::fragmentShaderSource):
3394
3395         * platform/graphics/texmap/TextureMapperShaderManager.h:
3396         Add new shader programs that can be used with GL_TEXTURE_RECTANGLE_ARB textures.
3397         This is mainly necessary, because this type of texture uses non-normalized coordinates.
3398         Further move the calls to initializeProgram() from the constructor into a separate
3399         initialize() function, as initializeProgram() calls vertexShaderSource() (and friends)
3400         and we should not call virtual functions in the constructor.
3401         (WebCore::TextureMapperShaderProgram::initialize):
3402         (TextureMapperShaderProgramSimple):
3403         (WebCore::TextureMapperShaderProgramSimple::TextureMapperShaderProgramSimple):
3404         (TextureMapperShaderProgramRectSimple):
3405         (WebCore::TextureMapperShaderProgramRectSimple::TextureMapperShaderProgramRectSimple):
3406         (TextureMapperShaderProgramOpacityAndMask):
3407         (WebCore::TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMask):
3408         (TextureMapperShaderProgramRectOpacityAndMask):
3409         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::TextureMapperShaderProgramRectOpacityAndMask):
3410         (TextureMapperShaderProgramSolidColor):
3411         (WebCore::TextureMapperShaderProgramSolidColor::TextureMapperShaderProgramSolidColor):
3412
3413 2012-06-01  Christophe Dumez  <christophe.dumez@intel.com>
3414
3415         [EFL] EFL port does not enable WEB_INTENTS_TAG flag
3416         https://bugs.webkit.org/show_bug.cgi?id=86866
3417
3418         Reviewed by Adam Barth.
3419
3420         Fix compilation error when WEB_INTENTS_TAG flag is enabled.
3421         HTMLElement::insertedInto() takes a ContainerNode* in argument, not a
3422         Node*.
3423
3424         Test: webintents/intent-tag.html
3425
3426         * CMakeLists.txt:
3427         * html/HTMLIntentElement.cpp:
3428         (WebCore::HTMLIntentElement::insertedInto):
3429         * html/HTMLIntentElement.h:
3430         (HTMLIntentElement):
3431
3432 2012-06-01  Dominik Röttsches  <dominik.rottsches@intel.com>
3433
3434         [cairo] Pixel artifacts can be seen on reflections
3435         https://bugs.webkit.org/show_bug.cgi?id=85483
3436
3437         Antialiased clipping in the simple rectangular clip method
3438         leads to edge artifacts when transformations are applied to the layer.
3439         Explicitly disabling antialiased clipping for this function solves this issue.
3440         Comparing Cairo GraphicsContext to Qt and Skia GC, it seems that these
3441         backends do not expect the platform context to clip antialiased in this