File.lastModifiedDate must return null if the modified time info is not available
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-30  Kinuko Yasuda  <kinuko@chromium.org>
2
3         File.lastModifiedDate must return null if the modified time info is not available
4         https://bugs.webkit.org/show_bug.cgi?id=87709
5
6         Reviewed by Kentaro Hara.
7
8         Per File API spec, File.lastModifiedDate must return null if the
9         modified time info is not available.
10         http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate
11
12         Test: http/tests/local/fileapi/file-last-modified-after-delete.html
13
14         * fileapi/File.cpp:
15         (WebCore::File::lastModifiedDateForBinding): Added.
16         (WebCore):
17         * fileapi/File.h:
18         (File):
19         * fileapi/File.idl: Added ImplementedAs=lastModifiedDateForBinding.
20
21 2012-05-30  Jochen Eisinger  <jochen@chromium.org>
22
23         Match Firefox restrictions to window.blur and window.focus
24         https://bugs.webkit.org/show_bug.cgi?id=86969
25
26         Reviewed by Adam Barth.
27
28         Disallow window.blur altogether, and only allow window.focus to be
29         invoked from the context that created this very window.
30
31         There's a new setting (windowFocusRestricted) that defaults to true. If
32         false, the new restrictions are lifted. This can be used by ports that
33         would prefer to stick with the old behavior.
34
35         For tests, this setting is accessible in window.internals.settings
36
37         To temporarily allow window.focus(), an object of type
38         WindowFocusAllowedIndicator can be created. It is currently used to
39         enable window.focus() during dispatch of the click event for
40         notifications.
41
42         Tests: fast/dom/Window/mozilla-focus-blur.html
43                fast/notifications/notifications-click-event-focus.html
44
45         * CMakeLists.txt:
46         * GNUmakefile.list.am:
47         * Target.pri:
48         * WebCore.gypi:
49         * WebCore.vcproj/WebCore.vcproj:
50         * WebCore.xcodeproj/project.pbxproj:
51         * notifications/Notification.cpp:
52         (WebCore::Notification::dispatchClickEvent):
53         * page/DOMWindow.cpp:
54         (WebCore::DOMWindow::focus):
55         (WebCore::DOMWindow::blur):
56         * page/DOMWindow.h:
57         (DOMWindow):
58         * page/DOMWindow.idl:
59         * page/Settings.cpp:
60         (WebCore::Settings::Settings):
61         * page/Settings.h:
62         (Settings):
63         (WebCore::Settings::setWindowFocusRestricted):
64         (WebCore::Settings::windowFocusRestricted):
65         * page/WindowFocusAllowedIndicator.cpp: Added.
66         (WebCore):
67         (WebCore::WindowFocusAllowedIndicator::windowFocusAllowed):
68         (WebCore::WindowFocusAllowedIndicator::WindowFocusAllowedIndicator):
69         (WebCore::WindowFocusAllowedIndicator::~WindowFocusAllowedIndicator):
70         * page/WindowFocusAllowedIndicator.h: Added.
71         (WebCore):
72         (WindowFocusAllowedIndicator):
73         * testing/InternalSettings.cpp:
74         (WebCore::InternalSettings::InternalSettings):
75         (WebCore::InternalSettings::restoreTo):
76         (WebCore::InternalSettings::setWindowFocusRestricted):
77         (WebCore):
78         * testing/InternalSettings.h:
79         (InternalSettings):
80         * testing/InternalSettings.idl:
81
82 2012-05-30  Mariusz Grzegorczyk  <mariusz.g@samsung.com>, Ryuan Choi  <ryuan.choi@samsung.com>
83
84         [EFL][WK2] Fix WebKit2-EFL build
85         https://bugs.webkit.org/show_bug.cgi?id=83693
86
87         Reviewed by Carlos Garcia Campos.
88
89         * CMakeLists.txt: Add GestureTapHighlighter.cpp.
90
91 2012-05-29  Antti Koivisto  <antti@apple.com>
92
93         Rename Foo::addSubresourceStyleURLs and Node::addSubresourceAttributeURLs
94         https://bugs.webkit.org/show_bug.cgi?id=87739
95
96         Rubber-stamped by Andreas Kling.
97
98         Rename them to collectSubresourceURLs and collectSubresourceURLsFromAttributes to match
99         the naming conventions.
100         
101         Move collectSubresourceURLsFromAttributes from Node to Element as only elements have attributes.
102
103         * css/CSSFontFaceSrcValue.cpp:
104         (WebCore::CSSFontFaceSrcValue::collectSubresourceURLs):
105         * css/CSSFontFaceSrcValue.h:
106         (CSSFontFaceSrcValue):
107         * css/CSSPrimitiveValue.cpp:
108         (WebCore::CSSPrimitiveValue::collectSubresourceURLs):
109         * css/CSSPrimitiveValue.h:
110         (CSSPrimitiveValue):
111         * css/CSSReflectValue.cpp:
112         (WebCore::CSSReflectValue::collectSubresourceURLs):
113         * css/CSSReflectValue.h:
114         (CSSReflectValue):
115         * css/CSSValue.cpp:
116         (WebCore::CSSValue::collectSubresourceURLs):
117         * css/CSSValue.h:
118         (CSSValue):
119         * css/CSSValueList.cpp:
120         (WebCore::CSSValueList::collectSubresourceURLs):
121         * css/CSSValueList.h:
122         (CSSValueList):
123         * css/StylePropertySet.cpp:
124         (WebCore::StylePropertySet::collectSubresourceURLs):
125         * css/StylePropertySet.h:
126         (StylePropertySet):
127         * css/StyleSheetContents.cpp:
128         (WebCore::StyleSheetContents::collectSubresourceURLs):
129         * css/StyleSheetContents.h:
130         (StyleSheetContents):
131         * dom/Element.h:
132         (WebCore::Element::collectSubresourceURLsFromAttributes):
133         (Element):
134         * dom/Node.cpp:
135         (WebCore::Node::getSubresourceURLs):
136         * dom/Node.h:
137         (WebCore):
138         * dom/ProcessingInstruction.cpp:
139         (WebCore::ProcessingInstruction::collectSubresourceURLsFromAttributes):
140         * dom/ProcessingInstruction.h:
141         (ProcessingInstruction):
142         * dom/StyledElement.cpp:
143         (WebCore::StyledElement::collectSubresourceURLsFromAttributes):
144         * dom/StyledElement.h:
145         (StyledElement):
146         * html/HTMLBodyElement.cpp:
147         (WebCore::HTMLBodyElement::collectSubresourceURLsFromAttributes):
148         * html/HTMLBodyElement.h:
149         (HTMLBodyElement):
150         * html/HTMLEmbedElement.cpp:
151         (WebCore::HTMLEmbedElement::collectSubresourceURLsFromAttributes):
152         * html/HTMLEmbedElement.h:
153         (HTMLEmbedElement):
154         * html/HTMLImageElement.cpp:
155         (WebCore::HTMLImageElement::collectSubresourceURLsFromAttributes):
156         * html/HTMLImageElement.h:
157         (HTMLImageElement):
158         * html/HTMLInputElement.cpp:
159         (WebCore::HTMLInputElement::collectSubresourceURLsFromAttributes):
160         * html/HTMLInputElement.h:
161         (HTMLInputElement):
162         * html/HTMLLinkElement.cpp:
163         (WebCore::HTMLLinkElement::collectSubresourceURLsFromAttributes):
164         * html/HTMLLinkElement.h:
165         (HTMLLinkElement):
166         * html/HTMLObjectElement.cpp:
167         (WebCore::HTMLObjectElement::collectSubresourceURLsFromAttributes):
168         * html/HTMLObjectElement.h:
169         (HTMLObjectElement):
170         * html/HTMLParamElement.cpp:
171         (WebCore::HTMLParamElement::collectSubresourceURLsFromAttributes):
172         * html/HTMLParamElement.h:
173         (HTMLParamElement):
174         * html/HTMLScriptElement.cpp:
175         (WebCore::HTMLScriptElement::collectSubresourceURLsFromAttributes):
176         * html/HTMLScriptElement.h:
177         (HTMLScriptElement):
178         * html/HTMLStyleElement.cpp:
179         (WebCore::HTMLStyleElement::collectSubresourceURLsFromAttributes):
180         * html/HTMLStyleElement.h:
181         (HTMLStyleElement):
182         * html/HTMLTableCellElement.cpp:
183         (WebCore::HTMLTableCellElement::collectSubresourceURLsFromAttributes):
184         * html/HTMLTableCellElement.h:
185         (HTMLTableCellElement):
186         * html/HTMLTableElement.cpp:
187         (WebCore::HTMLTableElement::collectSubresourceURLsFromAttributes):
188         * html/HTMLTableElement.h:
189         (HTMLTableElement):
190         * svg/SVGCursorElement.cpp:
191         (WebCore::SVGCursorElement::collectSubresourceURLsFromAttributes):
192         * svg/SVGCursorElement.h:
193         (SVGCursorElement):
194         * svg/SVGFEImageElement.cpp:
195         (WebCore::SVGFEImageElement::collectSubresourceURLsFromAttributes):
196         * svg/SVGFEImageElement.h:
197         (SVGFEImageElement):
198         * svg/SVGImageElement.cpp:
199         (WebCore::SVGImageElement::collectSubresourceURLsFromAttributes):
200         * svg/SVGImageElement.h:
201         (SVGImageElement):
202         * svg/SVGScriptElement.cpp:
203         (WebCore::SVGScriptElement::collectSubresourceURLsFromAttributes):
204         * svg/SVGScriptElement.h:
205         (SVGScriptElement):
206
207 2012-05-30  Eugene Klyuchnikov  <eustas.bug@gmail.com>
208
209         Web Inspector: Fix JS compiler warning
210         https://bugs.webkit.org/show_bug.cgi?id=87836
211
212         Reviewed by Yury Semikhatsky.
213
214         * inspector/front-end/SettingsScreen.js: Fix method annotation.
215
216 2012-05-30  Zoltan Horvath  <zoltan@webkit.org>
217
218         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
219         https://bugs.webkit.org/show_bug.cgi?id=80400
220
221         This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder.
222         The new behavior is to use QImageDecoder only if WebCoreImageDecoder - and the platform - doesn't support 
223         the requested image type.
224         The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed.
225
226         This change adds build depedency (except Qt-MAC and Qt-WIN platform) for libpng-dev and libjpeg-dev packages, 
227         because PNG and JPEG imagedecoders need not only these libraries, but their headers also. Qmake-config 
228         tests for these libraries were introduced in r110045.
229
230         Notice: with using libjpeg-turbo as a system library I measured 10% performance improvement on Methanol benchmark
231         (collection of popular sites, page-loading benchmark) with this patch.
232
233         Reviewed by Simon Hausmann.
234
235         No new tests needed.
236
237         * Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources.
238         * WebCore.pri: Move WebCore ImageDecoder include paths out of guards.
239         * platform/MIMETypeRegistry.cpp:
240         (WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types.
241         (WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types.
242         * platform/graphics/ImageSource.cpp: Remove unnecessary includes.
243         * platform/graphics/ImageSource.h: Remove unnecessary typedefs.
244         (WebCore):
245         * platform/graphics/qt/ImageDecoderQt.cpp: Remove ImageDecoder::create, since it is no longer needed.
246         (WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon.
247         (WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap.
248         (WebCore):
249         (WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp.
250         * platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header.
251         (WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder. Add guards
252         for JPEG, PNG, ICO decoder for Qt-MAC and Qt-WIN platform.
253         * platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes.
254         (WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed.
255         (ImageFrame):
256         * platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to
257         ImageDecoderQt.cpp.
258
259 2012-05-23  Kinuko Yasuda  <kinuko@chromium.org>
260
261         REGRESSION: We should allow null modificationTime when snapshot metadata is given
262         https://bugs.webkit.org/show_bug.cgi?id=86811
263
264         Reviewed by Jian Li.
265
266         r117432 has introduced a new File constructor which allows the caller
267         to pass in a snapshot file metadata. In the change we had considered the
268         given metadata is valid if "metadata.length >= 0 AND metadata.lastModifiedDate != 0",
269         but we should drop the latter condition (lastModifiedDate != 0) because
270
271         1. the value 0 is used to indicate the time information is unavailable in File, and
272         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).
273
274         (Note: the current js/v8 binding returns Date(0) for the time value 0,
275         which is still valid as epoch time but would fail to indicate the
276         unavailability of the information. In this patch I added FIXME in
277         File.idl and filed a separate issue http://webkit.org/b/87709)
278
279         No new tests as this change does not affect regular files/filesystems behavior.
280         (Tests in Chrome OS port should be able to verify this)
281
282         * fileapi/File.cpp:
283         (WebCore::File::lastModifiedDate):
284         (WebCore::File::size):
285         (WebCore::File::captureSnapshot):
286         * fileapi/File.h:
287         (File):
288
289 2012-05-30  MORITA Hajime  <morrita@google.com>
290
291         [Shadow DOM] HTMLContentElement and HTMLShadowElement constructors should be visible.
292         https://bugs.webkit.org/show_bug.cgi?id=87818
293
294         Reviewed by Kentaro Hara.
295
296         Added them as DOMWindow properties
297
298         Tests: fast/dom/shadow/content-element-api.html
299                fast/dom/shadow/shadow-element.html
300
301         * page/DOMWindow.idl:
302
303 2012-05-30  Mike Lawther  <mikelawther@chromium.org>
304
305         CSS3 calc: Implement CSSOM support
306         https://bugs.webkit.org/show_bug.cgi?id=84551
307
308         Reviewed by Ryosuke Niwa.
309
310         Adds a pretty printer for the calc expression tree. 
311
312         Test: css3/calc/cssom.html
313
314         * css/CSSCalculationValue.cpp:
315         (WebCore::CSSCalcValue::customCssText):
316         (WebCore::CSSCalcPrimitiveValue::customCssText):
317         (WebCore::CSSCalcBinaryOperation::customCssText):
318         (CSSCalcBinaryOperation):
319         * css/CSSCalculationValue.h:
320         (CSSCalcExpressionNode):
321
322 2012-05-29  Li Yin  <li.yin@intel.com>
323
324         [FileAPI] The result attribute of FileReader shuold use null to replace empty string
325         https://bugs.webkit.org/show_bug.cgi?id=87578
326
327         Reviewed by Jian Li.
328
329         Spec: http://www.w3.org/TR/FileAPI/#dfn-result
330         If the readyState is EMPTY (no read method has been called) or an error 
331         in reading the File or Blob has occurred (using any read method), then the 
332         result attribute MUST return null.
333
334         Currently, Firefox11, Opera and IE 10 follows the spec, but Webkit based
335         browser doesn't.
336         WebKit should change the returned value empty string into null to keep
337         conformance with the spec.
338
339         Tests: fast/files/read-file-async.html
340                fast/files/workers/worker-read-file-async.html
341
342         * fileapi/FileReader.cpp:
343         (WebCore::FileReader::arrayBufferResult):
344         (WebCore::FileReader::stringResult):
345
346 2012-05-29  Mark Pilgrim  <pilgrim@chromium.org>
347
348         [Chromium] Move fileExists to Platform.h
349         https://bugs.webkit.org/show_bug.cgi?id=87531
350
351         Reviewed by Adam Barth.
352
353         Call fileExists through fileUtilities(), not directly.
354
355         * platform/chromium/FileSystemChromium.cpp:
356         (WebCore::fileExists):
357
358 2012-05-29  Kentaro Hara  <haraken@chromium.org>
359
360         Remove a dummy style sheet from CSSParser::parseFlowThread()
361         https://bugs.webkit.org/show_bug.cgi?id=87715
362
363         Reviewed by Darin Adler.
364
365         r118736 changed CSSGrammar.y so that it works fine with no style sheet.
366         r118736 removed a dummy style sheet from CSSParser::parserSelector().
367         Now we can safely remove a dummy style sheet from parserFlowThread().
368
369         Tests: fast/regions. No change in test results.
370
371         * css/CSSParser.cpp:
372         (WebCore::CSSParser::parseFlowThread):
373
374 2012-05-29  Yoshifumi Inoue  <yosin@chromium.org>
375
376         REGRESSION(r111497): The "option" element doesn't match CSS pseudo class :enabled
377         https://bugs.webkit.org/show_bug.cgi?id=87719
378
379         Reviewed by Kent Tamura.
380
381         This patch added checking of "option" element for CSS pseudo class :enabled as same as
382         :disabled to selector checker. Before r111497, it was done by using isFormControlElement.
383         After that revision, HTMLOptionElement was no longer derived from HTMLFormControlElement.
384
385         Test: fast/form/select/optgroup-rendering.html
386
387         * css/SelectorChecker.cpp:
388         (WebCore::SelectorChecker::checkOneSelector): Checking element is option element as same
389         as PseudoDisabled in PseudoEnabled case.
390
391 2012-05-29  Hayato Ito  <hayato@chromium.org>
392
393         Introduces ComposedShadowTreeParentWalker, extracted from ComposedShadowTreeWalker.
394         https://bugs.webkit.org/show_bug.cgi?id=87004
395
396         Reviewed by Dimitri Glazkov.
397
398         Introduces a ComposedShadowTreeParentWalker, which is only used
399         for traversing a parent node (including shadow roots and insertion
400         points) and get rid of an equivalent function from
401         ComposedShadowTreeWalker.
402
403         Before this patch, there is an inconsistency inside of
404         ComposedShadowTreeWalker. The Walker uses 'Policy' to decide
405         whether it should visit shadow roots or not, but
406         parentIncludingInsertionPointAndShadowRoot() member function
407         ignores the policy.  We can not add an assertion in its
408         constructor due to this inconsistency.  To resolve it, we could
409         add yet another special policy, but that makes the implementation
410         complex and may add some overhead in runtime.  So separate the
411         functionality into another class as ComposedShadowTreeParentWalker.
412
413         No new tests, no new functionality except for assertion.
414
415         * dom/ComposedShadowTreeWalker.cpp:
416         (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker):
417         (WebCore::ComposedShadowTreeParentWalker::ComposedShadowTreeParentWalker):
418         (WebCore):
419         (WebCore::ComposedShadowTreeParentWalker::parentIncludingInsertionPointAndShadowRoot):
420         (WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot):
421         * dom/ComposedShadowTreeWalker.h:
422         (ComposedShadowTreeWalker):
423         (WebCore::ComposedShadowTreeWalker::assertPrecondition):
424         (WebCore):
425         (ComposedShadowTreeParentWalker):
426         (WebCore::ComposedShadowTreeParentWalker::get):
427         * dom/EventDispatcher.cpp:
428         (WebCore::EventRelatedTargetAdjuster::adjust):
429         (WebCore::EventDispatcher::ensureEventAncestors):
430         * page/EventHandler.cpp:
431         (WebCore::EventHandler::updateMouseEventTargetNode):
432
433 2012-05-29  Hayato Ito  <hayato@chromium.org>
434
435         Add assertions to make sure that event's target and relatedTarget are accessible.
436         https://bugs.webkit.org/show_bug.cgi?id=87641
437
438         Reviewed by Dimitri Glazkov.
439
440         No new tests. No new functionality except for assertions.
441
442         * dom/EventContext.cpp:
443         (WebCore::EventContext::EventContext):
444         * dom/EventContext.h:
445         (WebCore):
446         (EventContext):
447         (WebCore::EventContext::setRelatedTarget):
448         (WebCore::EventContext::accessible):
449
450 2012-05-29  Kent Tamura  <tkent@chromium.org>
451
452         Fix inefficient usage of traverseNextNode()
453         https://bugs.webkit.org/show_bug.cgi?id=87804
454
455         Reviewed by Ryosuke Niwa.
456
457         foo->traverseNextNode(foo) is equivalent to foo->firstChild(), and
458         firstChild() is more efficient.
459
460         No new tests because of no behavior change.
461
462         * html/HTMLFieldSetElement.cpp:
463         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
464         Replace traverseNextNode() with firstChild(), and shorten a variable name.
465         * svg/SVGSVGElement.cpp:
466         (WebCore::SVGSVGElement::getElementById):
467         Replace traverseNextNode() with firstChild().
468
469 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
470
471         [BlackBerry] Loading media data with http authentication
472         https://bugs.webkit.org/show_bug.cgi?id=84214
473
474         Reviewed by George Staikos.
475
476         RIM PR: 117618
477         Implemented http authentication feature for media by implementing
478         two interface functions in class MediaPlayerPrivate:
479         onAuthenticationNeeded(): this function is triggered when MMR
480         engine requires http authentication. We search the CredentialStorage
481         to see if we have already stored existing credential information,
482         or challenge user to provide it.
483         OnAuthenticationAccepted(): this function is triggered when MMR
484         engine accepts the credential information, and we need to save
485         it in CredentialStorage for later use.
486
487         Internally reviewed by Max Feil <mfeil@qnx.com>.
488
489         Manual test case: blackberry/video-load-with-authentication.html
490
491         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
492         (WebCore::generateProtectionSpaceFromMMRAuthChallenge):
493         (WebCore):
494         (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
495         (WebCore::MediaPlayerPrivate::onAuthenticationAccepted):
496         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
497         (MediaPlayerPrivate):
498
499 2012-05-29  MORITA Hajime  <morrita@google.com>
500
501         [Shadow DOM] Node distribution should be orthogonal from node attachment
502         https://bugs.webkit.org/show_bug.cgi?id=87223
503
504         Reviewed by Dimitri Glazkov.
505
506         This chagne reorganizes Shadow DOM subtree distribution implementation.
507
508         Originally, it was interleaved across attach() of several classes like
509         InsertionPoint and ShadowRoot. Its invalidation was also mixed as a part of
510         the style recalculation and detach()-es.
511
512         This change extracts these bits of code to a set of ContentDistributor methods, which are
513         facaded by two ElementShadow API. Following two API are the primary entry points:
514
515         - ElementShadow::ensureDistribution()
516         - ElementShadow::invalidateDistribution()
517
518         The actual implementations are ContentDistributor::distribute() and
519         ContentDistributor::invalidate() respectively.
520
521         When clients need to traverse composed tree, before attach() for
522         example, they should call ensureDistribution() to make sure that
523         the traversal data structure ("the distribution") is ready.  When
524         there is any DOM mutation which can result a composed tree
525         mutation, then clients should call invalidateDistribution() to
526         mark the distribution being dated.
527
528         Here are such DOM mutations:
529
530         - The children of any ShadowRoots are changed,
531         - The children of any InsertionPoints are changed,
532         - The children of any host elements are changed,
533         - Any insertion point is inserted to or removed from the shadow tree,
534         - @select attribute of <content> is modified and
535         - New ShadowRoot is added to the shadow tree.
536
537         Note that the validity of the distribution is tracked and
538         unnecessary distribution requests are ignored.
539
540         After the invalidation, that shadow subtrees are detached once and
541         request  their  re-attachment  through  the  style  recalculation.
542         Then,  on the  responding  style recalculation  and attach(),  new
543         distribution will be computed.
544
545         No new tests. Covered by existing tests.
546
547         * dom/Element.cpp:
548         (WebCore::Element::~Element):
549         (WebCore::Element::childrenChanged):
550         * dom/ElementShadow.cpp:
551         (WebCore::ElementShadow::~ElementShadow):
552         (WebCore::ElementShadow::addShadowRoot):
553         (WebCore::ElementShadow::removeAllShadowRoots):
554         (WebCore::ElementShadow::attach):
555         (WebCore::ElementShadow::recalcStyle):
556         (WebCore::ElementShadow::ensureDistribution):
557         (WebCore::ElementShadow::invalidateDistribution):
558         * dom/ElementShadow.h:
559         (ElementShadow):
560         * dom/NodeRenderingContext.cpp:
561         (WebCore::NodeRenderingContext::NodeRenderingContext):
562         (WebCore::NodeRendererFactory::createRendererIfNeeded):
563         * dom/NodeRenderingContext.h:
564         (NodeRenderingContext):
565         * dom/ShadowRoot.cpp:
566         (WebCore::ShadowRoot::setApplyAuthorStyles):
567         (WebCore::ShadowRoot::attach):
568         (WebCore::ShadowRoot::childrenChanged):
569         (WebCore):
570         * dom/ShadowRoot.h:
571         (ShadowRoot):
572         * html/HTMLFormControlElement.cpp:
573         * html/ValidationMessage.cpp:
574         (WebCore::ValidationMessage::buildBubbleTree):
575         * html/shadow/ContentDistributor.cpp:
576         (WebCore::ContentDistributor::ContentDistributor):
577         (WebCore::ContentDistributor::~ContentDistributor):
578         (WebCore::ContentDistributor::findInsertionPointFor):
579         (WebCore::ContentDistributor::distribute):
580         (WebCore::ContentDistributor::invalidate):
581         (WebCore::ContentDistributor::finishInivalidation):
582         (WebCore::ContentDistributor::distributeSelectionsTo):
583         (WebCore::ContentDistributor::distributeShadowChildrenTo):
584         (WebCore::ContentDistributor::invalidateDistributionIn):
585         * html/shadow/ContentDistributor.h:
586         (WebCore::ContentDistributor::needsInvalidation):
587         (ContentDistributor):
588         (WebCore::ContentDistributor::needsDistribution):
589         * html/shadow/HTMLContentElement.cpp:
590         (WebCore::HTMLContentElement::parseAttribute):
591         * html/shadow/InsertionPoint.cpp:
592         (WebCore::InsertionPoint::attach):
593         (WebCore::InsertionPoint::detach):
594         (WebCore::InsertionPoint::nextTo):
595         (WebCore::InsertionPoint::previousTo):
596         (WebCore::InsertionPoint::childrenChanged):
597         * html/shadow/InsertionPoint.h:
598         (WebCore::InsertionPoint::setDistribution):
599         (WebCore::InsertionPoint::clearDistribution):
600         (InsertionPoint):
601
602 2012-05-29  Luke Macpherson  <macpherson@chromium.org>
603
604         Implement post-landing feedback for WebKitCSSTransformValue::customCSSText().
605         https://bugs.webkit.org/show_bug.cgi?id=87684
606
607         Reviewed by Darin Adler.
608
609         Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed.
610         This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation
611         and WTF_ARRAY_LENGTH instead of hard coding the array length.
612
613         Covered by existing transform tests.
614
615         * css/WebKitCSSTransformValue.cpp:
616         (WebCore):
617         (WebCore::WebKitCSSTransformValue::customCssText):
618
619 2012-05-29  Eric Seidel  <eric@webkit.org>
620
621         Fix ENABLE_IFRAME_SEAMLESS to actually fully disable <iframe seamless>
622         https://bugs.webkit.org/show_bug.cgi?id=87646
623
624         Reviewed by Adam Barth.
625
626         In the process of moving the seamless feature out of github and into bugs.webkit.org
627         multiple versions of the shouldDisplaySeamlessly function got written
628         (and moved from HTMLIFrameElement to Document), but only one of them was wrapped
629         in ENABLE_IFRAME_SEAMLESS.  HTMLIFrameElement was checking mayDisplaySeamlessly
630         directly (as was my original design), which got around the ENABLE_IFRAME_SEAMLESS check.
631         I've fixed this oversight, and the feature is now off when we tell it to be off.
632
633         This is covered by many existing tests.  I've verified locally that
634         all tests fail when ENABLE_IFRAME_SEAMLESS is disabled instead of
635         only some of them.
636
637         * dom/SecurityContext.h:
638         (SecurityContext):
639         * html/HTMLIFrameElement.cpp:
640         (WebCore::HTMLIFrameElement::shouldDisplaySeamlessly):
641
642 2012-05-29  Scott Graham  <scottmg@chromium.org>
643
644         Fix warning in preprocessing Source/WebCore/dom/DOMError.idl
645         https://bugs.webkit.org/show_bug.cgi?id=87763
646
647         Reviewed by Adam Barth.
648
649         Add newline at end of file to avoid warning:
650         ../dom/DOMError.idl:35:2: warning: no newline at end of file
651
652         * dom/DOMError.idl:
653
654 2012-05-29  Mark Pilgrim  <pilgrim@chromium.org>
655
656         [Chromium] Move fileExists to Platform.h
657         https://bugs.webkit.org/show_bug.cgi?id=87531
658
659         Reviewed by Adam Barth.
660
661         Part of a refactoring series. See tracking bug 82948.
662
663         * platform/chromium/FileSystemChromium.cpp:
664         (WebCore::fileExists):
665         * platform/chromium/PlatformSupport.h:
666         (PlatformSupport):
667
668 2012-05-29  Kentaro Hara  <haraken@chromium.org>
669
670         [V8] Rename v8Null() to v8NullWithCheck()
671         https://bugs.webkit.org/show_bug.cgi?id=87713
672
673         Reviewed by Adam Barth.
674
675         In IRC, cmarcelo@ pointed out that v8::Null() and v8Null()
676         are confusing. This patch renames v8Null() to v8NullWithCheck().
677
678         No tests. No behavior change.
679
680         * bindings/scripts/CodeGeneratorV8.pm:
681         (GenerateHeader):
682         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
683         (WebCore::toV8):
684         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
685         (WebCore::toV8):
686         * bindings/scripts/test/V8/V8TestEventConstructor.h:
687         (WebCore::toV8):
688         * bindings/scripts/test/V8/V8TestEventTarget.h:
689         (WebCore::toV8):
690         * bindings/scripts/test/V8/V8TestException.h:
691         (WebCore::toV8):
692         * bindings/scripts/test/V8/V8TestInterface.h:
693         (WebCore::toV8):
694         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
695         (WebCore::toV8):
696         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
697         (WebCore::toV8):
698         * bindings/scripts/test/V8/V8TestNode.h:
699         (WebCore::toV8):
700         * bindings/scripts/test/V8/V8TestObj.h:
701         (WebCore::toV8):
702         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
703         (WebCore::toV8):
704         * bindings/v8/V8Binding.h:
705         (WebCore::v8NullWithCheck):
706         (WebCore::v8DateOrNull):
707
708 2012-05-29  Christophe Dumez  <christophe.dumez@intel.com>
709
710         Some Content Security Policy console messages are missing line numbers in JSC
711         https://bugs.webkit.org/show_bug.cgi?id=87558
712
713         Reviewed by Adam Barth.
714
715         Make ScriptController::eventHandlerPosition() behave the same way on
716         JSC than V8. This means that TextPosition::minimumPosition() is
717         returned if parser is null, instead of
718         TextPosition::belowRangePosition(). The line numbers are now correctly
719         printed in the output of Content Security Policy tests.
720
721         Tests: http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url.html
722                http/tests/security/contentSecurityPolicy/javascript-url-blocked.html
723
724         * bindings/js/ScriptController.cpp:
725         (WebCore::ScriptController::eventHandlerPosition):
726
727 2012-05-29  Shawn Singh  <shawnsingh@chromium.org>
728
729         [chromium] make WebTransformationMatrix object usable by non-webkit code
730         https://bugs.webkit.org/show_bug.cgi?id=87315
731
732         Reviewed by James Robinson.
733
734         This change is covered by existing tests and by whether it
735         compiles. There should be no changes in behavior.
736
737         * platform/chromium/support/WebTransformationMatrix.cpp:
738         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
739         (WebKit::WebTransformationMatrix::operator=):
740         (WebKit::WebTransformationMatrix::operator==):
741         (WebKit::WebTransformationMatrix::inverse):
742         (WebKit::WebTransformationMatrix::to2dTransform):
743         (WebKit::WebTransformationMatrix::multiply):
744         (WebKit::WebTransformationMatrix::makeIdentity):
745         (WebKit::WebTransformationMatrix::translate):
746         (WebKit::WebTransformationMatrix::translate3d):
747         (WebKit::WebTransformationMatrix::translateRight3d):
748         (WebKit::WebTransformationMatrix::scale):
749         (WebKit::WebTransformationMatrix::scaleNonUniform):
750         (WebKit::WebTransformationMatrix::scale3d):
751         (WebKit::WebTransformationMatrix::rotate):
752         (WebKit::WebTransformationMatrix::rotate3d):
753         (WebKit::WebTransformationMatrix::skewX):
754         (WebKit::WebTransformationMatrix::skewY):
755         (WebKit::WebTransformationMatrix::applyPerspective):
756         (WebKit::WebTransformationMatrix::blend):
757         (WebKit::WebTransformationMatrix::hasPerspective):
758         (WebKit::WebTransformationMatrix::isInvertible):
759         (WebKit::WebTransformationMatrix::isBackFaceVisible):
760         (WebKit::WebTransformationMatrix::isIdentity):
761         (WebKit::WebTransformationMatrix::isIdentityOrTranslation):
762         (WebKit::WebTransformationMatrix::isIntegerTranslation):
763         (WebKit::WebTransformationMatrix::m11):
764         (WebKit::WebTransformationMatrix::setM11):
765         (WebKit::WebTransformationMatrix::m12):
766         (WebKit::WebTransformationMatrix::setM12):
767         (WebKit::WebTransformationMatrix::m13):
768         (WebKit::WebTransformationMatrix::setM13):
769         (WebKit::WebTransformationMatrix::m14):
770         (WebKit::WebTransformationMatrix::setM14):
771         (WebKit::WebTransformationMatrix::m21):
772         (WebKit::WebTransformationMatrix::setM21):
773         (WebKit::WebTransformationMatrix::m22):
774         (WebKit::WebTransformationMatrix::setM22):
775         (WebKit::WebTransformationMatrix::m23):
776         (WebKit::WebTransformationMatrix::setM23):
777         (WebKit::WebTransformationMatrix::m24):
778         (WebKit::WebTransformationMatrix::setM24):
779         (WebKit::WebTransformationMatrix::m31):
780         (WebKit::WebTransformationMatrix::setM31):
781         (WebKit::WebTransformationMatrix::m32):
782         (WebKit::WebTransformationMatrix::setM32):
783         (WebKit::WebTransformationMatrix::m33):
784         (WebKit::WebTransformationMatrix::setM33):
785         (WebKit::WebTransformationMatrix::m34):
786         (WebKit::WebTransformationMatrix::setM34):
787         (WebKit::WebTransformationMatrix::m41):
788         (WebKit::WebTransformationMatrix::setM41):
789         (WebKit::WebTransformationMatrix::m42):
790         (WebKit::WebTransformationMatrix::setM42):
791         (WebKit::WebTransformationMatrix::m43):
792         (WebKit::WebTransformationMatrix::setM43):
793         (WebKit::WebTransformationMatrix::m44):
794         (WebKit::WebTransformationMatrix::setM44):
795         (WebKit::WebTransformationMatrix::a):
796         (WebKit::WebTransformationMatrix::setA):
797         (WebKit::WebTransformationMatrix::b):
798         (WebKit::WebTransformationMatrix::setB):
799         (WebKit::WebTransformationMatrix::c):
800         (WebKit::WebTransformationMatrix::setC):
801         (WebKit::WebTransformationMatrix::d):
802         (WebKit::WebTransformationMatrix::setD):
803         (WebKit::WebTransformationMatrix::e):
804         (WebKit::WebTransformationMatrix::setE):
805         (WebKit::WebTransformationMatrix::f):
806         (WebKit::WebTransformationMatrix::setF):
807         (WebKit::WebTransformationMatrix::toWebCoreTransform):
808         (WebKit::WebTransformationMatrix::mapRect):
809         (WebKit::WebTransformationMatrix::mapPoint):
810         (WebKit::WebTransformationMatrix::mapQuad):
811         (WebKit::WebTransformationMatrix::projectPoint):
812
813 2012-05-29  Alexis Menard  <alexis.menard@openbossa.org>
814
815         [CSS3 Backgrounds and Borders] Implement box-decoration-break parsing.
816         https://bugs.webkit.org/show_bug.cgi?id=87678
817
818         Reviewed by Eric Seidel.
819
820         Implement the parsing part of box-decoration-break. The specification
821         is located at http://www.w3.org/TR/css3-background/#box-decoration-break.
822         So far Opera implements it. This patch only implements the parsing part of
823         the property. A following patch will implement the rendering part. Despite
824         the rendering part missing it improves http://css3test.com by 1%.
825
826         Test: fast/box-decoration-break/box-decoration-break-parsing.html
827
828         * css/CSSComputedStyleDeclaration.cpp:
829         (WebCore):
830         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
831         * css/CSSParser.cpp:
832         (WebCore::isValidKeywordPropertyAndValue):
833         (WebCore::isKeywordPropertyID):
834         * css/CSSPrimitiveValueMappings.h:
835         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
836         (WebCore):
837         (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
838         * css/CSSProperty.cpp:
839         (WebCore::CSSProperty::isInheritedProperty):
840         * css/CSSPropertyNames.in:
841         * css/CSSValueKeywords.in:
842         * css/StyleBuilder.cpp:
843         (WebCore::StyleBuilder::StyleBuilder):
844         * rendering/style/RenderStyle.h:
845         * rendering/style/RenderStyleConstants.h:
846         * rendering/style/StyleBoxData.cpp:
847         (WebCore::StyleBoxData::StyleBoxData):
848         (WebCore::StyleBoxData::operator==):
849         * rendering/style/StyleBoxData.h:
850         (WebCore::StyleBoxData::boxDecorationBreak):
851         (StyleBoxData):
852
853 2012-05-29  David Barr  <davidbarr@chromium.org>
854
855         [text-overflow: ellipsis] WebKit should ignore the ellipsis for the purpose of dispatching mouse events
856         https://bugs.webkit.org/show_bug.cgi?id=63781
857
858         Reviewed by Eric Seidel.
859
860         "Ellipsing only affects rendering and must not affect layout nor dispatching of pointer events."
861         http://www.w3.org/TR/2012/WD-css3-ui-20120117/#text-overflow
862
863         Test: fast/css/text-overflow-ellipsis-hit-test.html
864
865         * rendering/EllipsisBox.cpp:
866         (WebCore::EllipsisBox::nodeAtPoint): Always return false.
867
868 2012-05-29  Gavin Peters  <gavinp@chromium.org>
869
870         [Chromium] Remove assertions on state in Prerender.cpp
871         https://bugs.webkit.org/show_bug.cgi?id=87746
872
873         Chrome was crashing in the new Prerender API on Google Web Search; this was because the DOM would stop(), setting the
874         state of the Prerenders in the document to Inactive, but an asyncronous GC would later come come along and trigger the
875         removedFromDocument behaviour on each element, including the <link> element launching the prerender.  This causes an
876         assertion failure.
877
878         I believe the late-deletion of the DOM, and the HTMLElement::removedFromDocument calls are legal, and it was the
879         overzealous assertions in Prerender that were inappropriate.
880
881         Reviewed by Adam Barth.
882
883         No new automated tests, working on a Chromium browser test. Manually test by entering many prerender and non-prerendered
884         queries into Google Web Search.
885
886         * platform/chromium/Prerender.cpp:
887         (WebCore::Prerender::Prerender):
888         (WebCore::Prerender::add):
889         (WebCore::Prerender::cancel):
890         (WebCore::Prerender::abandon):
891         * platform/chromium/Prerender.h:
892         (Prerender):
893
894 2012-05-29  Victor Carbune  <victor@rosedu.org>
895
896         Display cues in the controls area
897         https://bugs.webkit.org/show_bug.cgi?id=87591
898
899         Reviewed by Eric Carlson.
900
901         Changed the behaviour to implicitly hide the volume slidebar
902         if the controls are hidden (due mouse moving out of the video
903         area or controls are toggled through JS).
904
905         This seems to be the simplest fix to this issue, otherwise
906         on toggling the display:none property on the controls the
907         volume slidebar might appear below the video.
908
909         Re-enabled failing tests for this functionality.
910
911         * html/shadow/MediaControlElements.cpp:
912         (WebCore::MediaControlPanelElement::makeTransparent): Re-enabled
913         timer to set the display:none property on the controls.
914         * html/shadow/MediaControlRootElement.cpp:
915         (WebCore::MediaControlRootElement::hide): Added a call to hide
916         the volume slider.
917         (WebCore::MediaControlRootElement::makeTransparent): Same.
918         * html/shadow/MediaControlRootElementChromium.cpp:
919         (WebCore::MediaControlRootElementChromium::hide): Same.
920         (WebCore::MediaControlRootElementChromium::makeTransparent): Same.
921
922 2012-05-29  Adrienne Walker  <enne@google.com>
923
924         Fix transparent iframes with composited contents in WK1 on Mac
925         https://bugs.webkit.org/show_bug.cgi?id=76478
926
927         Reviewed by Simon Fraser.
928
929         Test: compositing/iframes/repaint-after-losing-scrollbars.html
930
931         * page/FrameView.cpp:
932         (WebCore::FrameView::useSlowRepaints):
933
934 2012-05-29  David Hyatt  <hyatt@apple.com>
935
936         https://bugs.webkit.org/show_bug.cgi?id=87787
937         
938         [New Multicolumn] Refactor the region and flow thread code so that it can pick up the correct column widths
939         and heights when determining the logical width and height of the flow thread itself.
940
941         This patch adds new virtual methods to RenderRegion: logicalWidthForFlowThreadContent and logicalHeightForFlowThreadContent.
942         For normal regions, these methods return the contentWidth and contentHeight of the regions themselves. For column sets,
943         however, these methods actually return the column widths and heights.
944         
945         This allows the flow thread to properly lay out according to the column width.
946         
947         Region invalidation is also done properly by using these new methods.
948         
949         In some cases the code is actually simplified, since we can get rid of some isHorizontalWritingMode() switching.
950         
951         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
952         column).
953
954         Reviewed by Dan Bernstein.
955
956         * rendering/RenderFlowThread.cpp:
957         (WebCore::RenderFlowThread::layout):
958         (WebCore::RenderFlowThread::computeLogicalWidth):
959         (WebCore::RenderFlowThread::computeLogicalHeight):
960         * rendering/RenderMultiColumnBlock.cpp:
961         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
962         * rendering/RenderMultiColumnBlock.h:
963         (WebCore::RenderMultiColumnBlock::isRenderMultiColumnBlock):
964         (RenderMultiColumnBlock):
965         (WebCore::toRenderMultiColumnBlock):
966         (WebCore):
967         * rendering/RenderMultiColumnSet.cpp:
968         (WebCore::RenderMultiColumnSet::computeLogicalWidth):
969         (WebCore):
970         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
971         * rendering/RenderMultiColumnSet.h:
972         (WebCore::RenderMultiColumnSet::setColumnWidthAndCount):
973         (RenderMultiColumnSet):
974         * rendering/RenderObject.h:
975         (WebCore::RenderObject::isRenderMultiColumnBlock):
976         * rendering/RenderRegion.cpp:
977         (WebCore::RenderRegion::logicalWidthForFlowThreadContent):
978         (WebCore):
979         (WebCore::RenderRegion::logicalHeightForFlowThreadContent):
980         (WebCore::RenderRegion::layout):
981         * rendering/RenderRegion.h:
982         (RenderRegion):
983
984 2012-05-29  Alec Flett  <alecflett@chromium.org>
985
986         IndexedDB: Align codes and names for IDB-specific and DOM-specific errors/exceptions
987         https://bugs.webkit.org/show_bug.cgi?id=87276
988
989         Reviewed by Tony Chang.
990
991         No new tests. Existing tests have been updated to use the new
992         exception constant values.
993
994         The IDB spec has evolved to DOM4-style DOMExceptions, which are
995         referred to with MixedCase, string-based style names for
996         exceptions rather than UNDERSCORE_CONSTANT_ERR codes. Change to
997         use MixedCase error/exception names, and tease out the
998         IDB-specific exception/error codes/names from the system-level
999         codes. Make sure that the legacy IDB-masked exception code values
1000         match the DOM exception values. Make sure that
1001         IDBDatabaseException[exception.name] still works.
1002
1003         * Modules/indexeddb/IDBDatabase.cpp:
1004         (WebCore::IDBDatabase::createObjectStore):
1005         (WebCore::IDBDatabase::transaction):
1006         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1007         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
1008         (WebCore::IDBDatabaseBackendImpl::setVersion):
1009         (WebCore::IDBDatabaseBackendImpl::transaction):
1010         * Modules/indexeddb/IDBDatabaseException.cpp:
1011         (IDBDatabaseExceptionNameDescription):
1012         (WebCore):
1013         (WebCore::IDBDatabaseException::initializeDescription):
1014         * Modules/indexeddb/IDBDatabaseException.h:
1015         * Modules/indexeddb/IDBDatabaseException.idl:
1016         * Modules/indexeddb/IDBObjectStore.cpp:
1017         (WebCore::IDBObjectStore::createIndex):
1018         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1019         (WebCore::IDBObjectStoreBackendImpl::index):
1020         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
1021         * Modules/indexeddb/IDBRequest.cpp:
1022         (WebCore::IDBRequest::abort):
1023         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1024         (WebCore::IDBTransactionBackendImpl::objectStore):
1025
1026 2012-05-29  David Hyatt  <hyatt@apple.com>
1027
1028         https://bugs.webkit.org/show_bug.cgi?id=87775
1029
1030         [New Multicolumn] Make sure RenderMultiColumnSets have their own copy of the count, width and height of their columns. 
1031
1032         Reviewed by Anders Carlsson.
1033
1034         * rendering/RenderMultiColumnBlock.cpp:
1035         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
1036         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
1037         * rendering/RenderMultiColumnBlock.h:
1038         (WebCore::RenderMultiColumnBlock::columnWidth):
1039         (WebCore::RenderMultiColumnBlock::columnCount):
1040         (RenderMultiColumnBlock):
1041         * rendering/RenderMultiColumnSet.cpp:
1042         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1043         * rendering/RenderMultiColumnSet.h:
1044         (WebCore::RenderMultiColumnSet::columnCount):
1045         (WebCore::RenderMultiColumnSet::columnWidth):
1046         (WebCore::RenderMultiColumnSet::columnHeight):
1047         (RenderMultiColumnSet):
1048         (WebCore::RenderMultiColumnSet::setColumnWidthAndCount):
1049         (WebCore::RenderMultiColumnSet::setColumnHeight):
1050
1051 2012-05-29  Simon Fraser  <simon.fraser@apple.com>
1052
1053         Incomplete repaint on twitter.com when replying to a tweet
1054         https://bugs.webkit.org/show_bug.cgi?id=87553
1055
1056         Reviewed by Dean Jackson.
1057         
1058         Style changes can cause a compositing layer to change between
1059         requiring its own backing store or not, e.g. with the addition
1060         or removal of a transform.
1061         
1062         When that happens, we need to repaint the ancesetor layer that
1063         this layer was, or will be drawing into.
1064         
1065         Factored some code out of layerWillBeRemoved() to be able to
1066         also call it from setRequiresOwnBackingStore().
1067
1068         New manual test, ManualTests/compositing/requires-backing-change.html.
1069         I was not able to get an automated pixel test to work.
1070
1071         * rendering/RenderLayerBacking.cpp:
1072         (WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
1073         * rendering/RenderLayerCompositor.cpp:
1074         (WebCore::RenderLayerCompositor::updateCompositingLayers): Remove trailing whitespace.
1075         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor):
1076         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1077         * rendering/RenderLayerCompositor.h:
1078
1079 2012-05-29  David Hyatt  <hyatt@apple.com>
1080
1081         https://bugs.webkit.org/show_bug.cgi?id=87771
1082         
1083         [New Multicolumn] Make sure we have one column set by default and add it to the flow thread's region list.
1084
1085         Reviewed by Anders Carlsson.
1086
1087         * rendering/RenderMultiColumnBlock.cpp:
1088         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
1089         * rendering/RenderRegion.cpp:
1090         (WebCore::RenderRegion::RenderRegion):
1091
1092 2012-05-29  John Sullivan  <sullivan@apple.com>
1093
1094         Update label for blacklisted plug-in
1095         https://bugs.webkit.org/show_bug.cgi?id=87767
1096         rdar://problem/11550048
1097         
1098         Reviewed by Kevin Decker.
1099
1100         * English.lproj/Localizable.strings:
1101         Regenerated.
1102         
1103         * platform/LocalizedStrings.cpp:
1104         (WebCore::insecurePluginVersionText):
1105         Changed this string.
1106
1107 2012-05-29  Julien Chaffraix  <jchaffraix@webkit.org>
1108
1109         REGRESSION(r111742): box-sizing: border-box doesn't work on fixed table layout
1110         https://bugs.webkit.org/show_bug.cgi?id=87536
1111
1112         Reviewed by Tony Chang.
1113
1114         Tests: fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout.html
1115                fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout.html
1116                fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout.html
1117                fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout.html
1118
1119         The change in r111742 completely ignored border-sizing (following the table's code lead unfortunately).
1120         The issue is that we would count the borders and paddings twice for the border-box case which would lead
1121         to the content-box including them too. From a web-author, this behavior is equivalent to ignoring box-sizing.
1122
1123         * rendering/FixedTableLayout.cpp:
1124         (WebCore::FixedTableLayout::calcWidthArray):
1125         Reworked the function to properly use computeBorderBoxLogicalWidth() for correctness. This matches
1126         what RenderBox and the rendering code does generally. Also refactored the code to avoid the need
1127         for local variables and make it more readable.
1128
1129 2012-05-25  Ojan Vafai  <ojan@chromium.org>
1130
1131         Absolute positioned elements in a relative positioned CSS3 Flexbox fail to display properly
1132         https://bugs.webkit.org/show_bug.cgi?id=58453
1133
1134         Reviewed by Tony Chang.
1135
1136         Test: css3/flexbox/align-absolute-child.html
1137
1138         * rendering/RenderFlexibleBox.cpp:
1139         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
1140         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
1141         (WebCore::RenderFlexibleBox::adjustAlignmentForChild):
1142         When adjusting positioned items, adjust their static position, not their location.
1143         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
1144         (WebCore::RenderFlexibleBox::flipForWrapReverse):
1145         * rendering/RenderFlexibleBox.h:
1146
1147 2012-05-29  Abhishek Arya  <inferno@chromium.org>
1148
1149         Crash due to text fragment destruction when updating first-letter block.
1150         https://bugs.webkit.org/show_bug.cgi?id=87751
1151
1152         Reviewed by Eric Seidel.
1153
1154         Test: fast/text/text-fragment-first-letter-update-crash.html
1155
1156         * rendering/RenderObject.cpp:
1157         (WebCore::RenderObject::setStyle):
1158
1159 2012-05-29  David Hyatt  <hyatt@apple.com>
1160
1161         https://bugs.webkit.org/show_bug.cgi?id=87764
1162         
1163         Add implementation of checkForPaginationLogicalHeightChange to RenderMultiColumnBlock.
1164         
1165         Also stub out ensureColumnSets() and write a comment describing how it's going to work.
1166
1167         Reviewed by Anders Carlsson.
1168
1169         * rendering/RenderMultiColumnBlock.cpp:
1170         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
1171         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
1172         (WebCore):
1173         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
1174         * rendering/RenderMultiColumnBlock.h:
1175         (WebCore::RenderMultiColumnBlock::columnHeight):
1176         (WebCore::RenderMultiColumnBlock::setColumnHeight):
1177         (RenderMultiColumnBlock):
1178
1179 2012-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1180
1181         Unreviewed, rolling out r118620.
1182         http://trac.webkit.org/changeset/118620
1183         https://bugs.webkit.org/show_bug.cgi?id=87760
1184
1185         This patch causes regression to read an empty file/blob via
1186         FileReader (Requested by jianli on #webkit).
1187
1188         * fileapi/FileReader.cpp:
1189         (WebCore::FileReader::stringResult):
1190
1191 2012-05-29  Andreas Kling  <kling@webkit.org>
1192
1193         Make StylePropertySet a variable-sized object to reduce memory use.
1194         <http://webkit.org/b/87506>
1195
1196         Reviewed by Antti Koivisto.
1197
1198         Make immutable StylePropertySet objects variable-sized and allocate exactly
1199         the space needed to hold the CSSProperty objects passed at construction.
1200         This lets us avoid the memory overhead of Vector<CSSProperty, 4>.
1201
1202         Renamed StylePropertySet::adopt* to create and createImmutable since they no
1203         longer adopt the incoming vector. More cleanup will follow in this area.
1204
1205         This reduces memory usage across the board - the more CSS declarations,
1206         the bigger the benefit. As an example, we save around ~0.5MB on wsj.com.
1207
1208         * css/CSSComputedStyleDeclaration.cpp:
1209         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
1210         * css/CSSParser.cpp:
1211         (WebCore::CSSParser::createStylePropertySet):
1212         * css/StylePropertySet.cpp:
1213         (WebCore::StylePropertySet::createImmutable):
1214         (WebCore::StylePropertySet::StylePropertySet):
1215         (WebCore::StylePropertySet::~StylePropertySet):
1216         (WebCore::StylePropertySet::copyPropertiesFrom):
1217         (WebCore::StylePropertySet::removeProperty):
1218         (WebCore::StylePropertySet::setProperty):
1219         (WebCore::StylePropertySet::parseDeclaration):
1220         (WebCore::StylePropertySet::addParsedProperties):
1221         (WebCore::StylePropertySet::asText):
1222         (WebCore::StylePropertySet::merge):
1223         (WebCore::StylePropertySet::addSubresourceStyleURLs):
1224         (WebCore::StylePropertySet::removePropertiesInSet):
1225         (WebCore::StylePropertySet::findPropertyWithId):
1226         (WebCore::StylePropertySet::removeEquivalentProperties):
1227         (WebCore::StylePropertySet::copyPropertiesInSet):
1228         (WebCore::StylePropertySet::averageSizeInBytes):
1229         (SameSizeAsStylePropertySet):
1230         (WebCore::StylePropertySet::append):
1231         * css/StylePropertySet.h:
1232         (WebCore::StylePropertySet::create):
1233         (StylePropertySet):
1234         (WebCore::StylePropertySet::propertyAt):
1235         (WebCore::StylePropertySet::propertyCount):
1236         (WebCore::StylePropertySet::isEmpty):
1237         (WebCore::StylePropertySet::array):
1238         * dom/StyledElement.cpp:
1239         (WebCore::StyledElement::updateAttributeStyle):
1240
1241 2012-05-29  David Hyatt  <hyatt@apple.com>
1242
1243         https://bugs.webkit.org/show_bug.cgi?id=87759
1244         
1245         Pull the initial page logical height checking for columns into its own separate function. This
1246         will allow the derived RenderMultiColumnBlock class to do its own setup there. It also has the
1247         effect of cleaning up layoutBlock even for the existing code.
1248
1249         Reviewed by Anders Carlsson.
1250
1251         * rendering/RenderBlock.cpp:
1252         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
1253         (WebCore):
1254         (WebCore::RenderBlock::layoutBlock):
1255         * rendering/RenderBlock.h:
1256         (RenderBlock):
1257
1258 2012-05-29  Victor Carbune  <victor@rosedu.org>
1259
1260         Update cue event dispatching for zero and negative duration cues
1261         https://bugs.webkit.org/show_bug.cgi?id=85143
1262
1263         Reviewed by Eric Carlson.
1264
1265         Updated existing test.
1266
1267         * html/HTMLMediaElement.cpp:
1268         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Explicitly
1269         treated event dispatching for zero and negative duration cues.
1270         (WebCore::HTMLMediaElement::textTrackAddCue): Interval tree doesn't
1271         handle invalid cues with intervals - negative cues need to be treated
1272         as zero-length cues as they are always missed cues anyway.
1273         (WebCore::HTMLMediaElement::textTrackRemoveCue): Same.
1274
1275 2012-05-29  MORITA Hajime  <morrita@google.com>
1276
1277         ShadowRoot.getElementById() returns removed node.
1278         https://bugs.webkit.org/show_bug.cgi?id=62184
1279
1280         Deregitration of m_elementsById map is done at Element::removedFrom()
1281         But the tree scope of the removed node is already reset from a shadow root
1282         to a document.
1283
1284         This change lookup the old shadow root through its parent node and
1285         deregitrater the node against it.
1286
1287         Reviewed by Dimitri Glazkov.
1288
1289         Test: fast/dom/shadow/get-element-by-id-in-shadow-mutation.html
1290
1291         * dom/Element.cpp:
1292         (WebCore::treeScopeOfParent):
1293         (WebCore):
1294         (WebCore::Element::removedFrom):
1295         * dom/Element.h:
1296         (Element):
1297         (WebCore::Element::updateId):
1298         (WebCore):
1299
1300 2012-05-29  Dana Jansens  <danakj@chromium.org>
1301
1302         [chromium] Unoccluded area in surfaces should always be clipped to the rootScissorRect
1303         https://bugs.webkit.org/show_bug.cgi?id=87677
1304
1305         Reviewed by Adrienne Walker.
1306
1307         When a contributing surface is visited, and we have not visited another
1308         surface, then we know the surface is completely unoccluded. However, the
1309         root scissor rect should still be applied, and anything outside of it
1310         should be considered occluded.
1311
1312         Unit test: WebKitTests::CCOcclusionTrackerTestTopmostSurfaceIsClippedToScissor
1313
1314         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1315         (WebCore::RenderSurfaceChromium::targetRenderSurface):
1316         (WebCore):
1317         * platform/graphics/chromium/RenderSurfaceChromium.h:
1318         (RenderSurfaceChromium):
1319         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1320         (WebCore::::unoccludedContributingSurfaceContentRect):
1321         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1322         (WebCore::CCRenderSurface::targetRenderSurface):
1323         (WebCore):
1324         * platform/graphics/chromium/cc/CCRenderSurface.h:
1325         (CCRenderSurface):
1326
1327 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1328
1329         [BlackBerry] Refactoring http/proxy authentication to use authcallback mechanism introduced with libcurl
1330         https://bugs.webkit.org/show_bug.cgi?id=87706
1331
1332         Reviewed by Antonio Gomes.
1333
1334         Because we use authentication callback mechanism of libcurl,
1335         which will take care of all the authentication communication
1336         between UA and server, so the only thing we need to do is to
1337         provide credential information when authentication callback
1338         is triggered. By using this we don't need to process
1339         intermediate headers for each http authentication scheme.
1340
1341         Implemented interface function notifyAuthReceived() in
1342         NetworkJob to handle the authentication notification from
1343         networking thread.
1344         When the authentication callback is triggered, we should
1345         cancel the current loading request and restart a new one with
1346         credential information attached which comes from
1347         credentialStorage or user input.
1348
1349         Internally reviewed by Joe Mason <jmason@rim.com>.
1350
1351         No new tests since there is no behavior change.
1352
1353         * platform/network/blackberry/NetworkJob.cpp:
1354         (WebCore::NetworkJob::notifyAuthReceived):
1355         (WebCore):
1356         (WebCore::NetworkJob::handleNotifyHeaderReceived):
1357         (WebCore::NetworkJob::sendRequestWithCredentials):
1358         * platform/network/blackberry/NetworkJob.h:
1359         (NetworkJob):
1360
1361 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1362
1363         [BlackBerry] http authentication challenge issue when loading subresource
1364         https://bugs.webkit.org/show_bug.cgi?id=87660
1365
1366         Reviewed by Rob Buis.
1367
1368         We should try to store the credential information as soon as we
1369         receive http status notification which indicates that the
1370         authentication succeeds, instead of storing credentials when the
1371         main resource receives notify done which is too late for loading
1372         subresource.
1373
1374         Internally reviewed by Joe Mason <jmason@rim.com>
1375
1376         No new tests since there is no change in behavior.
1377
1378         * platform/network/blackberry/NetworkJob.cpp:
1379         (WebCore::NetworkJob::handleNotifyStatusReceived):
1380         (WebCore::NetworkJob::handleNotifyClose):
1381
1382 2012-05-29  Alexey Proskuryakov  <ap@apple.com>
1383
1384         [Mac] Move DefaultFonts.plist to C++ code
1385         https://bugs.webkit.org/show_bug.cgi?id=87560
1386         <rdar://problem/11466119>
1387
1388         Reviewed by Dan Bernstein.
1389
1390         * DerivedSources.make:
1391         * Resources/DefaultFonts.plist.in: Removed.
1392         * WebCore.xcodeproj/project.pbxproj:
1393         * page/mac/SettingsMac.mm: (WebCore::Settings::initializeDefaultFontFamilies):
1394         Instead of having a separate configuration file, just hardcode the settings in C++.
1395
1396 2012-05-29  Alexei Filippov  <alexeif@chromium.org>
1397
1398         Web Inspector: Retainers are missing for all objects
1399         https://bugs.webkit.org/show_bug.cgi?id=87655
1400
1401         Reviewed by Yury Semikhatsky.
1402
1403         * inspector/front-end/HeapSnapshotDataGrids.js:
1404         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
1405
1406 2012-05-29  Philippe Normand  <pnormand@igalia.com>
1407
1408         [GStreamer] Video sink doesn't respect WebKit code style
1409         https://bugs.webkit.org/show_bug.cgi?id=87693
1410
1411         Reviewed by Alexis Menard.
1412
1413         No change in behavior of the sink, this patch only adapts the code
1414         style to WebKit's.
1415
1416         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1417         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1418         (_WebKitVideoSinkPrivate):
1419         (webkitVideoSinkTimeoutCallback):
1420         (webkitVideoSinkRender):
1421         (webkitVideoSinkDispose):
1422         (unlockBufferMutex):
1423         (webkitVideoSinkUnlock):
1424         (webkitVideoSinkUnlockStop):
1425         (webkitVideoSinkStop):
1426         (webkitVideoSinkStart):
1427         (webkitVideoSinkMarshalVoidAndMiniObject):
1428         (webkit_video_sink_class_init):
1429         (webkitVideoSinkNew):
1430         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
1431         (_WebKitVideoSink):
1432         (_WebKitVideoSinkClass):
1433
1434 2012-05-29  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
1435
1436         [Qt] Uninitialized shader compiler when GLES is used
1437         https://bugs.webkit.org/show_bug.cgi?id=87712
1438
1439         The '#if !defined(QT_OPENGL_ES_2)' has been removed before the initialization
1440         of shader compiler to compile shader codes for ES-platforms as well.
1441
1442         Reviewed by Noam Rosenthal.
1443
1444         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1445         (WebCore::GraphicsContext3D::GraphicsContext3D):
1446
1447 2012-05-29  Taiju Tsuiki  <tzik@chromium.org>
1448
1449         Add InspectorFileSystemAgent::FrontendProvider
1450         https://bugs.webkit.org/show_bug.cgi?id=87635
1451
1452         InspectorFileSystemAgent needs weak reference to its frontend to perform
1453         asynchronous operation.
1454
1455         Reviewed by Yury Semikhatsky.
1456
1457         * inspector/InspectorFileSystemAgent.cpp:
1458         (InspectorFileSystemAgent::FrontendProvider):
1459         (WebCore):
1460         (WebCore::InspectorFileSystemAgent::~InspectorFileSystemAgent):
1461         (WebCore::InspectorFileSystemAgent::enable):
1462         (WebCore::InspectorFileSystemAgent::disable):
1463         (WebCore::InspectorFileSystemAgent::setFrontend):
1464         (WebCore::InspectorFileSystemAgent::clearFrontend):
1465         (WebCore::InspectorFileSystemAgent::restore):
1466         (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
1467         * inspector/InspectorFileSystemAgent.h:
1468         (InspectorFileSystemAgent):
1469
1470 2012-05-29  Yoshifumi Inoue  <yosin@chromium.org>
1471
1472         REGRESSION(r109729): The optgroup element's "disabled" attribute has no effect to rendering and selection
1473         https://bugs.webkit.org/show_bug.cgi?id=87614
1474
1475         Reviewed by Kent Tamura.
1476
1477         This patch adds HTMLOptGroupElement::disabled and isEnabledFormControl
1478         methods which was implemented in HTMLFormControlElement at r109729 and
1479         updates CSS pseudo class checker to check "optgroup" element.
1480
1481         Tests: fast/forms/select/optgroup-clicking.html
1482                fast/forms/select/optgroup-disabled.html
1483                fast/forms/select/optgroup-rendering.html
1484
1485         * css/SelectorChecker.cpp:
1486         (WebCore::SelectorChecker::checkOneSelector): On disabled and enabled pseudo class checker. 
1487         We checked tag name "optgroup" in addition isFormControlElement.
1488         * css/StyleResolver.cpp:
1489         (WebCore::StyleResolver::canShareStyleWithElement): Checks optgroup.disabled.
1490         * html/HTMLOptGroupElement.cpp:
1491         (WebCore::HTMLOptGroupElement::disabled): Added.
1492         * html/HTMLOptGroupElement.h:
1493         (HTMLOptGroupElement): Added isEnabledFormControl.
1494
1495 2012-05-29  Alexander Pavlov  <apavlov@chromium.org>
1496
1497         [Chromium] [Regression] SELECT popup misplaced when there is not enough vertical space
1498         https://bugs.webkit.org/show_bug.cgi?id=87735
1499
1500         Reviewed by Kent Tamura.
1501
1502         This change fixes the obsolete WebWidget Y-repositioning code for the insufficient vertical space case, not removed in r113418.
1503
1504         No new tests, as popups are not testable in Chromium.
1505
1506         * platform/chromium/PopupContainer.cpp:
1507         (WebCore::PopupContainer::layoutAndCalculateWidgetRect):
1508
1509 2012-05-29  Andrei Bucur  <abucur@adobe.com>
1510
1511         [CSS Regions]Rename NamedFlow::overflow to NamedFlow::overset
1512         https://bugs.webkit.org/show_bug.cgi?id=87491
1513
1514         This patch updates the CSSOM property name overflow to overset. There are no changes in functionality.
1515         Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
1516
1517         Reviewed by Andreas Kling.
1518
1519         Test: fast/regions/webkit-named-flow-overset.html
1520
1521         * dom/WebKitNamedFlow.cpp:
1522         (WebCore::WebKitNamedFlow::overset):
1523         * dom/WebKitNamedFlow.h:
1524         (WebKitNamedFlow):
1525         * dom/WebKitNamedFlow.idl:
1526         * rendering/RenderFlowThread.cpp:
1527         (WebCore::RenderFlowThread::RenderFlowThread):
1528         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
1529         * rendering/RenderFlowThread.h:
1530
1531 2012-05-29  Andreas Kling  <kling@webkit.org>
1532
1533         Give StylePropertySet a proper mutability flag.
1534         <http://webkit.org/b/87675>
1535
1536         Reviewed by Antti Koivisto.
1537
1538         Add a flag to StylePropertySet that determines whether it's mutable or not. Only objects
1539         constructed from the CSS parser (by way of StylePropertySet::adopt()) are made immutable.
1540         This is clean-up and prep work for implementing a more efficient storage scheme for immutable
1541         StylePropertySets (fixed-size array instead of vector) as the vast majority of them are
1542         unlikely to ever mutate during their lifetime.
1543
1544         Sprinkled ASSERT(isMutable()) all over StylePropertySet to catch any attempts to modify
1545         an immutable object.
1546
1547         Also made properties() const on StyleRule and friends, which brought some additional code
1548         churn along with it.
1549
1550         * css/CSSComputedStyleDeclaration.cpp:
1551         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
1552         * css/CSSFontFaceRule.cpp:
1553         (WebCore::CSSFontFaceRule::style):
1554         (WebCore::CSSFontFaceRule::reattach):
1555         * css/CSSFontFaceSrcValue.cpp:
1556         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
1557         * css/CSSFontFaceSrcValue.h:
1558         (CSSFontFaceSrcValue):
1559         * css/CSSPageRule.cpp:
1560         (WebCore::CSSPageRule::style):
1561         (WebCore::CSSPageRule::reattach):
1562         * css/CSSPrimitiveValue.cpp:
1563         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
1564         * css/CSSPrimitiveValue.h:
1565         (CSSPrimitiveValue):
1566         * css/CSSReflectValue.cpp:
1567         (WebCore::CSSReflectValue::addSubresourceStyleURLs):
1568         * css/CSSReflectValue.h:
1569         (CSSReflectValue):
1570         * css/CSSStyleRule.cpp:
1571         (WebCore::CSSStyleRule::style):
1572         (WebCore::CSSStyleRule::reattach):
1573         * css/CSSValue.cpp:
1574         (WebCore::CSSValue::addSubresourceStyleURLs):
1575         * css/CSSValue.h:
1576         (CSSValue):
1577         * css/CSSValueList.cpp:
1578         (WebCore::CSSValueList::addSubresourceStyleURLs):
1579         * css/CSSValueList.h:
1580         (CSSValueList):
1581         * css/StylePropertySet.cpp:
1582         (WebCore::StylePropertySet::StylePropertySet):
1583         (WebCore::StylePropertySet::setCSSParserMode):
1584         (WebCore):
1585         (WebCore::StylePropertySet::copyPropertiesFrom):
1586         (WebCore::StylePropertySet::removeShorthandProperty):
1587         (WebCore::StylePropertySet::removeProperty):
1588         (WebCore::StylePropertySet::setProperty):
1589         (WebCore::StylePropertySet::parseDeclaration):
1590         (WebCore::StylePropertySet::addParsedProperties):
1591         (WebCore::StylePropertySet::addParsedProperty):
1592         (WebCore::StylePropertySet::merge):
1593         (WebCore::StylePropertySet::addSubresourceStyleURLs):
1594         (WebCore::StylePropertySet::removePropertiesInSet):
1595         (WebCore::StylePropertySet::findPropertyWithId):
1596         (WebCore::StylePropertySet::removeEquivalentProperties):
1597         (WebCore::StylePropertySet::copyPropertiesInSet):
1598         * css/StylePropertySet.h:
1599         (WebCore::StylePropertySet::adopt):
1600         (WebCore::StylePropertySet::adoptMutable):
1601         (StylePropertySet):
1602         (WebCore::StylePropertySet::isMutable):
1603         * css/StyleResolver.cpp:
1604         (WebCore::StyleResolver::addMatchedProperties):
1605         (WebCore::StyleResolver::collectMatchingRulesForList):
1606         * css/StyleResolver.h:
1607         (StyleResolver):
1608         * css/StyleRule.cpp:
1609         (WebCore::StyleRule::mutableProperties):
1610         (WebCore):
1611         (WebCore::StyleRulePage::mutableProperties):
1612         (WebCore::StyleRuleFontFace::mutableProperties):
1613         * css/StyleRule.h:
1614         (WebCore::StyleRule::properties):
1615         (StyleRule):
1616         (WebCore::StyleRuleFontFace::properties):
1617         (StyleRuleFontFace):
1618         (WebCore::StyleRulePage::properties):
1619         (StyleRulePage):
1620         * dom/ElementAttributeData.cpp:
1621         (WebCore::ElementAttributeData::ensureInlineStyle):
1622         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
1623         * editing/EditingStyle.cpp:
1624         (WebCore::styleFromMatchedRulesForElement):
1625         * svg/SVGFontFaceElement.cpp:
1626         (WebCore::SVGFontFaceElement::parseAttribute):
1627         (WebCore::SVGFontFaceElement::rebuildFontFace):
1628         (WebCore::SVGFontFaceElement::removedFrom):
1629
1630 2012-05-29  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1631
1632         [EFL] Refactoring. Get rid of unnecessary singleCharacterString() function
1633         https://bugs.webkit.org/show_bug.cgi?id=87654
1634
1635         Reviewed by Csaba Osztrogonác.
1636
1637         Evas key events already provide key string, so no practical need for singleCharacterString() 
1638         evaluating the event string from keyname.
1639         Modified code related functionality is already covered with fast/events and fast/forms tests.
1640
1641         * platform/efl/EflKeyboardUtilities.cpp:
1642         * platform/efl/PlatformKeyboardEventEfl.cpp:
1643         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1644
1645 2012-05-29  Ilya Tikhonovsky  <loislo@chromium.org>
1646
1647         Unreviewed: Web Inspector: single line fix after r118742.
1648
1649         * inspector/front-end/HeapSnapshotView.js:
1650         (WebInspector.HeapProfileHeader.prototype.saveToFile):
1651
1652 2012-05-29  Kentaro Hara  <haraken@chromium.org>
1653
1654         Remove m_rootNode and m_selectorChecker from SelectorQuery.h
1655         https://bugs.webkit.org/show_bug.cgi?id=87650
1656
1657         Reviewed by Antti Koivisto.
1658
1659         To avoid parsing CSS selectors every time, I am planning to cache
1660         SelectorQuery objects into a HashMap, which will be defined in
1661         Node::querySelector(). To make the size of SelectorQuery small,
1662         this patch removes m_rootNode and m_selectorChecker from SelectorQuery.h.
1663
1664         Tests: fast/dom/SelectorAPI/*. No change in test results.
1665
1666         * dom/Node.cpp:
1667         (WebCore::Node::querySelector):
1668         (WebCore::Node::querySelectorAll):
1669         * dom/SelectorQuery.cpp:
1670         (WebCore::SelectorQuery::SelectorQuery):
1671         (WebCore):
1672         (WebCore::SelectorQuery::queryAll):
1673         (WebCore::SelectorQuery::queryFirst):
1674         * dom/SelectorQuery.h:
1675         (SelectorQuery):
1676
1677 2012-05-29  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1678
1679         Web Inspector: Tabbed Settings Screen
1680         https://bugs.webkit.org/show_bug.cgi?id=87497
1681
1682         Reviewed by Yury Semikhatsky.
1683
1684         Combine settings screen and shortcuts screen
1685         to a single tabbed settings screen.
1686         This will make shortcuts screen more discoverable.
1687
1688         * inspector/front-end/HelpScreen.js:
1689         (WebInspector.HelpScreen): Make titled tamplate optional.
1690         (WebInspector.HelpScreen.prototype._createCloseButton): Extract method.
1691         * inspector/front-end/SettingsScreen.js:
1692         (WebInspector.SettingsScreen): Split initialization and UI construction.
1693         (WebInspector.SettingsScreen.prototype._createSettingsTabView.appendSection):
1694         (WebInspector.SettingsScreen.prototype._createSettingsTabView):
1695         Extract GUI construction method.
1696         (WebInspector.SettingsScreen.prototype._getOrCreateTabbedPane):
1697         Make GUI construction lazy.
1698         (WebInspector.SettingsScreen.prototype.selectTab):
1699         Add method for external tab swithching.
1700         (WebInspector.SettingsScreen.prototype.wasShown):
1701         Make GUI construction lazy.
1702         (WebInspector.SettingsScreenTabbedPane):
1703         Extend class to access protected member.
1704         (WebInspector.SettingsController.prototype._buttonClicked):
1705         Change "showSettingsScreen" visibility and parameters.
1706         (WebInspector.SettingsController.prototype._onHideSettingsScreen):
1707         Preserve settings screen state.
1708         (WebInspector.SettingsController.prototype.showSettingsScreen):
1709         Change method visibility and parameters.
1710         * inspector/front-end/ShortcutsScreen.js:
1711         (WebInspector.ShortcutsScreen): Remove inheritance from HelpScreen.
1712         (WebInspector.ShortcutsScreen.prototype._createShortcutsTabView):
1713         Refactoring of GUI construction.
1714         (WebInspector.ShortcutsSection.prototype.renderSection):
1715         Ditto.
1716         * inspector/front-end/helpScreen.css:
1717         (.help-window-main ::-webkit-scrollbar): Rebind scrollbar settings.
1718         (.help-window-main ::-webkit-resizer): Ditto.
1719         (.help-window-main ::-webkit-scrollbar-thumb:vertical): Ditto.
1720         (.help-window-main ::-webkit-scrollbar-thumb:vertical:active): Ditto.
1721         (.help-window-main ::-webkit-scrollbar-track:vertical): Ditto.
1722         (body:not(.compact) #settings-screen .tabbed-pane): Fix container height.
1723         (#settings-screen .tabbed-pane-header): Ditto.
1724         (#settings-screen .tabbed-pane-header-tabs): Adjust spacing.
1725         (#settings-screen .tabbed-pane-header-tab): Adjust style.
1726         (#settings-screen .help-close-button): Adjust spacing.
1727         (#settings-screen .tabbed-pane-header-tab.selected):
1728         Erase line below active tab.
1729         (#settings-screen .tabbed-pane-content): Adjust spacing.
1730         (#settings-screen .help-content): Ditto.
1731         * inspector/front-end/inspector.js:
1732         (WebInspector.documentKeyDown): Use Settings screen to show shortcuts.
1733
1734 2012-05-29  Ilya Tikhonovsky  <loislo@chromium.org>
1735
1736         Web Inspector: REGRESSION: load heap snapshot doesn't work.
1737         https://bugs.webkit.org/show_bug.cgi?id=87642
1738
1739         HeapSnapshotReceiver interface was introduced.
1740         It declares the API for HeapSnapshotLoader, HeapSnapshotLoaderProxy and HeapSnapshotSaveToFileReceiver.
1741         The HeapProfileHeader was refactored and tests were added.
1742
1743         Reviewed by Yury Semikhatsky.
1744
1745         * inspector/front-end/HeapSnapshotLoader.js:
1746         (WebInspector.HeapSnapshotLoader):
1747         (WebInspector.HeapSnapshotLoader.prototype.startLoading):
1748         (WebInspector.HeapSnapshotLoader.prototype.dispose):
1749         (WebInspector.HeapSnapshotLoader.prototype._reset):
1750         (WebInspector.HeapSnapshotLoader.prototype.finishLoading):
1751         * inspector/front-end/HeapSnapshotProxy.js:
1752         (WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls):
1753         (WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading):
1754         (WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk):
1755         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
1756         * inspector/front-end/HeapSnapshotView.js:
1757         (WebInspector.HeapSnapshotReceiver):
1758         (WebInspector.HeapSnapshotReceiver.prototype.startLoading):
1759         (WebInspector.HeapSnapshotReceiver.prototype.pushJSONChunk):
1760         (WebInspector.HeapSnapshotReceiver.prototype.finishLoading):
1761         (WebInspector.HeapSnapshotReceiver.prototype.dispose):
1762         (WebInspector.HeapProfileHeader):
1763         (WebInspector.HeapProfileHeader.prototype.load):
1764         (WebInspector.HeapProfileHeader.prototype._setupWorker):
1765         (WebInspector.HeapProfileHeader.prototype.dispose):
1766         (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate):
1767         (WebInspector.HeapProfileHeader.prototype.pushJSONChunk):
1768         (WebInspector.HeapProfileHeader.prototype._parsed):
1769         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
1770         (WebInspector.HeapProfileHeader.prototype.saveToFile):
1771         (WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad):
1772         (WebInspector.HeapProfileHeader.prototype.loadFromFile):
1773         (WebInspector.HeapProfileHeader.prototype._loadNextChunk):
1774         (WebInspector.HeapProfileHeader.prototype._nextChunkLoaded):
1775         (WebInspector.HeapProfileHeader.prototype._createFileReader):
1776         (WebInspector.HeapSnapshotSaveToFileReceiver):
1777         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.startLoading):
1778         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.pushJSONChunk):
1779         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.finishLoading):
1780         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.dispose):
1781         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype._startSavingSnapshot):
1782         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype._saveStatusUpdate):
1783         * inspector/front-end/ProfilesPanel.js:
1784         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement.onChange):
1785         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement):
1786         (WebInspector.ProfilesPanel.prototype._loadFromFile):
1787
1788 2012-05-29  Eric Seidel  <eric@webkit.org>
1789
1790         Add HTMLIFrameElement.seamless property accessor now that seamless is enabled and works
1791         https://bugs.webkit.org/show_bug.cgi?id=87708
1792
1793         Reviewed by Adam Barth.
1794
1795         Lots of tests in fast/frames/seamless cover this property.
1796
1797         * html/HTMLIFrameElement.idl:
1798
1799 2012-05-29  Kentaro Hara  <haraken@chromium.org>
1800
1801         [Performance] Optimize querySelector() and querySelectorAll() by removing
1802         redundant dummy style sheet creations
1803         https://bugs.webkit.org/show_bug.cgi?id=87627
1804
1805         Reviewed by Antti Koivisto.
1806
1807         This patch improves performance of querySelector("#id") by 4.2% ~ 17.7%
1808         in Safari and Chromium.
1809
1810         Performance tests: https://bugs.webkit.org/attachment.cgi?id=144288
1811
1812         The performance test results in my desktop:
1813
1814         [Safari/Mac]
1815         document.querySelector("#headId") :               13.60 ms =>  12.40 ms  +9.68%
1816         document.querySelector("#duplicatedId") :         14.80 ms =>  14.20 ms  +4.23%
1817         document.querySelector("#tailId") :               13.80 ms =>  12.20 ms  +13.11%
1818         document.querySelectorAll("#headId") :            17.80 ms =>  14.60 ms  +21.92%
1819         document.querySelectorAll("#duplicatedId") :     513.80 ms => 471.60 ms  +8.95%
1820         document.querySelectorAll("#tailId") :            19.20 ms =>  16.40 ms  +17.07%
1821         document.querySelector("h1") :                    14.40 ms =>  13.60 ms  +5.88%
1822         document.querySelector("h2") :                    14.80 ms =>  13.80 ms  +7.25%
1823         document.querySelector("h3") :                   312.00 ms => 306.60 ms  +1.76%
1824         document.querySelectorAll("h1") :                322.00 ms => 314.60 ms  +2.35%
1825         document.querySelectorAll("h2") :                481.00 ms => 420.60 ms  +14.36%
1826         document.querySelectorAll("h3") :                326.80 ms => 315.80 ms  +3.48%
1827         document.querySelector(".headClass") :            16.20 ms =>  15.40 ms  +5.19%
1828         document.querySelector(".duplicatedClass") :      17.00 ms =>  15.40 ms  +10.39%
1829         document.querySelector(".tailClass") :           369.60 ms => 362.60 ms  +1.93%
1830         document.querySelectorAll(".headClass") :        388.20 ms => 377.60 ms  +2.81%
1831         document.querySelectorAll(".duplicatedClass") :  605.00 ms => 581.20 ms  +4.09%
1832         document.querySelectorAll(".tailClass") :        401.60 ms => 391.40 ms  +2.61%
1833
1834         [Chromium/Linux]
1835         ocument.querySelector("#headId") :                16.00 ms =>  13.60 ms  +17.65%
1836         document.querySelector("#duplicatedId") :         16.80 ms =>  15.40 ms  +9.09%
1837         document.querySelector("#tailId") :               16.00 ms =>  13.60 ms  +17.65%
1838         document.querySelectorAll("#headId") :            29.00 ms =>  25.00 ms  +16.00%
1839         document.querySelectorAll("#duplicatedId") :     561.40 ms => 505.20 ms  +11.12%
1840         document.querySelectorAll("#tailId") :            34.00 ms =>  26.80 ms  +26.87%
1841         document.querySelector("h1") :                    18.20 ms =>  15.80 ms  +15.19%
1842         document.querySelector("h2") :                    19.00 ms =>  16.60 ms  +14.46%
1843         document.querySelector("h3") :                   280.40 ms => 274.00 ms  +2.34%
1844         document.querySelectorAll("h1") :                300.20 ms => 365.20 ms  -17.80%
1845         document.querySelectorAll("h2") :                487.60 ms => 504.20 ms  -3.29%
1846         document.querySelectorAll("h3") :                349.40 ms => 324.00 ms  +7.84%
1847         document.querySelector(".headClass") :            18.40 ms =>  16.00 ms  +15.00%
1848         document.querySelector(".duplicatedClass") :      19.40 ms =>  16.20 ms  +19.75%
1849         document.querySelector(".tailClass") :           349.60 ms => 345.40 ms  +1.22%
1850         document.querySelectorAll(".headClass") :        382.80 ms => 378.20 ms  +1.22%
1851         document.querySelectorAll(".duplicatedClass") :  550.80 ms => 574.20 ms  -4.08%
1852         document.querySelectorAll(".tailClass") :        381.00 ms => 387.00 ms  -1.55%
1853
1854         I've found that StyleSheetInternal::create() in CSSParser::parseSelector()
1855         is a bottleneck of querySelector() and querySelectorAll().
1856
1857         void CSSParser::parseSelector(const String& string, CSSSelectorList& selectorList)
1858         {
1859             RefPtr<StyleSheetInternal> dummyStyleSheet = StyleSheetInternal::create();
1860             setStyleSheet(dummyStyleSheet.get());
1861             ...;
1862         }
1863
1864         This patch removes a dummy style sheet. Previously the dummy style sheet
1865         was needed to avoid null checks of m_styleSheet in CSSGrammer.y.
1866         This patch fixes CSSGrammer.y so that it works fine with a null m_styleSheet.
1867
1868         Tests: fast/dom/SelectorAPI/*. No change in the test results.
1869
1870         * css/CSSGrammar.y:
1871         * css/CSSParser.cpp:
1872         (WebCore::CSSParser::parseSelector):
1873
1874 2012-05-29  Nikolas Zimmermann  <nzimmermann@rim.com>
1875
1876         SVGViewSpec DOM bindings aka SVGSVGElement.currentView is unimplemented
1877         https://bugs.webkit.org/show_bug.cgi?id=15495
1878
1879         Reviewed by Rob Buis.
1880
1881         Finish SVGViewSpec implementation and expose it to the Web. Numerous smaller bugs are fixed:
1882         - SVGViewSpec and all of its contents should be read-only. Enforce that and test it.
1883           Add a new enum to SVGPropertyInfo so that each SVGAnimatedProperty knows if its content is supposed to be read-write or read-only.
1884         - Make the 'transform' attribute of SVGViewSpec exposable by switching to a SVGTransformListProperty - it can now be accessed from JS.
1885         - Assure that following XXXString methods are in sync with the corresponding SVG DOM interfaces
1886             readonly attribute DOMString viewBoxString;
1887             readonly attribute DOMString preserveAspectRatioString;
1888             readonly attribute DOMString transformString;
1889             readonly attribute DOMString viewTargetString;
1890         - Cleanup code in svg/properties that was intended to handle SVGViewSpec. Turns out lot of the complexity was unncessary, and can be removed.
1891         - Move SVGFitToViewBox to the same pattern SVGZoomAndPan uses since two days, that avoids any virtual function calls for attribute parsing.
1892         - Create/expose ObjectiveC/JS bindings for SVGViewSpec.
1893         - Enable SVGViewSpec constructor.
1894
1895         Tests: svg/custom/linking-a-03-b-all-expected.svg
1896                svg/dom/SVGViewSpec-defaults.html
1897                svg/dom/SVGViewSpec.html
1898                svg/dom/complex-svgView-specification.html
1899                svg/dom/viewspec-parser.html
1900
1901         * CMakeLists.txt:
1902         * DerivedSources.cpp:
1903         * DerivedSources.make:
1904         * DerivedSources.pri:
1905         * GNUmakefile.list.am:
1906         * Target.pri:
1907         * WebCore.gyp/WebCore.gyp:
1908         * WebCore.gypi:
1909         * WebCore.order:
1910         * WebCore.vcproj/WebCore.vcproj:
1911         * WebCore.xcodeproj/project.pbxproj:
1912         * bindings/js/JSSVGLengthCustom.cpp:
1913         (WebCore::JSSVGLength::setValue):
1914         (WebCore::JSSVGLength::convertToSpecifiedUnits):
1915         * bindings/objc/DOMSVG.h:
1916         * bindings/scripts/CodeGeneratorJS.pm:
1917         (GenerateImplementation):
1918         (NativeToJSValue):
1919         * bindings/scripts/CodeGeneratorObjC.pm:
1920         (GenerateImplementation):
1921         * bindings/scripts/CodeGeneratorV8.pm:
1922         (GenerateNormalAttrGetter):
1923         (GenerateNormalAttrSetter):
1924         (GenerateFunctionCallback):
1925         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1926         (WebCore::V8SVGLength::valueAccessorSetter):
1927         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
1928         * page/DOMWindow.idl:
1929         * rendering/svg/RenderSVGResourcePattern.cpp:
1930         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
1931         * svg/SVGFitToViewBox.cpp:
1932         * svg/SVGFitToViewBox.h:
1933         (SVGFitToViewBox):
1934         (WebCore::SVGFitToViewBox::parseAttribute):
1935         * svg/SVGMarkerElement.cpp:
1936         (WebCore::SVGMarkerElement::orientTypePropertyInfo):
1937         (WebCore::SVGMarkerElement::parseAttribute):
1938         (WebCore::SVGMarkerElement::synchronizeOrientType):
1939         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
1940         * svg/SVGPathElement.cpp:
1941         (WebCore::SVGPathElement::dPropertyInfo):
1942         (WebCore::SVGPathElement::svgAttributeChanged):
1943         (WebCore::SVGPathElement::pathByteStream):
1944         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1945         (WebCore::SVGPathElement::synchronizeD):
1946         * svg/SVGPathSegWithContext.h:
1947         (WebCore::SVGPathSegWithContext::animatedProperty):
1948         * svg/SVGPatternElement.cpp:
1949         (WebCore::SVGPatternElement::parseAttribute):
1950         * svg/SVGPolyElement.cpp:
1951         (WebCore::SVGPolyElement::pointsPropertyInfo):
1952         (WebCore::SVGPolyElement::parseAttribute):
1953         (WebCore::SVGPolyElement::synchronizePoints):
1954         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
1955         * svg/SVGRect.h:
1956         * svg/SVGSVGElement.cpp:
1957         (WebCore::SVGSVGElement::~SVGSVGElement):
1958         (WebCore::SVGSVGElement::currentView):
1959         (WebCore::SVGSVGElement::parseAttribute):
1960         (WebCore::SVGSVGElement::currentViewBoxRect):
1961         (WebCore::SVGSVGElement::viewBoxToViewTransform):
1962         (WebCore::SVGSVGElement::setupInitialView):
1963         (WebCore::SVGSVGElement::inheritViewAttributes):
1964         * svg/SVGSVGElement.h:
1965         (SVGSVGElement):
1966         * svg/SVGSVGElement.idl:
1967         * svg/SVGSymbolElement.cpp:
1968         (WebCore::SVGSymbolElement::parseAttribute):
1969         * svg/SVGTests.cpp:
1970         (WebCore::SVGTests::requiredFeaturesPropertyInfo):
1971         (WebCore::SVGTests::requiredExtensionsPropertyInfo):
1972         (WebCore::SVGTests::systemLanguagePropertyInfo):
1973         (WebCore::SVGTests::synchronizeRequiredFeatures):
1974         (WebCore::SVGTests::synchronizeRequiredExtensions):
1975         (WebCore::SVGTests::synchronizeSystemLanguage):
1976         * svg/SVGTextContentElement.cpp:
1977         (WebCore::SVGTextContentElement::textLengthPropertyInfo):
1978         (WebCore::SVGTextContentElement::synchronizeTextLength):
1979         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
1980         * svg/SVGViewElement.cpp:
1981         (WebCore::SVGViewElement::parseAttribute):
1982         * svg/SVGViewElement.h:
1983         * svg/SVGViewSpec.cpp:
1984         (WebCore::SVGViewSpec::viewBoxPropertyInfo):
1985         (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
1986         (WebCore::SVGViewSpec::transformPropertyInfo):
1987         (WebCore::SVGViewSpec::SVGViewSpec):
1988         (WebCore::SVGViewSpec::viewBoxIdentifier):
1989         (WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
1990         (WebCore::SVGViewSpec::transformIdentifier):
1991         (WebCore::SVGViewSpec::setZoomAndPan):
1992         (WebCore::SVGViewSpec::setTransformString):
1993         (WebCore::SVGViewSpec::transformString):
1994         (WebCore::SVGViewSpec::viewBoxString):
1995         (WebCore::SVGViewSpec::preserveAspectRatioString):
1996         (WebCore::SVGViewSpec::viewTarget):
1997         (WebCore::SVGViewSpec::transform):
1998         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
1999         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
2000         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
2001         (WebCore::SVGViewSpec::reset):
2002         (WebCore::SVGViewSpec::parseViewSpec):
2003         * svg/SVGViewSpec.h:
2004         (WebCore::SVGViewSpec::~SVGViewSpec):
2005         (SVGViewSpec):
2006         (WebCore::SVGViewSpec::create):
2007         (WebCore::SVGViewSpec::setViewTargetString):
2008         (WebCore::SVGViewSpec::setZoomAndPan):
2009         (WebCore::SVGViewSpec::contextElement):
2010         (WebCore::SVGViewSpec::resetContextElement):
2011         (WebCore::SVGViewSpec::transformBaseValue):
2012         (WebCore::SVGViewSpec::viewBoxAnimated):
2013         (WebCore::SVGViewSpec::viewBox):
2014         (WebCore::SVGViewSpec::viewBoxBaseValue):
2015         (WebCore::SVGViewSpec::setViewBoxBaseValue):
2016         (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
2017         (WebCore::SVGViewSpec::preserveAspectRatio):
2018         (WebCore::SVGViewSpec::preserveAspectRatioBaseValue):
2019         (WebCore::SVGViewSpec::setPreserveAspectRatioBaseValue):
2020         * svg/SVGViewSpec.idl:
2021         * svg/properties/SVGAnimatedProperty.h:
2022         (WebCore::SVGAnimatedProperty::isReadOnly):
2023         (WebCore::SVGAnimatedProperty::setIsReadOnly):
2024         (SVGAnimatedProperty):
2025         (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
2026         (WebCore::SVGAnimatedProperty::lookupWrapper):
2027         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
2028         * svg/properties/SVGAnimatedPropertyMacros.h:
2029         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
2030         (SVGSynchronizableAnimatedProperty):
2031         * svg/properties/SVGAnimatedPropertySynchronizer.h: Removed.
2032         * svg/properties/SVGAttributeToPropertyMap.h:
2033         * svg/properties/SVGListProperty.h:
2034         * svg/properties/SVGListPropertyTearOff.h:
2035         (SVGListPropertyTearOff):
2036         (WebCore::SVGListPropertyTearOff::isReadOnly):
2037         * svg/properties/SVGPathSegListPropertyTearOff.h:
2038         (SVGPathSegListPropertyTearOff):
2039         (WebCore::SVGPathSegListPropertyTearOff::isReadOnly):
2040         * svg/properties/SVGProperty.h:
2041         (SVGProperty):
2042         * svg/properties/SVGPropertyInfo.h:
2043         (WebCore::SVGPropertyInfo::SVGPropertyInfo):
2044         (SVGPropertyInfo):
2045         * svg/properties/SVGPropertyTearOff.h:
2046         (WebCore::SVGPropertyTearOff::isReadOnly):
2047         * svg/properties/SVGStaticListPropertyTearOff.h:
2048         (SVGStaticListPropertyTearOff):
2049         (WebCore::SVGStaticListPropertyTearOff::isReadOnly):
2050
2051 2012-05-29  Kent Tamura  <tkent@chromium.org>
2052
2053         REGRESSION (r90971): the cursor is painted “behind” the placeholder text
2054         https://bugs.webkit.org/show_bug.cgi?id=87155
2055
2056         Reviewed by Hajime Morita.
2057
2058         This regression happened only on platforms on which
2059         RenderTheme::shouldShowPlaceholderWhenFocused() returns true.
2060
2061         Because the order of renderers for the editable node and the placeholder
2062         node was:
2063          - A renderer for the editable node
2064          - A renderer for the placeholder node,
2065         The text caret was painted, then the palceholder was painted.
2066
2067         We should not use z-index in the built-in shadow nodes. So the patch
2068         fixes this bug by re-ordering these renderers.
2069
2070         Tests: fast/forms/input-placeholder-paint-order-2.html
2071                fast/forms/input-placeholder-paint-order.html
2072                fast/forms/textarea/textarea-placeholder-paint-order-2.html
2073                fast/forms/textarea/textarea-placeholder-paint-order.html
2074
2075         * html/HTMLTextFormControlElement.cpp:
2076         (WebCore::HTMLTextFormControlElement::fixPlaceholderRenderer):
2077         Added. Reorder the order of renderers so that the placeholder renderer
2078         precedes the inner text renderer.
2079         * html/HTMLTextFormControlElement.h: Add fixPlaceholderRenderer() declaration.
2080
2081         * html/HTMLTextAreaElement.cpp:
2082         (WebCore::HTMLTextAreaElement::attach): Calls fixPlaceholderRenderer().
2083         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
2084         ditto. Also, use innerTextElement() to improvde code readability.
2085         * html/HTMLTextAreaElement.h:
2086         (HTMLTextAreaElement): Overrides attach().
2087
2088         * html/TextFieldInputType.cpp:
2089         (WebCore::TextFieldInputType::updatePlaceholderText):
2090         Calls fixPlaceholderRenderer().
2091         (WebCore::TextFieldInputType::attach): ditto.
2092         * html/TextFieldInputType.h:
2093         (TextFieldInputType): Overrides attach().
2094
2095 2012-05-28  Kentaro Hara  <haraken@chromium.org>
2096
2097         [V8] Implement V8Binding::v8Null(isolate) and use it in CodeGeneratorV8.pm
2098         https://bugs.webkit.org/show_bug.cgi?id=87692
2099
2100         Reviewed by Adam Barth.
2101
2102         Since v8::Null(isolate) crashes if we pass a NULL isolate, we are planning
2103         to pass Isolate to v8::Null() in the following steps:
2104
2105         [1] Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check.
2106         If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise,
2107         v8Null(isolate) calls v8::Null(isolate).
2108
2109         [2] In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a non-optional
2110         'isolate' parameter. (e.g. void foo(..., Isolate* isolate) { v8::Null(); } )
2111
2112         [3] In V8 bindings, we replace v8::Null() with v8Null(isolate) for an optional
2113         'isolate' parameter. (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } )
2114
2115         This bug fixes [1] by implementing V8Binding::v8Null(isolate). Also this patch uses
2116         V8Binding::v8Null(isolate) in bindings/v8/*.{h,cpp}.
2117
2118         No tests. No behavior change.
2119
2120         * bindings/scripts/CodeGeneratorV8.pm:
2121         (GenerateHeader):
2122         (NativeToJSValue):
2123         * bindings/scripts/test/V8/V8Float64Array.h:
2124         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2125         (WebCore::toV8):
2126         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2127         (WebCore::toV8):
2128         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2129         (WebCore::toV8):
2130         * bindings/scripts/test/V8/V8TestEventTarget.h:
2131         (WebCore::toV8):
2132         * bindings/scripts/test/V8/V8TestException.h:
2133         (WebCore::toV8):
2134         * bindings/scripts/test/V8/V8TestInterface.h:
2135         (WebCore::toV8):
2136         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2137         (WebCore::toV8):
2138         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2139         (WebCore::toV8):
2140         * bindings/scripts/test/V8/V8TestNode.h:
2141         (WebCore::toV8):
2142         * bindings/scripts/test/V8/V8TestObj.h:
2143         (WebCore::toV8):
2144         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2145         (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter):
2146         (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter):
2147         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2148         (WebCore::toV8):
2149         * bindings/v8/V8Binding.h:
2150         (WebCore::v8Null):
2151         (WebCore):
2152         (WebCore::v8DateOrNull):
2153         * bindings/v8/V8DOMWrapper.cpp:
2154         * bindings/v8/V8DOMWrapper.h:
2155         (WebCore):
2156
2157 2012-05-28  Kent Tamura  <tkent@chromium.org>
2158
2159         Fix a crash in HTMLFormControlElement::disabled().
2160         https://bugs.webkit.org/show_bug.cgi?id=86534
2161
2162         Reviewed by Ryosuke Niwa.
2163
2164         Stop to hold pointers of fildset and legend elements. We can avoid it by
2165         holding ancestor's disabled state.
2166
2167         The ancesotr's disabled state should be invalidated when
2168          - fieldset's disabled value is changed.
2169          - fieldset's children is updated because a legend position might be changed.
2170          - A form control is attached to or detached from a tree.
2171
2172         No new tests. It's almost impossible to make a reliable test.
2173
2174         * html/HTMLFieldSetElement.cpp:
2175         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
2176         Added. Invalidate disabled state of form controls under the specified node.
2177         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
2178         Uses invalidateDisabledStateUnder().
2179         (WebCore::HTMLFieldSetElement::childrenChanged):
2180         Added new override function. We need invalidate disabled state of form
2181         controls under legend elements.
2182
2183         * html/HTMLFieldSetElement.h:
2184         (HTMLFieldSetElement): Add invalidateDisabledStateUnder() and childrenChanged().
2185
2186         * html/HTMLFormControlElement.cpp:
2187         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2188         Remove initialization of the removed data members.
2189         Initialize m_ancestorDisabledState.
2190         (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
2191         Update m_ancestorDisabledState. It should be
2192         AncestorDisabledStateDisabled if the control is under a disabled
2193         fieldset and not under the first legend child of the disabled filedset.
2194         (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged):
2195         Invalidate m_ancestorDisabledState.
2196         (WebCore::HTMLFormControlElement::insertedInto): ditto.
2197         (WebCore::HTMLFormControlElement::removedFrom): ditto.
2198         (WebCore::HTMLFormControlElement::disabled):
2199         Calls updateAncestorDisabledState() if needed.
2200         (WebCore::HTMLFormControlElement::recalcWillValidate):
2201         Remove unnecessary check for m_legendAncestor.
2202
2203         * html/HTMLFormControlElement.h:
2204         (HTMLFormControlElement):
2205         - Rename updateFieldSetAndLegendAncestor() to updateAncestorDisabledState(), and make it private.
2206         - Remove m_fieldSetAncestor, m_legendAncestor, and m_fieldSetAncestorValid.
2207         - Add m_ancestorDisabledState.
2208
2209 2012-05-28  Takashi Toyoshima  <toyoshim@chromium.org>
2210
2211         [WebSocket] Receiving reserved close codes, 1005, 1006, and 1015 must appear as code=1006 and wasClean=false
2212         https://bugs.webkit.org/show_bug.cgi?id=87084
2213
2214         Reviewed by Kent Tamura.
2215
2216         Status codes 1005, 1006, and 1015 are forbidden to be sent in actual close frames.
2217         If a client received these frames, the client should handle them as broken.
2218         Close frames containing invalid body size are the same as these forbidden cases.
2219         Update close-code-and-reason tests to verify this patch.
2220
2221         * Modules/websockets/WebSocket.cpp: Handle AbnormalClosure as wasClean == false
2222         (WebCore::WebSocket::didClose):
2223         * Modules/websockets/WebSocketChannel.cpp: Handle close frames' status code carefully
2224         (WebCore::WebSocketChannel::processFrame):
2225         * Modules/websockets/WebSocketChannel.h: Update on newly defined close event codes
2226
2227 2012-05-28  Kentaro Hara  <haraken@chromium.org>
2228
2229         [V8] Avoid passing NULL to an 'isolate' parameter
2230         https://bugs.webkit.org/show_bug.cgi?id=87689
2231
2232         Reviewed by Adam Barth.
2233
2234         v8::Null(isolate) crashes if we pass a NULL isolate.
2235         Thus we are planning to replace v8::Null()s in a following way:
2236
2237         - Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check.
2238         If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise,
2239         v8Null(isolate) calls v8::Null(isolate).
2240
2241         - In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a
2242         non-optional 'isolate' parameter.
2243         (e.g. void foo(..., Isolate* isolate) { v8::Null(); } )
2244
2245         - In V8 bindings, we replace v8::Null() with v8Null(isolate) for an
2246         optional 'isolate' parameter.
2247         (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } )
2248
2249         However, currently we cannot do the replacement mechanically, since some code
2250         pass NULL to a non-optional 'isolate' parameter. In other words, currently
2251         "non-optional" does not guarantee that 'isolate' is not NULL.
2252
2253         This patch removes all the code that passes NULL to a non-optional 'isolate'
2254         parameter. This will enable us to achieve the replacement mechanically.
2255
2256         No tests. No behavior change.
2257
2258         * bindings/scripts/CodeGeneratorV8.pm:
2259         (GenerateCallbackImplementation):
2260         (NativeToJSValue):
2261         * bindings/scripts/test/V8/V8TestCallback.cpp:
2262         (WebCore::V8TestCallback::callbackWithClass1Param):
2263         (WebCore::V8TestCallback::callbackWithClass2Param):
2264         (WebCore::V8TestCallback::callbackWithStringList):
2265         (WebCore::V8TestCallback::callbackRequiresThisToPass):
2266         * bindings/scripts/test/V8/V8TestObj.cpp:
2267         (WebCore::V8TestObj::installPerContextProperties):
2268         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
2269         (WebCore::V8SQLStatementErrorCallback::handleEvent):
2270         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
2271         (WebCore::V8MutationCallback::handleEvent):
2272
2273 2012-05-28  Kent Tamura  <tkent@chromium.org>
2274
2275         Form controls in <fieldset disabled> should not be validated.
2276         https://bugs.webkit.org/show_bug.cgi?id=87381
2277
2278         Reviewed by Hajime Morita.
2279
2280         We need to use disabeld() instead of m_disabled to calculate
2281         willValidate property. Also, we need to update willValidate if
2282         necessary.
2283
2284         Test: fast/forms/fieldset/validation-in-fieldset.html
2285
2286         * html/HTMLFieldSetElement.cpp:
2287         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
2288          - Do not traverse this.
2289          - Calls ancestorDisabledStateWasChanged() instead of
2290           setNeedsStyleRecalc() because we'd like to do additional tasks.
2291         * html/HTMLFormControlElement.cpp:
2292         (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged):
2293         Added. Just calls disabledAttributeChanged().
2294         (WebCore::HTMLFormControlElement::parseAttribute):
2295         Do not call setNeedsWillValidateCheck() whenever an attribute is updated.
2296         It should be called only if disabled or readonly attribute is updated.
2297         (WebCore::HTMLFormControlElement::disabledAttributeChanged):
2298         Add setNeedsWillValidateCheck(). It was moved from parseAttribute().
2299         (WebCore::HTMLFormControlElement::insertedInto):
2300         Invalidate ancestor information.
2301         (WebCore::HTMLFormControlElement::recalcWillValidate):
2302         Use disabled() instead of m_disabled. disabled() takes care of
2303         ancestor's disabled state.
2304         * html/HTMLFormControlElement.h:
2305         (HTMLFormControlElement):
2306
2307 2012-05-28  Rakesh KN  <rakesh.kn@motorola.com>
2308
2309         [Forms] HTMLFieldSetElement.idl doesn't have elements attribute.
2310         https://bugs.webkit.org/show_bug.cgi?id=80110
2311
2312         Reviewed by Kent Tamura.
2313
2314         Implemented elements attribute for HTMLFieldSetElement. This is spec'ed at
2315         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-fieldset-elements
2316
2317         Tests: fast/forms/fieldset/fieldset-elements.html
2318                fast/forms/fieldset/fieldset-form-collection-radionode-list.html
2319
2320         * dom/Node.cpp:
2321         (WebCore::Node::radioNodeList):
2322         Extended ASSERT to assert if not HTMLFieldSetElement or HTMLFormElement.
2323         * html/HTMLFieldSetElement.cpp:
2324         (WebCore::HTMLFieldSetElement::elements):
2325         Elements attribute implementation.
2326         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
2327         Update the formcontrol elements collections if dom tree got modified.
2328         (WebCore::HTMLFieldSetElement::associatedElements):
2329         FormControl elements collection accessor.
2330         (WebCore::HTMLFieldSetElement::length):
2331         Number of elements in the fieldset group.
2332         * html/HTMLFieldSetElement.h:
2333         Added elements collection member and form control collection members.
2334         * html/HTMLFieldSetElement.idl:
2335         Added elements attribute.
2336         * html/HTMLFormCollection.cpp:
2337         (WebCore::HTMLFormCollection::formControlElements):
2338         Added support for HTMLFieldSetElement, based on base element type gets its associated elements.
2339         (WebCore::HTMLFormCollection::numberOfFormControlElements): Ditto
2340         (WebCore::HTMLFormCollection::getNamedFormItem): Process image elements only for form element.
2341         (WebCore::HTMLFormCollection::updateNameCache): Ditto
2342         * html/RadioNodeList.cpp:
2343         (WebCore::RadioNodeList::RadioNodeList):
2344         DynamicSubTree root element is decided based on the type whether base element is form or fieldset element.
2345         Renamed m_formElement to m_baseElement.
2346         (WebCore::RadioNodeList::~RadioNodeList):
2347         Renamed m_formElement to m_baseElement.
2348         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
2349         Form element specific changes moved under form element check.
2350         * html/RadioNodeList.h:
2351         (WebCore::RadioNodeList::create):
2352         (RadioNodeList):
2353         Renamed m_formElement to m_baseElement.
2354
2355 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2356
2357         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
2358         https://bugs.webkit.org/show_bug.cgi?id=80135
2359
2360         Reviewed by Rob Buis.
2361
2362         RIM PR: 145660
2363         Fixed a regression introduced by r111810, we should cancel the new
2364         request when user press cancel button in http authentication challenge
2365         dialog, and we should also allow sending empty username and password
2366         with the request.
2367         Also removed redundant codes which checked the existence of the
2368         FrameLoaderClient pointer, as we've already moved authenticationChallenge()
2369         out of class FrameLoaderClient, it is not needed.
2370
2371         Manual test added. Testing http authentication dialog relies on user interaction.
2372
2373         Resubmit the patch reverted by r115104 after the digest infinite loop
2374         issue for BlackBerry porting get identified and fixed.
2375
2376         Internally reviewed by Joe Mason <jmason@rim.com>
2377
2378         * platform/blackberry/PageClientBlackBerry.h:
2379         * platform/network/blackberry/NetworkJob.cpp:
2380         (WebCore::NetworkJob::sendRequestWithCredentials):
2381
2382 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2383
2384         [BlackBerry] http authentication challenge issue when loading favicon
2385         https://bugs.webkit.org/show_bug.cgi?id=87665
2386
2387         Reviewed by Rob Buis.
2388
2389         Provide the TargetType when generating a favicon loading
2390         request. Loading favicons is triggered after the main resource
2391         has been loaded and parsed, so if we cancel the authentication
2392         challenge when loading main resource, we should also cancel
2393         loading the favicon when it starts to load. If not we will
2394         receive another challenge after we canceled the main resource
2395         loading, which may confuse the user.
2396
2397         Internally reviewed by Joe Mason <jmason@rim.com>
2398
2399         No new tests because of no behavior changes.
2400
2401         * loader/icon/IconLoader.cpp:
2402         (WebCore::IconLoader::startLoading):
2403         * platform/network/blackberry/NetworkJob.cpp:
2404         (WebCore::NetworkJob::sendRequestWithCredentials):
2405
2406 2012-05-28  MORITA Hajime  <morrita@google.com>
2407
2408         Rename FrameLoaderClient::shadowDOMAllowed() to allowShadowDOM()
2409         https://bugs.webkit.org/show_bug.cgi?id=87101
2410
2411         Reviewed by Kentaro Hara.
2412
2413         No new tests. No behavior change.
2414
2415         * bindings/generic/ContextEnabledFeatures.cpp:
2416         (WebCore::ContextEnabledFeatures::shadowDOMEnabled):
2417         * loader/FrameLoaderClient.h:
2418         (WebCore::FrameLoaderClient::allowShadowDOM):
2419
2420 2012-05-28  David Barton  <dbarton@mathscribe.com>
2421
2422         mathml/presentation/mo-stretch.html and mroot-pref-width.html tests fail on Mac
2423         https://bugs.webkit.org/show_bug.cgi?id=86786
2424
2425         Reviewed by Darin Adler.
2426
2427         The fix to https://bugs.webkit.org/show_bug.cgi?id=84167 changed inline-table baselines,
2428         including for <mtable>. We therefore have to correct <mtable>'s vertical-align CSS
2429         property.
2430
2431         Tested by existing tests mo-stretch.html, row-alignment.xhtml, and tables.xhtml.
2432
2433         * css/mathml.css:
2434         (mtable):
2435
2436 2012-05-28  Luke Macpherson  <macpherson@chromium.org>
2437
2438         Make CSSParser::filteredProperties() O(n) instead of O(n^2) and improve readability.
2439         https://bugs.webkit.org/show_bug.cgi?id=87078
2440
2441         Reviewed by Darin Adler.
2442
2443         This patch implements a number of improvements to filteredProperties:
2444         1) Make the code more linearly readable by separating out handling of important and non-important properties.
2445         2) Eliminate one BitArray instance (reduces hot memory so more cache friendly).
2446         3) Remove O(n^2) behavior caused by scanning for and removing previously encountered definitions of each property.
2447         The key algorithmic change is to add properties in decreasing precedence:
2448         a) Iterating once per (important, !important) so that important properties are visited first.
2449         b) Reverse iteration of m_parsedProperties visits the properties in decreasing precedence.
2450
2451         Covered by loads of existing tests - getting CSS property precedence wrong results in too many errors to list.
2452         In particular fast/css contains test cases for important corner cases like duplicated important properties.
2453
2454         * css/CSSParser.cpp:
2455         (WebCore::CSSParser::createStylePropertySet):
2456         * css/CSSProperty.h:
2457         Add vector traits so that CSSProperty can just be memset by vector without calling constructor.
2458
2459 2012-05-28  MORITA Hajime  <morrita@google.com>
2460
2461         Can't edit <input> elements with :first-letter
2462         https://bugs.webkit.org/show_bug.cgi?id=87615
2463
2464         Reviewed by Kent Tamura.
2465
2466         A check using canHaveGeneratedChildren() should cover not only
2467         button and menulist, but also RenderTextControl.
2468         This change pulles canHaveGeneratedChildren() up
2469         from RenderDeprecatedFlexibleBox to RenderObject,
2470         and lets RenderTextControl override it.
2471
2472         Test: fast/forms/input-first-letter-edit.html
2473
2474         * rendering/RenderBlock.cpp:
2475         (WebCore):
2476         (WebCore::RenderBlock::styleDidChange):
2477         (WebCore::RenderBlock::updateFirstLetter):
2478         * rendering/RenderBlock.h: Removed a static function canHaveGeneratedChildren()
2479         (RenderBlock):
2480         * rendering/RenderDeprecatedFlexibleBox.h:
2481         * rendering/RenderObject.cpp:
2482         (WebCore):
2483         (WebCore::RenderObject::canHaveGeneratedChildren): Added.
2484         * rendering/RenderObject.h:
2485         (RenderObject):
2486         * rendering/RenderTextControl.h:
2487
2488 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2489
2490         [BlackBerry] Add support for layers with scale invariant size
2491         https://bugs.webkit.org/show_bug.cgi?id=87601
2492
2493         Reviewed by Rob Buis.
2494
2495         To support layers that have a "floating" appearance, i.e. don't change size
2496         when the web page is drawn at a different scale, we add a new layer property
2497         named "sizeIsScaleInvariant".
2498
2499         The anchor position will still be given in document coordinates for these
2500         "floating" layers, so this is well suited for interface elements like selection
2501         handles whose size is always the same but move with the web page contents.
2502
2503         PR #156812
2504
2505         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2506         (WebCore::LayerCompositingThread::setDrawTransform):
2507         (WebCore::LayerCompositingThread::drawTextures):
2508         (WebCore::LayerCompositingThread::drawMissingTextures):
2509         * platform/graphics/blackberry/LayerCompositingThread.h:
2510         (LayerCompositingThread):
2511         * platform/graphics/blackberry/LayerCompositingThreadClient.h:
2512         (LayerCompositingThreadClient):
2513         (WebCore::LayerCompositingThreadClient::drawMissingTextures):
2514         * platform/graphics/blackberry/LayerData.h:
2515         (WebCore::LayerData::LayerData):
2516         (WebCore::LayerData::sizeIsScaleInvariant):
2517         (LayerData):
2518         * platform/graphics/blackberry/LayerRenderer.cpp:
2519         (WebCore::LayerRenderer::LayerRenderer):
2520         (WebCore::LayerRenderer::compositeLayers):
2521         (WebCore::LayerRenderer::updateLayersRecursive):
2522         (WebCore::LayerRenderer::compositeLayersRecursive):
2523         * platform/graphics/blackberry/LayerRenderer.h:
2524         (LayerRenderer):
2525         * platform/graphics/blackberry/LayerTiler.cpp:
2526         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2527         (WebCore::LayerTiler::drawTextures):
2528         (WebCore::LayerTiler::drawMissingTextures):
2529         (WebCore::LayerTiler::drawTexturesInternal):
2530         * platform/graphics/blackberry/LayerTiler.h:
2531         (LayerTiler):
2532         * platform/graphics/blackberry/LayerWebKitThread.h:
2533         (WebCore::LayerWebKitThread::setSizeIsScaleInvariant):
2534         (LayerWebKitThread):
2535
2536 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2537
2538         [BlackBerry] Make it possible to manipulate layers on the compositing thread
2539         https://bugs.webkit.org/show_bug.cgi?id=87602
2540
2541         Reviewed by Rob Buis.
2542
2543         Normally, layers are manipulated on the WebKit thread, and the changes are
2544         synced to the compositing thread during the next accelerated compositing commit
2545         operation.
2546
2547         However, for overlay layers the ability to manipulate layers on the compositing
2548         thread is necessary for adequate user interface responsiveness.
2549
2550         Two mechanisms are added:
2551         1. For a layer with a WebKit-thread counterpart, you can temporarily override
2552         attributes or add animations whose output override attributes.
2553         2. For a layer with no WebKit-thread counterpart, you can now directly set the
2554         compositing thread values for attributes. If you attempt to do this for layers
2555         that do have a WebKit-thread counterpart, the compositing thread values will
2556         be overwritten at the time of the next commit, which makes the override
2557         mechanism more useful there.
2558
2559         PR #156812
2560
2561         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2562         (WebCore::LayerCompositingThread::addSublayer):
2563         (WebCore):
2564         (WebCore::LayerCompositingThread::updateAnimations):
2565         (WebCore::LayerCompositingThread::removeAnimation):
2566         (WebCore::LayerCompositingThread::override):
2567         (WebCore::LayerCompositingThread::clearOverride):
2568         * platform/graphics/blackberry/LayerCompositingThread.h:
2569         (LayerOverride):
2570         (WebCore::LayerOverride::create):
2571         (WebCore::LayerOverride::setPosition):
2572         (WebCore::LayerOverride::setAnchorPoint):
2573         (WebCore::LayerOverride::setBounds):
2574         (WebCore::LayerOverride::setTransform):
2575         (WebCore::LayerOverride::setOpacity):
2576         (WebCore::LayerOverride::addAnimation):
2577         (WebCore::LayerOverride::LayerOverride):
2578         (WebCore):
2579         (LayerCompositingThread):
2580         (WebCore::LayerCompositingThread::setPosition):
2581         (WebCore::LayerCompositingThread::setAnchorPoint):
2582         (WebCore::LayerCompositingThread::setBounds):
2583         (WebCore::LayerCompositingThread::setSizeIsScaleInvariant):
2584         (WebCore::LayerCompositingThread::setTransform):
2585         (WebCore::LayerCompositingThread::setOpacity):
2586         (WebCore::LayerCompositingThread::setNeedsTexture):
2587         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2588         (WebCore::LayerWebKitThread::LayerWebKitThread):
2589         (WebCore::LayerWebKitThread::commitOnCompositingThread):
2590         * platform/graphics/blackberry/LayerWebKitThread.h:
2591         (LayerWebKitThread):
2592         (WebCore::LayerWebKitThread::clearOverride):
2593
2594 2012-05-28  Rob Flack  <flackr@chromium.org>
2595
2596         [chromium] Only increase size of Combo Box Options when displayed on touch screen
2597         https://bugs.webkit.org/show_bug.cgi?id=85921
2598
2599         Reviewed by Adam Barth.
2600
2601         Adds a flag to set whether the current device is a touch screen, independent of whether touch events are supported and use this for the combo box sizing.
2602
2603         No new tests as this is a flag change and covered by existing tests: WebKit/chromium/tests/PopupMenuTest.cpp
2604
2605         * page/Settings.cpp:
2606         (WebCore::Settings::Settings):
2607         * page/Settings.h:
2608         (WebCore::Settings::setDeviceSupportsTouch):
2609         (WebCore::Settings::deviceSupportsTouch):
2610         (Settings):
2611         * platform/chromium/PopupListBox.cpp:
2612         (WebCore::PopupListBox::getRowHeight):
2613         * platform/chromium/PopupListBox.h:
2614         (PopupContainerSettings):
2615         * platform/chromium/PopupMenuChromium.cpp:
2616         (WebCore::PopupMenuChromium::show):
2617
2618 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2619
2620         [BlackBerry] Make custom compositing thread layers more flexible
2621         https://bugs.webkit.org/show_bug.cgi?id=87600
2622
2623         Reviewed by Rob Buis.
2624
2625         Introduce a LayerCompositingThreadClient that's used to fine tune the
2626         behaviour of custom layers. Let the LayerTiler be a
2627         LayerCompositingThreadClient and thus decouple it from
2628         LayerCompositingThread. Adjust method signatures to allow a one-to-many
2629         relationship between Client and Layer.
2630
2631         Remove the old LayerCompositingThread::drawCustom() in favour of this new
2632         Client interface.
2633
2634         PR #156812
2635
2636         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2637         (WebCore::LayerCompositingThread::create):
2638         (WebCore::LayerCompositingThread::LayerCompositingThread):
2639         (WebCore::LayerCompositingThread::~LayerCompositingThread):
2640         (WebCore::LayerCompositingThread::deleteTextures):
2641         (WebCore::LayerCompositingThread::drawTextures):
2642         (WebCore::LayerCompositingThread::hasMissingTextures):
2643         (WebCore::LayerCompositingThread::drawMissingTextures):
2644         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
2645         (WebCore::LayerCompositingThread::bindContentsTexture):
2646         (WebCore::LayerCompositingThread::setVisible):
2647         (WebCore::LayerCompositingThread::scheduleCommit):
2648         * platform/graphics/blackberry/LayerCompositingThread.h:
2649         (WebCore):
2650         (LayerCompositingThread):
2651         * platform/graphics/blackberry/LayerCompositingThreadClient.h: Added.
2652         (WebCore):
2653         (LayerCompositingThreadClient):
2654         (WebCore::LayerCompositingThreadClient::~LayerCompositingThreadClient):
2655         (WebCore::LayerCompositingThreadClient::bindContentsTexture):
2656         (WebCore::LayerCompositingThreadClient::hasMissingTextures):
2657         (WebCore::LayerCompositingThreadClient::drawMissingTextures):
2658         (WebCore::LayerCompositingThreadClient::scheduleCommit):
2659         * platform/graphics/blackberry/LayerRenderer.cpp:
2660         (WebCore::LayerRenderer::drawDebugBorder):
2661         * platform/graphics/blackberry/LayerTiler.cpp:
2662         (WebCore::LayerTiler::LayerTiler):
2663         (WebCore::LayerTiler::layerCompositingThreadDestroyed):
2664         (WebCore::LayerTiler::layerVisibilityChanged):
2665         (WebCore::LayerTiler::uploadTexturesIfNeeded):
2666         (WebCore::LayerTiler::deleteTextures):
2667         (WebCore::LayerTiler::scheduleCommit):
2668         (WebCore):
2669         (WebCore::LayerTiler::bindContentsTexture):
2670         * platform/graphics/blackberry/LayerTiler.h:
2671         (LayerTiler):
2672         (WebCore::LayerTiler::hasMissingTextures):
2673         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2674         (WebCore::LayerWebKitThread::LayerWebKitThread):
2675         * platform/graphics/blackberry/LayerWebKitThread.h:
2676         (LayerWebKitThread):
2677
2678 2012-05-25  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2679
2680         WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled
2681         https://bugs.webkit.org/show_bug.cgi?id=42328
2682
2683         Reviewed by Eric Seidel.
2684
2685         Add setJavaScriptProfilingEnabled() to window.internals.settings. No new tests, but this
2686         change will allow more tests to run in WebKitTestRunner and DRT for ports that weren't
2687         implementing this function before.
2688         This patch also refactors InspectorController::enableProfiler() and
2689         InspectorController::disableProfiler() to InspectorController::setProfilerEnabled(bool).
2690
2691         * WebCore.exp.in:
2692         * inspector/InspectorController.cpp:
2693         (WebCore::InspectorController::profilerEnabled):
2694         (WebCore::InspectorController::setProfilerEnabled):
2695         * inspector/InspectorController.h:
2696         (InspectorController):
2697         * testing/InternalSettings.cpp:
2698         (WebCore::InternalSettings::InternalSettings):
2699         (WebCore::InternalSettings::restoreTo):
2700         (WebCore::InternalSettings::setJavaScriptProfilingEnabled):
2701         (WebCore):
2702         * testing/InternalSettings.h:
2703         (InternalSettings):
2704         * testing/InternalSettings.idl:
2705
2706 2012-05-28  Yong Li  <yoli@rim.com>
2707
2708         Crash on incomplete :not().
2709         https://bugs.webkit.org/show_bug.cgi?id=86673
2710
2711         Reviewed by Antti Koivisto.
2712
2713         Add back null-checks for incomplete :not() class
2714         which were dropped by r81845.
2715
2716         * css/CSSSelector.cpp:
2717         (WebCore::CSSSelector::specificityForOneSelector):
2718         (WebCore::CSSSelector::selectorText):
2719         * css/SelectorChecker.cpp:
2720         (WebCore::SelectorChecker::checkOneSelector):
2721         (WebCore::SelectorChecker::determineLinkMatchType):
2722
2723 2012-05-28  Leo Yang  <leo.yang@torchmobile.com.cn>
2724
2725         FileWriterSync binding should have no static table
2726         https://bugs.webkit.org/show_bug.cgi?id=87645
2727
2728         Reviewed by George Staikos.
2729
2730         FileWriterSync could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file.
2731
2732         Covered by existing test: fast/filesystem/workers/sync-operations.html.
2733
2734         * Modules/filesystem/FileWriterSync.idl:
2735
2736 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2737
2738         [BlackBerry] Add an overlay layer
2739         https://bugs.webkit.org/show_bug.cgi?id=87567
2740
2741         Reviewed by Antonio Gomes.
2742
2743         The overlay layer allows us to have compositing layers even though the
2744         web page is not currently using accelerated compositing.
2745
2746         These layers can be used to implement tap highlight, inspector overlay
2747         and more.
2748
2749         The WebCore changes support the overlay layer functionality in WebKit
2750         by making it possible to add animations from the compositing thread
2751         without them being instantly overwritten during the next commit.
2752
2753         Also a new custom layer type is added, which allow an overlay layer to
2754         draw itself using raw OpenGL calls. An instance of a custom subclass of
2755         LayerCompositingThread must be provided when creating the
2756         LayerWebKitThread. Then, the custom layer can be used as the content
2757         layer of a GraphicsLayer, or by itself.
2758
2759         Reviewed internally by Filip Spacek.
2760
2761         PR #154335
2762
2763         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2764         (WebCore::LayerCompositingThread::~LayerCompositingThread):
2765         (WebCore::LayerCompositingThread::deleteTextures):
2766         (WebCore::LayerCompositingThread::drawTextures):
2767         (WebCore::LayerCompositingThread::drawMissingTextures):
2768         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
2769         (WebCore::LayerCompositingThread::setVisible):
2770         (WebCore::LayerCompositingThread::scheduleCommit):
2771         * platform/graphics/blackberry/LayerCompositingThread.h:
2772         (WebCore::LayerCompositingThread::addAnimation):
2773         (WebCore::LayerCompositingThread::setRunningAnimations):
2774         (WebCore::LayerCompositingThread::setSuspendedAnimations):
2775         (LayerCompositingThread):
2776         (WebCore::LayerCompositingThread::drawCustom):
2777         * platform/graphics/blackberry/LayerData.h:
2778         (LayerData):
2779         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2780         (WebCore::LayerWebKitThread::LayerWebKitThread):
2781         (WebCore):
2782         (WebCore::LayerWebKitThread::~LayerWebKitThread):
2783         (WebCore::LayerWebKitThread::updateTextureContentsIfNeeded):
2784         (WebCore::LayerWebKitThread::startAnimations):
2785         (WebCore::LayerWebKitThread::commitOnCompositingThread):
2786         (WebCore::LayerWebKitThread::setNeedsDisplayInRect):
2787         (WebCore::LayerWebKitThread::setNeedsDisplay):
2788         (WebCore::LayerWebKitThread::setIsMask):
2789         (WebCore::LayerWebKitThread::setRunningAnimations):
2790         (WebCore::LayerWebKitThread::setSuspendedAnimations):
2791         * platform/graphics/blackberry/LayerWebKitThread.h:
2792         (LayerWebKitThread):
2793
2794 2012-05-28  Leo Yang  <leo.yang@torchmobile.com.cn>
2795
2796         ProgressEvent JSC binding should have no static table
2797         https://bugs.webkit.org/show_bug.cgi?id=87365
2798
2799         Reviewed by George Staikos.
2800
2801         ProgressEvent could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file.
2802
2803         Covered by existing test: fast/filesystem/workers/file-writer-events.html.
2804
2805         * dom/ProgressEvent.idl:
2806
2807 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2808
2809         [BlackBerry] Update WebPageCompositor::render() API
2810         https://bugs.webkit.org/show_bug.cgi?id=87565
2811
2812         Reviewed by Rob Buis.
2813
2814         The new API allows the embedder to specify the root transform and many
2815         OpenGL related parameters.
2816
2817         Also refactor the code to allow several sets of layers to be rendered,
2818         and to allow interleaving the rendering of layers with rendering of
2819         buffers and checkerboard.
2820
2821         Reviewed internally by Filip Spacek.
2822
2823         PR #154334
2824
2825         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2826         (WebCore::LayerCompositingThread::drawTextures):
2827         (WebCore::LayerCompositingThread::drawSurface):
2828         * platform/graphics/blackberry/LayerRenderer.cpp:
2829         (WebCore::LayerRenderer::orthoMatrix):
2830         (WebCore::LayerRenderer::LayerRenderer):
2831         (WebCore::LayerRenderer::prepareFrame):
2832         (WebCore):
2833         (WebCore::LayerRenderer::setViewport):
2834         (WebCore::LayerRenderer::compositeLayers):
2835         (WebCore::LayerRenderer::compositeBuffer):
2836         (WebCore::LayerRenderer::drawCheckerboardPattern):
2837         (WebCore::LayerRenderer::drawLayersOnSurfaces):
2838         (WebCore::LayerRenderer::prepareFrameRecursive):
2839         (WebCore::LayerRenderer::updateLayersRecursive):
2840         (WebCore::LayerRenderer::compositeLayersRecursive):
2841         (WebCore::LayerRenderer::updateScissorIfNeeded):
2842         (WebCore::LayerRenderingResults::addHolePunchRect):
2843         * platform/graphics/blackberry/LayerRenderer.h:
2844         (LayerRenderer):
2845
2846 2012-05-28  Antti Koivisto  <antti@apple.com>
2847
2848         REGRESSION(r96517): Attribute selector fails to match dynamically modified style attribute
2849         https://bugs.webkit.org/show_bug.cgi?id=87349
2850
2851         Reviewed by Andreas Kling.
2852         
2853         Selector fast path does not trigger lazy style attribute generation. Since attribute selectors matching
2854         style attribute are rare, disallow them from the fast path rather than making it more branchy.
2855
2856         Test: fast/css/dynamic-style-attribute-query.html
2857
2858         * css/SelectorChecker.cpp:
2859         (WebCore::isFastCheckableMatch):
2860
2861 2012-05-28  Peter Rybin  <peter.rybin@gmail.com>
2862
2863         Web Inspector: Expose function (closure) scopes in remote protocol
2864         https://bugs.webkit.org/show_bug.cgi?id=86861
2865
2866         Reviewed by Yury Semikhatsky.
2867
2868         A data transfer from V8's FunctionMirror via DebuggerScript.js via InjectedScriptHost is built.
2869         Scope field is added to protocol declaration similar to scopes of stack call frame.
2870         Test for function details is extended.
2871         JSC code binging got fixme for implemting the corresponding feature.
2872
2873         * bindings/js/JSInjectedScriptHostCustom.cpp:
2874         (WebCore::JSInjectedScriptHost::functionDetails):
2875         * bindings/v8/DebuggerScript.js:
2876         * bindings/v8/ScriptDebugServer.cpp:
2877         (WebCore::ScriptDebugServer::functionScopes):
2878         (WebCore):
2879         * bindings/v8/ScriptDebugServer.h:
2880         (ScriptDebugServer):
2881         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2882         (WebCore::V8InjectedScriptHost::functionDetailsCallback):
2883         * inspector/InjectedScriptHost.cpp:
2884         (WebCore):
2885         (WebCore::InjectedScriptHost::scriptDebugServer):
2886         * inspector/InjectedScriptHost.h:
2887         (WebCore):
2888         (WebCore::InjectedScriptHost::init):
2889         (InjectedScriptHost):
2890         * inspector/InjectedScriptSource.js:
2891         (.):
2892         * inspector/Inspector.json:
2893         * inspector/InspectorController.cpp:
2894         (WebCore::InspectorController::InspectorController):
2895         * inspector/WorkerInspectorController.cpp:
2896         (WebCore::WorkerInspectorController::WorkerInspectorController):
2897
2898 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2899
2900         [BlackBerry] Add a constructor to create a Path from an SkPath
2901         https://bugs.webkit.org/show_bug.cgi?id=87566
2902
2903         Reviewed by Antonio Gomes.
2904
2905         Skia allows the creation of more complex paths than WebCore would
2906         allow. This will be used in the BlackBerry port to implement a default
2907         tap highlight appearance.
2908
2909         Reviewed internally by Mike Lattanzio.
2910
2911         PR #154329
2912
2913         * platform/graphics/Path.h:
2914         (Path):
2915         * platform/graphics/skia/PathSkia.cpp:
2916         (WebCore):
2917         (WebCore::Path::Path):
2918
2919 2012-05-28  Alexis Menard  <alexis.menard@openbossa.org>
2920
2921         Unreviewed build fix for Mac on Lion.
2922
2923         * inspector/CodeGeneratorInspector.py:
2924
2925 2012-05-28  Keishi Hattori  <keishi@webkit.org>
2926
2927         Expose value localization function of HTMLInputElement
2928         https://bugs.webkit.org/show_bug.cgi?id=84356
2929
2930         Reviewed by Kent Tamura.
2931
2932         No new tests.
2933
2934         We want to localize the values that are defined in the datalist element.
2935         This adds HTMLInputElement::localizeValue() which will localize a given
2936         value.
2937
2938         * html/BaseDateAndTimeInputType.cpp:
2939         (WebCore::BaseDateAndTimeInputType::localizeValue):
2940         (WebCore):
2941         (WebCore::BaseDateAndTimeInputType::visibleValue):
2942         * html/BaseDateAndTimeInputType.h:
2943         (BaseDateAndTimeInputType):
2944         * html/HTMLInputElement.cpp:
2945         (WebCore::HTMLInputElement::localizeValue):
2946         (WebCore):
2947         * html/HTMLInputElement.h:
2948         (HTMLInputElement):
2949         * html/InputType.cpp:
2950         (WebCore::InputType::localizeValue):
2951         (WebCore):
2952         * html/InputType.h:
2953         (InputType):
2954         * html/NumberInputType.cpp:
2955         (WebCore::NumberInputType::localizeValue):
2956         (WebCore):
2957         (WebCore::NumberInputType::visibleValue):
2958         * html/NumberInputType.h:
2959         (NumberInputType):
2960
2961 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
2962
2963         Unreviewed. Test fix after r118670: saved timeline data may
2964         not have DOM counters data and MemoryStatistics object should
2965         take this into account.
2966
2967         * inspector/front-end/MemoryStatistics.js:
2968         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
2969
2970 2012-05-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2971
2972         Unreviewed, rolling out r118580.
2973         http://trac.webkit.org/changeset/118580
2974         https://bugs.webkit.org/show_bug.cgi?id=87647
2975
2976         Caused webkit_unit_tests to crash on chromium. (Requested by
2977         bulach on #webkit).
2978
2979         * platform/graphics/chromium/ContentLayerChromium.cpp:
2980         (WebCore::ContentLayerPainter::create):
2981         (WebCore::ContentLayerPainter::paint):
2982         (WebCore::ContentLayerPainter::ContentLayerPainter):
2983         (ContentLayerPainter):
2984         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
2985         * platform/graphics/chromium/TiledLayerChromium.cpp:
2986         (UpdatableTile):
2987         (WebCore::UpdatableTile::UpdatableTile):
2988         (WebCore::TiledLayerChromium::updateTiles):
2989         * platform/graphics/chromium/TiledLayerChromium.h:
2990         (TiledLayerChromium):
2991         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2992         (WebCore::CCSettings::CCSettings):
2993         (CCSettings):
2994
2995 2012-05-28  Peter Beverloo  <peter@chromium.org>
2996
2997         &AElig doesn't get rendered as U+00C6
2998         https://bugs.webkit.org/show_bug.cgi?id=87465
2999
3000         Reviewed by Adam Barth.
3001
3002         The if-statement to check whether the first entry of a certain letter
3003         already exists in the index used .get(). The very first alphabetical
3004         entry is in position "0", which evaluates to false, causing the first
3005         entry to be ignored. Instead, use a "x not in y" check here.
3006
3007         Also update WebCore.gyp to list the create-html-entity-table script as
3008         an input for the action, to make sure the table will be recreated.
3009
3010         Test: html5lib/resources/entities02.dat
3011
3012         * WebCore.gyp/WebCore.gyp:
3013         * html/parser/create-html-entity-table:
3014
3015 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
3016
3017         Web Inspector: dom counters graphs vanish on switching between timeline views
3018         https://bugs.webkit.org/show_bug.cgi?id=87628
3019
3020         Reviewed by Vsevolod Vlasov.
3021
3022         MemoryStatistics object now listens to the TimelineModel events instead of being
3023         populated by timeline panel. This behavior mathes that of the overview pane.
3024
3025         * inspector/front-end/MemoryStatistics.js:
3026         (WebInspector.MemoryStatistics.prototype.addTimlineEvent):
3027         * inspector/front-end/TimelinePanel.js:
3028         (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
3029         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
3030
3031 2012-05-28  Marcus Bulach  <bulach@chromium.org>
3032
3033         [chromium] Buildfix: remove obsolete file from gypi.
3034         https://bugs.webkit.org/show_bug.cgi?id=87643
3035
3036         Reviewed by no-reviewer.
3037
3038         Following http://trac.webkit.org/changeset/118610.
3039         Removes reference to platform/graphics/gstreamer/ImageGStreamerCG.mm
3040
3041         * WebCore.gypi:
3042
3043 2012-05-28  MORITA Hajime  <morrita@google.com>
3044
3045         HTMLFormControlElement::m_validationMessage shouldn't be cleared on detach()
3046         https://bugs.webkit.org/show_bug.cgi?id=87608
3047
3048         Reviewed by Kent Tamura.
3049
3050         Moved m_validationMessage clearance from detach() to removedFrom() and
3051         remove detach().
3052
3053         No new tests. This change has no visible difference. Upcoming changes rely on this though.
3054
3055         * html/HTMLFormControlElement.cpp:
3056         (WebCore::HTMLFormControlElement::removedFrom):
3057
3058 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
3059
3060         Web Inspector: "Record CPU profile" button doesn't change its state after finishing profiling
3061         https://bugs.webkit.org/show_bug.cgi?id=87624
3062
3063         Reviewed by Vsevolod Vlasov.
3064
3065         Keep record button state in sync with the current profiling state.
3066
3067         * inspector/front-end/ProfilesPanel.js:
3068         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
3069
3070 2012-05-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3071
3072         Unreviewed, rolling out r118650.
3073         http://trac.webkit.org/changeset/118650
3074         https://bugs.webkit.org/show_bug.cgi?id=87639
3075
3076         Patch caused massive failures throughout the builders
3077         (Requested by zdobersek on #webkit).
3078
3079         * css/MediaQuery.cpp:
3080         (WebCore):
3081         (WebCore::MediaQuery::serialize):
3082         (WebCore::MediaQuery::MediaQuery):
3083         (WebCore::MediaQuery::cssText):
3084         * css/MediaQuery.h:
3085         (WebCore::MediaQuery::expressions):
3086         (WebCore::MediaQuery::mediaType):
3087         (MediaQuery):
3088         (WebCore::MediaQuery::copy):
3089         * css/MediaQueryEvaluator.cpp:
3090         (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
3091         (WebCore::MediaQueryEvaluator):
3092         (WebCore::MediaQueryEvaluator::eval):
3093         (WebCore::aspect_ratioMediaFeatureEval):
3094         (WebCore::device_aspect_ratioMediaFeatureEval):
3095         (WebCore::transform_3dMediaFeatureEval):
3096         (WebCore::view_modeMediaFeatureEval):
3097         (WebCore::createFunctionMap):
3098         * css/MediaQueryEvaluator.h:
3099         (WebCore):
3100         (MediaQueryEvaluator):
3101         * css/StyleResolver.cpp:
3102         (WebCore):
3103         (WebCore::StyleResolver::collectMatchingRulesForList):
3104         * css/StyleResolver.h:
3105         (MediaQueryResult):
3106         (WebCore::MediaQueryResult::MediaQueryResult):
3107         (WebCore):
3108         (StyleResolver):
3109
3110 2012-05-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3111
3112         Move allowRoundingHacks to Internals interface
3113         https://bugs.webkit.org/show_bug.cgi?id=87328
3114
3115         Reviewed by Hajime Morita.
3116
3117         Add allowRoundingHacks function, because it is able to work in the
3118         cross-port way by means of the Internals interface.
3119
3120         In addition, a function is added in order to restore default setting values.
3121
3122         No new tests, since we are improving here the infra-structure for testing
3123         a specific method.
3124
3125         * testing/Internals.cpp:
3126         (WebCore::Internals::reset):
3127         (WebCore):
3128         (WebCore::Internals::resetDefaultsToConsistentValues):
3129         (WebCore::Internals::allowRoundingHacks):
3130         * testing/Internals.h:
3131         (Internals):
3132         * testing/Internals.idl:
3133
3134 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3135
3136         [BlackBerry] http authentication crash the browser when user commit or cancel the http authentication dialog
3137         https://bugs.webkit.org/show_bug.cgi?id=87579
3138
3139         Reviewed by George Staikos.
3140
3141         In function NetworkJob::startNewJobWithRequest, We should cancel the
3142         NetworkJob first before we start a new NetworkJob which reuses the
3143         resource handle of the old one. If we only set the m_handle = 0 of the
3144         old NetworkJob without cancelling itself, it will still receives data
3145         notification from network thread and handles the received data with
3146         the released resource handler, which will cause the crash.
3147
3148         No new tests because no behavior has changed.
3149
3150         * platform/network/blackberry/NetworkJob.cpp:
3151         (WebCore::NetworkJob::startNewJobWithRequest):
3152
3153 2012-05-27  MORITA Hajime  <morrita@google.com>
3154
3155         [Refactoring][ShadowDOM] Some ElementShadow methods can be inlined.
3156         https://bugs.webkit.org/show_bug.cgi?id=87617
3157
3158         Reviewed by Kentaro Hara.
3159
3160         Inlined ElementShadow::attachHost(), ElementShadow::detachHost() and
3161         ElementShadow::reattach()
3162
3163         No new tests. No behavior change.
3164
3165         * dom/Element.cpp:
3166         (WebCore::Element::attach):
3167         (WebCore::Element::detach):
3168         * dom/ElementShadow.cpp:
3169         (WebCore::ElememtnShadow::reattachHostChildrenAndShadow):
3170         * dom/ElementShadow.h:
3171         (ElementShadow):
3172
3173 2012-05-28  Peter Rybin  <peter.rybin@gmail.com>
3174
3175         Web Inspector: CodeGeneratorInspector.py: protect typed API from C++ implicit float to int cast
3176         https://bugs.webkit.org/show_bug.cgi?id=87183
3177
3178         Reviewed by Yury Semikhatsky.
3179
3180         An intermediate C++ class is introduced that uses C++ template technique to control actual type
3181         of its constructor argument.
3182         All input parameters of type "int" now have type ExactlyInt. 
3183         All usage sites are fixed accordingly.
3184
3185         * inspector/CodeGeneratorInspector.py:
3186         (TypeModel.RefPtrBased):
3187         (TypeModel.Enum):
3188         (TypeModel.ValueType):
3189         (TypeModel.ValueType.get_opt_output_type_):
3190         (TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
3191         (TypeModel.ExactlyInt):
3192         (TypeModel.ExactlyInt.__init__):
3193         (TypeModel.ExactlyInt.get_input_param_type_text):
3194         (TypeModel.ExactlyInt.get_opt_output_type_):
3195         (TypeModel.init_class):
3196         (ExactlyInt):
3197         * inspector/InspectorAgent.cpp:
3198         (WebCore::InspectorAgent::enable):
3199         (WebCore::InspectorAgent::didCreateWorker):
3200         (WebCore::InspectorAgent::didDestroyWorker):
3201         (WebCore::InspectorAgent::evaluateForTestInFrontend):
3202         * inspector/InspectorApplicationCacheAgent.cpp:
3203         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
3204         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3205         * inspector/InspectorDOMAgent.cpp:
3206         (WebCore::InspectorDOMAgent::buildObjectForNode):
3207         * inspector/InspectorMemoryAgent.cpp:
3208         (WebCore::jsHeapInfo):
3209         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
3210         * inspector/PageRuntimeAgent.cpp:
3211         (WebCore::PageRuntimeAgent::notifyContextCreated):
3212
3213 2012-05-28  Kentaro Hara  <haraken@chromium.org>
3214
3215         Unreviewed. Rebaselined run-binding-tests results.
3216
3217         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3218         (WebCore::JSTestActiveDOMObjectOwner::finalize):
3219         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3220         (WebCore::JSTestCustomNamedGetterOwner::finalize):
3221         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3222         (WebCore::JSTestEventConstructorOwner::finalize):
3223         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3224         (WebCore::JSTestEventTargetOwner::finalize):
3225         * bindings/scripts/test/JS/JSTestException.cpp:
3226         (WebCore::JSTestExceptionOwner::finalize):
3227         * bindings/scripts/test/JS/JSTestInterface.cpp:
3228         (WebCore::JSTestInterfaceOwner::finalize):
3229         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3230         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
3231         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3232         (WebCore::JSTestNamedConstructorOwner::finalize):
3233         * bindings/scripts/test/JS/JSTestObj.cpp:
3234         (WebCore::JSTestObjOwner::finalize):
3235         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3236         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
3237         * bindings/scripts/test/V8/V8TestObj.cpp:
3238         (WebCore::V8TestObj::installPerContextProperties):
3239
3240 2012-05-28  Darin Adler  <darin@apple.com>
3241
3242         StyleResolver need not allocate each MediaQueryResult on the heap
3243         https://bugs.webkit.org/show_bug.cgi?id=75223
3244
3245         Reviewed by Daniel Bates.
3246
3247         * css/MediaQuery.cpp: Removed some comments that pointed to CSS documents.
3248         There is no guarantee these links will be valid over time.
3249         (WebCore::MediaQuery::MediaQuery): Rewrote for clarity, conventional WebKit coding
3250         style, and simplicity.
3251         (WebCore::MediaQuery::copy): Moved out of line; not performance critical, and this
3252         allows us to cut down header dependencies.
3253         (WebCore::MediaQuery::cssText): Updated for change to data member name.
3254
3255         * css/MediaQuery.h: Removed unneeded includes. Removed non-helpful argument name
3256         "exprs". Changed expressions function to return a reference instead of
3257         a pointer. Changed mediaType and cssText functions to return a reference. Renamed
3258         m_serializationCache to m_serializedQuery. Moved copy function out of header.
3259
3260         * css/MediaQueryEvaluator.cpp: Renamed EvalFunc to MediaFeatureEvaluationFunction.
3261         Broke a FIXME into three and reworded for clarity.
3262         (WebCore::MediaQueryEvaluator): Updated for name changes.
3263         (WebCore::MediaQueryEvaluator::eval): Rewrote this for clarity and to regularize
3264         the logic a bit.
3265         (WebCore::aspect_ratioMediaFeatureEval): Got rid of a != 0 that is contrary to the
3266         normal WebKit style.
3267         (WebCore::device_aspect_ratioMediaFeatureEval): Ditto.
3268         (WebCore::transform_3dMediaFeatureEval): Fixed mangled #if that was here.
3269         (WebCore::view_modeMediaFeatureEval): Replaced UNUSED_PARAM usage with ASSERT_UNUSED.
3270         (WebCore::createFunctionMap): Changed this so it returns the map so we can use a
3271         cleaner style in the caller.
3272         (WebCore::MediaQueryEvaluator::eval): Updated to take a reference and improved the
3273         comments and coding style a bit.
3274
3275         * css/MediaQueryEvaluator.h: Updated comment style. Removed unused constructor.
3276         Removed unneeded destructor declaration. Renamed m_expResult to m_mediaFeatureResult.
3277
3278         * css/StyleResolver.cpp: Moved the MediaQueryResult class into this file
3279         and made it a structure rather than a class.
3280         (WebCore::StyleResolver::addViewportDependentMediaQueryResult): Updated to take
3281         a reference argument instead of a pointer and for the new vector type.
3282         (WebCore::StyleResolver::affectedByViewportChange): Updated for above changes.
3283
3284         * css/StyleResolver.h: Removed many unneeded includes and forward declarations of
3285         classes, including now-unneeded include of MediaQueryExp.h. Replaced MediaQueryResult
3286         definition with a forward declaration. Changed addViewportDependentMediaQueryResult
3287         to take a reference instead of a pointer. Changed m_viewportDependentMediaQueryResults
3288         to be a vector of values rather than of pointers.
3289
3290 2012-05-27  Shinya Kawanaka  <shinyak@chromium.org>
3291
3292         cut, copy or paste event won't be fired in Shadow DOM.
3293         https://bugs.webkit.org/show_bug.cgi?id=87352
3294
3295         Reviewed by Dimitri Glazkov.
3296
3297         cut, copy or paste event was not fired in Shadow DOM.
3298         Since event re-targeting has been implemented, it should be safe to fire them in Shadow DOM now.
3299
3300         Tests: fast/dom/shadow/cppevent-in-shadow.html
3301                fast/dom/shadow/cppevent-input-in-shadow.html
3302
3303         * editing/Editor.cpp:
3304         (WebCore::Editor::findEventTargetFrom):
3305
3306 2012-05-27  Hayato Ito  <hayato@chromium.org>
3307
3308         Support multiple shadow roots in event dispatching.
3309         https://bugs.webkit.org/show_bug.cgi?id=87470
3310
3311         Reviewed by Dimitri Glazkov.
3312
3313         The current implementation does not set event's target correctly
3314         if an event happens on DOM tree with multiple shadow roots.  So
3315         this patch updates an event re-targeting algorithm so that it
3316         works even if it is applied to multiple shadow roots.
3317
3318         Tests: fast/dom/shadow/shadow-dom-event-dispatching.html
3319
3320         * dom/ComposedShadowTreeWalker.cpp:
3321         (WebCore::ComposedShadowTreeWalker::traverseParentIncludingInsertionPointAndShadowRoot):
3322         * dom/EventDispatcher.cpp:
3323         (WebCore::EventDispatcher::ensureEventAncestors):
3324
3325 2012-05-27  Benjamin Poulain  <benjamin@webkit.org>
3326
3327         Minor code cleaning for the interface of MainResourceLoader
3328         https://bugs.webkit.org/show_bug.cgi?id=87607
3329
3330         Reviewed by Darin Adler.
3331
3332         * loader/MainResourceLoader.cpp:
3333         (WebCore::MainResourceLoader::MainResourceLoader):
3334         (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
3335         (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
3336         * loader/MainResourceLoader.h:
3337         (MainResourceLoader):
3338         -Add the OVERRIDE keyword for the methods inherited from ResourceLoader.
3339         -Remove the useless declaration of handleDataLoad(ResourceRequest&), this method does not exist.
3340         -Rename handleDataLoadNow() to handleSubstituteDataLoadNow() and make the method private. This should
3341          only be used by handleSubstituteDataLoadSoon() and indirectly through the timer.
3342
3343 2012-05-27  Yoshifumi Inoue  <yosin@chromium.org>
3344
3345         [WTF] Introduce UINT64_C to MathExtras.h
3346         https://bugs.webkit.org/show_bug.cgi?id=87485
3347
3348         Reviewed by Kent Tamura.
3349
3350         This patch introduces UINT64_C for all platforms to avoid using
3351         conditional compilation.
3352
3353         No new tests. This patch doesn't change behavior.
3354
3355         * Modules/websockets/WebSocketFrame.cpp:
3356         (WebCore::WebSocketFrame::parseFrame): Replace conditional compilation with UINT64_C.
3357
3358 2012-05-27  Luke Macpherson  <macpherson@chromium.org>
3359
3360         Use StringBuilder in WebKitCSSTransformValue::customCssText() to allow code reuse with CSS Variables.
3361         https://bugs.webkit.org/show_bug.cgi?id=87462
3362
3363         Reviewed by Dimitri Glazkov.
3364
3365         Factor out strings into a const char* array, and use a StringBuilder instead of String concatenation.
3366         This will allow future code to re-use the array of transform names, and StringBuilder is generally faster.
3367
3368         Covered by existing CSS transform tests.
3369
3370         * css/WebKitCSSTransformValue.cpp:
3371         (WebCore):
3372         (WebCore::WebKitCSSTransformValue::customCssText):
3373
3374 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
3375
3376         [BlackBerry] Update color for tap highlight and selection
3377         https://bugs.webkit.org/show_bug.cgi?id=87606
3378
3379         Reviewed by Antonio Gomes.
3380
3381         PR #154813
3382
3383         * platform/blackberry/RenderThemeBlackBerry.cpp:
3384         (WebCore::RenderThemeBlackBerry::platformTapHighlightColor):
3385         (WebCore::RenderThemeBlackBerry::platformActiveSelectionBackgroundColor):
3386
3387 2012-05-27  Benjamin Poulain  <bpoulain@apple.com>
3388
3389         When pages are loaded from AppCache with DeferredLoading, willSendRequest() is never called
3390         https://bugs.webkit.org/show_bug.cgi?id=87582
3391
3392         Reviewed by Darin Adler.
3393
3394         Previously, there was a shortcut when a deferred MainResourceLoader is resumed: If the data
3395         was coming from AppCache we could jump directly to startDataLoadTimer().
3396
3397         The problem with the shortcut is willSendRequest() is never called in that particular case
3398         (substituteData + deferred-resume). The imbalance between willSendRequest() and didReceiveResponse()
3399         causes problems.
3400
3401         This patch removes the shortcut so that MainResourceLoader::loadNow() is used regardless of
3402         the deferred loading. The method MainResourceLoader::loadNow() handle the substituteData as if the loading
3403         was not deferred.
3404
3405         Test: http/tests/appcache/load-from-appcache-defer-resume-crash.html
3406
3407         * loader/MainResourceLoader.cpp:
3408         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
3409         (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
3410         Rename the method to be consistent with the attribute it uses, making the naming more explicit.
3411         (WebCore::MainResourceLoader::loadNow):
3412         (WebCore::MainResourceLoader::setDefersLoading):
3413         * loader/MainResourceLoader.h:
3414         (MainResourceLoader):
3415
3416 2012-05-27  David Kilzer  <ddkilzer@apple.com>
3417
3418         Use xcrun to find gperf path on platforms that use Xcode
3419         <http://webkit.org/b/87587>
3420
3421         Reviewed by Dan Bernstein.
3422
3423         * WebCore.xcodeproj/project.pbxproj:
3424         (Generate Derived Sources): Set GPERF environment variable using
3425         xcrun.
3426         * css/makeprop.pl: Use GPERF environment variable if set, else
3427         "gperf".
3428         * css/makevalues.pl: Ditto.
3429         * make-hash-tools.pl: Ditto.
3430
3431 2012-05-27  Li Yin  <li.yin@intel.com>
3432
3433         [FileAPI] FileReader should fire progress event when blob has been completely read into memory
3434         https://bugs.webkit.org/show_bug.cgi?id=87585
3435
3436         Reviewed by Kentaro Hara.
3437
3438         From Spec: http://www.w3.org/TR/FileAPI/#dfn-progress-event
3439         One progress event will fire when blob has been completely read into memory.
3440         Firefox, Opera and IE follows the spec.
3441         Webkit based browser doesn't do that, it only fires progress event at interval of 50ms.
3442         WebKit should add the behavior to make the conformance with the spec.
3443
3444         Tests: fast/files/file-reader-event-listener.html
3445
3446         * fileapi/FileReader.cpp:
3447         (WebCore::FileReader::didFinishLoading):
3448