[Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5)
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-31  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2
3         [Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5)
4         https://bugs.webkit.org/show_bug.cgi?id=87955
5
6         Reviewed by Simon Hausmann.
7
8         * bridge/qt/qt_class.cpp:
9         * bridge/qt/qt_instance.cpp:
10         * bridge/qt/qt_runtime.h:
11         * page/qt/EventHandlerQt.cpp:
12         * platform/graphics/GraphicsContext3D.h:
13         * platform/graphics/OpenGLShims.cpp:
14         * platform/graphics/OpenGLShims.h:
15         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
16         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
17         * platform/graphics/qt/GraphicsContext3DQt.cpp:
18         * platform/graphics/qt/SimpleFontDataQt.cpp:
19         * platform/graphics/texmap/TextureMapper.h:
20         * platform/graphics/texmap/TextureMapperGL.cpp:
21         * platform/qt/DeviceMotionProviderQt.h:
22         * platform/qt/DeviceOrientationProviderQt.h:
23         * platform/qt/KURLQt.cpp:
24         * platform/qt/PlatformScreenQt.cpp:
25         * platform/qt/QWebPageClient.h:
26         * plugins/qt/PluginPackageQt.cpp:
27         * plugins/qt/PluginViewQt.cpp:
28
29 2012-05-30  Andreas Kling  <kling@webkit.org>
30
31         Have StylePropertySet constructor take array/length instead of vector.
32         <http://webkit.org/b/87876>
33
34         Reviewed by Antti Koivisto.
35
36         Remove the StylePropertyVector typedef and have StylePropertySet constructors
37         take CSSProperty*/length since we are copying the data into a tightly packed
38         array anyway. This frees up the call sites to use whatever storage they please
39         rather than being restricted to a vector with inlineCapacity=4.
40
41         Change said call sites to use an arbitrary high inline capacity (256) for their
42         stack-allocated temporary vectors.
43
44         * css/CSSComputedStyleDeclaration.cpp:
45         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
46         * css/CSSParser.cpp:
47         (WebCore::filterProperties):
48         (WebCore::CSSParser::createStylePropertySet):
49         * css/StylePropertySet.cpp:
50         (WebCore::StylePropertySet::createImmutable):
51         (WebCore::StylePropertySet::StylePropertySet):
52         (WebCore::StylePropertySet::removePropertiesInSet):
53         (WebCore::StylePropertySet::copyPropertiesInSet):
54         * css/StylePropertySet.h:
55         (WebCore::StylePropertySet::create):
56         (StylePropertySet):
57
58 2012-05-31  Mike West  <mkwst@chromium.org>
59
60         Fixing compilation with SVG disabled.
61         https://bugs.webkit.org/show_bug.cgi?id=87944
62
63         This patch adds the missing enumeration value
64         'CSSPropertyWebkitBoxDecorationBreak' into switch statements to make
65         clang happy.
66
67         Reviewed by Alexis Menard.
68
69         * css/CSSParser.cpp:
70         (WebCore::CSSParser::parseValue):
71         * css/StyleResolver.cpp:
72         (WebCore::StyleResolver::collectMatchingRulesForList):
73
74 2012-05-31  Yoshifumi Inoue  <yosin@chromium.org>
75
76         [Platform] Implementation of Decimal(int32_t) isn't portable.
77         https://bugs.webkit.org/show_bug.cgi?id=87941
78
79         Reviewed by Kent Tamura.
80
81         This patch changes negation of integer to make unsigned integer
82         in portable way.
83
84         No new tests. This patch doesn't change behavior.
85
86         * platform/Decimal.cpp:
87         (WebCore::Decimal::Decimal): Use uint64_t(-int64_t(i32)) instead of uint64_t(-i32) 
88
89 2012-05-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
90
91         [CMAKE][EFL] Remove unneeded include path
92         https://bugs.webkit.org/show_bug.cgi?id=87927
93
94         Reviewed by Kenneth Rohde Christiansen.
95
96         Though *wtf* directory was moved to Source/WTF, PlatformEfl.cmake is still including the previous
97         path. In addition, files on EFL port are using "<wtf/gobject/XXX>" directly in #include line.
98         So, EFL port doesn't need to include ${JAVASCRIPTCORE_DIR}/wtf/gobject path anymore.
99
100         * PlatformEfl.cmake: Remove '${JAVASCRIPTCORE_DIR}/wtf/gobject' path from include path list.
101
102 2012-05-31  Yoshifumi Inoue  <yosin@chromium.org>
103
104         [Platform] Introduce Decimal class for Number/Range input type.
105         https://bugs.webkit.org/show_bug.cgi?id=87360
106
107         Reviewed by Kent Tamura.
108
109         This patch added new class Decimal for decimal arithmatic in two
110         files: platform/Decimal.cpp and Decimal.h with unit test.
111
112         Test: WebKit/chromium/tests/DecimalTest.cpp
113
114         * CMakeLists.txt:
115         * GNUmakefile.list.am:
116         * Target.pri:
117         * WebCore.gypi:
118         * WebCore.vcproj/WebCore.vcproj:
119         * WebCore.xcodeproj/project.pbxproj:
120         * platform/Decimal.cpp: Added.
121         (WebCore):
122         (DecimalPrivate):
123         (SpecialValueHandler):
124         (WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler):
125         (WebCore::DecimalPrivate::SpecialValueHandler::handle):
126         (WebCore::DecimalPrivate::SpecialValueHandler::value):
127         (UInt128):
128         (WebCore::DecimalPrivate::UInt128::UInt128):
129         (WebCore::DecimalPrivate::UInt128::high):
130         (WebCore::DecimalPrivate::UInt128::low):
131         (WebCore::DecimalPrivate::UInt128::multiply):
132         (WebCore::DecimalPrivate::UInt128::highUInt32):
133         (WebCore::DecimalPrivate::UInt128::lowUInt32):
134         (WebCore::DecimalPrivate::UInt128::isZero):
135         (WebCore::DecimalPrivate::UInt128::makeUInt64):
136         (WebCore::DecimalPrivate::UInt128::operator/=):
137         (WebCore::DecimalPrivate::UInt128::multiplyHigh):
138         (WebCore::DecimalPrivate::countDigits):
139         (WebCore::DecimalPrivate::scaleDown):
140         (WebCore::DecimalPrivate::scaleUp):
141         (WebCore::Decimal::EncodedData::EncodedData):
142         (WebCore::Decimal::EncodedData::operator==):
143         (WebCore::Decimal::Decimal):
144         (WebCore::Decimal::operator=):
145         (WebCore::Decimal::operator+=):
146         (WebCore::Decimal::operator-=):
147         (WebCore::Decimal::operator*=):
148         (WebCore::Decimal::operator/=):
149         (WebCore::Decimal::operator-):
150         (WebCore::Decimal::operator+):
151         (WebCore::Decimal::operator*):
152         (WebCore::Decimal::operator/):
153         (WebCore::Decimal::operator==):
154         (WebCore::Decimal::operator!=):
155         (WebCore::Decimal::operator<):
156         (WebCore::Decimal::operator<=):
157         (WebCore::Decimal::operator>):
158         (WebCore::Decimal::operator>=):
159         (WebCore::Decimal::abs):
160         (WebCore::Decimal::alignOperands):
161         (WebCore::Decimal::ceiling):
162         (WebCore::Decimal::compareTo):
163         (WebCore::Decimal::floor):
164         (WebCore::Decimal::fromString):
165         (WebCore::Decimal::infinity):
166         (WebCore::Decimal::nan):
167         (WebCore::Decimal::remainder):
168         (WebCore::Decimal::round):
169         (WebCore::Decimal::toString):
170         (WebCore::Decimal::zero):
171         * platform/Decimal.h: Added.
172         (WebCore):
173         (DecimalPrivate):
174         (Decimal):
175         (EncodedData):
176         (WebCore::Decimal::EncodedData::operator!=):
177         (WebCore::Decimal::EncodedData::coefficient):
178         (WebCore::Decimal::EncodedData::exponent):
179         (WebCore::Decimal::EncodedData::isFinite):
180         (WebCore::Decimal::EncodedData::isNaN):
181         (WebCore::Decimal::EncodedData::isSpecial):
182         (WebCore::Decimal::EncodedData::isZero):
183         (WebCore::Decimal::EncodedData::sign):
184         (WebCore::Decimal::EncodedData::setSign):
185         (WebCore::Decimal::EncodedData::formatClass):
186         (WebCore::Decimal::isFinite):
187         (WebCore::Decimal::isNaN):
188         (WebCore::Decimal::isNegative):
189         (WebCore::Decimal::isPositive):
190         (WebCore::Decimal::isSpecial):
191         (WebCore::Decimal::isZero):
192         (WebCore::Decimal::value):
193         (AlignedOperands):
194         (WebCore::Decimal::invertSign):
195         (WebCore::Decimal::exponent):
196         (WebCore::Decimal::sign):
197
198 2012-05-31  Kentaro Hara  <haraken@chromium.org>
199
200         [V8] Pass Isolate to v8String() in custom bindings
201         https://bugs.webkit.org/show_bug.cgi?id=87825
202
203         Reviewed by Adam Barth.
204
205         The objective is to pass Isolate around in V8 bindings.
206         This patch passes Isolate to v8String() in custom bindings.
207
208         No tests. No change in behavior.
209
210         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
211         (WebCore::installFastSet):
212         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
213         (WebCore):
214         (WebCore::setWebGLArrayHelper):
215         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
216         (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator):
217         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
218         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
219         (WebCore::toV8Object):
220         * bindings/v8/custom/V8ClipboardCustom.cpp:
221         (WebCore::V8Clipboard::typesAccessorGetter):
222         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
223         (WebCore::V8DOMStringMap::namedPropertyGetter):
224         (WebCore::V8DOMStringMap::namedPropertyEnumerator):
225         * bindings/v8/custom/V8FileReaderCustom.cpp:
226         (WebCore::V8FileReader::resultAccessorGetter):
227         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
228         (WebCore::V8HTMLCanvasElement::toDataURLCallback):
229         * bindings/v8/custom/V8HTMLElementCustom.cpp:
230         (WebCore::toV8Object):
231         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
232         (WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter):
233         * bindings/v8/custom/V8IDBAnyCustom.cpp:
234         (WebCore::toV8):
235         * bindings/v8/custom/V8IDBKeyCustom.cpp:
236         (WebCore::toV8):
237         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
238         (WebCore::V8InjectedScriptHost::databaseIdCallback):
239         (WebCore::V8InjectedScriptHost::storageIdCallback):
240         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
241         (WebCore::V8InspectorFrontendHost::platformCallback):
242         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
243         (WebCore::V8JavaScriptCallFrame::typeAccessorGetter):
244         * bindings/v8/custom/V8LocationCustom.cpp:
245         (WebCore::V8Location::toStringCallback):
246         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
247         (WebCore::V8SQLResultSetRowList::itemCallback):
248         * bindings/v8/custom/V8StorageCustom.cpp:
249         (WebCore::V8Storage::namedPropertyEnumerator):
250         (WebCore::storageGetter):
251         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
252         (WebCore::V8XMLHttpRequest::responseTextAccessorGetter):
253         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
254         (WebCore::V8XSLTProcessor::getParameterCallback):
255
256 2012-05-31  Hayato Ito  <hayato@chromium.org>
257
258         ComposedShadowTreeWalker should support traversing nodes in an orphaned shadow subtree.
259         https://bugs.webkit.org/show_bug.cgi?id=87493
260
261         Reviewed by Dimitri Glazkov.
262
263         ComposedShadowTreeWalker assumed that a visited shadow root is
264         always assigned to a shadow insertion point since it only
265         traverses nodes which are rendered.  But there is an exceptional
266         use case such as an event dispatching. Some events, such as a
267         'click' event, may happen in an orphaned shadow subtree.  In such
268         cases, traversal might start with a node in an orphaned shadow
269         subtree.  So ComposedShadowTreeWalker can not assume that visited
270         shadow root is always assigned to a shadow insertion point.
271
272         This patch only fixes ComposedShadowTreeWalker.
273         ComposedShadowTreeParentWalker will be fixed in another patch with
274         an event dispatching test.
275
276         Test: fast/dom/shadow/composed-shadow-tree-walker.html
277
278         * dom/ComposedShadowTreeWalker.cpp:
279         (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
280
281
282 2012-05-30  Yury Semikhatsky  <yurys@chromium.org>
283
284         Web Inspector: add MemoryUsageSupport::processMemorySizesInBytes
285         https://bugs.webkit.org/show_bug.cgi?id=87830
286
287         Reviewed by James Robinson.
288
289         Added a method for getting process memory usage in bytes. It is
290         used in the inspector memory instrumentation to get process total
291         memory usage.
292
293         * inspector/InspectorMemoryAgent.cpp:
294         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
295         * platform/MemoryUsageSupport.cpp:
296         (WebCore::MemoryUsageSupport::processMemorySizesInBytes):
297         (WebCore):
298         * platform/MemoryUsageSupport.h:
299         (MemoryUsageSupport): provided embedders with a way to report WebKit process
300         memory usage.
301         * platform/chromium/MemoryUsageSupportChromium.cpp:
302         (WebCore::MemoryUsageSupport::processMemorySizesInBytes):
303         (WebCore):
304
305 2012-05-31  Kent Tamura  <tkent@chromium.org>
306
307         Unreviewed, rolling out r119062 and r119064.
308         http://trac.webkit.org/changeset/119062
309         http://trac.webkit.org/changeset/119064
310         https://bugs.webkit.org/show_bug.cgi?id=87360
311
312         Broke build on Lion, SnowLoepard, Chromium Windows, and
313         Chromium Linux 32
314
315         * CMakeLists.txt:
316         * GNUmakefile.list.am:
317         * Target.pri:
318         * WebCore.gypi:
319         * WebCore.vcproj/WebCore.vcproj:
320         * WebCore.xcodeproj/project.pbxproj:
321         * platform/Decimal.cpp: Removed.
322         * platform/Decimal.h: Removed.
323
324 2012-05-31  Shane Stephens  <shanestephens@google.com>
325
326         text-decoration should not be propagated through absolutely positioned elements to <a> tags
327         https://bugs.webkit.org/show_bug.cgi?id=86517
328
329         Reviewed by Darin Adler.
330
331         Test: fast/css/text-decoration-in-second-order-descendants.html
332
333         * rendering/RenderObject.cpp:
334         (WebCore::RenderObject::getTextDecorationColors):
335         Remove fix from 18611 as it doesn't work on second order descendants.
336
337         * css/StyleResolver.cpp:
338         (WebCore::StyleResolver::adjustRenderStyle):
339         Add floating and positioned checks when deciding whether to avoid propagating text decoration. Move all checks into new method to improve readability.
340         (WebCore::doesNotInheritTextDecoration): Added
341
342 2012-05-30  Yoshifumi Inoue  <yosin@chromium.org>
343
344         Build fix for Linon/SnowLeopard after r119062
345
346         * platform/Decimal.cpp:
347         (WebCore::Decimal::Decimal):
348
349 2012-05-30  Yoshifumi Inoue  <yosin@chromium.org>
350
351         [Platform] Introduce Decimal class for Number/Range input type.
352         https://bugs.webkit.org/show_bug.cgi?id=87360
353
354         Reviewed by Kent Tamura.
355
356         This patch added new class Decimal for decimal arithmatic in two
357         files: platform/Decimal.cpp and Decimal.h with unit test.
358
359         Test: WebKit/chromium/tests/DecimalTest.cpp
360
361         * CMakeLists.txt:
362         * GNUmakefile.list.am:
363         * Target.pri:
364         * WebCore.gypi:
365         * WebCore.vcproj/WebCore.vcproj:
366         * WebCore.xcodeproj/project.pbxproj:
367         * platform/Decimal.cpp: Added.
368         (WebCore):
369         (DecimalPrivate):
370         (SpecialValueHandler):
371         (WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler):
372         (WebCore::DecimalPrivate::SpecialValueHandler::handle):
373         (WebCore::DecimalPrivate::SpecialValueHandler::value):
374         (UInt128):
375         (WebCore::DecimalPrivate::UInt128::UInt128):
376         (WebCore::DecimalPrivate::UInt128::high):
377         (WebCore::DecimalPrivate::UInt128::low):
378         (WebCore::DecimalPrivate::UInt128::multiply):
379         (WebCore::DecimalPrivate::UInt128::highUInt32):
380         (WebCore::DecimalPrivate::UInt128::lowUInt32):
381         (WebCore::DecimalPrivate::UInt128::isZero):
382         (WebCore::DecimalPrivate::UInt128::makeUInt64):
383         (WebCore::DecimalPrivate::UInt128::operator/=):
384         (WebCore::DecimalPrivate::UInt128::multiplyHigh):
385         (WebCore::DecimalPrivate::countDigits):
386         (WebCore::DecimalPrivate::scaleDown):
387         (WebCore::DecimalPrivate::scaleUp):
388         (WebCore::Decimal::EncodedData::EncodedData):
389         (WebCore::Decimal::EncodedData::operator==):
390         (WebCore::Decimal::Decimal):
391         (WebCore::Decimal::operator=):
392         (WebCore::Decimal::operator+=):
393         (WebCore::Decimal::operator-=):
394         (WebCore::Decimal::operator*=):
395         (WebCore::Decimal::operator/=):
396         (WebCore::Decimal::operator-):
397         (WebCore::Decimal::operator+):
398         (WebCore::Decimal::operator*):
399         (WebCore::Decimal::operator/):
400         (WebCore::Decimal::operator==):
401         (WebCore::Decimal::operator!=):
402         (WebCore::Decimal::operator<):
403         (WebCore::Decimal::operator<=):
404         (WebCore::Decimal::operator>):
405         (WebCore::Decimal::operator>=):
406         (WebCore::Decimal::abs):
407         (WebCore::Decimal::alignOperands):
408         (WebCore::Decimal::ceiling):
409         (WebCore::Decimal::compareTo):
410         (WebCore::Decimal::floor):
411         (WebCore::Decimal::fromString):
412         (WebCore::Decimal::infinity):
413         (WebCore::Decimal::nan):
414         (WebCore::Decimal::remainder):
415         (WebCore::Decimal::round):
416         (WebCore::Decimal::toString):
417         (WebCore::Decimal::zero):
418         * platform/Decimal.h: Added.
419         (WebCore):
420         (DecimalPrivate):
421         (Decimal):
422         (EncodedData):
423         (WebCore::Decimal::EncodedData::operator!=):
424         (WebCore::Decimal::EncodedData::coefficient):
425         (WebCore::Decimal::EncodedData::exponent):
426         (WebCore::Decimal::EncodedData::isFinite):
427         (WebCore::Decimal::EncodedData::isNaN):
428         (WebCore::Decimal::EncodedData::isSpecial):
429         (WebCore::Decimal::EncodedData::isZero):
430         (WebCore::Decimal::EncodedData::sign):
431         (WebCore::Decimal::EncodedData::setSign):
432         (WebCore::Decimal::EncodedData::formatClass):
433         (WebCore::Decimal::isFinite):
434         (WebCore::Decimal::isNaN):
435         (WebCore::Decimal::isNegative):
436         (WebCore::Decimal::isPositive):
437         (WebCore::Decimal::isSpecial):
438         (WebCore::Decimal::isZero):
439         (WebCore::Decimal::value):
440         (AlignedOperands):
441         (WebCore::Decimal::invertSign):
442         (WebCore::Decimal::exponent):
443         (WebCore::Decimal::sign):
444
445 2012-05-30  Patrick Gansterer  <paroga@webkit.org>
446
447         Build fix for WinCE after r116723.
448
449         * platform/graphics/wince/FontWinCE.cpp:
450         (WebCore::TextRunComponent::TextRunComponent):
451
452 2012-05-30  Kentaro Hara  <haraken@chromium.org>
453
454         Implement CSSParser::determineNameInNamespace() as a helper function for CSSGrammar.y
455         https://bugs.webkit.org/show_bug.cgi?id=87799
456
457         Reviewed by Darin Adler.
458
459         As pointed out by darin@ in https://bugs.webkit.org/show_bug.cgi?id=87627#c12,
460         we should avoid repeating the following code in CSSGrammar.y:
461
462             if (p->m_styleSheet)
463                 $$->setTag(QualifiedName(namespacePrefix, $2, p->m_styleSheet->determineNamespace(namespacePrefix)));
464             else
465                 $$->setTag(QualifiedName(namespacePrefix, $2, p->m_defaultNamespace));
466
467         This patch implements CSSParser::determineNameInNamespace() as a helper function
468         and replaces the above code.
469
470         Tests: fast/dom/SelectorAPI/*. No change in test results.
471
472         * css/CSSGrammar.y:
473         * css/CSSParser.cpp:
474         (WebCore::CSSParser::determineNameInNamespace):
475         (WebCore):
476         * css/CSSParser.h:
477
478 2012-05-30  Patrick Gansterer  <paroga@webkit.org>
479
480         Build fix for WinCE after r117697.
481
482         * page/wince/FrameWinCE.cpp:
483         (WebCore::computePageRectsForFrame):
484
485 2012-05-30  Shawn Singh  <shawnsingh@chromium.org>
486
487         [chromium] Fix min/max bounds error in CCMathUtil.cpp
488         https://bugs.webkit.org/show_bug.cgi?id=87915
489
490         Reviewed by James Robinson.
491
492         Two unit tests added to CCMathUtilTest:
493             CCMathUtilTest.verifyEnclosingClippedRectUsesCorrectInitialBounds
494             CCMathUtilTest.verifyEnclosingRectOfVerticesUsesCorrectInitialBounds
495
496         While computing bounds, the initial values for xmax and ymax are
497         intended to be set to -float_max. It turns out that
498         std::numeric_limits<float>::min() actually returns the smallest
499         positive value close to zero, which is not what was intended. This
500         patch fixes the code to use -float_max instead, which is the
501         intended value.
502
503         * platform/graphics/chromium/cc/CCMathUtil.cpp:
504         (WebCore::CCMathUtil::mapClippedRect):
505         (WebCore::CCMathUtil::projectClippedRect):
506         (WebCore::CCMathUtil::computeEnclosingRectOfVertices):
507         (WebCore::CCMathUtil::computeEnclosingClippedRect):
508         (WebCore):
509         * platform/graphics/chromium/cc/CCMathUtil.h:
510         (WebCore::HomogeneousCoordinate::HomogeneousCoordinate):
511         (HomogeneousCoordinate):
512         (WebCore::HomogeneousCoordinate::shouldBeClipped):
513         (WebCore::HomogeneousCoordinate::cartesianPoint2d):
514         (WebCore):
515         (CCMathUtil):
516
517 2012-05-30  Patrick Gansterer  <paroga@webkit.org>
518
519         Build fix for WinCE after r118568.
520
521         * platform/text/wince/TextBreakIteratorWinCE.cpp:
522         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator):
523
524 2012-05-30  Abhishek Arya  <inferno@chromium.org>
525
526         Crash in ContainerNode::parserAddChild.
527         https://bugs.webkit.org/show_bug.cgi?id=87903
528
529         Reviewed by Ryosuke Niwa.
530
531         Call the ChildNodeInsertionNotifier.notify call at the end since
532         it can destroy |this| and some of the local pointers like |last|.
533         This also matches the order of calls - childrenChanged precedes
534         ChildNodeInsertionNotifier.notify in updateTreeAfterInsertion and
535         ContainerNode::parserInsertBefore.
536
537         Also remove a FIXME since we use ChildNodeInsertionNotifier.notify
538         instead of ChildNodeInsertionNotifier.notifyInsertedIntoDocument
539         (as recommended in the FIXME).
540
541         Test: fast/dom/child-insertion-notify-crash.html
542
543         * dom/ContainerNode.cpp:
544         (WebCore::ContainerNode::parserAddChild):
545
546 2012-05-30  Rick Byers  <rbyers@chromium.org>
547
548         [chromium] Implement pointer and hover CSS media features
549         https://bugs.webkit.org/show_bug.cgi?id=87403
550
551         Reviewed by Adam Barth.
552
553         Add initial support for the pointer and hover media features as defined
554         here:
555         http://dev.w3.org/csswg/css4-mediaqueries/#pointer
556         http://dev.w3.org/csswg/css4-mediaqueries/#hover
557
558         For now this only supports the case where we know a touch screen is
559         available (currently known only for the chromium port on certain
560         platforms).  All other cases continue to behave exactly as if the media
561         feature isn't supported.
562
563         Tests: fast/media/mq-pointer.html
564
565         * css/CSSValueKeywords.in:
566         * css/MediaFeatureNames.h:
567         (MediaFeatureNames):
568         * css/MediaQueryEvaluator.cpp:
569         (WebCore::getLeastCapablePrimaryPointerDeviceType):
570         (WebCore):
571         (WebCore::hoverMediaFeatureEval):
572         (WebCore::pointerMediaFeatureEval):
573
574         * testing/InternalSettings.cpp:
575         (WebCore::InternalSettings::InternalSettings):
576         (WebCore::InternalSettings::restoreTo):
577         (WebCore::InternalSettings::setDeviceSupportsTouch):
578         (WebCore):
579         * testing/InternalSettings.h:
580         (InternalSettings):
581         * testing/InternalSettings.idl:
582
583 2012-05-30  Julien Chaffraix  <jchaffraix@webkit.org>
584
585         Add an helper function to get the style for a cell's flow computation
586         https://bugs.webkit.org/show_bug.cgi?id=87902
587
588         Reviewed by Ojan Vafai.
589
590         No expected change in behavior.
591
592         This change introduces styleForCellFlow that unify which function we use
593         to determine a cell's direction and writing mode.
594
595         This unification will make it easier to support direction on table row
596         group (section in WebKit land).
597
598         * rendering/RenderTableCell.h:
599         (WebCore::RenderTableCell::styleForCellFlow):
600         Added the new function along with a comment as to its purpose.
601
602         * rendering/RenderTableCell.cpp:
603         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
604         (WebCore::RenderTableCell::computeCollapsedStartBorder):
605         (WebCore::RenderTableCell::computeCollapsedEndBorder):
606         (WebCore::RenderTableCell::computeCollapsedBeforeBorder):
607         (WebCore::RenderTableCell::computeCollapsedAfterBorder):
608         (WebCore::RenderTableCell::borderHalfLeft):
609         (WebCore::RenderTableCell::borderHalfRight):
610         (WebCore::RenderTableCell::borderHalfTop):
611         (WebCore::RenderTableCell::borderHalfBottom):
612         (WebCore::RenderTableCell::borderHalfStart):
613         (WebCore::RenderTableCell::borderHalfEnd):
614         (WebCore::RenderTableCell::borderHalfBefore):
615         (WebCore::RenderTableCell::borderHalfAfter):
616         (WebCore::RenderTableCell::paintCollapsedBorders):
617         Mostly mechanical replacement.
618
619         * rendering/RenderTableCell.cpp:
620         (WebCore::RenderTableCell::cachedCollapsedLeftBorder):
621         (WebCore::RenderTableCell::cachedCollapsedRightBorder):
622         (WebCore::RenderTableCell::cachedCollapsedTopBorder):
623         (WebCore::RenderTableCell::cachedCollapsedBottomBorder):
624         Made the argument 'const' now.
625
626         * rendering/RenderTableSection.cpp:
627         (WebCore::RenderTableSection::layoutRows):
628         Added a FIXME to unify with the rest.
629
630 2012-05-30  Christophe Dumez  <christophe.dumez@intel.com>
631
632         [JSC] SerializedScriptValue.create() succeeds even if MessagePort object cannot be found in transferred ports
633         https://bugs.webkit.org/show_bug.cgi?id=87118
634
635         Reviewed by Adam Barth.
636
637         Make SerializedScriptValue.create() throw an exception if one of the
638         MessagePort objects cannot be found in the transferred ports. This
639         matches the behavior of the V8 implementation.
640
641         Test: webintents/web-intents-obj-constructor.html
642
643         * bindings/js/SerializedScriptValue.cpp:
644         (WebCore::CloneSerializer::dumpIfTerminal):
645
646 2012-05-30  Mark Pilgrim  <pilgrim@chromium.org>
647
648         [Chromium] Call fileUtilities methods directly
649         https://bugs.webkit.org/show_bug.cgi?id=87852
650
651         Reviewed by Adam Barth.
652
653         Part of a refactoring series. See tracking bug 82948.
654
655         * platform/chromium/DragDataChromium.cpp:
656         (WebCore::DragData::asURL):
657         * platform/chromium/FileSystemChromium.cpp:
658         (WebCore::deleteFile):
659         (WebCore::deleteEmptyDirectory):
660         (WebCore::getFileSize):
661         (WebCore::getFileModificationTime):
662         (WebCore::getFileMetadata):
663         (WebCore::directoryName):
664         (WebCore::pathByAppendingComponent):
665         (WebCore::makeAllDirectories):
666         (WebCore::openFile):
667         (WebCore::closeFile):
668         (WebCore::seekFile):
669         (WebCore::truncateFile):
670         (WebCore::readFromFile):
671         (WebCore::writeToFile):
672         * platform/chromium/PlatformSupport.h:
673         (PlatformSupport):
674
675 2012-05-30  Kent Tamura  <tkent@chromium.org>
676
677         Form controls in <fieldset disabled> should not be focusable.
678         https://bugs.webkit.org/show_bug.cgi?id=87380
679
680         Reviewed by Darin Adler.
681
682         Test: fast/forms/fieldset/focus-in-fieldset-disabled.html
683
684         * html/HTMLFormControlElement.cpp:
685         (WebCore::HTMLFormControlElement::supportsFocus):
686         Refer to disabled() instead of m_disabled to take account of wrapping
687         fieldset elements.
688
689 2012-05-30  Robin Dunn  <robin@alldunn.com>
690
691         [wx] Implement HTML clipboard support.
692         https://bugs.webkit.org/show_bug.cgi?id=87883
693
694         Reviewed by Kevin Ollivier.
695
696         * platform/wx/ClipboardWx.cpp:
697         (WebCore::ClipboardWx::writeRange):
698         * platform/wx/PasteboardWx.cpp:
699         (WebCore::Pasteboard::writeSelection):
700         (WebCore::Pasteboard::documentFragment):
701
702 2012-05-30  Garrett Casto  <gcasto@chromium.org>
703
704         TextFieldDecorationElement should respect style attribute
705         https://bugs.webkit.org/show_bug.cgi?id=87762
706
707         Reviewed by Kent Tamura.
708
709         * html/shadow/TextFieldDecorationElement.cpp: Use style set on the
710         Element when creating rendering style.
711         (WebCore::TextFieldDecorationElement::customStyleForRenderer):
712
713 2012-05-30  Ojan Vafai  <ojan@chromium.org>
714
715         Avoid second layout for flex-direction:row, flex-basis:auto flex items
716         https://bugs.webkit.org/show_bug.cgi?id=87901
717
718         Reviewed by Tony Chang.
719
720         No new tests. This is strictly a performance optimization and has no other
721         web visible changes.
722
723         Also, add FIXMEs for other cases where we could avoid doing layouts. 
724
725         * rendering/RenderFlexibleBox.cpp:
726         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
727         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
728         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
729
730 2012-05-30  Zhenyao Mo  <zmo@google.com>
731
732         WebKit incorrectly clears the alpha channel on readPixels, even for Framebuffers
733         https://bugs.webkit.org/show_bug.cgi?id=87310
734
735         Reviewed by Kenneth Russell.
736
737         * html/canvas/WebGLRenderingContext.cpp:
738         (WebCore):
739         (WebCore::WebGLRenderingContext::getParameter): set DEPTH_BITS/STENCIL_BITS to 0 if related channels are not requested.
740         (WebCore::WebGLRenderingContext::readPixels): don't do the alpha value fix if the current bound is not the internal drawing buffer.
741
742 2012-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
743
744         Unreviewed, rolling out r118986.
745         http://trac.webkit.org/changeset/118986
746         https://bugs.webkit.org/show_bug.cgi?id=87914
747
748         Caused several IndexedDB browser_test failures on Chromium
749         canary builders (Requested by rafaelw_ on #webkit).
750
751         * Modules/indexeddb/IDBCursor.cpp:
752         (WebCore::IDBCursor::advance):
753         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
754         (WebCore::IDBDatabaseBackendImpl::setVersion):
755         * Modules/indexeddb/IDBDatabaseError.h:
756         (WebCore::IDBDatabaseError::create):
757         (IDBDatabaseError):
758         (WebCore::IDBDatabaseError::createWithoutOffset):
759         (WebCore::IDBDatabaseError::code):
760         (WebCore::IDBDatabaseError::setCode):
761         (WebCore::IDBDatabaseError::setMessage):
762         (WebCore::IDBDatabaseError::IDBDatabaseError):
763         * Modules/indexeddb/IDBDatabaseException.cpp:
764         (WebCore):
765         (WebCore::IDBDatabaseException::initializeDescription):
766         * Modules/indexeddb/IDBDatabaseException.h:
767         (IDBDatabaseException):
768         * Modules/indexeddb/IDBObjectStore.cpp:
769         (WebCore::IDBObjectStore::createIndex):
770         * Modules/indexeddb/IDBRequest.cpp:
771         (WebCore::IDBRequest::resetReadyState):
772         (WebCore::IDBRequest::abort):
773         (WebCore::IDBRequest::onError):
774         (WebCore::IDBRequest::onSuccess):
775         (WebCore::IDBRequest::onSuccessWithContinuation):
776         (WebCore::IDBRequest::dispatchEvent):
777         * Modules/indexeddb/IDBRequest.h:
778         (IDBRequest):
779         * Modules/indexeddb/IDBRequest.idl:
780         * Modules/indexeddb/IDBTransaction.cpp:
781         * Modules/indexeddb/IDBTransaction.h:
782         (IDBTransaction):
783         * Modules/indexeddb/IDBTransaction.idl:
784
785 2012-05-30  Dominic Mazzoni  <dmazzoni@chromium.org>
786
787         [Chromium] AX: WebAccessibilityObject should check if an AccessibilityObject is detached
788         https://bugs.webkit.org/show_bug.cgi?id=87778
789
790         Reviewed by Adam Barth.
791
792         Chromium was never actually using AccessibilityObjectWrapper, so
793         this change deletes it. Instead, it's replaced with a simple bool
794         that keeps track of whether an AccessibilityObject was detached or
795         not. WebKit/chromium/public/WebAccessibilityObject can then use this
796         to determine if an object is still valid.
797
798         Test: accessibility/accessibility-object-detached.html
799
800         * WebCore.gypi:
801         * accessibility/AccessibilityObject.cpp:
802         (WebCore::AccessibilityObject::AccessibilityObject):
803         (WebCore::AccessibilityObject::detach):
804         (WebCore::AccessibilityObject::isDetached):
805         (WebCore):
806         * accessibility/AccessibilityObject.h:
807         (AccessibilityObject):
808         * accessibility/chromium/AXObjectCacheChromium.cpp:
809         (WebCore):
810         (WebCore::AXObjectCache::detachWrapper):
811         (WebCore::AXObjectCache::attachWrapper):
812         * accessibility/chromium/AccessibilityObjectWrapper.h: Removed.
813
814 2012-05-30  Shawn Singh  <shawnsingh@chromium.org>
815
816         Simplify TransformationMatrix rotation code to improve precision
817         https://bugs.webkit.org/show_bug.cgi?id=86666
818
819         Reviewed by Adrienne Walker.
820
821         Change covered by existing layout tests;
822         Additional unit tests added.
823
824         The original rotation code for WebCore::TransformationMatrix was
825         using indirect trig identities to compute basic rotation
826         matrices. As far as I can imagine, this is unnecessary, and brief
827         informal experiments showed that we can gain a few extra bits of
828         precision by avoiding that indirection.
829
830         Indeed, precision improved such that it revealed a mistake on one
831         of the unit tests, where the test was actually degenerate so that
832         the layer was aligned with a viewport boundary. When it was
833         imprecise, it didnt appear to be aligned. Putting an additional
834         translation on that test fixes it so it is no longer a degenerate
835         test.
836
837         This patch also revealed a few chinks in the unit testing armor of
838         this code, an error that should have been caught in unit tests was
839         luckily caught by SVG layout tests. This chink is fixed by adding
840         2 extra unit tests.
841
842         * platform/graphics/transforms/TransformationMatrix.cpp:
843         (WebCore::TransformationMatrix::rotate3d):
844
845 2012-05-30  Alec Flett  <alecflett@chromium.org>
846
847         IndexedDB: Remove old get/getKey implementations
848         https://bugs.webkit.org/show_bug.cgi?id=87879
849
850         Reviewed by Ojan Vafai.
851
852         Removal of dead code, was scaffolding for a complicated
853         Chromium landing.
854
855         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
856         (WebCore::IDBIndexBackendImpl::getInternal):
857         (WebCore::IDBIndexBackendImpl::getKeyInternal):
858         (WebCore::IDBIndexBackendImpl::get):
859         (WebCore::IDBIndexBackendImpl::getKey):
860         * Modules/indexeddb/IDBIndexBackendImpl.h:
861         (IDBIndexBackendImpl):
862         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
863         (WebCore::IDBObjectStoreBackendImpl::get):
864         (WebCore::IDBObjectStoreBackendImpl::getInternal):
865         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
866         (IDBObjectStoreBackendImpl):
867
868 2012-05-30  Joe Mason  <jmason@rim.com>
869
870         [BlackBerry] Fix assertion fail on redirect due to multiple jobs per handle
871         https://bugs.webkit.org/show_bug.cgi?id=87579
872
873         Reviewed by George Staikos.
874
875         RIM PR #158892:
876
877         When we start a redirect, we now call cancelJob instead of just deleting it immediately to make sure
878         that all cleanup is performed. However, we also reassign the ResourceHandle to the new job, and
879         since cancelJob is asynchronous it is now assigned to two jobs simultaneously.
880
881         Work around this by only returning handles that have not been cancelled from findJobForHandle.
882         Cancelled jobs still technically exist in the jobs list, but they're invisible to callers. This is
883         safe because there is literally nothing that can be done with a cancelled job - it is supposed to
884         merely consume any notifications that are already in progress and then kill itself off - so no
885         callers of findJobForHandle are expecting a cancelled job. (All existing callers call methods on the
886         returned job which are no-ops for cancelled jobs, so there is no behaviour change.)
887
888         No new tests because there is no behaviour change (fixes a regression).
889
890         * platform/network/blackberry/NetworkManager.cpp:
891         (WebCore::NetworkManager::findJobForHandle):
892
893 2012-05-30  Kentaro Hara  <haraken@chromium.org>
894
895         [V8][Performance] Optimize DOM attribute getters that return an empty string
896         https://bugs.webkit.org/show_bug.cgi?id=87820
897
898         Reviewed by Adam Barth.
899
900         This patch optimizes the performance of DOM attribute getters that return an
901         empty string by 65.8% (e.g. div.id, div.className, div.title, div.lang ...etc)
902
903         Performance test: Bindings/undefined-id-getter.html
904
905         [Without the patch]
906         RESULT Bindings: undefined-id-getter= 441.984669644 runs/s
907         median= 445.544554455 runs/s, stdev= 11.8406070959 runs/s, min= 405.063291139 runs/s, max= 447.204968944 runs/s
908
909         [With the patch]
910         RESULT Bindings: undefined-id-getter= 738.840460474 runs/s
911         median= 738.786279683 runs/s, stdev= 2.00249797161 runs/s, min= 733.944954128 runs/s, max= 741.721854305 runs/s
912
913         - This patch passes Isolate to v8::String::Empty(), which removes Isolate
914         look-up inside v8::String::Empty().
915
916         - This patch inlines V8Binding::getElementStringAttr() and
917         V8Binding::setElementStringAttr().
918
919         No tests. No change in behavior.
920
921         * bindings/scripts/CodeGeneratorV8.pm:
922         (GenerateNormalAttrGetter):
923         (GenerateNormalAttrSetter):
924         * bindings/v8/V8Binding.cpp:
925         (WebCore::StringCache::v8ExternalStringSlow):
926         * bindings/v8/V8Binding.h:
927         (WebCore::StringCache::v8ExternalString):
928         (StringCache):
929         (WebCore::v8ExternalString):
930         (WebCore):
931
932 2012-05-30  Kentaro Hara  <haraken@chromium.org>
933
934         [V8] Implement V8Binding::v8BooleanWithCheck(isolate)
935         https://bugs.webkit.org/show_bug.cgi?id=87814
936
937         Reviewed by Adam Barth.
938
939         The objective is to pass Isolate to v8::True() and v8::False().
940         Similarly to v8NullWithCheck() (bug 87713), this patch implements
941         V8Binding::v8BooleanWithCheck(isolate), which calls v8::True()/v8::False()
942         or v8::True(isolate)/v8::False(isolate) depending on whether the
943         passed isolate is null or not.
944
945         This patch also passes Isolate to v8Boolean() in CodeGeneratorV8.pm.
946
947         No tests. No behavior change.
948
949         * bindings/scripts/CodeGeneratorV8.pm:
950         (NativeToJSValue):
951         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
952         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
953         * bindings/scripts/test/V8/V8TestObj.cpp:
954         (WebCore::TestObjV8Internal::createAttrGetter):
955         (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrGetter):
956         (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter):
957         * bindings/v8/V8Binding.h:
958         (WebCore::v8Boolean):
959         (WebCore):
960         (WebCore::v8BooleanWithCheck):
961
962 2012-05-30  Kentaro Hara  <haraken@chromium.org>
963
964         [V8] Replace v8::True() and v8::False() with v8Boolean()
965         https://bugs.webkit.org/show_bug.cgi?id=87812
966
967         Reviewed by Adam Barth.
968
969         To avoid implementing all of v8TrueWithCheck(isolate), v8FalseWithCheck(isolate)
970         and v8BooleanWithCheck(isolate), we can first replace v8::True() and v8::False()
971         with v8Boolean(). Then we can just implement v8BooleanWithCheck(isolate).
972
973         No tests. No change in behavior.
974
975         * bindings/v8/SerializedScriptValue.cpp:
976         * bindings/v8/V8Binding.h:
977         (WebCore::v8StringOrFalse):
978         * bindings/v8/V8NPUtils.cpp:
979         (WebCore::convertNPVariantToV8Object):
980         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
981         (WebCore::V8DOMStringMap::namedPropertyDeleter):
982         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
983         (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback):
984         * bindings/v8/custom/V8StorageCustom.cpp:
985         (WebCore::storageDeleter):
986
987 2012-05-30  Kentaro Hara  <haraken@chromium.org>
988
989         [V8] Replace v8::Null() with v8NullWithCheck(isolate) in custom bindings where isolate can be 0
990         https://bugs.webkit.org/show_bug.cgi?id=87807
991
992         Reviewed by Adam Barth.
993
994         The objective is to pass Isolate around in V8 bindings.
995         This patch replaces v8::Null() with v8NullWithCheck(isolate)
996         in custom bindings where isolate can be 0.
997
998         'where isolate can be 0' means all the places where we cannot
999         retrieve Isolate directly from AccessorInfo or Arguments.
1000
1001         No tests. No behavior change.
1002
1003         * bindings/v8/custom/V8BlobCustom.cpp:
1004         (WebCore::toV8):
1005         * bindings/v8/custom/V8CSSRuleCustom.cpp:
1006         (WebCore::toV8):
1007         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
1008         (WebCore::toV8):
1009         * bindings/v8/custom/V8CSSValueCustom.cpp:
1010         (WebCore::toV8):
1011         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1012         (WebCore::toV8):
1013         * bindings/v8/custom/V8DOMTokenListCustom.cpp:
1014         (WebCore::toV8):
1015         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1016         (WebCore::toV8):
1017         * bindings/v8/custom/V8DataViewCustom.cpp:
1018         (WebCore::toV8):
1019         * bindings/v8/custom/V8DocumentCustom.cpp:
1020         (WebCore::toV8):
1021         * bindings/v8/custom/V8EntryCustom.cpp:
1022         (WebCore::toV8):
1023         * bindings/v8/custom/V8EntrySyncCustom.cpp:
1024         (WebCore::toV8):
1025         * bindings/v8/custom/V8EventCustom.cpp:
1026         (WebCore::toV8):
1027         * bindings/v8/custom/V8Float32ArrayCustom.cpp:
1028         (WebCore::toV8):
1029         * bindings/v8/custom/V8Float64ArrayCustom.cpp:
1030         (WebCore::toV8):
1031         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1032         (WebCore::toV8):
1033         * bindings/v8/custom/V8HTMLElementCustom.cpp:
1034         (WebCore::toV8):
1035         * bindings/v8/custom/V8IDBAnyCustom.cpp:
1036         (WebCore::toV8):
1037         * bindings/v8/custom/V8IDBKeyCustom.cpp:
1038         (WebCore::toV8):
1039         * bindings/v8/custom/V8ImageDataCustom.cpp:
1040         (WebCore::toV8):
1041         * bindings/v8/custom/V8Int16ArrayCustom.cpp:
1042         (WebCore::toV8):
1043         * bindings/v8/custom/V8Int32ArrayCustom.cpp:
1044         (WebCore::toV8):
1045         * bindings/v8/custom/V8Int8ArrayCustom.cpp:
1046         (WebCore::toV8):
1047         * bindings/v8/custom/V8LocationCustom.cpp:
1048         (WebCore::toV8):
1049         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1050         (WebCore::toV8):
1051         * bindings/v8/custom/V8NodeCustom.cpp:
1052         (WebCore::toV8Slow):
1053         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
1054         (WebCore::toV8):
1055         * bindings/v8/custom/V8SVGElementCustom.cpp:
1056         (WebCore::toV8):
1057         * bindings/v8/custom/V8SVGPathSegCustom.cpp:
1058         (WebCore::toV8):
1059         * bindings/v8/custom/V8ScriptProfileCustom.cpp:
1060         (WebCore::toV8):
1061         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
1062         (WebCore::toV8):
1063         * bindings/v8/custom/V8StyleSheetCustom.cpp:
1064         (WebCore::toV8):
1065         * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
1066         (WebCore::toV8):
1067         * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
1068         (WebCore::toV8):
1069         * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
1070         (WebCore::toV8):
1071         * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
1072         (WebCore::toV8):
1073         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1074         (WebCore::toV8):
1075
1076 2012-05-30  Kentaro Hara  <haraken@chromium.org>
1077
1078         [V8] Replace v8::Null() with v8::Null(isolate) or v8NullWithCheck(isolate) in non-custom bindings
1079         https://bugs.webkit.org/show_bug.cgi?id=87810
1080
1081         Reviewed by Adam Barth.
1082
1083         The objective is to pass Isolate around in V8 bindings.
1084         For non-custom bindings, we replace v8::Null() with v8::Null(isolate)
1085         where isolate cannot be 0, and replace v8::Null() with v8NullWithCheck(isolate)
1086         where isolate can be 0.
1087
1088         This will be the final patch for passing Isolate to v8::Null().
1089
1090         No tests. No change in behavior.
1091
1092         * bindings/scripts/CodeGeneratorV8.pm:
1093         (GenerateNormalAttrGetter):
1094         (GenerateFunctionCallback):
1095         * bindings/scripts/test/V8/V8TestObj.cpp:
1096         (WebCore::TestObjV8Internal::contentDocumentAttrGetter):
1097         (WebCore::TestObjV8Internal::getSVGDocumentCallback):
1098         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1099         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter):
1100         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter):
1101         * bindings/v8/SerializedScriptValue.cpp:
1102         (WebCore::SerializedScriptValue::deserialize):
1103         * bindings/v8/V8DOMWrapper.cpp:
1104         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1105
1106 2012-05-30  Kentaro Hara  <haraken@chromium.org>
1107
1108         [V8] Replace v8::Null() with v8::Null(isolate) in custom bindings where isolate shouldn't be 0
1109         https://bugs.webkit.org/show_bug.cgi?id=87809
1110
1111         Reviewed by Adam Barth.
1112
1113         The objective is to pass Isolate around in V8 bindings.
1114         This patch replaces v8::Null() with v8::Null(isolate) in custom bindings
1115         where isolate shouldn't be 0. 'where isolate shouldn't be 0' is the place
1116         where isolate is retrieved directly from AccessorInfo and Arguments.
1117
1118         This patch includes a couple of refactorings:
1119
1120         - Makes V8DeviceMotionEvent::createAccelerationObject() and
1121         V8DeviceMotionEvent::createRotationRateObject() static
1122
1123         - Moves V8HTMLElement::toV8Object() into the existing ENABLE(MICRODATA) flag.
1124
1125         No tests. No change in behavior.
1126
1127         * bindings/v8/custom/V8ClipboardCustom.cpp:
1128         (WebCore::V8Clipboard::typesAccessorGetter):
1129         * bindings/v8/custom/V8CoordinatesCustom.cpp:
1130         (WebCore::V8Coordinates::altitudeAccessorGetter):
1131         (WebCore::V8Coordinates::altitudeAccuracyAccessorGetter):
1132         (WebCore::V8Coordinates::headingAccessorGetter):
1133         (WebCore::V8Coordinates::speedAccessorGetter):
1134         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1135         (WebCore::V8DeviceMotionEvent::accelerationAccessorGetter):
1136         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter):
1137         (WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter):
1138         (WebCore::V8DeviceMotionEvent::intervalAccessorGetter):
1139         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1140         (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter):
1141         (WebCore::V8DeviceOrientationEvent::betaAccessorGetter):
1142         (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter):
1143         (WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter):
1144         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
1145         (WebCore::V8Document::locationAccessorGetter):
1146         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1147         (WebCore::V8HTMLCanvasElement::getContextCallback):
1148         * bindings/v8/custom/V8HTMLElementCustom.cpp:
1149         (WebCore::toV8):
1150         (WebCore):
1151         (WebCore::toV8Object):
1152         * bindings/v8/custom/V8HistoryCustom.cpp:
1153         (WebCore::V8History::stateAccessorGetter):
1154         * bindings/v8/custom/V8MessageEventCustom.cpp:
1155         (WebCore::V8MessageEvent::dataAccessorGetter):
1156         * bindings/v8/custom/V8NodeCustom.cpp:
1157         (WebCore::V8Node::insertBeforeCallback):
1158         (WebCore::V8Node::replaceChildCallback):
1159         (WebCore::V8Node::removeChildCallback):
1160         (WebCore::V8Node::appendChildCallback):
1161         * bindings/v8/custom/V8PopStateEventCustom.cpp:
1162         (WebCore::V8PopStateEvent::stateAccessorGetter):
1163         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
1164         (WebCore::V8SQLResultSetRowList::itemCallback):
1165         * bindings/v8/custom/V8TrackEventCustom.cpp:
1166         (WebCore::V8TrackEvent::trackAccessorGetter):
1167         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1168         (WebCore::toV8Object):
1169         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
1170         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
1171
1172 2012-05-30  Nico Weber  <thakis@chromium.org>
1173
1174         Make the files attribute of HTMLInputElement writable
1175         https://bugs.webkit.org/show_bug.cgi?id=87154
1176
1177         Reviewed by Adam Barth.
1178
1179         whatwg thread:
1180         http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/036140.html
1181
1182         * bindings/objc/PublicDOMInterfaces.h:
1183             Remove readonly on files property.
1184         * html/FileInputType.cpp:
1185         (FileInputType):
1186             Add a NULL check to setFiles().
1187         * html/FileInputType.h:
1188         (FileInputType):
1189             Let setFiles() overwrite the base  class's method.
1190         * html/HTMLInputElement.cpp:
1191         (WebCore::HTMLInputElement::setFiles):
1192             Add setFiles() implementation, delegate to input type.
1193         * html/HTMLInputElement.h:
1194         (HTMLInputElement):
1195         * html/HTMLInputElement.idl:
1196         * html/InputType.cpp:
1197         (WebCore::InputType::setFiles):
1198             setFiles() does nothing by default.
1199         * html/InputType.h:
1200         (InputType):
1201             Add a virtual setFiles() method.
1202
1203 2012-05-30  Joe Mason  <jmason@rim.com>
1204
1205         [BlackBerry] Remove useless string->char*->string conversion in NetworkJob.
1206         https://bugs.webkit.org/show_bug.cgi?id=87861
1207
1208         Reviewed by Antonio Gomes.
1209
1210         RIM PR #152383: username is a WTF::String.  ResourceHandleInternal::m_user is a string.  Yet they're
1211         assigned with "username = m_user.utf8().data()".  Pointless: "username = m_user" will do.
1212
1213         No new tests since there is no behaviour change.
1214
1215         * platform/network/blackberry/NetworkJob.cpp:
1216         (WebCore::NetworkJob::sendRequestWithCredentials):
1217
1218 2012-05-30  Dan Bernstein  <mitz@apple.com>
1219
1220         [Qt] REGRESSION(r118568): It broke fast/forms/textarea-maxlength.html on Qt 4.8
1221         https://bugs.webkit.org/show_bug.cgi?id=87740
1222
1223         Reviewed by Darin Adler.
1224
1225         * platform/text/qt/TextBreakIteratorQt.cpp:
1226         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Changed to use
1227         the return value of setUpIterator.
1228
1229 2012-05-30  Zeno Albisser  <zeno@webkit.org>
1230
1231         GraphicsSurface: allow importing and exporting of textures directly on GPU side.
1232         https://bugs.webkit.org/show_bug.cgi?id=87725
1233
1234         Add copyFromFramebuffer function to copy a texture from an FBO
1235         onto the GraphicsSurface.
1236         Add getTextureID function to export the texture ID.
1237         This allows binding/blitting the texture directly on the GPU.
1238
1239         Reviewed by Noam Rosenthal.
1240
1241         * platform/graphics/surfaces/GraphicsSurface.cpp:
1242         (WebCore::GraphicsSurface::getTextureID):
1243         (WebCore):
1244         (WebCore::GraphicsSurface::copyFromFramebuffer):
1245         * platform/graphics/surfaces/GraphicsSurface.h:
1246         (GraphicsSurface):
1247         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1248         (WebCore::GraphicsSurface::platformGetTextureID):
1249         (WebCore):
1250         (WebCore::GraphicsSurface::platformCopyFromFramebuffer):
1251
1252 2012-05-30  Alec Flett  <alecflett@chromium.org>
1253
1254         IndexedDB: Implement IDBTransaction.error and IDBRequest.error
1255         https://bugs.webkit.org/show_bug.cgi?id=87865
1256
1257         Reviewed by Tony Chang.
1258
1259         Added "error" attribute to IDBRequest and IDBTransaction. Update
1260         IDBDatabaseError to honor the IDBDatabaseException behavior
1261         of dealing with IDB-specific throws of DOMException codes,
1262         as per the spec.
1263
1264         Existing tests which previously tested 'errorCode' and
1265         'webkitErrorMessage' have been updated to use the new attribute.
1266
1267         * Modules/indexeddb/IDBCursor.cpp:
1268         (WebCore::IDBCursor::advance):
1269         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1270         (WebCore::IDBDatabaseBackendImpl::setVersion):
1271         * Modules/indexeddb/IDBDatabaseError.h:
1272         (WebCore::IDBDatabaseError::create):
1273         (WebCore::IDBDatabaseError::code):
1274         (WebCore::IDBDatabaseError::idbCode):
1275         (WebCore::IDBDatabaseError::name):
1276         (WebCore::IDBDatabaseError::IDBDatabaseError):
1277         (IDBDatabaseError):
1278         * Modules/indexeddb/IDBDatabaseException.cpp:
1279         (WebCore):
1280         (WebCore::getErrorEntry):
1281         (WebCore::IDBDatabaseException::initializeDescription):
1282         (WebCore::IDBDatabaseException::getErrorName):
1283         (WebCore::IDBDatabaseException::getLegacyErrorCode):
1284         * Modules/indexeddb/IDBDatabaseException.h:
1285         (IDBDatabaseException):
1286         * Modules/indexeddb/IDBObjectStore.cpp:
1287         (WebCore::IDBObjectStore::createIndex):
1288         * Modules/indexeddb/IDBRequest.cpp:
1289         (WebCore::IDBRequest::error):
1290         (WebCore):
1291         (WebCore::IDBRequest::resetReadyState):
1292         (WebCore::IDBRequest::abort):
1293         (WebCore::IDBRequest::onError):
1294         (WebCore::IDBRequest::onSuccess):
1295         (WebCore::IDBRequest::onSuccessWithContinuation):
1296         (WebCore::IDBRequest::dispatchEvent):
1297         * Modules/indexeddb/IDBRequest.h:
1298         (IDBRequest):
1299         * Modules/indexeddb/IDBRequest.idl:
1300         * Modules/indexeddb/IDBTransaction.cpp:
1301         (WebCore::IDBTransaction::error):
1302         (WebCore):
1303         (WebCore::IDBTransaction::setError):
1304         * Modules/indexeddb/IDBTransaction.h:
1305         (IDBTransaction):
1306         * Modules/indexeddb/IDBTransaction.idl:
1307
1308 2012-05-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1309
1310         [Qt] ImageDecoderQt doesn't support some decoders.
1311         https://bugs.webkit.org/show_bug.cgi?id=87851
1312
1313         Reviewed by Kenneth Rohde Christiansen.
1314
1315         If forced to decode GIF and JPEG, ImageDecoderQt show several
1316         artifacts. This is caused by mismatched decoded image-formats.
1317
1318         Convert mismatched color spaces into ARGB color space, and perform
1319         manual mem-copy when the image has been decoded into a new buffer.
1320
1321         This patch also add support for down-scaling in the decoder.
1322
1323         * platform/graphics/qt/ImageDecoderQt.cpp:
1324         (WebCore::ImageDecoderQt::internalDecodeSize):
1325         (WebCore::ImageDecoderQt::internalHandleCurrentImage):
1326
1327 2012-05-30  Emil A Eklund  <eae@chromium.org>
1328
1329         Floats wraps incorrectly when top edge has subpixel precision
1330         https://bugs.webkit.org/show_bug.cgi?id=87688
1331
1332         Reviewed by Levi Weintraub.
1333         
1334         When computing the logical left and right offsets for a float we
1335         incorrectly floored the logical top when passing it to the float search
1336         adapter. This caused it to return incorrect values where the floored and
1337         pixel snapped values are not the same.
1338
1339         Test: fast/sub-pixel/float-wrap-with-subpixel-top.html
1340
1341         * rendering/RenderBlock.cpp:
1342         (WebCore::RenderBlock::logicalLeftOffsetForLine):
1343         (WebCore::RenderBlock::logicalRightOffsetForLine):
1344
1345 2012-05-30  Emil A Eklund  <eae@chromium.org>
1346
1347         Inline blocks with margin wrap incorrectly with subpixel layout turned on
1348         https://bugs.webkit.org/show_bug.cgi?id=87897
1349
1350         Reviewed by Levi Weintraub.
1351
1352         Change WebCore::getBorderPaddingMargin and the helper function
1353         getBPMWidth to return a LayoutUnit rather than an int as the padding and
1354         margin values have subpixel precision. This fixes an issue where we would
1355         incorrectly wrap inline blocks with a subpixel padding or margin. 
1356
1357         Test: fast/sub-pixel/inline-block-with-margin.html
1358
1359         * rendering/RenderBlock.cpp:
1360         (WebCore::getBPMWidth):
1361         (WebCore::getBorderPaddingMargin):
1362         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1363
1364 2012-05-30  Tony Chang  <tony@chromium.org>
1365
1366         rename flexbox css values from justify and distribute to space-between and space-around
1367         https://bugs.webkit.org/show_bug.cgi?id=87867
1368
1369         Reviewed by Ojan Vafai.
1370
1371         This was recently changed in the spec:
1372         http://dev.w3.org/csswg/css3-flexbox/#justify-content
1373
1374         No new tests, updated existing tests and expectations.
1375
1376         * css/CSSParser.cpp:
1377         (WebCore::isValidKeywordPropertyAndValue):
1378         * css/CSSPrimitiveValueMappings.h:
1379         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1380         (WebCore::CSSPrimitiveValue::operator EFlexPack):
1381         (WebCore::CSSPrimitiveValue::operator EFlexLinePack):
1382         * css/CSSValueKeywords.in:
1383         * rendering/RenderFlexibleBox.cpp:
1384         (WebCore::initialPackingOffset):
1385         (WebCore::packingSpaceBetweenChildren):
1386         (WebCore::initialLinePackingOffset):
1387         (WebCore::linePackingSpaceBetweenChildren):
1388         * rendering/style/RenderStyleConstants.h:
1389
1390 2012-05-30  Kevin Ollivier  <kevino@theolliviers.com>
1391
1392         [wx] Unreviewed build fix. Make sure we get the file size with the proper native type.
1393
1394         * platform/wx/FileSystemWx.cpp:
1395         (WebCore::getFileMetadata):
1396
1397 2012-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1398
1399         Unreviewed, rolling out r118913.
1400         http://trac.webkit.org/changeset/118913
1401         https://bugs.webkit.org/show_bug.cgi?id=87891
1402
1403         patch is incorrect (see comments in
1404         https://bugs.webkit.org/show_bug.cgi?id=87889) (Requested by
1405         thorton on #webkit).
1406
1407         * css/CSSFontFaceSrcValue.cpp:
1408         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
1409         * css/CSSFontFaceSrcValue.h:
1410         (CSSFontFaceSrcValue):
1411         * css/CSSPrimitiveValue.cpp:
1412         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
1413         * css/CSSPrimitiveValue.h:
1414         (CSSPrimitiveValue):
1415         * css/CSSReflectValue.cpp:
1416         (WebCore::CSSReflectValue::addSubresourceStyleURLs):
1417         * css/CSSReflectValue.h:
1418         (CSSReflectValue):
1419         * css/CSSValue.cpp:
1420         (WebCore::CSSValue::addSubresourceStyleURLs):
1421         * css/CSSValue.h:
1422         (CSSValue):
1423         * css/CSSValueList.cpp:
1424         (WebCore::CSSValueList::addSubresourceStyleURLs):
1425         * css/CSSValueList.h:
1426         (CSSValueList):
1427         * css/StylePropertySet.cpp:
1428         (WebCore::StylePropertySet::addSubresourceStyleURLs):
1429         * css/StylePropertySet.h:
1430         (StylePropertySet):
1431         * css/StyleSheetContents.cpp:
1432         (WebCore::StyleSheetContents::addSubresourceStyleURLs):
1433         * css/StyleSheetContents.h:
1434         (StyleSheetContents):
1435         * dom/Element.h:
1436         * dom/Node.cpp:
1437         (WebCore::Node::getSubresourceURLs):
1438         * dom/Node.h:
1439         (WebCore::Node::addSubresourceAttributeURLs):
1440         (WebCore):
1441         * dom/ProcessingInstruction.cpp:
1442         (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
1443         * dom/ProcessingInstruction.h:
1444         (ProcessingInstruction):
1445         * dom/StyledElement.cpp:
1446         (WebCore::StyledElement::addSubresourceAttributeURLs):
1447         * dom/StyledElement.h:
1448         (StyledElement):
1449         * html/HTMLBodyElement.cpp:
1450         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
1451         * html/HTMLBodyElement.h:
1452         (HTMLBodyElement):
1453         * html/HTMLEmbedElement.cpp:
1454         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs):
1455         * html/HTMLEmbedElement.h:
1456         (HTMLEmbedElement):
1457         * html/HTMLImageElement.cpp:
1458         (WebCore::HTMLImageElement::addSubresourceAttributeURLs):
1459         * html/HTMLImageElement.h:
1460         (HTMLImageElement):
1461         * html/HTMLInputElement.cpp:
1462         (WebCore::HTMLInputElement::addSubresourceAttributeURLs):
1463         * html/HTMLInputElement.h:
1464         (HTMLInputElement):
1465         * html/HTMLLinkElement.cpp:
1466         (WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
1467         * html/HTMLLinkElement.h:
1468         (HTMLLinkElement):
1469         * html/HTMLObjectElement.cpp:
1470         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
1471         * html/HTMLObjectElement.h:
1472         (HTMLObjectElement):
1473         * html/HTMLParamElement.cpp:
1474         (WebCore::HTMLParamElement::addSubresourceAttributeURLs):
1475         * html/HTMLParamElement.h:
1476         (HTMLParamElement):
1477         * html/HTMLScriptElement.cpp:
1478         (WebCore::HTMLScriptElement::addSubresourceAttributeURLs):
1479         * html/HTMLScriptElement.h:
1480         (HTMLScriptElement):
1481         * html/HTMLStyleElement.cpp:
1482         (WebCore::HTMLStyleElement::addSubresourceAttributeURLs):
1483         * html/HTMLStyleElement.h:
1484         (HTMLStyleElement):
1485         * html/HTMLTableCellElement.cpp:
1486         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs):
1487         * html/HTMLTableCellElement.h:
1488         (HTMLTableCellElement):
1489         * html/HTMLTableElement.cpp:
1490         (WebCore::HTMLTableElement::addSubresourceAttributeURLs):
1491         * html/HTMLTableElement.h:
1492         (HTMLTableElement):
1493         * svg/SVGCursorElement.cpp:
1494         (WebCore::SVGCursorElement::addSubresourceAttributeURLs):
1495         * svg/SVGCursorElement.h:
1496         (SVGCursorElement):
1497         * svg/SVGFEImageElement.cpp:
1498         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs):
1499         * svg/SVGFEImageElement.h:
1500         (SVGFEImageElement):
1501         * svg/SVGImageElement.cpp:
1502         (WebCore::SVGImageElement::addSubresourceAttributeURLs):
1503         * svg/SVGImageElement.h:
1504         (SVGImageElement):
1505         * svg/SVGScriptElement.cpp:
1506         (WebCore::SVGScriptElement::addSubresourceAttributeURLs):
1507         * svg/SVGScriptElement.h:
1508         (SVGScriptElement):
1509
1510 2012-05-30  Shezan Baig  <shezbaig.wk@gmail.com>
1511
1512         Rename offsetTopLeft in RenderBoxModelObject to something better
1513         https://bugs.webkit.org/show_bug.cgi?id=85915
1514
1515         Reviewed by Darin Adler.
1516
1517         Renamed offsetTopLeft in RenderBoxModelObject to
1518         adjustedPositionRelativeToOffsetParent, because it returns the given
1519         startPoint after adjusting it to be relative to the top-left corner of
1520         the offsetParent.  The definition of offsetParent itself is non-trivial
1521         and is documented within the body of RenderObject::offsetParent,
1522         therefore I decided to reuse this term, as-is, in the name of this
1523         function.
1524
1525         No new tests; no functional or visible changes.
1526
1527         * rendering/RenderBox.cpp:
1528         (WebCore::RenderBox::offsetLeft):
1529         (WebCore::RenderBox::offsetTop):
1530         * rendering/RenderBoxModelObject.cpp:
1531         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1532         (WebCore::RenderBoxModelObject::offsetLeft):
1533         (WebCore::RenderBoxModelObject::offsetTop):
1534         * rendering/RenderBoxModelObject.h:
1535         (RenderBoxModelObject):
1536         * rendering/RenderInline.cpp:
1537         (WebCore::RenderInline::offsetLeft):
1538         (WebCore::RenderInline::offsetTop):
1539
1540 2012-05-29  Adrienne Walker  <enne@google.com>
1541
1542         Transformed fixed position layers have an incorrect overlap map entry
1543         https://bugs.webkit.org/show_bug.cgi?id=64201
1544
1545         Reviewed by Darin Adler.
1546
1547         Previously, layers that both had a transform and were fixed position
1548         were not considered as being fixed position in RenderGeometryMap or in
1549         RenderBox::mapLocalToContainer (although this case is not incorrect in
1550         the case of painting, so an external caller likely adjusts for this).
1551
1552         Tests: compositing/layer-creation/fixed-position-and-transform.html
1553                compositing/layer-creation/fixed-position-under-transform.html
1554
1555         * rendering/RenderBox.cpp:
1556         (WebCore::RenderBox::mapLocalToContainer):
1557         * rendering/RenderGeometryMap.cpp:
1558         (WebCore::RenderGeometryMap::mapToAbsolute):
1559
1560 2012-05-30  Ulan Degenbaev  <ulan@chromium.org>
1561
1562         [v8] Crash after redefining setter on typed array to a number
1563         https://bugs.webkit.org/show_bug.cgi?id=87862
1564
1565         Reviewed by Kenneth Russell.
1566
1567         Remove calls to typed array set() method from C++.
1568         Store the copying script as a hidden property of a typed array prototype.
1569
1570         Test: fast/canvas/webgl/array-override-set.html
1571
1572         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
1573         (WebCore):
1574         (WebCore::getHiddenCopyMethod):
1575         (WebCore::installHiddenCopyMethod):
1576         (WebCore::copyElements):
1577         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1578         (WebCore):
1579         (WebCore::constructWebGLArray):
1580         (WebCore::setWebGLArrayHelper):
1581         * bindings/v8/custom/V8ArrayBufferViewCustomScript.js:
1582
1583 2012-05-30  David Hyatt  <hyatt@apple.com>
1584
1585         https://bugs.webkit.org/show_bug.cgi?id=87882
1586         
1587         [New Multicolumn] Rename layoutColumns to relayoutForPagination and make it
1588         virtual so that it can be implemented by RenderMultiColumnBlock.
1589
1590         Reviewed by Anders Carlsson.
1591
1592         * rendering/RenderBlock.cpp:
1593         (WebCore::RenderBlock::layoutBlock):
1594         (WebCore::RenderBlock::relayoutForPagination):
1595         * rendering/RenderBlock.h:
1596         (RenderBlock):
1597         * rendering/RenderMultiColumnBlock.cpp:
1598         (WebCore::RenderMultiColumnBlock::relayoutForPagination):
1599         (WebCore):
1600         * rendering/RenderMultiColumnBlock.h:
1601         (RenderMultiColumnBlock):
1602
1603 2012-05-30  Daniel Drake  <dsd@laptop.org>
1604
1605         Check for GTK2/GTK3 symbol mismatch earlier
1606         https://bugs.webkit.org/show_bug.cgi?id=87687
1607
1608         Reviewed by Martin Robinson.
1609
1610         No new tests. Regressions in core behavior are covered by existing
1611         plugin tests and the fix deals with particular aspects of the system
1612         environment that are difficult to test.
1613
1614         Detect plugins that would mix GTK+ symbols earlier, so that the
1615         WebKit can skip them and choose a more appropriate plugin module.
1616
1617         * plugins/gtk/PluginPackageGtk.cpp: Move this code from PluginViewGtk.
1618         (WebCore::moduleMixesGtkSymbols):
1619         (WebCore::PluginPackage::load):
1620         * plugins/gtk/PluginViewGtk.cpp: Move this code to PluginPackageGtk.
1621         (WebCore::PluginView::platformStart):
1622
1623 2012-05-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1624
1625         [Qt] Support IMAGE_DECODER_DOWN_SAMPLING flag.
1626         https://bugs.webkit.org/show_bug.cgi?id=87840
1627
1628         Based on patches by Qi Zhang and Jussi Lehto.
1629         Reviewed by Kenneth Rohde Christiansen.
1630
1631         * platform/graphics/Image.cpp:
1632         (WebCore::Image::adjustSourceRectForDownSampling):
1633         * platform/graphics/Image.h:
1634         (Image):
1635         * platform/graphics/openvg/ImageOpenVG.cpp:
1636         (WebCore::BitmapImage::draw):
1637         * platform/graphics/qt/ImageQt.cpp:
1638         (WebCore::Image::drawPattern):
1639         (WebCore::BitmapImage::draw):
1640
1641 2012-05-30  Shinya Kawanaka  <shinyak@chromium.org>
1642
1643         comparePositions in htmlediting should consider nested Shadow DOM.
1644         https://bugs.webkit.org/show_bug.cgi?id=87623
1645
1646         Reviewed by Ryosuke Niwa.
1647
1648         comparePositions in htmlediting.cpp didn't consider nested Shadow DOM.
1649         This patch makes it possible to compare the nodes in nested Shadow DOM.
1650
1651         The algorithm is: we calculate the common tree scope of node A and B, and
1652         adjust the nodes to the treeScope, then compare them. If the adjusted nodes
1653         are the same, we check the shadow descendent of each node.
1654
1655         Test: editing/shadow/compare-positions-in-nested-shadow.html
1656
1657         * dom/TreeScope.cpp:
1658         (WebCore::listTreeScopes):
1659         (WebCore):
1660         (WebCore::commonTreeScope):
1661         * dom/TreeScope.h:
1662         (WebCore):
1663         * editing/htmlediting.cpp:
1664         (WebCore::comparePositions):
1665
1666 2012-05-30  Erik Arvidsson  <arv@chromium.org>
1667
1668         [V8] Clean up V8LazyEventListener to use one less function call
1669         https://bugs.webkit.org/show_bug.cgi?id=87785
1670
1671         Reviewed by Kentaro Hara.
1672
1673         Instead of relying on 'arguments' we rely on 'this'. 'this' cannot be intercepted by a
1674         with-statement so it is safe to use that to bind the context objects. This allows us to
1675         remove one layer of function indirection in the generated code.
1676
1677         Covered by existing tests.
1678
1679         * bindings/v8/V8LazyEventListener.cpp:
1680         (WebCore::V8LazyEventListener::prepareListenerObject):
1681
1682 2012-05-30  Tim Horton  <timothy_horton@apple.com>
1683
1684         Factor DeferrableOneShotTimer out of GraphicsContextCG/GeneratorGeneratedImage
1685         https://bugs.webkit.org/show_bug.cgi?id=87824
1686
1687         Reviewed by Simon Fraser.
1688
1689         DeferrableOneShotTimer is a timer which takes a class and method to call (as Timer does),
1690         and a delay. It exposes restart(), stop(), and isActive(), and none of the rest of
1691         the TimerBase interface. On restart(), the timer is started with the given delay,
1692         unless it's already running, in which case a flag is set to automatically restart
1693         the timer when it fires instead of calling the given method. This provides a
1694         low-overhead way to implement a deferrable timer.
1695
1696         No new tests, refactoring.
1697
1698         * platform/Timer.h:
1699         (DeferrableOneShotTimer):
1700         (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer): New class.
1701         (WebCore::DeferrableOneShotTimer::restart):
1702         (WebCore::DeferrableOneShotTimer::fired):
1703         * platform/graphics/GeneratorGeneratedImage.cpp:
1704         (WebCore::GeneratorGeneratedImage::invalidateCacheTimerFired):
1705         * platform/graphics/GeneratorGeneratedImage.h:
1706         (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage): Make use of DeferrableOneShotTimer.
1707         * platform/graphics/cg/GraphicsContextCG.cpp:
1708         (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer): Make use of DeferrableOneShotTimer.
1709         (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
1710
1711 2012-05-30  Xueqing Huang  <huangxueqing@baidu.com>
1712
1713         eventSender.beginDragWithFiles should be implemented in Windows, which blocked drag and drop related tests.
1714         https://bugs.webkit.org/show_bug.cgi?id=86296
1715
1716         Reviewed by Tony Chang.
1717
1718         Test: This change was requirement for eventSender.beginDragWithFiles, update win/Skipped file to remove drag and drop related tests will valiate it. 
1719
1720         * platform/win/DragDataWin.cpp:
1721         (WebCore::DragData::numberOfFiles):
1722
1723 2012-05-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1724
1725         HashTable.h has using directives for std::pair and std::make_pair
1726         https://bugs.webkit.org/show_bug.cgi?id=29919
1727
1728         Reviewed by Darin Adler.
1729
1730         Change code to use std::pair and std::make_pair.
1731
1732         * accessibility/AXObjectCache.cpp:
1733         (WebCore::AXObjectCache::postNotification):
1734         * html/MediaFragmentURIParser.cpp:
1735         (WebCore::MediaFragmentURIParser::parseFragments):
1736         * html/parser/HTMLMetaCharsetParser.cpp:
1737         (WebCore::HTMLMetaCharsetParser::processMeta):
1738         * loader/cache/CachedImage.cpp:
1739         (WebCore::CachedImage::brokenImage):
1740         * page/PageSerializer.cpp:
1741         (WebCore::isCharsetSpecifyingNode):
1742
1743 2012-05-30  Peter Rybin  <peter.rybin@gmail.com>
1744
1745         Web Inspector: disable ExactlyInt feature in InspectorTypeBuilder since it breaks release Windows 7 WK2
1746         https://bugs.webkit.org/show_bug.cgi?id=87857
1747
1748         Reviewed by Yury Semikhatsky.
1749
1750         Code generator is patched to support old style of int parameter.
1751
1752         * inspector/CodeGeneratorInspector.py:
1753         (TypeModel.init_class):
1754
1755 2012-05-30  Alexei Filippov  <alexeif@chromium.org>
1756
1757         Web Inspector: Add trace() method to the WorkerConsole
1758         https://bugs.webkit.org/show_bug.cgi?id=87656
1759
1760         Reviewed by Yury Semikhatsky.
1761
1762         * inspector/front-end/HeapSnapshotProxy.js:
1763         (WebInspector.HeapSnapshotRealWorker.prototype._messageReceived):
1764         * inspector/front-end/HeapSnapshotWorker.js:
1765         (WebInspector.WorkerConsole.prototype.trace):
1766
1767 2012-05-30  Kinuko Yasuda  <kinuko@chromium.org>
1768
1769         File.lastModifiedDate must return null if the modified time info is not available
1770         https://bugs.webkit.org/show_bug.cgi?id=87709
1771
1772         Reviewed by Kentaro Hara.
1773
1774         Per File API spec, File.lastModifiedDate must return null if the
1775         modified time info is not available.
1776         http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate
1777
1778         Test: http/tests/local/fileapi/file-last-modified-after-delete.html
1779
1780         * fileapi/File.cpp:
1781         (WebCore::File::lastModifiedDateForBinding): Added.
1782         (WebCore):
1783         * fileapi/File.h:
1784         (File):
1785         * fileapi/File.idl: Added ImplementedAs=lastModifiedDateForBinding.
1786
1787 2012-05-30  Jochen Eisinger  <jochen@chromium.org>
1788
1789         Match Firefox restrictions to window.blur and window.focus
1790         https://bugs.webkit.org/show_bug.cgi?id=86969
1791
1792         Reviewed by Adam Barth.
1793
1794         Disallow window.blur altogether, and only allow window.focus to be
1795         invoked from the context that created this very window.
1796
1797         There's a new setting (windowFocusRestricted) that defaults to true. If
1798         false, the new restrictions are lifted. This can be used by ports that
1799         would prefer to stick with the old behavior.
1800
1801         For tests, this setting is accessible in window.internals.settings
1802
1803         To temporarily allow window.focus(), an object of type
1804         WindowFocusAllowedIndicator can be created. It is currently used to
1805         enable window.focus() during dispatch of the click event for
1806         notifications.
1807
1808         Tests: fast/dom/Window/mozilla-focus-blur.html
1809                fast/notifications/notifications-click-event-focus.html
1810
1811         * CMakeLists.txt:
1812         * GNUmakefile.list.am:
1813         * Target.pri:
1814         * WebCore.gypi:
1815         * WebCore.vcproj/WebCore.vcproj:
1816         * WebCore.xcodeproj/project.pbxproj:
1817         * notifications/Notification.cpp:
1818         (WebCore::Notification::dispatchClickEvent):
1819         * page/DOMWindow.cpp:
1820         (WebCore::DOMWindow::focus):
1821         (WebCore::DOMWindow::blur):
1822         * page/DOMWindow.h:
1823         (DOMWindow):
1824         * page/DOMWindow.idl:
1825         * page/Settings.cpp:
1826         (WebCore::Settings::Settings):
1827         * page/Settings.h:
1828         (Settings):
1829         (WebCore::Settings::setWindowFocusRestricted):
1830         (WebCore::Settings::windowFocusRestricted):
1831         * page/WindowFocusAllowedIndicator.cpp: Added.
1832         (WebCore):
1833         (WebCore::WindowFocusAllowedIndicator::windowFocusAllowed):
1834         (WebCore::WindowFocusAllowedIndicator::WindowFocusAllowedIndicator):
1835         (WebCore::WindowFocusAllowedIndicator::~WindowFocusAllowedIndicator):
1836         * page/WindowFocusAllowedIndicator.h: Added.
1837         (WebCore):
1838         (WindowFocusAllowedIndicator):
1839         * testing/InternalSettings.cpp:
1840         (WebCore::InternalSettings::InternalSettings):
1841         (WebCore::InternalSettings::restoreTo):
1842         (WebCore::InternalSettings::setWindowFocusRestricted):
1843         (WebCore):
1844         * testing/InternalSettings.h:
1845         (InternalSettings):
1846         * testing/InternalSettings.idl:
1847
1848 2012-05-30  Mariusz Grzegorczyk  <mariusz.g@samsung.com>, Ryuan Choi  <ryuan.choi@samsung.com>
1849
1850         [EFL][WK2] Fix WebKit2-EFL build
1851         https://bugs.webkit.org/show_bug.cgi?id=83693
1852
1853         Reviewed by Carlos Garcia Campos.
1854
1855         * CMakeLists.txt: Add GestureTapHighlighter.cpp.
1856
1857 2012-05-29  Antti Koivisto  <antti@apple.com>
1858
1859         Rename Foo::addSubresourceStyleURLs and Node::addSubresourceAttributeURLs
1860         https://bugs.webkit.org/show_bug.cgi?id=87739
1861
1862         Rubber-stamped by Andreas Kling.
1863
1864         Rename them to collectSubresourceURLs and collectSubresourceURLsFromAttributes to match
1865         the naming conventions.
1866         
1867         Move collectSubresourceURLsFromAttributes from Node to Element as only elements have attributes.
1868
1869         * css/CSSFontFaceSrcValue.cpp:
1870         (WebCore::CSSFontFaceSrcValue::collectSubresourceURLs):
1871         * css/CSSFontFaceSrcValue.h:
1872         (CSSFontFaceSrcValue):
1873         * css/CSSPrimitiveValue.cpp:
1874         (WebCore::CSSPrimitiveValue::collectSubresourceURLs):
1875         * css/CSSPrimitiveValue.h:
1876         (CSSPrimitiveValue):
1877         * css/CSSReflectValue.cpp:
1878         (WebCore::CSSReflectValue::collectSubresourceURLs):
1879         * css/CSSReflectValue.h:
1880         (CSSReflectValue):
1881         * css/CSSValue.cpp:
1882         (WebCore::CSSValue::collectSubresourceURLs):
1883         * css/CSSValue.h:
1884         (CSSValue):
1885         * css/CSSValueList.cpp:
1886         (WebCore::CSSValueList::collectSubresourceURLs):
1887         * css/CSSValueList.h:
1888         (CSSValueList):
1889         * css/StylePropertySet.cpp:
1890         (WebCore::StylePropertySet::collectSubresourceURLs):
1891         * css/StylePropertySet.h:
1892         (StylePropertySet):
1893         * css/StyleSheetContents.cpp:
1894         (WebCore::StyleSheetContents::collectSubresourceURLs):
1895         * css/StyleSheetContents.h:
1896         (StyleSheetContents):
1897         * dom/Element.h:
1898         (WebCore::Element::collectSubresourceURLsFromAttributes):
1899         (Element):
1900         * dom/Node.cpp:
1901         (WebCore::Node::getSubresourceURLs):
1902         * dom/Node.h:
1903         (WebCore):
1904         * dom/ProcessingInstruction.cpp:
1905         (WebCore::ProcessingInstruction::collectSubresourceURLsFromAttributes):
1906         * dom/ProcessingInstruction.h:
1907         (ProcessingInstruction):
1908         * dom/StyledElement.cpp:
1909         (WebCore::StyledElement::collectSubresourceURLsFromAttributes):
1910         * dom/StyledElement.h:
1911         (StyledElement):
1912         * html/HTMLBodyElement.cpp:
1913         (WebCore::HTMLBodyElement::collectSubresourceURLsFromAttributes):
1914         * html/HTMLBodyElement.h:
1915         (HTMLBodyElement):
1916         * html/HTMLEmbedElement.cpp:
1917         (WebCore::HTMLEmbedElement::collectSubresourceURLsFromAttributes):
1918         * html/HTMLEmbedElement.h:
1919         (HTMLEmbedElement):
1920         * html/HTMLImageElement.cpp:
1921         (WebCore::HTMLImageElement::collectSubresourceURLsFromAttributes):
1922         * html/HTMLImageElement.h:
1923         (HTMLImageElement):
1924         * html/HTMLInputElement.cpp:
1925         (WebCore::HTMLInputElement::collectSubresourceURLsFromAttributes):
1926         * html/HTMLInputElement.h:
1927         (HTMLInputElement):
1928         * html/HTMLLinkElement.cpp:
1929         (WebCore::HTMLLinkElement::collectSubresourceURLsFromAttributes):
1930         * html/HTMLLinkElement.h:
1931         (HTMLLinkElement):
1932         * html/HTMLObjectElement.cpp:
1933         (WebCore::HTMLObjectElement::collectSubresourceURLsFromAttributes):
1934         * html/HTMLObjectElement.h:
1935         (HTMLObjectElement):
1936         * html/HTMLParamElement.cpp:
1937         (WebCore::HTMLParamElement::collectSubresourceURLsFromAttributes):
1938         * html/HTMLParamElement.h:
1939         (HTMLParamElement):
1940         * html/HTMLScriptElement.cpp:
1941         (WebCore::HTMLScriptElement::collectSubresourceURLsFromAttributes):
1942         * html/HTMLScriptElement.h:
1943         (HTMLScriptElement):
1944         * html/HTMLStyleElement.cpp:
1945         (WebCore::HTMLStyleElement::collectSubresourceURLsFromAttributes):
1946         * html/HTMLStyleElement.h:
1947         (HTMLStyleElement):
1948         * html/HTMLTableCellElement.cpp:
1949         (WebCore::HTMLTableCellElement::collectSubresourceURLsFromAttributes):
1950         * html/HTMLTableCellElement.h:
1951         (HTMLTableCellElement):
1952         * html/HTMLTableElement.cpp:
1953         (WebCore::HTMLTableElement::collectSubresourceURLsFromAttributes):
1954         * html/HTMLTableElement.h:
1955         (HTMLTableElement):
1956         * svg/SVGCursorElement.cpp:
1957         (WebCore::SVGCursorElement::collectSubresourceURLsFromAttributes):
1958         * svg/SVGCursorElement.h:
1959         (SVGCursorElement):
1960         * svg/SVGFEImageElement.cpp:
1961         (WebCore::SVGFEImageElement::collectSubresourceURLsFromAttributes):
1962         * svg/SVGFEImageElement.h:
1963         (SVGFEImageElement):
1964         * svg/SVGImageElement.cpp:
1965         (WebCore::SVGImageElement::collectSubresourceURLsFromAttributes):
1966         * svg/SVGImageElement.h:
1967         (SVGImageElement):
1968         * svg/SVGScriptElement.cpp:
1969         (WebCore::SVGScriptElement::collectSubresourceURLsFromAttributes):
1970         * svg/SVGScriptElement.h:
1971         (SVGScriptElement):
1972
1973 2012-05-30  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1974
1975         Web Inspector: Fix JS compiler warning
1976         https://bugs.webkit.org/show_bug.cgi?id=87836
1977
1978         Reviewed by Yury Semikhatsky.
1979
1980         * inspector/front-end/SettingsScreen.js: Fix method annotation.
1981
1982 2012-05-30  Zoltan Horvath  <zoltan@webkit.org>
1983
1984         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
1985         https://bugs.webkit.org/show_bug.cgi?id=80400
1986
1987         This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder.
1988         The new behavior is to use QImageDecoder only if WebCoreImageDecoder - and the platform - doesn't support 
1989         the requested image type.
1990         The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed.
1991
1992         This change adds build depedency (except Qt-MAC and Qt-WIN platform) for libpng-dev and libjpeg-dev packages, 
1993         because PNG and JPEG imagedecoders need not only these libraries, but their headers also. Qmake-config 
1994         tests for these libraries were introduced in r110045.
1995
1996         Notice: with using libjpeg-turbo as a system library I measured 10% performance improvement on Methanol benchmark
1997         (collection of popular sites, page-loading benchmark) with this patch.
1998
1999         Reviewed by Simon Hausmann.
2000
2001         No new tests needed.
2002
2003         * Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources.
2004         * WebCore.pri: Move WebCore ImageDecoder include paths out of guards.
2005         * platform/MIMETypeRegistry.cpp:
2006         (WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types.
2007         (WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types.
2008         * platform/graphics/ImageSource.cpp: Remove unnecessary includes.
2009         * platform/graphics/ImageSource.h: Remove unnecessary typedefs.
2010         (WebCore):
2011         * platform/graphics/qt/ImageDecoderQt.cpp: Remove ImageDecoder::create, since it is no longer needed.
2012         (WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon.
2013         (WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap.
2014         (WebCore):
2015         (WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp.
2016         * platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header.
2017         (WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder. Add guards
2018         for JPEG, PNG, ICO decoder for Qt-MAC and Qt-WIN platform.
2019         * platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes.
2020         (WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed.
2021         (ImageFrame):
2022         * platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to
2023         ImageDecoderQt.cpp.
2024
2025 2012-05-23  Kinuko Yasuda  <kinuko@chromium.org>
2026
2027         REGRESSION: We should allow null modificationTime when snapshot metadata is given
2028         https://bugs.webkit.org/show_bug.cgi?id=86811
2029
2030         Reviewed by Jian Li.
2031
2032         r117432 has introduced a new File constructor which allows the caller
2033         to pass in a snapshot file metadata. In the change we had considered the
2034         given metadata is valid if "metadata.length >= 0 AND metadata.lastModifiedDate != 0",
2035         but we should drop the latter condition (lastModifiedDate != 0) because
2036
2037         1. the value 0 is used to indicate the time information is unavailable in File, and
2038         2. it is valid per spec (http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate says the UA must return null if the information is not available).
2039
2040         (Note: the current js/v8 binding returns Date(0) for the time value 0,
2041         which is still valid as epoch time but would fail to indicate the
2042         unavailability of the information. In this patch I added FIXME in
2043         File.idl and filed a separate issue http://webkit.org/b/87709)
2044
2045         No new tests as this change does not affect regular files/filesystems behavior.
2046         (Tests in Chrome OS port should be able to verify this)
2047
2048         * fileapi/File.cpp:
2049         (WebCore::File::lastModifiedDate):
2050         (WebCore::File::size):
2051         (WebCore::File::captureSnapshot):
2052         * fileapi/File.h:
2053         (File):
2054
2055 2012-05-30  MORITA Hajime  <morrita@google.com>
2056
2057         [Shadow DOM] HTMLContentElement and HTMLShadowElement constructors should be visible.
2058         https://bugs.webkit.org/show_bug.cgi?id=87818
2059
2060         Reviewed by Kentaro Hara.
2061
2062         Added them as DOMWindow properties
2063
2064         Tests: fast/dom/shadow/content-element-api.html
2065                fast/dom/shadow/shadow-element.html
2066
2067         * page/DOMWindow.idl:
2068
2069 2012-05-30  Mike Lawther  <mikelawther@chromium.org>
2070
2071         CSS3 calc: Implement CSSOM support
2072         https://bugs.webkit.org/show_bug.cgi?id=84551
2073
2074         Reviewed by Ryosuke Niwa.
2075
2076         Adds a pretty printer for the calc expression tree. 
2077
2078         Test: css3/calc/cssom.html
2079
2080         * css/CSSCalculationValue.cpp:
2081         (WebCore::CSSCalcValue::customCssText):
2082         (WebCore::CSSCalcPrimitiveValue::customCssText):
2083         (WebCore::CSSCalcBinaryOperation::customCssText):
2084         (CSSCalcBinaryOperation):
2085         * css/CSSCalculationValue.h:
2086         (CSSCalcExpressionNode):
2087
2088 2012-05-29  Li Yin  <li.yin@intel.com>
2089
2090         [FileAPI] The result attribute of FileReader shuold use null to replace empty string
2091         https://bugs.webkit.org/show_bug.cgi?id=87578
2092
2093         Reviewed by Jian Li.
2094
2095         Spec: http://www.w3.org/TR/FileAPI/#dfn-result
2096         If the readyState is EMPTY (no read method has been called) or an error 
2097         in reading the File or Blob has occurred (using any read method), then the 
2098         result attribute MUST return null.
2099
2100         Currently, Firefox11, Opera and IE 10 follows the spec, but Webkit based
2101         browser doesn't.
2102         WebKit should change the returned value empty string into null to keep
2103         conformance with the spec.
2104
2105         Tests: fast/files/read-file-async.html
2106                fast/files/workers/worker-read-file-async.html
2107
2108         * fileapi/FileReader.cpp:
2109         (WebCore::FileReader::arrayBufferResult):
2110         (WebCore::FileReader::stringResult):
2111
2112 2012-05-29  Mark Pilgrim  <pilgrim@chromium.org>
2113
2114         [Chromium] Move fileExists to Platform.h
2115         https://bugs.webkit.org/show_bug.cgi?id=87531
2116
2117         Reviewed by Adam Barth.
2118
2119         Call fileExists through fileUtilities(), not directly.
2120
2121         * platform/chromium/FileSystemChromium.cpp:
2122         (WebCore::fileExists):
2123
2124 2012-05-29  Kentaro Hara  <haraken@chromium.org>
2125
2126         Remove a dummy style sheet from CSSParser::parseFlowThread()
2127         https://bugs.webkit.org/show_bug.cgi?id=87715
2128
2129         Reviewed by Darin Adler.
2130
2131         r118736 changed CSSGrammar.y so that it works fine with no style sheet.
2132         r118736 removed a dummy style sheet from CSSParser::parserSelector().
2133         Now we can safely remove a dummy style sheet from parserFlowThread().
2134
2135         Tests: fast/regions. No change in test results.
2136
2137         * css/CSSParser.cpp:
2138         (WebCore::CSSParser::parseFlowThread):
2139
2140 2012-05-29  Yoshifumi Inoue  <yosin@chromium.org>
2141
2142         REGRESSION(r111497): The "option" element doesn't match CSS pseudo class :enabled
2143         https://bugs.webkit.org/show_bug.cgi?id=87719
2144
2145         Reviewed by Kent Tamura.
2146
2147         This patch added checking of "option" element for CSS pseudo class :enabled as same as
2148         :disabled to selector checker. Before r111497, it was done by using isFormControlElement.
2149         After that revision, HTMLOptionElement was no longer derived from HTMLFormControlElement.
2150
2151         Test: fast/form/select/optgroup-rendering.html
2152
2153         * css/SelectorChecker.cpp:
2154         (WebCore::SelectorChecker::checkOneSelector): Checking element is option element as same
2155         as PseudoDisabled in PseudoEnabled case.
2156
2157 2012-05-29  Hayato Ito  <hayato@chromium.org>
2158
2159         Introduces ComposedShadowTreeParentWalker, extracted from ComposedShadowTreeWalker.
2160         https://bugs.webkit.org/show_bug.cgi?id=87004
2161
2162         Reviewed by Dimitri Glazkov.
2163
2164         Introduces a ComposedShadowTreeParentWalker, which is only used
2165         for traversing a parent node (including shadow roots and insertion
2166         points) and get rid of an equivalent function from
2167         ComposedShadowTreeWalker.
2168
2169         Before this patch, there is an inconsistency inside of
2170         ComposedShadowTreeWalker. The Walker uses 'Policy' to decide
2171         whether it should visit shadow roots or not, but
2172         parentIncludingInsertionPointAndShadowRoot() member function
2173         ignores the policy.  We can not add an assertion in its
2174         constructor due to this inconsistency.  To resolve it, we could
2175         add yet another special policy, but that makes the implementation
2176         complex and may add some overhead in runtime.  So separate the
2177         functionality into another class as ComposedShadowTreeParentWalker.
2178
2179         No new tests, no new functionality except for assertion.
2180
2181         * dom/ComposedShadowTreeWalker.cpp:
2182         (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker):
2183         (WebCore::ComposedShadowTreeParentWalker::ComposedShadowTreeParentWalker):
2184         (WebCore):
2185         (WebCore::ComposedShadowTreeParentWalker::parentIncludingInsertionPointAndShadowRoot):
2186         (WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot):
2187         * dom/ComposedShadowTreeWalker.h:
2188         (ComposedShadowTreeWalker):
2189         (WebCore::ComposedShadowTreeWalker::assertPrecondition):
2190         (WebCore):
2191         (ComposedShadowTreeParentWalker):
2192         (WebCore::ComposedShadowTreeParentWalker::get):
2193         * dom/EventDispatcher.cpp:
2194         (WebCore::EventRelatedTargetAdjuster::adjust):
2195         (WebCore::EventDispatcher::ensureEventAncestors):
2196         * page/EventHandler.cpp:
2197         (WebCore::EventHandler::updateMouseEventTargetNode):
2198
2199 2012-05-29  Hayato Ito  <hayato@chromium.org>
2200
2201         Add assertions to make sure that event's target and relatedTarget are accessible.
2202         https://bugs.webkit.org/show_bug.cgi?id=87641
2203
2204         Reviewed by Dimitri Glazkov.
2205
2206         No new tests. No new functionality except for assertions.
2207
2208         * dom/EventContext.cpp:
2209         (WebCore::EventContext::EventContext):
2210         * dom/EventContext.h:
2211         (WebCore):
2212         (EventContext):
2213         (WebCore::EventContext::setRelatedTarget):
2214         (WebCore::EventContext::accessible):
2215
2216 2012-05-29  Kent Tamura  <tkent@chromium.org>
2217
2218         Fix inefficient usage of traverseNextNode()
2219         https://bugs.webkit.org/show_bug.cgi?id=87804
2220
2221         Reviewed by Ryosuke Niwa.
2222
2223         foo->traverseNextNode(foo) is equivalent to foo->firstChild(), and
2224         firstChild() is more efficient.
2225
2226         No new tests because of no behavior change.
2227
2228         * html/HTMLFieldSetElement.cpp:
2229         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
2230         Replace traverseNextNode() with firstChild(), and shorten a variable name.
2231         * svg/SVGSVGElement.cpp:
2232         (WebCore::SVGSVGElement::getElementById):
2233         Replace traverseNextNode() with firstChild().
2234
2235 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2236
2237         [BlackBerry] Loading media data with http authentication
2238         https://bugs.webkit.org/show_bug.cgi?id=84214
2239
2240         Reviewed by George Staikos.
2241
2242         RIM PR: 117618
2243         Implemented http authentication feature for media by implementing
2244         two interface functions in class MediaPlayerPrivate:
2245         onAuthenticationNeeded(): this function is triggered when MMR
2246         engine requires http authentication. We search the CredentialStorage
2247         to see if we have already stored existing credential information,
2248         or challenge user to provide it.
2249         OnAuthenticationAccepted(): this function is triggered when MMR
2250         engine accepts the credential information, and we need to save
2251         it in CredentialStorage for later use.
2252
2253         Internally reviewed by Max Feil <mfeil@qnx.com>.
2254
2255         Manual test case: blackberry/video-load-with-authentication.html
2256
2257         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2258         (WebCore::generateProtectionSpaceFromMMRAuthChallenge):
2259         (WebCore):
2260         (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
2261         (WebCore::MediaPlayerPrivate::onAuthenticationAccepted):
2262         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
2263         (MediaPlayerPrivate):
2264
2265 2012-05-29  MORITA Hajime  <morrita@google.com>
2266
2267         [Shadow DOM] Node distribution should be orthogonal from node attachment
2268         https://bugs.webkit.org/show_bug.cgi?id=87223
2269
2270         Reviewed by Dimitri Glazkov.
2271
2272         This chagne reorganizes Shadow DOM subtree distribution implementation.
2273
2274         Originally, it was interleaved across attach() of several classes like
2275         InsertionPoint and ShadowRoot. Its invalidation was also mixed as a part of
2276         the style recalculation and detach()-es.
2277
2278         This change extracts these bits of code to a set of ContentDistributor methods, which are
2279         facaded by two ElementShadow API. Following two API are the primary entry points:
2280
2281         - ElementShadow::ensureDistribution()
2282         - ElementShadow::invalidateDistribution()
2283
2284         The actual implementations are ContentDistributor::distribute() and
2285         ContentDistributor::invalidate() respectively.
2286
2287         When clients need to traverse composed tree, before attach() for
2288         example, they should call ensureDistribution() to make sure that
2289         the traversal data structure ("the distribution") is ready.  When
2290         there is any DOM mutation which can result a composed tree
2291         mutation, then clients should call invalidateDistribution() to
2292         mark the distribution being dated.
2293
2294         Here are such DOM mutations:
2295
2296         - The children of any ShadowRoots are changed,
2297         - The children of any InsertionPoints are changed,
2298         - The children of any host elements are changed,
2299         - Any insertion point is inserted to or removed from the shadow tree,
2300         - @select attribute of <content> is modified and
2301         - New ShadowRoot is added to the shadow tree.
2302
2303         Note that the validity of the distribution is tracked and
2304         unnecessary distribution requests are ignored.
2305
2306         After the invalidation, that shadow subtrees are detached once and
2307         request  their  re-attachment  through  the  style  recalculation.
2308         Then,  on the  responding  style recalculation  and attach(),  new
2309         distribution will be computed.
2310
2311         No new tests. Covered by existing tests.
2312
2313         * dom/Element.cpp:
2314         (WebCore::Element::~Element):
2315         (WebCore::Element::childrenChanged):
2316         * dom/ElementShadow.cpp:
2317         (WebCore::ElementShadow::~ElementShadow):
2318         (WebCore::ElementShadow::addShadowRoot):
2319         (WebCore::ElementShadow::removeAllShadowRoots):
2320         (WebCore::ElementShadow::attach):
2321         (WebCore::ElementShadow::recalcStyle):
2322         (WebCore::ElementShadow::ensureDistribution):
2323         (WebCore::ElementShadow::invalidateDistribution):
2324         * dom/ElementShadow.h:
2325         (ElementShadow):
2326         * dom/NodeRenderingContext.cpp:
2327         (WebCore::NodeRenderingContext::NodeRenderingContext):
2328         (WebCore::NodeRendererFactory::createRendererIfNeeded):
2329         * dom/NodeRenderingContext.h:
2330         (NodeRenderingContext):
2331         * dom/ShadowRoot.cpp:
2332         (WebCore::ShadowRoot::setApplyAuthorStyles):
2333         (WebCore::ShadowRoot::attach):
2334         (WebCore::ShadowRoot::childrenChanged):
2335         (WebCore):
2336         * dom/ShadowRoot.h:
2337         (ShadowRoot):
2338         * html/HTMLFormControlElement.cpp:
2339         * html/ValidationMessage.cpp:
2340         (WebCore::ValidationMessage::buildBubbleTree):
2341         * html/shadow/ContentDistributor.cpp:
2342         (WebCore::ContentDistributor::ContentDistributor):
2343         (WebCore::ContentDistributor::~ContentDistributor):
2344         (WebCore::ContentDistributor::findInsertionPointFor):
2345         (WebCore::ContentDistributor::distribute):
2346         (WebCore::ContentDistributor::invalidate):
2347         (WebCore::ContentDistributor::finishInivalidation):
2348         (WebCore::ContentDistributor::distributeSelectionsTo):
2349         (WebCore::ContentDistributor::distributeShadowChildrenTo):
2350         (WebCore::ContentDistributor::invalidateDistributionIn):
2351         * html/shadow/ContentDistributor.h:
2352         (WebCore::ContentDistributor::needsInvalidation):
2353         (ContentDistributor):
2354         (WebCore::ContentDistributor::needsDistribution):
2355         * html/shadow/HTMLContentElement.cpp:
2356         (WebCore::HTMLContentElement::parseAttribute):
2357         * html/shadow/InsertionPoint.cpp:
2358         (WebCore::InsertionPoint::attach):
2359         (WebCore::InsertionPoint::detach):
2360         (WebCore::InsertionPoint::nextTo):
2361         (WebCore::InsertionPoint::previousTo):
2362         (WebCore::InsertionPoint::childrenChanged):
2363         * html/shadow/InsertionPoint.h:
2364         (WebCore::InsertionPoint::setDistribution):
2365         (WebCore::InsertionPoint::clearDistribution):
2366         (InsertionPoint):
2367
2368 2012-05-29  Luke Macpherson  <macpherson@chromium.org>
2369
2370         Implement post-landing feedback for WebKitCSSTransformValue::customCSSText().
2371         https://bugs.webkit.org/show_bug.cgi?id=87684
2372
2373         Reviewed by Darin Adler.
2374
2375         Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed.
2376         This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation
2377         and WTF_ARRAY_LENGTH instead of hard coding the array length.
2378
2379         Covered by existing transform tests.
2380
2381         * css/WebKitCSSTransformValue.cpp:
2382         (WebCore):
2383         (WebCore::WebKitCSSTransformValue::customCssText):
2384
2385 2012-05-29  Eric Seidel  <eric@webkit.org>
2386
2387         Fix ENABLE_IFRAME_SEAMLESS to actually fully disable <iframe seamless>
2388         https://bugs.webkit.org/show_bug.cgi?id=87646
2389
2390         Reviewed by Adam Barth.
2391
2392         In the process of moving the seamless feature out of github and into bugs.webkit.org
2393         multiple versions of the shouldDisplaySeamlessly function got written
2394         (and moved from HTMLIFrameElement to Document), but only one of them was wrapped
2395         in ENABLE_IFRAME_SEAMLESS.  HTMLIFrameElement was checking mayDisplaySeamlessly
2396         directly (as was my original design), which got around the ENABLE_IFRAME_SEAMLESS check.
2397         I've fixed this oversight, and the feature is now off when we tell it to be off.
2398
2399         This is covered by many existing tests.  I've verified locally that
2400         all tests fail when ENABLE_IFRAME_SEAMLESS is disabled instead of
2401         only some of them.
2402
2403         * dom/SecurityContext.h:
2404         (SecurityContext):
2405         * html/HTMLIFrameElement.cpp:
2406         (WebCore::HTMLIFrameElement::shouldDisplaySeamlessly):
2407
2408 2012-05-29  Scott Graham  <scottmg@chromium.org>
2409
2410         Fix warning in preprocessing Source/WebCore/dom/DOMError.idl
2411         https://bugs.webkit.org/show_bug.cgi?id=87763
2412
2413         Reviewed by Adam Barth.
2414
2415         Add newline at end of file to avoid warning:
2416         ../dom/DOMError.idl:35:2: warning: no newline at end of file
2417
2418         * dom/DOMError.idl:
2419
2420 2012-05-29  Mark Pilgrim  <pilgrim@chromium.org>
2421
2422         [Chromium] Move fileExists to Platform.h
2423         https://bugs.webkit.org/show_bug.cgi?id=87531
2424
2425         Reviewed by Adam Barth.
2426
2427         Part of a refactoring series. See tracking bug 82948.
2428
2429         * platform/chromium/FileSystemChromium.cpp:
2430         (WebCore::fileExists):
2431         * platform/chromium/PlatformSupport.h:
2432         (PlatformSupport):
2433
2434 2012-05-29  Kentaro Hara  <haraken@chromium.org>
2435
2436         [V8] Rename v8Null() to v8NullWithCheck()
2437         https://bugs.webkit.org/show_bug.cgi?id=87713
2438
2439         Reviewed by Adam Barth.
2440
2441         In IRC, cmarcelo@ pointed out that v8::Null() and v8Null()
2442         are confusing. This patch renames v8Null() to v8NullWithCheck().
2443
2444         No tests. No behavior change.
2445
2446         * bindings/scripts/CodeGeneratorV8.pm:
2447         (GenerateHeader):
2448         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2449         (WebCore::toV8):
2450         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2451         (WebCore::toV8):
2452         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2453         (WebCore::toV8):
2454         * bindings/scripts/test/V8/V8TestEventTarget.h:
2455         (WebCore::toV8):
2456         * bindings/scripts/test/V8/V8TestException.h:
2457         (WebCore::toV8):
2458         * bindings/scripts/test/V8/V8TestInterface.h:
2459         (WebCore::toV8):
2460         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2461         (WebCore::toV8):
2462         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2463         (WebCore::toV8):
2464         * bindings/scripts/test/V8/V8TestNode.h:
2465         (WebCore::toV8):
2466         * bindings/scripts/test/V8/V8TestObj.h:
2467         (WebCore::toV8):
2468         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2469         (WebCore::toV8):
2470         * bindings/v8/V8Binding.h:
2471         (WebCore::v8NullWithCheck):
2472         (WebCore::v8DateOrNull):
2473
2474 2012-05-29  Christophe Dumez  <christophe.dumez@intel.com>
2475
2476         Some Content Security Policy console messages are missing line numbers in JSC
2477         https://bugs.webkit.org/show_bug.cgi?id=87558
2478
2479         Reviewed by Adam Barth.
2480
2481         Make ScriptController::eventHandlerPosition() behave the same way on
2482         JSC than V8. This means that TextPosition::minimumPosition() is
2483         returned if parser is null, instead of
2484         TextPosition::belowRangePosition(). The line numbers are now correctly
2485         printed in the output of Content Security Policy tests.
2486
2487         Tests: http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url.html
2488                http/tests/security/contentSecurityPolicy/javascript-url-blocked.html
2489
2490         * bindings/js/ScriptController.cpp:
2491         (WebCore::ScriptController::eventHandlerPosition):
2492
2493 2012-05-29  Shawn Singh  <shawnsingh@chromium.org>
2494
2495         [chromium] make WebTransformationMatrix object usable by non-webkit code
2496         https://bugs.webkit.org/show_bug.cgi?id=87315
2497
2498         Reviewed by James Robinson.
2499
2500         This change is covered by existing tests and by whether it
2501         compiles. There should be no changes in behavior.
2502
2503         * platform/chromium/support/WebTransformationMatrix.cpp:
2504         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
2505         (WebKit::WebTransformationMatrix::operator=):
2506         (WebKit::WebTransformationMatrix::operator==):
2507         (WebKit::WebTransformationMatrix::inverse):
2508         (WebKit::WebTransformationMatrix::to2dTransform):
2509         (WebKit::WebTransformationMatrix::multiply):
2510         (WebKit::WebTransformationMatrix::makeIdentity):
2511         (WebKit::WebTransformationMatrix::translate):
2512         (WebKit::WebTransformationMatrix::translate3d):
2513         (WebKit::WebTransformationMatrix::translateRight3d):
2514         (WebKit::WebTransformationMatrix::scale):
2515         (WebKit::WebTransformationMatrix::scaleNonUniform):
2516         (WebKit::WebTransformationMatrix::scale3d):
2517         (WebKit::WebTransformationMatrix::rotate):
2518         (WebKit::WebTransformationMatrix::rotate3d):
2519         (WebKit::WebTransformationMatrix::skewX):
2520         (WebKit::WebTransformationMatrix::skewY):
2521         (WebKit::WebTransformationMatrix::applyPerspective):
2522         (WebKit::WebTransformationMatrix::blend):
2523         (WebKit::WebTransformationMatrix::hasPerspective):
2524         (WebKit::WebTransformationMatrix::isInvertible):
2525         (WebKit::WebTransformationMatrix::isBackFaceVisible):
2526         (WebKit::WebTransformationMatrix::isIdentity):
2527         (WebKit::WebTransformationMatrix::isIdentityOrTranslation):
2528         (WebKit::WebTransformationMatrix::isIntegerTranslation):
2529         (WebKit::WebTransformationMatrix::m11):
2530         (WebKit::WebTransformationMatrix::setM11):
2531         (WebKit::WebTransformationMatrix::m12):
2532         (WebKit::WebTransformationMatrix::setM12):
2533         (WebKit::WebTransformationMatrix::m13):
2534         (WebKit::WebTransformationMatrix::setM13):
2535         (WebKit::WebTransformationMatrix::m14):
2536         (WebKit::WebTransformationMatrix::setM14):
2537         (WebKit::WebTransformationMatrix::m21):
2538         (WebKit::WebTransformationMatrix::setM21):
2539         (WebKit::WebTransformationMatrix::m22):
2540         (WebKit::WebTransformationMatrix::setM22):
2541         (WebKit::WebTransformationMatrix::m23):
2542         (WebKit::WebTransformationMatrix::setM23):
2543         (WebKit::WebTransformationMatrix::m24):
2544         (WebKit::WebTransformationMatrix::setM24):
2545         (WebKit::WebTransformationMatrix::m31):
2546         (WebKit::WebTransformationMatrix::setM31):
2547         (WebKit::WebTransformationMatrix::m32):
2548         (WebKit::WebTransformationMatrix::setM32):
2549         (WebKit::WebTransformationMatrix::m33):
2550         (WebKit::WebTransformationMatrix::setM33):
2551         (WebKit::WebTransformationMatrix::m34):
2552         (WebKit::WebTransformationMatrix::setM34):
2553         (WebKit::WebTransformationMatrix::m41):
2554         (WebKit::WebTransformationMatrix::setM41):
2555         (WebKit::WebTransformationMatrix::m42):
2556         (WebKit::WebTransformationMatrix::setM42):
2557         (WebKit::WebTransformationMatrix::m43):
2558         (WebKit::WebTransformationMatrix::setM43):
2559         (WebKit::WebTransformationMatrix::m44):
2560         (WebKit::WebTransformationMatrix::setM44):
2561         (WebKit::WebTransformationMatrix::a):
2562         (WebKit::WebTransformationMatrix::setA):
2563         (WebKit::WebTransformationMatrix::b):
2564         (WebKit::WebTransformationMatrix::setB):
2565         (WebKit::WebTransformationMatrix::c):
2566         (WebKit::WebTransformationMatrix::setC):
2567         (WebKit::WebTransformationMatrix::d):
2568         (WebKit::WebTransformationMatrix::setD):
2569         (WebKit::WebTransformationMatrix::e):
2570         (WebKit::WebTransformationMatrix::setE):
2571         (WebKit::WebTransformationMatrix::f):
2572         (WebKit::WebTransformationMatrix::setF):
2573         (WebKit::WebTransformationMatrix::toWebCoreTransform):
2574         (WebKit::WebTransformationMatrix::mapRect):
2575         (WebKit::WebTransformationMatrix::mapPoint):
2576         (WebKit::WebTransformationMatrix::mapQuad):
2577         (WebKit::WebTransformationMatrix::projectPoint):
2578
2579 2012-05-29  Alexis Menard  <alexis.menard@openbossa.org>
2580
2581         [CSS3 Backgrounds and Borders] Implement box-decoration-break parsing.
2582         https://bugs.webkit.org/show_bug.cgi?id=87678
2583
2584         Reviewed by Eric Seidel.
2585
2586         Implement the parsing part of box-decoration-break. The specification
2587         is located at http://www.w3.org/TR/css3-background/#box-decoration-break.
2588         So far Opera implements it. This patch only implements the parsing part of
2589         the property. A following patch will implement the rendering part. Despite
2590         the rendering part missing it improves http://css3test.com by 1%.
2591
2592         Test: fast/box-decoration-break/box-decoration-break-parsing.html
2593
2594         * css/CSSComputedStyleDeclaration.cpp:
2595         (WebCore):
2596         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2597         * css/CSSParser.cpp:
2598         (WebCore::isValidKeywordPropertyAndValue):
2599         (WebCore::isKeywordPropertyID):
2600         * css/CSSPrimitiveValueMappings.h:
2601         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2602         (WebCore):
2603         (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
2604         * css/CSSProperty.cpp:
2605         (WebCore::CSSProperty::isInheritedProperty):
2606         * css/CSSPropertyNames.in:
2607         * css/CSSValueKeywords.in:
2608         * css/StyleBuilder.cpp:
2609         (WebCore::StyleBuilder::StyleBuilder):
2610         * rendering/style/RenderStyle.h:
2611         * rendering/style/RenderStyleConstants.h:
2612         * rendering/style/StyleBoxData.cpp:
2613         (WebCore::StyleBoxData::StyleBoxData):
2614         (WebCore::StyleBoxData::operator==):
2615         * rendering/style/StyleBoxData.h:
2616         (WebCore::StyleBoxData::boxDecorationBreak):
2617         (StyleBoxData):
2618
2619 2012-05-29  David Barr  <davidbarr@chromium.org>
2620
2621         [text-overflow: ellipsis] WebKit should ignore the ellipsis for the purpose of dispatching mouse events
2622         https://bugs.webkit.org/show_bug.cgi?id=63781
2623
2624         Reviewed by Eric Seidel.
2625
2626         "Ellipsing only affects rendering and must not affect layout nor dispatching of pointer events."
2627         http://www.w3.org/TR/2012/WD-css3-ui-20120117/#text-overflow
2628
2629         Test: fast/css/text-overflow-ellipsis-hit-test.html
2630
2631         * rendering/EllipsisBox.cpp:
2632         (WebCore::EllipsisBox::nodeAtPoint): Always return false.
2633
2634 2012-05-29  Gavin Peters  <gavinp@chromium.org>
2635
2636         [Chromium] Remove assertions on state in Prerender.cpp
2637         https://bugs.webkit.org/show_bug.cgi?id=87746
2638
2639         Chrome was crashing in the new Prerender API on Google Web Search; this was because the DOM would stop(), setting the
2640         state of the Prerenders in the document to Inactive, but an asyncronous GC would later come come along and trigger the
2641         removedFromDocument behaviour on each element, including the <link> element launching the prerender.  This causes an
2642         assertion failure.
2643
2644         I believe the late-deletion of the DOM, and the HTMLElement::removedFromDocument calls are legal, and it was the
2645         overzealous assertions in Prerender that were inappropriate.
2646
2647         Reviewed by Adam Barth.
2648
2649         No new automated tests, working on a Chromium browser test. Manually test by entering many prerender and non-prerendered
2650         queries into Google Web Search.
2651
2652         * platform/chromium/Prerender.cpp:
2653         (WebCore::Prerender::Prerender):
2654         (WebCore::Prerender::add):
2655         (WebCore::Prerender::cancel):
2656         (WebCore::Prerender::abandon):
2657         * platform/chromium/Prerender.h:
2658         (Prerender):
2659
2660 2012-05-29  Victor Carbune  <victor@rosedu.org>
2661
2662         Display cues in the controls area
2663         https://bugs.webkit.org/show_bug.cgi?id=87591
2664
2665         Reviewed by Eric Carlson.
2666
2667         Changed the behaviour to implicitly hide the volume slidebar
2668         if the controls are hidden (due mouse moving out of the video
2669         area or controls are toggled through JS).
2670
2671         This seems to be the simplest fix to this issue, otherwise
2672         on toggling the display:none property on the controls the
2673         volume slidebar might appear below the video.
2674
2675         Re-enabled failing tests for this functionality.
2676
2677         * html/shadow/MediaControlElements.cpp:
2678         (WebCore::MediaControlPanelElement::makeTransparent): Re-enabled
2679         timer to set the display:none property on the controls.
2680         * html/shadow/MediaControlRootElement.cpp:
2681         (WebCore::MediaControlRootElement::hide): Added a call to hide
2682         the volume slider.
2683         (WebCore::MediaControlRootElement::makeTransparent): Same.
2684         * html/shadow/MediaControlRootElementChromium.cpp:
2685         (WebCore::MediaControlRootElementChromium::hide): Same.
2686         (WebCore::MediaControlRootElementChromium::makeTransparent): Same.
2687
2688 2012-05-29  Adrienne Walker  <enne@google.com>
2689
2690         Fix transparent iframes with composited contents in WK1 on Mac
2691         https://bugs.webkit.org/show_bug.cgi?id=76478
2692
2693         Reviewed by Simon Fraser.
2694
2695         Test: compositing/iframes/repaint-after-losing-scrollbars.html
2696
2697         * page/FrameView.cpp:
2698         (WebCore::FrameView::useSlowRepaints):
2699
2700 2012-05-29  David Hyatt  <hyatt@apple.com>
2701
2702         https://bugs.webkit.org/show_bug.cgi?id=87787
2703         
2704         [New Multicolumn] Refactor the region and flow thread code so that it can pick up the correct column widths
2705         and heights when determining the logical width and height of the flow thread itself.
2706
2707         This patch adds new virtual methods to RenderRegion: logicalWidthForFlowThreadContent and logicalHeightForFlowThreadContent.
2708         For normal regions, these methods return the contentWidth and contentHeight of the regions themselves. For column sets,
2709         however, these methods actually return the column widths and heights.
2710         
2711         This allows the flow thread to properly lay out according to the column width.
2712         
2713         Region invalidation is also done properly by using these new methods.
2714         
2715         In some cases the code is actually simplified, since we can get rid of some isHorizontalWritingMode() switching.
2716         
2717         With this patch the flow thread now actually lays out and paints at the right width (spilling out of the region set in a single unbroken
2718         column).
2719
2720         Reviewed by Dan Bernstein.
2721
2722         * rendering/RenderFlowThread.cpp:
2723         (WebCore::RenderFlowThread::layout):
2724         (WebCore::RenderFlowThread::computeLogicalWidth):
2725         (WebCore::RenderFlowThread::computeLogicalHeight):
2726         * rendering/RenderMultiColumnBlock.cpp:
2727         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
2728         * rendering/RenderMultiColumnBlock.h:
2729         (WebCore::RenderMultiColumnBlock::isRenderMultiColumnBlock):
2730         (RenderMultiColumnBlock):
2731         (WebCore::toRenderMultiColumnBlock):
2732         (WebCore):
2733         * rendering/RenderMultiColumnSet.cpp:
2734         (WebCore::RenderMultiColumnSet::computeLogicalWidth):
2735         (WebCore):
2736         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
2737         * rendering/RenderMultiColumnSet.h:
2738         (WebCore::RenderMultiColumnSet::setColumnWidthAndCount):
2739         (RenderMultiColumnSet):
2740         * rendering/RenderObject.h:
2741         (WebCore::RenderObject::isRenderMultiColumnBlock):
2742         * rendering/RenderRegion.cpp:
2743         (WebCore::RenderRegion::logicalWidthForFlowThreadContent):
2744         (WebCore):
2745         (WebCore::RenderRegion::logicalHeightForFlowThreadContent):
2746         (WebCore::RenderRegion::layout):
2747         * rendering/RenderRegion.h:
2748         (RenderRegion):
2749
2750 2012-05-29  Alec Flett  <alecflett@chromium.org>
2751
2752         IndexedDB: Align codes and names for IDB-specific and DOM-specific errors/exceptions
2753         https://bugs.webkit.org/show_bug.cgi?id=87276
2754
2755         Reviewed by Tony Chang.
2756
2757         No new tests. Existing tests have been updated to use the new
2758         exception constant values.
2759
2760         The IDB spec has evolved to DOM4-style DOMExceptions, which are
2761         referred to with MixedCase, string-based style names for
2762         exceptions rather than UNDERSCORE_CONSTANT_ERR codes. Change to
2763         use MixedCase error/exception names, and tease out the
2764         IDB-specific exception/error codes/names from the system-level
2765         codes. Make sure that the legacy IDB-masked exception code values
2766         match the DOM exception values. Make sure that
2767         IDBDatabaseException[exception.name] still works.
2768
2769         * Modules/indexeddb/IDBDatabase.cpp:
2770         (WebCore::IDBDatabase::createObjectStore):
2771         (WebCore::IDBDatabase::transaction):
2772         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2773         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
2774         (WebCore::IDBDatabaseBackendImpl::setVersion):
2775         (WebCore::IDBDatabaseBackendImpl::transaction):
2776         * Modules/indexeddb/IDBDatabaseException.cpp:
2777         (IDBDatabaseExceptionNameDescription):
2778         (WebCore):
2779         (WebCore::IDBDatabaseException::initializeDescription):
2780         * Modules/indexeddb/IDBDatabaseException.h:
2781         * Modules/indexeddb/IDBDatabaseException.idl:
2782         * Modules/indexeddb/IDBObjectStore.cpp:
2783         (WebCore::IDBObjectStore::createIndex):
2784         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2785         (WebCore::IDBObjectStoreBackendImpl::index):
2786         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
2787         * Modules/indexeddb/IDBRequest.cpp:
2788         (WebCore::IDBRequest::abort):
2789         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2790         (WebCore::IDBTransactionBackendImpl::objectStore):
2791
2792 2012-05-29  David Hyatt  <hyatt@apple.com>
2793
2794         https://bugs.webkit.org/show_bug.cgi?id=87775
2795
2796         [New Multicolumn] Make sure RenderMultiColumnSets have their own copy of the count, width and height of their columns. 
2797
2798         Reviewed by Anders Carlsson.
2799
2800         * rendering/RenderMultiColumnBlock.cpp:
2801         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
2802         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
2803         * rendering/RenderMultiColumnBlock.h:
2804         (WebCore::RenderMultiColumnBlock::columnWidth):
2805         (WebCore::RenderMultiColumnBlock::columnCount):
2806         (RenderMultiColumnBlock):
2807         * rendering/RenderMultiColumnSet.cpp:
2808         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
2809         * rendering/RenderMultiColumnSet.h:
2810         (WebCore::RenderMultiColumnSet::columnCount):
2811         (WebCore::RenderMultiColumnSet::columnWidth):
2812         (WebCore::RenderMultiColumnSet::columnHeight):
2813         (RenderMultiColumnSet):
2814         (WebCore::RenderMultiColumnSet::setColumnWidthAndCount):
2815         (WebCore::RenderMultiColumnSet::setColumnHeight):
2816
2817 2012-05-29  Simon Fraser  <simon.fraser@apple.com>
2818
2819         Incomplete repaint on twitter.com when replying to a tweet
2820         https://bugs.webkit.org/show_bug.cgi?id=87553
2821
2822         Reviewed by Dean Jackson.
2823         
2824         Style changes can cause a compositing layer to change between
2825         requiring its own backing store or not, e.g. with the addition
2826         or removal of a transform.
2827         
2828         When that happens, we need to repaint the ancesetor layer that
2829         this layer was, or will be drawing into.
2830         
2831         Factored some code out of layerWillBeRemoved() to be able to
2832         also call it from setRequiresOwnBackingStore().
2833
2834         New manual test, ManualTests/compositing/requires-backing-change.html.
2835         I was not able to get an automated pixel test to work.
2836
2837         * rendering/RenderLayerBacking.cpp:
2838         (WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
2839         * rendering/RenderLayerCompositor.cpp:
2840         (WebCore::RenderLayerCompositor::updateCompositingLayers): Remove trailing whitespace.
2841         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor):
2842         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
2843         * rendering/RenderLayerCompositor.h:
2844
2845 2012-05-29  David Hyatt  <hyatt@apple.com>
2846
2847         https://bugs.webkit.org/show_bug.cgi?id=87771
2848         
2849         [New Multicolumn] Make sure we have one column set by default and add it to the flow thread's region list.
2850
2851         Reviewed by Anders Carlsson.
2852
2853         * rendering/RenderMultiColumnBlock.cpp:
2854         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
2855         * rendering/RenderRegion.cpp:
2856         (WebCore::RenderRegion::RenderRegion):
2857
2858 2012-05-29  John Sullivan  <sullivan@apple.com>
2859
2860         Update label for blacklisted plug-in
2861         https://bugs.webkit.org/show_bug.cgi?id=87767
2862         rdar://problem/11550048
2863         
2864         Reviewed by Kevin Decker.
2865
2866         * English.lproj/Localizable.strings:
2867         Regenerated.
2868         
2869         * platform/LocalizedStrings.cpp:
2870         (WebCore::insecurePluginVersionText):
2871         Changed this string.
2872
2873 2012-05-29  Julien Chaffraix  <jchaffraix@webkit.org>
2874
2875         REGRESSION(r111742): box-sizing: border-box doesn't work on fixed table layout
2876         https://bugs.webkit.org/show_bug.cgi?id=87536
2877
2878         Reviewed by Tony Chang.
2879
2880         Tests: fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout.html
2881                fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout.html
2882                fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout.html
2883                fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout.html
2884
2885         The change in r111742 completely ignored border-sizing (following the table's code lead unfortunately).
2886         The issue is that we would count the borders and paddings twice for the border-box case which would lead
2887         to the content-box including them too. From a web-author, this behavior is equivalent to ignoring box-sizing.
2888
2889         * rendering/FixedTableLayout.cpp:
2890         (WebCore::FixedTableLayout::calcWidthArray):
2891         Reworked the function to properly use computeBorderBoxLogicalWidth() for correctness. This matches
2892         what RenderBox and the rendering code does generally. Also refactored the code to avoid the need
2893         for local variables and make it more readable.
2894
2895 2012-05-25  Ojan Vafai  <ojan@chromium.org>
2896
2897         Absolute positioned elements in a relative positioned CSS3 Flexbox fail to display properly
2898         https://bugs.webkit.org/show_bug.cgi?id=58453
2899
2900         Reviewed by Tony Chang.
2901
2902         Test: css3/flexbox/align-absolute-child.html
2903
2904         * rendering/RenderFlexibleBox.cpp:
2905         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
2906         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2907         (WebCore::RenderFlexibleBox::adjustAlignmentForChild):
2908         When adjusting positioned items, adjust their static position, not their location.
2909         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
2910         (WebCore::RenderFlexibleBox::flipForWrapReverse):
2911         * rendering/RenderFlexibleBox.h:
2912
2913 2012-05-29  Abhishek Arya  <inferno@chromium.org>
2914
2915         Crash due to text fragment destruction when updating first-letter block.
2916         https://bugs.webkit.org/show_bug.cgi?id=87751
2917
2918         Reviewed by Eric Seidel.
2919
2920         Test: fast/text/text-fragment-first-letter-update-crash.html
2921
2922         * rendering/RenderObject.cpp:
2923         (WebCore::RenderObject::setStyle):
2924
2925 2012-05-29  David Hyatt  <hyatt@apple.com>
2926
2927         https://bugs.webkit.org/show_bug.cgi?id=87764
2928         
2929         Add implementation of checkForPaginationLogicalHeightChange to RenderMultiColumnBlock.
2930         
2931         Also stub out ensureColumnSets() and write a comment describing how it's going to work.
2932
2933         Reviewed by Anders Carlsson.
2934
2935         * rendering/RenderMultiColumnBlock.cpp:
2936         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
2937         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
2938         (WebCore):
2939         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
2940         * rendering/RenderMultiColumnBlock.h:
2941         (WebCore::RenderMultiColumnBlock::columnHeight):
2942         (WebCore::RenderMultiColumnBlock::setColumnHeight):
2943         (RenderMultiColumnBlock):
2944
2945 2012-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2946
2947         Unreviewed, rolling out r118620.
2948         http://trac.webkit.org/changeset/118620
2949         https://bugs.webkit.org/show_bug.cgi?id=87760
2950
2951         This patch causes regression to read an empty file/blob via
2952         FileReader (Requested by jianli on #webkit).
2953
2954         * fileapi/FileReader.cpp:
2955         (WebCore::FileReader::stringResult):
2956
2957 2012-05-29  Andreas Kling  <kling@webkit.org>
2958
2959         Make StylePropertySet a variable-sized object to reduce memory use.
2960         <http://webkit.org/b/87506>
2961
2962         Reviewed by Antti Koivisto.
2963
2964         Make immutable StylePropertySet objects variable-sized and allocate exactly
2965         the space needed to hold the CSSProperty objects passed at construction.
2966         This lets us avoid the memory overhead of Vector<CSSProperty, 4>.
2967
2968         Renamed StylePropertySet::adopt* to create and createImmutable since they no
2969         longer adopt the incoming vector. More cleanup will follow in this area.
2970
2971         This reduces memory usage across the board - the more CSS declarations,
2972         the bigger the benefit. As an example, we save around ~0.5MB on wsj.com.
2973
2974         * css/CSSComputedStyleDeclaration.cpp:
2975         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
2976         * css/CSSParser.cpp:
2977         (WebCore::CSSParser::createStylePropertySet):
2978         * css/StylePropertySet.cpp:
2979         (WebCore::StylePropertySet::createImmutable):
2980         (WebCore::StylePropertySet::StylePropertySet):
2981         (WebCore::StylePropertySet::~StylePropertySet):
2982         (WebCore::StylePropertySet::copyPropertiesFrom):
2983         (WebCore::StylePropertySet::removeProperty):
2984         (WebCore::StylePropertySet::setProperty):
2985         (WebCore::StylePropertySet::parseDeclaration):
2986         (WebCore::StylePropertySet::addParsedProperties):
2987         (WebCore::StylePropertySet::asText):
2988         (WebCore::StylePropertySet::merge):
2989         (WebCore::StylePropertySet::addSubresourceStyleURLs):
2990         (WebCore::StylePropertySet::removePropertiesInSet):
2991         (WebCore::StylePropertySet::findPropertyWithId):
2992         (WebCore::StylePropertySet::removeEquivalentProperties):
2993         (WebCore::StylePropertySet::copyPropertiesInSet):
2994         (WebCore::StylePropertySet::averageSizeInBytes):
2995         (SameSizeAsStylePropertySet):
2996         (WebCore::StylePropertySet::append):
2997         * css/StylePropertySet.h:
2998         (WebCore::StylePropertySet::create):
2999         (StylePropertySet):
3000         (WebCore::StylePropertySet::propertyAt):
3001         (WebCore::StylePropertySet::propertyCount):
3002         (WebCore::StylePropertySet::isEmpty):
3003         (WebCore::StylePropertySet::array):
3004         * dom/StyledElement.cpp:
3005         (WebCore::StyledElement::updateAttributeStyle):
3006
3007 2012-05-29  David Hyatt  <hyatt@apple.com>
3008
3009         https://bugs.webkit.org/show_bug.cgi?id=87759
3010         
3011         Pull the initial page logical height checking for columns into its own separate function. This
3012         will allow the derived RenderMultiColumnBlock class to do its own setup there. It also has the
3013         effect of cleaning up layoutBlock even for the existing code.
3014
3015         Reviewed by Anders Carlsson.
3016
3017         * rendering/RenderBlock.cpp:
3018         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
3019         (WebCore):
3020         (WebCore::RenderBlock::layoutBlock):
3021         * rendering/RenderBlock.h:
3022         (RenderBlock):
3023
3024 2012-05-29  Victor Carbune  <victor@rosedu.org>
3025
3026         Update cue event dispatching for zero and negative duration cues
3027         https://bugs.webkit.org/show_bug.cgi?id=85143
3028
3029         Reviewed by Eric Carlson.
3030
3031         Updated existing test.
3032
3033         * html/HTMLMediaElement.cpp:
3034         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Explicitly
3035         treated event dispatching for zero and negative duration cues.
3036         (WebCore::HTMLMediaElement::textTrackAddCue): Interval tree doesn't
3037         handle invalid cues with intervals - negative cues need to be treated
3038         as zero-length cues as they are always missed cues anyway.
3039         (WebCore::HTMLMediaElement::textTrackRemoveCue): Same.
3040
3041 2012-05-29  MORITA Hajime  <morrita@google.com>
3042
3043         ShadowRoot.getElementById() returns removed node.
3044         https://bugs.webkit.org/show_bug.cgi?id=62184
3045
3046         Deregitration of m_elementsById map is done at Element::removedFrom()
3047         But the tree scope of the removed node is already reset from a shadow root
3048         to a document.
3049
3050         This change lookup the old shadow root through its parent node and
3051         deregitrater the node against it.
3052
3053         Reviewed by Dimitri Glazkov.
3054
3055         Test: fast/dom/shadow/get-element-by-id-in-shadow-mutation.html
3056
3057         * dom/Element.cpp:
3058         (WebCore::treeScopeOfParent):
3059         (WebCore):
3060         (WebCore::Element::removedFrom):
3061         * dom/Element.h:
3062         (Element):
3063         (WebCore::Element::updateId):
3064         (WebCore):
3065
3066 2012-05-29  Dana Jansens  <danakj@chromium.org>
3067
3068         [chromium] Unoccluded area in surfaces should always be clipped to the rootScissorRect
3069         https://bugs.webkit.org/show_bug.cgi?id=87677
3070
3071         Reviewed by Adrienne Walker.
3072
3073         When a contributing surface is visited, and we have not visited another
3074         surface, then we know the surface is completely unoccluded. However, the
3075         root scissor rect should still be applied, and anything outside of it
3076         should be considered occluded.
3077
3078         Unit test: WebKitTests::CCOcclusionTrackerTestTopmostSurfaceIsClippedToScissor
3079
3080         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
3081         (WebCore::RenderSurfaceChromium::targetRenderSurface):
3082         (WebCore):
3083         * platform/graphics/chromium/RenderSurfaceChromium.h:
3084         (RenderSurfaceChromium):
3085         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3086         (WebCore::::unoccludedContributingSurfaceContentRect):
3087         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3088         (WebCore::CCRenderSurface::targetRenderSurface):
3089         (WebCore):
3090         * platform/graphics/chromium/cc/CCRenderSurface.h:
3091         (CCRenderSurface):
3092
3093 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3094
3095         [BlackBerry] Refactoring http/proxy authentication to use authcallback mechanism introduced with libcurl
3096         https://bugs.webkit.org/show_bug.cgi?id=87706
3097
3098         Reviewed by Antonio Gomes.
3099
3100         Because we use authentication callback mechanism of libcurl,
3101         which will take care of all the authentication communication
3102         between UA and server, so the only thing we need to do is to
3103         provide credential information when authentication callback
3104         is triggered. By using this we don't need to process
3105         intermediate headers for each http authentication scheme.
3106
3107         Implemented interface function notifyAuthReceived() in
3108         NetworkJob to handle the authentication notification from
3109         networking thread.
3110         When the authentication callback is triggered, we should
3111         cancel the current loading request and restart a new one with
3112         credential information attached which comes from
3113         credentialStorage or user input.
3114
3115         Internally reviewed by Joe Mason <jmason@rim.com>.
3116
3117         No new tests since there is no behavior change.
3118
3119         * platform/network/blackberry/NetworkJob.cpp:
3120         (WebCore::NetworkJob::notifyAuthReceived):
3121         (WebCore):
3122         (WebCore::NetworkJob::handleNotifyHeaderReceived):
3123         (WebCore::NetworkJob::sendRequestWithCredentials):
3124         * platform/network/blackberry/NetworkJob.h:
3125         (NetworkJob):
3126
3127 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3128
3129         [BlackBerry] http authentication challenge issue when loading subresource
3130         https://bugs.webkit.org/show_bug.cgi?id=87660
3131
3132         Reviewed by Rob Buis.
3133
3134         We should try to store the credential information as soon as we
3135         receive http status notification which indicates that the
3136         authentication succeeds, instead of storing credentials when the
3137         main resource receives notify done which is too late for loading
3138         subresource.
3139
3140         Internally reviewed by Joe Mason <jmason@rim.com>
3141
3142         No new tests since there is no change in behavior.
3143
3144         * platform/network/blackberry/NetworkJob.cpp:
3145         (WebCore::NetworkJob::handleNotifyStatusReceived):
3146         (WebCore::NetworkJob::handleNotifyClose):
3147
3148 2012-05-29  Alexey Proskuryakov  <ap@apple.com>
3149
3150         [Mac] Move DefaultFonts.plist to C++ code
3151         https://bugs.webkit.org/show_bug.cgi?id=87560
3152         <rdar://problem/11466119>
3153
3154         Reviewed by Dan Bernstein.
3155
3156         * DerivedSources.make:
3157         * Resources/DefaultFonts.plist.in: Removed.
3158         * WebCore.xcodeproj/project.pbxproj:
3159         * page/mac/SettingsMac.mm: (WebCore::Settings::initializeDefaultFontFamilies):
3160         Instead of having a separate configuration file, just hardcode the settings in C++.
3161
3162 2012-05-29  Alexei Filippov  <alexeif@chromium.org>
3163
3164         Web Inspector: Retainers are missing for all objects
3165         https://bugs.webkit.org/show_bug.cgi?id=87655
3166
3167         Reviewed by Yury Semikhatsky.
3168
3169         * inspector/front-end/HeapSnapshotDataGrids.js:
3170         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
3171
3172 2012-05-29  Philippe Normand  <pnormand@igalia.com>
3173
3174         [GStreamer] Video sink doesn't respect WebKit code style
3175         https://bugs.webkit.org/show_bug.cgi?id=87693
3176
3177         Reviewed by Alexis Menard.
3178
3179         No change in behavior of the sink, this patch only adapts the code
3180         style to WebKit's.
3181
3182         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3183         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3184         (_WebKitVideoSinkPrivate):
3185         (webkitVideoSinkTimeoutCallback):
3186         (webkitVideoSinkRender):
3187         (webkitVideoSinkDispose):
3188         (unlockBufferMutex):
3189         (webkitVideoSinkUnlock):
3190         (webkitVideoSinkUnlockStop):
3191         (webkitVideoSinkStop):
3192         (webkitVideoSinkStart):
3193         (webkitVideoSinkMarshalVoidAndMiniObject):
3194         (webkit_video_sink_class_init):
3195         (webkitVideoSinkNew):
3196         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
3197         (_WebKitVideoSink):
3198         (_WebKitVideoSinkClass):
3199
3200 2012-05-29  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
3201
3202         [Qt] Uninitialized shader compiler when GLES is used
3203         https://bugs.webkit.org/show_bug.cgi?id=87712
3204
3205         The '#if !defined(QT_OPENGL_ES_2)' has been removed before the initialization
3206         of shader compiler to compile shader codes for ES-platforms as well.
3207
3208         Reviewed by Noam Rosenthal.
3209
3210         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3211         (WebCore::GraphicsContext3D::GraphicsContext3D):
3212
3213 2012-05-29  Taiju Tsuiki  <tzik@chromium.org>
3214
3215         Add InspectorFileSystemAgent::FrontendProvider
3216         https://bugs.webkit.org/show_bug.cgi?id=87635
3217
3218         InspectorFileSystemAgent needs weak reference to its frontend to perform
3219         asynchronous operation.
3220
3221         Reviewed by Yury Semikhatsky.
3222
3223         * inspector/InspectorFileSystemAgent.cpp:
3224         (InspectorFileSystemAgent::FrontendProvider):
3225         (WebCore):
3226         (WebCore::InspectorFileSystemAgent::~InspectorFileSystemAgent):
3227         (WebCore::InspectorFileSystemAgent::enable):
3228         (WebCore::InspectorFileSystemAgent::disable):
3229         (WebCore::InspectorFileSystemAgent::setFrontend):
3230         (WebCore::InspectorFileSystemAgent::clearFrontend):
3231         (WebCore::InspectorFileSystemAgent::restore):
3232         (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
3233         * inspector/InspectorFileSystemAgent.h:
3234         (InspectorFileSystemAgent):
3235
3236 2012-05-29  Yoshifumi Inoue  <yosin@chromium.org>
3237
3238         REGRESSION(r109729): The optgroup element's "disabled" attribute has no effect to rendering and selection
3239         https://bugs.webkit.org/show_bug.cgi?id=87614
3240
3241         Reviewed by Kent Tamura.
3242
3243         This patch adds HTMLOptGroupElement::disabled and isEnabledFormControl
3244         methods which was implemented in HTMLFormControlElement at r109729 and
3245         updates CSS pseudo class checker to check "optgroup" element.
3246
3247         Tests: fast/forms/select/optgroup-clicking.html
3248                fast/forms/select/optgroup-disabled.html
3249                fast/forms/select/optgroup-rendering.html
3250
3251         * css/SelectorChecker.cpp:
3252         (WebCore::SelectorChecker::checkOneSelector): On disabled and enabled pseudo class checker. 
3253         We checked tag name "optgroup" in addition isFormControlElement.
3254         * css/StyleResolver.cpp:
3255         (WebCore::StyleResolver::canShareStyleWithElement): Checks optgroup.disabled.
3256         * html/HTMLOptGroupElement.cpp:
3257         (WebCore::HTMLOptGroupElement::disabled): Added.
3258         * html/HTMLOptGroupElement.h:
3259         (HTMLOptGroupElement): Added isEnabledFormControl.
3260
3261 2012-05-29  Alexander Pavlov  <apavlov@chromium.org>
3262
3263         [Chromium] [Regression] SELECT popup misplaced when there is not enough vertical space
3264         https://bugs.webkit.org/show_bug.cgi?id=87735
3265
3266         Reviewed by Kent Tamura.
3267
3268         This change fixes the obsolete WebWidget Y-repositioning code for the insufficient vertical space case, not removed in r113418.
3269
3270         No new tests, as popups are not testable in Chromium.
3271
3272         * platform/chromium/PopupContainer.cpp:
3273         (WebCore::PopupContainer::layoutAndCalculateWidgetRect):
3274
3275 2012-05-29  Andrei Bucur  <abucur@adobe.com>
3276
3277         [CSS Regions]Rename NamedFlow::overflow to NamedFlow::overset
3278         https://bugs.webkit.org/show_bug.cgi?id=87491
3279
3280         This patch updates the CSSOM property name overflow to overset. There are no changes in functionality.
3281         Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
3282
3283         Reviewed by Andreas Kling.
3284
3285         Test: fast/regions/webkit-named-flow-overset.html
3286
3287         * dom/WebKitNamedFlow.cpp:
3288         (WebCore::WebKitNamedFlow::overset):
3289         * dom/WebKitNamedFlow.h:
3290         (WebKitNamedFlow):
3291         * dom/WebKitNamedFlow.idl:
3292         * rendering/RenderFlowThread.cpp:
3293         (WebCore::RenderFlowThread::RenderFlowThread):
3294         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
3295         * rendering/RenderFlowThread.h:
3296
3297 2012-05-29  Andreas Kling  <kling@webkit.org>
3298
3299         Give StylePropertySet a proper mutability flag.
3300         <http://webkit.org/b/87675>
3301
3302         Reviewed by Antti Koivisto.
3303
3304         Add a flag to StylePropertySet that determines whether it's mutable or not. Only objects
3305         constructed from the CSS parser (by way of StylePropertySet::adopt()) are made immutable.
3306         This is clean-up and prep work for implementing a more efficient storage scheme for immutable
3307         StylePropertySets (fixed-size array instead of vector) as the vast majority of them are
3308         unlikely to ever mutate during their lifetime.
3309
3310         Sprinkled ASSERT(isMutable()) all over StylePropertySet to catch any attempts to modify
3311         an immutable object.
3312
3313         Also made properties() const on StyleRule and friends, which brought some additional code
3314         churn along with it.
3315
3316         * css/CSSComputedStyleDeclaration.cpp:
3317         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
3318         * css/CSSFontFaceRule.cpp:
3319         (WebCore::CSSFontFaceRule::style):
3320         (WebCore::CSSFontFaceRule::reattach):
3321         * css/CSSFontFaceSrcValue.cpp:
3322         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
3323         * css/CSSFontFaceSrcValue.h:
3324         (CSSFontFaceSrcValue):
3325         * css/CSSPageRule.cpp:
3326         (WebCore::CSSPageRule::style):
3327         (WebCore::CSSPageRule::reattach):
3328         * css/CSSPrimitiveValue.cpp:
3329         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
3330         * css/CSSPrimitiveValue.h:
3331         (CSSPrimitiveValue):
3332         * css/CSSReflectValue.cpp:
3333         (WebCore::CSSReflectValue::addSubresourceStyleURLs):
3334         * css/CSSReflectValue.h:
3335         (CSSReflectValue):
3336         * css/CSSStyleRule.cpp:
3337         (WebCore::CSSStyleRule::style):
3338         (WebCore::CSSStyleRule::reattach):
3339         * css/CSSValue.cpp:
3340         (WebCore::CSSValue::addSubresourceStyleURLs):
3341         * css/CSSValue.h:
3342         (CSSValue):
3343         * css/CSSValueList.cpp:
3344         (WebCore::CSSValueList::addSubresourceStyleURLs):
3345         * css/CSSValueList.h:
3346         (CSSValueList):
3347         * css/StylePropertySet.cpp:
3348         (WebCore::StylePropertySet::StylePropertySet):
3349         (WebCore::StylePropertySet::setCSSParserMode):
3350         (WebCore):
3351         (WebCore::StylePropertySet::copyPropertiesFrom):
3352         (WebCore::StylePropertySet::removeShorthandProperty):
3353         (WebCore::StylePropertySet::removeProperty):
3354         (WebCore::StylePropertySet::setProperty):
3355         (WebCore::StylePropertySet::parseDeclaration):
3356         (WebCore::StylePropertySet::addParsedProperties):
3357         (WebCore::StylePropertySet::addParsedProperty):
3358         (WebCore::StylePropertySet::merge):
3359         (WebCore::StylePropertySet::addSubresourceStyleURLs):
3360         (WebCore::StylePropertySet::removePropertiesInSet):
3361         (WebCore::StylePropertySet::findPropertyWithId):
3362         (WebCore::StylePropertySet::removeEquivalentProperties):
3363         (WebCore::StylePropertySet::copyPropertiesInSet):
3364         * css/StylePropertySet.h:
3365         (WebCore::StylePropertySet::adopt):
3366         (WebCore::StylePropertySet::adoptMutable):
3367         (StylePropertySet):
3368         (WebCore::StylePropertySet::isMutable):
3369         * css/StyleResolver.cpp:
3370         (WebCore::StyleResolver::addMatchedProperties):
3371         (WebCore::StyleResolver::collectMatchingRulesForList):
3372         * css/StyleResolver.h:
3373         (StyleResolver):
3374         * css/StyleRule.cpp:
3375         (WebCore::StyleRule::mutableProperties):
3376         (WebCore):
3377         (WebCore::StyleRulePage::mutableProperties):
3378         (WebCore::StyleRuleFontFace::mutableProperties):
3379         * css/StyleRule.h:
3380         (WebCore::StyleRule::properties):
3381         (StyleRule):
3382         (WebCore::StyleRuleFontFace::properties):
3383         (StyleRuleFontFace):
3384         (WebCore::StyleRulePage::properties):
3385         (StyleRulePage):
3386         * dom/ElementAttributeData.cpp:
3387         (WebCore::ElementAttributeData::ensureInlineStyle):
3388         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
3389         * editing/EditingStyle.cpp:
3390         (WebCore::styleFromMatchedRulesForElement):
3391         * svg/SVGFontFaceElement.cpp:
3392         (WebCore::SVGFontFaceElement::parseAttribute):
3393         (WebCore::SVGFontFaceElement::rebuildFontFace):
3394         (WebCore::SVGFontFaceElement::removedFrom):
3395
3396 2012-05-29  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3397
3398         [EFL] Refactoring. Get rid of unnecessary singleCharacterString() function
3399         https://bugs.webkit.org/show_bug.cgi?id=87654
3400
3401         Reviewed by Csaba Osztrogonác.
3402
3403         Evas key events already provide key string, so no practical need for singleCharacterString() 
3404         evaluating the event string from keyname.
3405         Modified code related functionality is already covered with fast/events and fast/forms tests.
3406
3407         * platform/efl/EflKeyboardUtilities.cpp:
3408         * platform/efl/PlatformKeyboardEventEfl.cpp:
3409         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3410
3411 2012-05-29  Ilya Tikhonovsky  <loislo@chromium.org>
3412
3413         Unreviewed: Web Inspector: single line fix after r118742.
3414
3415         * inspector/front-end/HeapSnapshotView.js:
3416         (WebInspector.HeapProfileHeader.prototype.saveToFile):
3417
3418 2012-05-29  Kentaro Hara  <haraken@chromium.org>
3419
3420         Remove m_rootNode and m_selectorChecker from SelectorQuery.h
3421         https://bugs.webkit.org/show_bug.cgi?id=87650
3422
3423         Reviewed by Antti Koivisto.
3424
3425         To avoid parsing CSS selectors every time, I am planning to cache
3426         SelectorQuery objects into a HashMap, which will be defined in
3427         Node::querySelector(). To make the size of SelectorQuery small,
3428         this patch removes m_rootNode and m_selectorChecker from SelectorQuery.h.
3429
3430         Tests: fast/dom/SelectorAPI/*. No change in test results.
3431
3432         * dom/Node.cpp:
3433         (WebCore::Node::querySelector):
3434         (WebCore::Node::querySelectorAll):
3435         * dom/SelectorQuery.cpp:
3436         (WebCore::SelectorQuery::SelectorQuery):
3437         (WebCore):
3438         (WebCore::SelectorQuery::queryAll):
3439         (WebCore::SelectorQuery::queryFirst):
3440         * dom/SelectorQuery.h:
3441         (SelectorQuery):
3442
3443 2012-05-29  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3444
3445         Web Inspector: Tabbed Settings Screen
3446         https://bugs.webkit.org/show_bug.cgi?id=87497
3447
3448         Reviewed by Yury Semikhatsky.
3449
3450         Combine settings screen and shortcuts screen
3451         to a single tabbed settings screen.
3452         This will make shortcuts screen more discoverable.
3453
3454         * inspector/front-end/HelpScreen.js:
3455         (WebInspector.HelpScreen): Make titled tamplate optional.
3456         (WebInspector.HelpScreen.prototype._createCloseButton): Extract method.
3457         * inspector/front-end/SettingsScreen.js:
3458         (WebInspector.SettingsScreen): Split initialization and UI construction.
3459         (WebInspector.SettingsScreen.prototype._createSettingsTabView.appendSection):
3460         (WebInspector.SettingsScreen.prototype._createSettingsTabView):
3461         Extract GUI construction method.
3462         (WebInspector.SettingsScreen.prototype._getOrCreateTabbedPane):
3463         Make GUI construction lazy.
3464         (WebInspector.SettingsScreen.prototype.selectTab):
3465         Add method for external tab swithching.
3466         (WebInspector.SettingsScreen.prototype.wasShown):
3467         Make GUI construction lazy.
3468         (WebInspector.SettingsScreenTabbedPane):
3469         Extend class to access protected member.
3470         (WebInspector.SettingsController.prototype._buttonClicked):
3471         Change "showSettingsScreen" visibility and parameters.
3472         (WebInspector.SettingsController.prototype._onHideSettingsScreen):
3473         Preserve settings screen state.
3474         (WebInspector.SettingsController.prototype.showSettingsScreen):
3475         Change method visibility and parameters.
3476         * inspector/front-end/ShortcutsScreen.js:
3477         (WebInspector.ShortcutsScreen): Remove inheritance from HelpScreen.
3478         (WebInspector.ShortcutsScreen.prototype._createShortcutsTabView):
3479         Refactoring of GUI construction.
3480         (WebInspector.ShortcutsSection.prototype.renderSection):
3481         Ditto.
3482         * inspector/front-end/helpScreen.css:
3483         (.help-window-main ::-webkit-scrollbar): Rebind scrollbar settings.
3484         (.help-window-main ::-webkit-resizer): Ditto.
3485         (.help-window-main ::-webkit-scrollbar-thumb:vertical): Ditto.
3486         (.help-window-main ::-webkit-scrollbar-thumb:vertical:active): Ditto.
3487         (.help-window-main ::-webkit-scrollbar-track:vertical): Ditto.
3488         (body:not(.compact) #settings-screen .tabbed-pane): Fix container height.
3489         (#settings-screen .tabbed-pane-header): Ditto.
3490         (#settings-screen .tabbed-pane-header-tabs): Adjust spacing.
3491         (#settings-screen .tabbed-pane-header-tab): Adjust style.
3492         (#settings-screen .help-close-button): Adjust spacing.
3493         (#settings-screen .tabbed-pane-header-tab.selected):
3494         Erase line below active tab.
3495         (#settings-screen .tabbed-pane-content): Adjust spacing.
3496         (#settings-screen .help-content): Ditto.
3497         * inspector/front-end/inspector.js:
3498         (WebInspector.documentKeyDown): Use Settings screen to show shortcuts.
3499
3500 2012-05-29  Ilya Tikhonovsky  <loislo@chromium.org>
3501
3502         Web Inspector: REGRESSION: load heap snapshot doesn'